11 lines
No EOL
240 KiB
JavaScript
11 lines
No EOL
240 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.8.8
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),o=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),a=r.namespace,c=r.error,u="module-"+a,d=g(v),f=this,m=d.data(u),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),m=p,d.data(u,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),console!==b&&console.log!==b||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(p.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,o,e,a){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n=!p.moduleExists(t)||(g.fn[t].settings.namespace||!1);p.moduleExists(t)&&(p.verbose("Changing default setting",i,o,t),g.fn[t].settings[i]=o,a&&n&&0<(n=g(":data(module-"+n+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i,o)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n;p.moduleExists(t)&&(p.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),o&&a&&0<(n=g(":data(module-"+a+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||r.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||r.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?m.cache.console===b?p.error(c.console):(p.debug("Restoring console function"),h.console=m.cache.console):(p.debug("Disabling console function"),m.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,p,e);else{if(t===b)return p[e];p[e]=t}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(p.performance.timer),g.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):g.each(o,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),o=[]}},invoke:function(i,e,t){var o,a,n,r=m;return e=e||l,t=f||t,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),o=i.length-1,g.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(g.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==b)return a=r[n],!1;{if(!g.isPlainObject(r[t])||e==o)return r[t]!==b?a=r[t]:p.error(c.method,i),!1;r=r[t]}}})),g.isFunction(a)?n=a.apply(t,e):a!==b&&(n=a),Array.isArray(s)?s.push(n):s!==b?s=[s,n]:n!==b&&(s=n),a}};return n?(m===b&&p.initialize(),p.invoke(t)):(m!==b&&p.destroy(),p.initialize()),s!==b?s:this},g.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},g.extend(g.expr[":"],{data:g.expr.createPseudo?g.expr.createPseudo(function(t){return function(e){return!!g.data(e,t)}}):function(e,t,n){return!!g.data(e,n[3])}})}(jQuery,window,document),function(oe,D,k,ae){"use strict";oe.isFunction=oe.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},D=void 0!==D&&D.Math==Math?D:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),oe.fn.calendar=function(h){var v,e=oe(this),b=e.selector||"",y=(new Date).getTime(),w=[],x=h,C="string"==typeof x,T=[].slice.call(arguments,1),S={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},ie=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var d,e,X=oe.isPlainObject(h)?oe.extend(!0,{},oe.fn.calendar.settings,h):oe.extend({},oe.fn.calendar.settings),K=X.className,t=X.namespace,i=X.selector,J=X.formatter,n=X.parser,Z=X.metadata,_=S[X.minTimeGap],s=X.error,o="."+t,a="module-"+t,r=oe(this),l=r.find(i.input),ee=r.find(i.popup),c=r.find(i.activator),u=this,f=r.data(a),m=!1,te=r.hasClass(K.inverted),p=!1,g=!1,ne={initialize:function(){ne.debug("Initializing calendar for",u,r),d=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),f=ne,r.data(a,f)},destroy:function(){ne.verbose("Destroying previous calendar for",u),r.removeData(a),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(r.data(Z.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(r.data(Z.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",X.on||(l.length?"focus":"click"))},popup:function(){var e,t,n;X.inline||(c.length||(c=r.children().first()).length)&&(oe.fn.popup===ae?ne.error(s.popup):(ee.length||(e=0!==(t=c.parent()).closest(i.append).length?"appendTo":"prependTo",ee=oe("<div/>").addClass(K.popup)[e](t)),ee.addClass(K.calendar),te&&ee.addClass(K.inverted),e=function(){return ne.refreshTooltips(),X.onVisible.apply(ee,arguments)},t=X.onHidden,l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),X.onVisible.apply(ee,arguments)},t=function(){return ne.blur(),X.onHidden.apply(ee,arguments)}),n=ne.setting("on"),n=oe.extend({},X.popupOptions,{popup:ee,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(X.startMode)),X.onShow.apply(ee,arguments)},onVisible:e,onHide:X.onHide,onHidden:t}),ne.popup(n)))},inline:function(){c.length&&!X.inline||(X.inline=!0,ee=oe("<div/>").addClass(K.calendar).appendTo(r),l.length||ee.attr("tabindex","0"))},input:function(){X.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;X.initialDate?e=n.date(X.initialDate,X):r.data(Z.date)!==ae?e=n.date(r.data(Z.date),X):l.length&&(e=n.date(l.val(),X)),ne.set.date(e,X.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=k.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,L,n=ne.get.mode(),i=new Date,j=ne.get.date(),o=ne.get.focusDate(),a=ne.helper.dateInRange(o||j||X.initialDate||i),r=(o||ne.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,N="time"===X.type,H=Math.max(X.multiMonth,1),V=l?ne.get.monthOffset():0,d=a.getMinutes(),f=a.getHours(),m=a.getDate(),z=a.getMonth()+V,p=a.getFullYear(),g=l?X.showWeekNumbers?8:7:c?4:_.column,U=l||c?6:_.row,h=l?H:1,W=(v=ee).hasClass("left")?"right center":"left center";for(v.empty(),1<h&&(L=oe("<div/>").addClass(K.grid).appendTo(v)),t=0;t<h;t++){1<h&&(v=oe("<div/>").addClass(K.column).appendTo(L));var v,b=z+t,B=(new Date(p,b,1).getDay()-X.firstDayOfWeek%7+7)%7,y=(!X.constantHeight&&l&&(y=new Date(p,b+1,0).getDate()+B,U=Math.ceil(y/7)),r?10:s?1:0),w=l?1:0,x=c||u?1:0,C=c||u?m:1,T=new Date(p-y,b-w,C-x,f),w=new Date(p+y,b+w,C+x,f),C=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,b,0):new Date(p,b,m,-1),x=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,b+1,1):new Date(p,b,m+1),S=n,S=(l&&X.showWeekNumbers&&(S+=" andweek"),oe("<table/>").addClass(K.table).addClass(S).addClass(ie[g]+" column").appendTo(v)),D=(te&&S.addClass(K.inverted),g);if(!N){var Y=oe("<thead/>").appendTo(S),k=oe("<tr/>").appendTo(Y),A=oe("<th/>").attr("colspan",""+g).appendTo(k),E=r||s?new Date(p,0,1):l?new Date(p,b,1):new Date(p,b,m,f,d),F=oe("<span/>").addClass(K.link).appendTo(A),E=(F.text(J.header(E,n,X)),s?X.disableYear?"day":"year":l?X.disableMonth?"year":"month":"day");if(F.data(Z.mode,E),0===t&&((F=oe("<span/>").addClass(K.prev).appendTo(A)).data(Z.focusDate,T),F.toggleClass(K.disabledCell,!ne.helper.isDateInRange(C,n)),oe("<i/>").addClass(K.prevIcon).appendTo(F)),t===h-1&&((E=oe("<span/>").addClass(K.next).appendTo(A)).data(Z.focusDate,w),E.toggleClass(K.disabledCell,!ne.helper.isDateInRange(x,n)),oe("<i/>").addClass(K.nextIcon).appendTo(E)),l)for(k=oe("<tr/>").appendTo(Y),X.showWeekNumbers&&((A=oe("<th/>").appendTo(k)).text(X.text.weekNo),A.addClass(K.weekCell),D--),O=0;O<D;O++)(A=oe("<th/>").appendTo(k)).text(J.dayColumnHeader((O+X.firstDayOfWeek)%7,X))}for(var $=oe("<tbody/>").appendTo(S),O=r?10*Math.ceil(p/10)-9:l?1-B:0,Q=0;Q<U;Q++)for(k=oe("<tr/>").appendTo($),l&&X.showWeekNumbers&&((A=oe("<th/>").appendTo(k)).text(ne.get.weekOfYear(p,b,O+1-X.firstDayOfWeek)),A.addClass(K.weekCell)),e=0;e<D;e++,O++){var M,P=r?new Date(O,b,1,f,d):s?new Date(p,O,1,f,d):l?new Date(p,b,O,f,d):c?new Date(p,b,m,O):new Date(p,b,m,f,O*X.minTimeGap),R=r?O:s?X.text.monthsShort[O]:l?P.getDate():J.time(P,X,!0),R=((A=oe("<td/>").addClass(K.cell).appendTo(k)).text(R),A.data(Z.date,P),l&&P.getMonth()!==(b+12)%12),I=!X.selectAdjacentDays&&R||!ne.helper.isDateInRange(P,n)||X.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),q=(I?null!==(q=ne.helper.findDayAsObject(P,n,X.disabledDates))&&q[Z.message]&&(A.attr("data-tooltip",q[Z.message]),A.attr("data-position",q[Z.position]||W),(q[Z.inverted]||te&&q[Z.inverted]===ae)&&A.attr("data-inverted",""),q[Z.variation]&&A.attr("data-variation",q[Z.variation])):null!==(M=ne.helper.findDayAsObject(P,n,X.eventDates))&&(A.addClass(M[Z.class]||X.eventClass),M[Z.message]&&(A.attr("data-tooltip",M[Z.message]),A.attr("data-position",M[Z.position]||W),(M[Z.inverted]||te&&M[Z.inverted]===ae)&&A.attr("data-inverted",""),M[Z.variation]&&A.attr("data-variation",M[Z.variation]))),ne.helper.dateEqual(P,j,n)),G=ne.helper.dateEqual(P,i,n),R=(A.toggleClass(K.adjacentCell,R&&!M),A.toggleClass(K.disabledCell,I),A.toggleClass(K.activeCell,q&&!(R&&I)),c||u||A.toggleClass(K.todayCell,!R&&G),{mode:n,adjacent:R,disabled:I,active:q,today:G});J.cell(A,P,R),ne.helper.dateEqual(P,o,n)&&ne.set.focusDate(P,!1,!1)}X.today&&(T=oe("<tr/>").appendTo($),(C=oe("<td/>").attr("colspan",""+g).addClass(K.today).appendTo(T)).text(J.today(X)),C.data(Z.date,i)),ne.update.focus(!1,S),X.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,o=oe(this),a=o.data(Z.date);a&&(e=o.hasClass(K.disabledCell),t=o.hasClass(K.activeCell),n=o.hasClass(K.adjacentCell),i=ne.helper.dateEqual(a,s,r),a=!!u&&(!!l&&ne.helper.isDateInRange(a,r,l,u)||!!c&&ne.helper.isDateInRange(a,r,u,c)),o.toggleClass(K.focusCell,i&&(!d||m)&&(!n||X.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(o)||o.toggleClass(K.rangeCell,a&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=oe(D).width();ee.find("td[data-position]").each(function(){var e=oe(this),t=D.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),ee.on("mousedown"+o,ne.event.mousedown),ee.on("touchstart"+o,ne.event.mousedown),ee.on("mouseup"+o,ne.event.mouseup),ee.on("touchend"+o,ne.event.mouseup),ee.on("mouseover"+o,ne.event.mouseover),l.length?(l.on("input"+o,ne.event.inputChange),l.on("focus"+o,ne.event.inputFocus),l.on("blur"+o,ne.event.inputBlur),l.on("keydown"+o,ne.event.keydown)):ee.on("keydown"+o,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(o),l.length&&l.off(o)}},event:{mouseover:function(e){var t=oe(e.target).data(Z.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=oe(e.target).data(Z.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t,n,i,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(Z.date)||t.data(Z.focusDate)||t.data(Z.mode)?t:e).data(Z.date),n=e.data(Z.focusDate),i=e.data(Z.mode),t&&!1!==X.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(K.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,o,a,r,s,l=e.which;27!==l&&9!==l||ne.popup("hide"),ne.popup("is visible")&&(37===l||38===l||39===l||40===l?(o="day"===(r=ne.get.mode())?7:"hour"===r?4:"minute"===r?_.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===r?X.minTimeGap:1,a=(t=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===r?o:0),s=t.getMonth()+("month"===r?o:0),n=t.getDate()+("day"===r?o:0),i=t.getHours()+("hour"===r?o:0),o=t.getMinutes()+("minute"===r?o:0),a=new Date(a,s,n,i,o),"time"===X.type&&(a=ne.helper.mergeDateTime(t,a)),ne.helper.isDateInRange(a,r)&&ne.set.focusDate(a)):13===l&&(r=ne.get.mode(),(s=ne.get.focusDate())&&!X.isDisabled(s,r)&&!ne.helper.isDisabled(s,r)&&ne.helper.isEnabled(s,r)&&ne.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=n.date(e,X);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(K.active)},inputBlur:function(){var e;ee.removeClass(K.active),X.formatInput&&(e=ne.get.date(),e=J.datetime(e,X),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(K.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},date:function(){return ne.helper.sanitiseDate(r.data(Z.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(Z.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(X.startCalendar);return(e?e.get.date():r.data(Z.startDate))||null},endDate:function(){var e=ne.get.calendarModule(X.endCalendar);return(e?e.get.date():r.data(Z.endDate))||null},minDate:function(){return r.data(Z.minDate)||null},maxDate:function(){return r.data(Z.maxDate)||null},monthOffset:function(){return r.data(Z.monthOffset)||0},mode:function(){var e=r.data(Z.mode)||X.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===X.type?"hour":"month"===X.type?"month":"year"===X.type?"year":"day"},type:function(){return r.data(Z.type)||X.type},validModes:function(){var e=[];return"time"!==X.type&&(X.disableYear&&"year"!==X.type||e.push("year"),(X.disableMonth||"year"===X.type)&&"month"!==X.type||e.push("month"),0<=X.type.indexOf("date")&&e.push("day")),0<=X.type.indexOf("time")&&(e.push("hour"),X.disableMinute||e.push("minute")),e},isTouch:function(){try{return k.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:oe(e).first()).data(a):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i=ne.get.mode(),o=J.datetime(e,X);if(n&&!1===X.onBeforeChange.call(u,e,o,i))return!1;if(ne.set.focusDate(e),X.isDisabled(e,i))return!1;var a=ne.get.endDate();a&&e&&a<e&&ne.set.endDate(ae),ne.set.dataKeyValue(Z.date,e),t&&l.length&&l.val(o),n&&X.onChange.call(u,e,o,i)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(X.startCalendar);n&&n.set.date(e),ne.set.dataKeyValue(Z.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(X.endCalendar);n&&n.set.date(e),ne.set.dataKeyValue(Z.endDate,e,t)},focusDate:function(e,t,n,i){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var o="day"===ne.get.mode(),a=ne.get.focusDate(),o=(o&&e&&a&&((o=12*(e.getFullYear()-a.getFullYear())+e.getMonth()-a.getMonth())&&(a=ne.get.monthOffset()-o,ne.set.monthOffset(a,!1))),ne.set.dataKeyValue(Z.focusDate,e,!!e&&t));n=!1!==n&&o&&!1===t||p!=i,p=i,n&&ne.update.focus(i)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==X.maxDate&&X.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,X.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(Z.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==X.minDate&&X.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,X.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max(X.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(Z.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||X.disableMinute&&"hour"===n||"date"===X.type&&"day"===n||"month"===X.type&&"month"===n||"year"===X.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,X.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(X.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?X.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(ae)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i)&&("day"===i&&-1!==X.disabledDaysOfWeek.indexOf(n.getDay())||X.disabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[Z.year]?"number"==typeof e[Z.year]?n.getFullYear()==e[Z.year]:Array.isArray(e[Z.year])?-1<e[Z.year].indexOf(n.getFullYear()):void 0:e[Z.month]?"number"==typeof e[Z.month]?n.getMonth()==e[Z.month]:Array.isArray(e[Z.month])?-1<e[Z.month].indexOf(n.getMonth()):e[Z.month]instanceof Date?(t=ne.helper.sanitiseDate(e[Z.month]),n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):void 0:e[Z.date]&&"day"===i?e[Z.date]instanceof Date?ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[Z.date]),i):Array.isArray(e[Z.date])?e[Z.date].some(function(e){return ne.helper.dateEqual(n,e,i)}):void 0:void 0:void 0;var t}))},isEnabled:function(t,n){return"day"!==n||(0===X.enabledDates.length||X.enabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(t,e,n):null!==e&&"object"==typeof e&&e[Z.date]?ne.helper.dateEqual(t,ne.helper.sanitiseDate(e[Z.date]),n):void 0}))},findDayAsObject:function(t,n,e){if("day"===n||"month"===n||"year"===n)for(var i,o=0;o<e.length;o++){if((i="string"==typeof(i=e[o])?ne.helper.sanitiseDate(i):i)instanceof Date&&ne.helper.dateEqual(t,i,n))return(a={})[Z.date]=i,a;if(null!==i&&"object"==typeof i)if(i[Z.year]){if("number"==typeof i[Z.year]&&t.getFullYear()==i[Z.year])return i;if(Array.isArray(i[Z.year])&&-1<i[Z.year].indexOf(t.getFullYear()))return i}else if(i[Z.month]){if("number"==typeof i[Z.month]&&t.getMonth()==i[Z.month])return i;if(Array.isArray(i[Z.month])){if(-1<i[Z.month].indexOf(t.getMonth()))return i}else if(i[Z.month]instanceof Date){var a=ne.helper.sanitiseDate(i[Z.month]);if(t.getMonth()==a.getMonth()&&t.getFullYear()==a.getFullYear())return i}}else if(i[Z.date]&&"day"===n){if(i[Z.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[Z.date]),n))return i;if(Array.isArray(i[Z.date])&&i[Z.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:n.date(""+e,X))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===X.type,o="year"===(n=n||"day"),a=o||"month"===n,r="minute"===n,n=r||"hour"===n;return e=new Date(i?2e3:e.getFullYear(),i||o?0:e.getMonth(),i||a?1:e.getDate(),n?e.getHours():0,r?X.minTimeGap*Math.floor(e.getMinutes()/X.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||o?0:t.getMonth(),i||a?1:t.getDate(),n?t.getHours():0,r?X.minTimeGap*Math.floor(t.getMinutes()/X.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var o;return n||i||(n=(o=ne.get.startDate())&&X.minDate?new Date(Math.max(o,X.minDate)):o||X.minDate,i=X.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),X.minTimeGap*Math.ceil(n.getMinutes()/X.minTimeGap)),!(!e||n&&0<ne.helper.dateDiff(e,n,t)||i&&0<ne.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ne.get.startDate())&&X.minDate?new Date(Math.max(i,X.minDate)):i||X.minDate,n=X.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),X.minTimeGap*Math.ceil(t.getMinutes()/X.minTimeGap));var i="time"===X.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?i?ne.helper.mergeDateTime(e,t):t:n&&0<ne.helper.dateDiff(n,e,"minute")?i?ne.helper.mergeDateTime(e,n):n:e)},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t},isTodayButton:function(e){return e.text()===X.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,X,e);else{if(t===ae)return X[e];oe.isPlainObject(X[e])?oe.extend(!0,X[e],t):X[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(t===ae)return ne[e];ne[e]=t}},debug:function(){!X.silent&&X.debug&&(X.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,X.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!X.silent&&X.verbose&&X.debug&&(X.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,X.name+":"),ne.verbose.apply(console,arguments)))},error:function(){X.silent||(ne.error=Function.prototype.bind.call(console.error,console,X.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,n;X.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=X.name+":",n=0;y=!1,clearTimeout(ne.performance.timer),oe.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==ae||console.table!==ae)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):oe.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var o,a,n,r=f;return e=e||T,t=u||t,"string"==typeof i&&r!==ae&&(i=i.split(/[\. ]/),o=i.length-1,oe.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(oe.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==ae)return a=r[n],!1;{if(!oe.isPlainObject(r[t])||e==o)return r[t]!==ae?a=r[t]:ne.error(s.method,i),!1;r=r[t]}}})),oe.isFunction(a)?n=a.apply(t,e):a!==ae&&(n=a),Array.isArray(v)?v.push(n):v!==ae?v=[v,n]:n!==ae&&(v=n),a}};C?(f===ae&&ne.initialize(),ne.invoke(x)):(f!==ae&&f.invoke("destroy"),ne.initialize())}),v!==ae?v:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!1,type:"datetime",firstDayOfWeek:0,constantHeight:!0,today:!1,closable:!0,monthFirst:!0,touchReadonly:!0,inline:!1,on:null,initialDate:null,startMode:!1,minDate:null,maxDate:null,ampm:!0,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,minTimeGap:5,showWeekNumbers:null,disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{header:function(e,t,n){return"year"===t?n.formatter.yearHeader(e,n):"month"===t?n.formatter.monthHeader(e,n):"day"===t?n.formatter.dayHeader(e,n):"hour"===t?n.formatter.hourHeader(e,n):n.formatter.minuteHeader(e,n)},yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:function(e,t){return e.getFullYear()},dayHeader:function(e,t){return t.text.months[e.getMonth()]+" "+e.getFullYear()},hourHeader:function(e,t){return t.formatter.date(e,t)},minuteHeader:function(e,t){return t.formatter.date(e,t)},dayColumnHeader:function(e,t){return t.text.days[e]},datetime:function(e,t){if(!e)return"";var n="time"===t.type?"":t.formatter.date(e,t),e=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return n+("datetime"===t.type?" ":"")+e},date:function(e,t){if(!e)return"";var n=e.getDate(),i=t.text.months[e.getMonth()],e=e.getFullYear();return"year"===t.type?e:"month"===t.type?i+" "+e:(t.monthFirst?i+" "+n:n+" "+i)+", "+e},time:function(e,t,n){if(!e)return"";var i=e.getHours(),e=e.getMinutes(),o="";return t.ampm&&(o=" "+(i<12?t.text.am:t.text.pm),i=0===i?12:12<i?i-12:i),i+":"+(e<10?"0":"")+e+o},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,n){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim()).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var n,i,o,a=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(a.getDate()))return a;e=e.toLowerCase();var r,s,l,c=-1,u=-1,d=-1,f=-1,m=-1,a=ae,p="time"===t.type,g=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!g)for(a=0<=oe.inArray(t.text.am.toLowerCase(),h)||!(0<=oe.inArray(t.text.pm.toLowerCase(),h))&&ae,n=0;n<v.length;n++)if(0<=(s=v[n]).indexOf(":")){if(u<0||c<0)for(l=s.split(":"),o=0;o<Math.min(2,l.length);o++)i=parseInt(l[o]),isNaN(i)&&(i=0),0===o?u=i%24:c=i%60;v.splice(n,1)}if(!p){for(n=0;n<h.length;n++)if(!((r=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].substring(0,r.length).toLowerCase()===r){f=i+1;break}if(0<=f)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(f<0)for(n=0;n<v.length;n++)if(o=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[o]),!isNaN(i)&&1<=i&&i<=12){f=i,v.splice(o,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&1<=i&&i<=31){d=i,v.splice(n,1);break}if(m<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n]),!isNaN(i)){i<=99&&(i+=t.currentCentury),m=i,v.splice(n,1);break}}if(!g){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(c<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=59){c=i,v.splice(n,1);break}}if(c<0&&u<0&&d<0&&f<0&&m<0)return null;c<0&&(c=0),u<0&&(u=0),d<0&&(d=1),f<0&&(f=1),m<0&&(m=(new Date).getFullYear()),a!==ae&&(a?12===u&&(u=0):u<12&&(u+=12));e=new Date(m,f-1,d,u,c);return e.getMonth()===f-1&&e.getFullYear()===m||(e=new Date(m,f,0,u,c)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,n){return!0},onChange:function(e,t,n){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},onSelect:function(e,t){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input",append:".inline.field,.inline.fields"},regExp:{dateWords:/[^A-Za-z\u00C0-\u024F]+/g,dateNumbers:/[^\d:]+/g},error:{popup:"UI Popup, a required component is not included in this page",method:"The method you called is not defined."},className:{calendar:"calendar",active:"active",popup:"ui popup",grid:"ui equal width grid",column:"column",table:"ui celled center aligned unstackable table",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year"},eventClass:"blue"}}(jQuery,window,document),function(T,e,S,D){"use strict";T.isFunction=T.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")(),T.fn.dimmer=function(g){var h,v=T(this),b=(new Date).getTime(),y=[],w=g,x="string"==typeof w,C=[].slice.call(arguments,1);return v.each(function(){var o,t,a=T.isPlainObject(g)?T.extend(!0,{},T.fn.dimmer.settings,g):T.extend({},T.fn.dimmer.settings),n=a.selector,e=a.namespace,i=a.className,s=a.error,r="."+e,l="module-"+e,c=v.selector||"",u="ontouchstart"in S.documentElement?"touchstart":"click",d=T(this),f=this,m=d.data(l),p={preinitialize:function(){o=p.is.dimmer()?(t=d.parent(),d):(t=d,p.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):p.create())},initialize:function(){p.debug("Initializing dimmer",a),p.bind.events(),p.set.dimmable(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,d.data(l,m)},destroy:function(){p.verbose("Destroying previous module",o),p.unbind.events(),p.remove.variation(),t.off(r)},bind:{events:function(){"hover"==a.on?t.on("mouseenter"+r,p.show).on("mouseleave"+r,p.hide):"click"==a.on&&t.on(u+r,p.toggle),p.is.page()&&(p.debug("Setting as a page dimmer",t),p.set.pageDimmer()),p.is.closable()&&(p.verbose("Adding dimmer close event",o),t.on(u+r,n.dimmer,p.event.click))}},unbind:{events:function(){d.removeData(l),t.off(r)}},event:{click:function(e){p.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!T(e.target).is(n.content)||(p.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=T(e);p.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=T(a.template.dimmer(a));return a.dimmerName&&(p.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=T.isFunction(e)?e:function(){},p.debug("Showing dimmer",o,a),p.set.variation(),p.is.dimmed()&&!p.is.animating()||!p.is.enabled()?p.debug("Dimmer is already shown or disabled"):(p.animate.show(e),a.onShow.call(f),a.onChange.call(f))},hide:function(e){e=T.isFunction(e)?e:function(){},p.is.dimmed()||p.is.animating()?(p.debug("Hiding dimmer",o),p.animate.hide(e),a.onHide.call(f),a.onChange.call(f)):p.debug("Dimmer is not visible")},toggle:function(){p.verbose("Toggling dimmer visibility",o),p.is.dimmed()?p.is.closable()&&p.hide():p.show()},animate:{show:function(e){e=T.isFunction(e)?e:function(){},a.useCSS&&T.fn.transition!==D&&o.transition("is supported")?(a.useFlex?(p.debug("Using flex dimmer"),p.remove.legacy()):(p.debug("Using legacy non-flex dimmer"),p.set.legacy()),"auto"!==a.opacity&&p.set.opacity(),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:p.get.duration(),useFailSafe:!0,onStart:function(){p.set.dimmed()},onComplete:function(){p.set.active(),e()}})):(p.verbose("Showing dimmer animation with javascript"),p.set.dimmed(),"auto"==a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(p.get.duration(),a.opacity,function(){o.removeAttr("style"),p.set.active(),e()}))},hide:function(e){e=T.isFunction(e)?e:function(){},a.useCSS&&T.fn.transition!==D&&o.transition("is supported")?(p.verbose("Hiding dimmer with css"),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:p.get.duration(),useFailSafe:!0,onComplete:function(){p.remove.dimmed(),p.remove.variation(),p.remove.active(),e()}})):(p.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(p.get.duration(),function(){p.remove.dimmed(),p.remove.active(),o.removeAttr("style"),e()}))}},get:{dimmer:function(){return o},duration:function(){return p.is.active()?a.transition.hideDuration||a.duration.hide||a.duration:a.transition.showDuration||a.duration.show||a.duration}},has:{dimmer:function(){return a.dimmerName?0<d.find(n.dimmer).filter("."+a.dimmerName).length:0<d.find(n.dimmer).length}},is:{active:function(){return o.hasClass(i.active)},animating:function(){return o.is(":animated")||o.hasClass(i.animating)},closable:function(){return"auto"==a.closable?"hover"!=a.on:a.closable},dimmer:function(){return d.hasClass(i.dimmer)},dimmable:function(){return d.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!p.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return o.hasClass(i.pageDimmer)}},can:{show:function(){return!o.hasClass(i.disabled)}},set:{opacity:function(e){var t=o.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===a.opacity?0:a.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",p.debug("Setting opacity to",e),o.css("background-color",t)},legacy:function(){o.addClass(i.legacy)},active:function(){o.addClass(i.active)},dimmable:function(){t.addClass(i.dimmable)},dimmed:function(){t.addClass(i.dimmed)},pageDimmer:function(){o.addClass(i.pageDimmer)},disabled:function(){o.addClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.addClass(e)}},remove:{active:function(){o.removeClass(i.active)},legacy:function(){o.removeClass(i.legacy)},dimmed:function(){t.removeClass(i.dimmed)},disabled:function(){o.removeClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.removeClass(e)}},setting:function(e,t){if(p.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,a,e);else{if(t===D)return a[e];T.isPlainObject(a[e])?T.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,p,e);else{if(t===D)return p[e];p[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,a.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),p.verbose.apply(console,arguments)))},error:function(){a.silent||(p.error=Function.prototype.bind.call(console.error,console,a.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(p.performance.timer),T.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==D||console.table!==D)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):T.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=m;return e=e||C,t=f||t,"string"==typeof i&&r!==D&&(i=i.split(/[\. ]/),o=i.length-1,T.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==D)return a=r[n],!1;{if(!T.isPlainObject(r[t])||e==o)return r[t]!==D?a=r[t]:p.error(s.method,i),!1;r=r[t]}}})),T.isFunction(a)?n=a.apply(t,e):a!==D&&(n=a),Array.isArray(h)?h.push(n):h!==D?h=[h,n]:n!==D&&(h=n),a}};p.preinitialize(),x?(m===D&&p.initialize(),p.invoke(w)):(m!==D&&m.invoke("destroy"),p.initialize())}),h!==D?h:this},T.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",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",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=T("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=T("<div/>").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(te,ne,ie,oe){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(W){var B,Y=te(this),$=te(ie),Q=Y.selector||"",G="ontouchstart"in ie.documentElement,X=G?"touchstart":"click",K=(new Date).getTime(),J=[],Z=W,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Y.each(function(L){var d,e,t,n,i,o,a,r,s,f=te.isPlainObject(W)?te.extend(!0,{},te.fn.dropdown.settings,W):te.extend({},te.fn.dropdown.settings),m=f.className,p=f.message,l=f.fields,g=f.keys,h=f.metadata,j=f.namespace,c=f.regExp,v=f.selector,u=f.error,N=f.templates,b="."+j,y="module-"+j,w=te(this),x=te(f.context),C=w.find(v.text),T=w.find(v.search),S=w.find(v.sizer),D=w.find(v.input),H=w.find(v.icon),V=w.find(v.clearIcon),k=0<w.prev().find(v.text).length?w.prev().find(v.text):w.prev(),A=w.children(v.menu),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te(),O=!1,z=!1,U=!1,M=!1,P=this,R=!1,I=w.data(y),q={initialize:function(){q.debug("Initializing dropdown",f),q.is.alreadySetup()?q.setup.reference():(f.ignoreDiacritics&&!String.prototype.normalize&&(f.ignoreDiacritics=!1,q.error(u.noNormalize,P)),q.setup.layout(),f.values&&(q.set.initialLoad(),q.change.values(f.values),q.remove.initialLoad()),q.refreshData(),q.save.defaults(),q.restore.selected(),q.create.id(),q.bind.events(),q.observeChanges(),q.instantiate())},instantiate:function(){q.verbose("Storing instance of dropdown",q),I=q,w.data(y,q)},destroy:function(){q.verbose("Destroying previous dropdown",w),q.remove.tabbable(),q.remove.active(),A.transition("stop all"),A.removeClass(m.visible).addClass(m.hidden),w.off(b).removeData(y),A.off(b),$.off(i),q.disconnect.menuObserver(),q.disconnect.selectObserver(),q.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ne&&(a=new MutationObserver(q.event.select.mutation),r=new MutationObserver(q.event.menu.mutation),s=new MutationObserver(q.event.class.mutation),q.debug("Setting up mutation observer",a,r,s),q.observe.select(),q.observe.menu(),q.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){a&&a.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){q.has.input()&&a&&a.observe(w[0],{childList:!0,subtree:!0})},menu:function(){q.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){q.has.search()&&s&&s.observe(w[0],{attributes:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),i="."+o,q.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i;return!!(e=e||q.get.userValues())&&(e=Array.isArray(e)?e:[e],te.each(e,function(e,t){!1===q.get.item(t)&&(i=f.templates.addition(q.add.variables(p.addResult,t)),i=te("<div />").html(i).attr("data-"+h.value,t).attr("data-"+h.text,t).addClass(m.addition).addClass(m.item),f.hideAdditions&&i.addClass(m.hidden),n=n===oe?i:n.add(i),q.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=q.get.userValues();t&&(q.debug("Adding user labels",t),te.each(t,function(e,t){q.verbose("Adding custom user value"),q.add.label(t,t)}))},menu:function(){A=te("<div />").addClass(m.menu).appendTo(w)},sizer:function(){S=te("<span />").addClass(m.sizer).insertAfter(T)}},search:function(e){e=e!==oe?e:q.get.query(),q.verbose("Searching for query",e),!1===f.fireOnInit&&q.is.initialLoad()?q.verbose("Skipping callback on initial load",f.onSearch):q.has.minCharacters(e)&&!1!==f.onSearch.call(P,e)?q.filter(e):q.hide(null,!0)},select:{firstUnfiltered:function(){q.verbose("Selecting first non-filtered element"),q.remove.selectedItem(),E.not(v.unselectable).not(v.addition+v.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(v.item).not(v.unselectable).eq(0),e=e.prevAll(v.item).not(v.unselectable).eq(0);0<t.length?(q.verbose("Moving selection to",t),t.addClass(m.selected)):(q.verbose("Moving selection to",e),e.addClass(m.selected))}},setup:{api:function(){var e={debug:f.debug,urlData:{value:q.get.value(),query:q.get.query()},on:!1};q.verbose("First request, initializing API"),w.api(e)},layout:function(){w.is("select")&&(q.setup.select(),q.setup.returnedObject()),q.has.menu()||q.create.menu(),q.is.clearable()&&!q.has.clearItem()&&(q.verbose("Adding clear icon"),V=te("<i />").addClass("remove icon").insertBefore(C)),q.is.search()&&!q.has.search()&&(q.verbose("Adding search input"),T=te("<input />").addClass(m.search).prop("autocomplete",q.is.chrome()?"fomantic-search":"off").insertBefore(C)),q.is.multiple()&&q.is.searchSelection()&&!q.has.sizer()&&q.create.sizer(),f.allowTab&&q.set.tabbable()},select:function(){var e=q.get.selectValues();q.debug("Dropdown initialized on a select",e),0<(D=w.is("select")?w:D).parent(v.dropdown).length?(q.debug("UI dropdown already exists. Creating dropdown menu only"),w=D.closest(v.dropdown),q.has.menu()||q.create.menu(),A=w.children(v.menu),q.setup.menu(e)):(q.debug("Creating entire dropdown from select"),w=te("<div />").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(N.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(q.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&q.set.multiple(),D.prop("disabled")&&(q.debug("Disabling dropdown"),w.addClass(m.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(w)),q.refresh()},menu:function(e){A.html(N.menu(e,l,f.preserveHTML,f.className)),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},reference:function(){q.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(v.dropdown),I=w.data(y),P=w.get(0),q.refresh(),q.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,L),t=Y.slice(L+1);Y=e.add(w).add(t)}},refresh:function(){q.refreshSelectors(),q.refreshData()},refreshItems:function(){E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshSelectors:function(){q.verbose("Refreshing selector cache"),C=w.find(v.text),T=w.find(v.search),D=w.find(v.input),H=w.find(v.icon),k=0<w.prev().find(v.text).length?w.prev().find(v.text):w.prev(),A=w.children(v.menu),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshData:function(){q.verbose("Refreshing cached metadata"),E.removeData(h.text).removeData(h.value)},clearData:function(){q.verbose("Clearing metadata"),E.removeData(h.text).removeData(h.value),w.removeData(h.defaultText).removeData(h.defaultValue).removeData(h.placeholderText)},clearItems:function(){A.empty(),q.refreshItems()},toggle:function(){q.verbose("Toggling menu visibility"),q.is.active()?q.hide():q.show()},show:function(e,t){if(e=te.isFunction(e)?e:function(){},(R||M)&&q.is.remote()&&q.is.noApiCache()&&q.clearItems(),!q.can.show()&&q.is.remote()&&(q.debug("No API results retrieved, searching before show"),q.queryRemote(q.get.query(),q.show,[e,t])),q.can.show()&&!q.is.active()){if(q.debug("Showing dropdown"),!q.has.message()||q.has.maxSelections()||q.has.allResultsFiltered()||q.remove.message(),q.is.allFiltered())return!0;!1!==f.onShow.call(P)&&q.animate.show(function(){q.can.click()&&q.bind.intent(),q.has.search()&&!t&&q.focusSearch(),q.set.visible(),e.call(P)})}},hide:function(e,t){e=te.isFunction(e)?e:function(){},q.is.active()&&!q.is.animatingOutward()?(q.debug("Hiding dropdown"),!1!==f.onHide.call(P)&&q.animate.hide(function(){q.remove.visible(),q.is.focusedOnSearch()&&!0!==t&&T.blur(),e.call(P)})):q.can.click()&&q.unbind.intent(),R=M=!1},hideOthers:function(){q.verbose("Finding other dropdowns to hide"),Y.not(w).has(v.menu+"."+m.visible).dropdown("hide")},hideMenu:function(){q.verbose("Hiding menu instantaneously"),q.remove.active(),q.remove.visible(),A.transition("hide")},hideSubMenus:function(){var e=A.children(v.item).find(v.menu);q.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){q.bind.keyboardEvents(),q.bind.inputEvents(),q.bind.mouseEvents()},keyboardEvents:function(){q.verbose("Binding keyboard events"),w.on("keydown"+b,q.event.keydown),q.has.search()&&w.on(q.get.inputEvent()+b,v.search,q.event.input),q.is.multiple()&&$.on("keydown"+i,q.event.document.keydown)},inputEvents:function(){q.verbose("Binding input change events"),w.on("change"+b,v.input,q.event.change)},mouseEvents:function(){q.verbose("Binding mouse events"),q.is.multiple()&&w.on(X+b,v.label,q.event.label.click).on(X+b,v.remove,q.event.remove.click),q.is.searchSelection()?(w.on("mousedown"+b,q.event.mousedown).on("mouseup"+b,q.event.mouseup).on("mousedown"+b,v.menu,q.event.menu.mousedown).on("mouseup"+b,v.menu,q.event.menu.mouseup).on(X+b,v.icon,q.event.icon.click).on(X+b,v.clearIcon,q.event.clearIcon.click).on("focus"+b,v.search,q.event.search.focus).on(X+b,v.search,q.event.search.focus).on("blur"+b,v.search,q.event.search.blur).on(X+b,v.text,q.event.text.focus),q.is.multiple()&&w.on(X+b,q.event.click).on(X+b,q.event.search.focus)):("click"==f.on?w.on(X+b,v.icon,q.event.icon.click).on(X+b,q.event.test.toggle):"hover"==f.on?w.on("mouseenter"+b,q.delay.show).on("mouseleave"+b,q.delay.hide):w.on(f.on+b,q.toggle),w.on("mousedown"+b,q.event.mousedown).on("mouseup"+b,q.event.mouseup).on("focus"+b,q.event.focus).on(X+b,v.clearIcon,q.event.clearIcon.click),q.has.menuSearch()?w.on("blur"+b,v.search,q.event.search.blur):w.on("blur"+b,q.event.blur)),A.on((G?"touchstart":"mouseenter")+b,v.item,q.event.item.mouseenter).on("mouseleave"+b,v.item,q.event.item.mouseleave).on("click"+b,v.item,q.event.item.click)},intent:function(){q.verbose("Binding hide intent event to document"),G&&$.on("touchstart"+i,q.event.test.touch).on("touchmove"+i,q.event.test.touch),$.on(X+i,q.event.test.hide)}},unbind:{intent:function(){q.verbose("Removing hide intent event from document"),G&&$.off("touchstart"+i).off("touchmove"+i),$.off(X+i)}},filter:function(e){function t(){q.is.multiple()&&q.filterActive(),(e||!e&&0==q.get.activeItem().length)&&q.select.firstUnfiltered(),q.has.allResultsFiltered()?f.onNoResults.call(P,n)?f.allowAdditions?f.hideAdditions&&(q.verbose("User addition with no menu, setting empty style"),q.set.empty(),q.hideMenu()):(q.verbose("All items filtered, showing message",n),q.add.message(p.noResults)):(q.verbose("All items filtered, hiding dropdown",n),q.hideMenu()):(q.remove.empty(),q.remove.message()),f.allowAdditions&&q.add.userSuggestion(q.escape.htmlEntities(e)),q.is.searchSelection()&&q.can.show()&&q.is.focusedOnSearch()&&q.show()}var n=e!==oe?e:q.get.query();f.useLabels&&q.has.maxSelections()||(f.apiSettings?q.can.useAPI()?q.queryRemote(n,function(){f.filterRemoteData&&q.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(f.delimiter):[]),q.is.multiple()&&te.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(m.filtered)}),q.focusSearch(!0),t()}):q.error(u.noAPI):(q.filterItems(n),t()))},queryRemote:function(e,n,i){Array.isArray(i)||(i=[i]);e={errorDuration:!1,cache:"local",throttle:f.throttle,urlData:{query:e},onError:function(){q.add.message(p.serverError),R=M=!1,n.apply(null,i)},onFailure:function(){q.add.message(p.serverError),R=M=!1,n.apply(null,i)},onSuccess:function(e){var e=e[l.remoteValues],t=(Array.isArray(e)||(e=[]),q.remove.message(),{});t[l.values]=e,q.setup.menu(t),0!==e.length||f.allowAdditions?""!==(t=q.is.multiple()?q.get.values():q.get.value())&&(q.verbose("Value(s) present after click icon, select value(s) in items"),q.set.selected(t,null,null,!0)):q.add.message(p.noResults),R=M=!1,n.apply(null,i)}};w.api("get request")||q.setup.api(),e=te.extend(!0,{},e,f.apiSettings),w.api("setting",e).api("query")},filterItems:function(e){var n=q.remove.diacritics(e!==oe?e:q.get.query()),i=null,e=q.escape.string(n),t=(f.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);q.has.query()&&(i=[],q.verbose("Searching for matching values",n),E.each(function(){var e,t=te(this);if(t.hasClass(m.unfilterable))return i.push(this),!0;if("both"===f.match||"text"===f.match){if(-1!==(e=q.remove.diacritics(String(q.get.choiceText(t,!1)))).search(o))return i.push(this),!0;if("exact"===f.fullTextSearch&&q.exactSearch(n,e))return i.push(this),!0;if(!0===f.fullTextSearch&&q.fuzzySearch(n,e))return i.push(this),!0}return("both"===f.match||"value"===f.match)&&(-1!==(t=q.remove.diacritics(String(q.get.choiceValue(t,e)))).search(o)||"exact"===f.fullTextSearch&&q.exactSearch(n,t)||!0===f.fullTextSearch&&q.fuzzySearch(n,t))?(i.push(this),!0):void 0})),q.debug("Showing only matched items",n),q.remove.filteredItem(),i&&E.not(i).addClass(m.filtered),q.has.query()?!0===f.hideDividers?F.addClass(m.hidden):"empty"===f.hideDividers&&F.removeClass(m.hidden).filter(function(){var e=te(this).nextUntil(v.item);return 0===(e.length?e:te(this)).nextUntil(v.divider).filter(v.item+":not(."+m.filtered+")").length}).addClass(m.hidden):F.removeClass(m.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=f.ignoreSearchCase?e.toLowerCase():e,t=f.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=f.ignoreSearchCase?e.toLowerCase():e,-1<(t=f.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){f.useLabels&&E.filter("."+m.active).addClass(m.filtered)},focusSearch:function(e){q.has.search()&&!q.is.focusedOnSearch()&&(e?(w.off("focus"+b,v.search),T.focus(),w.on("focus"+b,v.search,q.event.search.focus)):T.focus())},blurSearch:function(){q.has.search()&&T.blur()},forceSelection:function(){var e=E.not(m.filtered).filter("."+m.selected).eq(0),t=E.not(m.filtered).filter("."+m.active).eq(0),e=0<e.length?e:t,t=0<e.length;f.allowAdditions||t&&!q.is.multiple()?(q.debug("Forcing partial selection to selected item",e),q.event.item.click.call(e,{},!0)):q.remove.searchTerm()},change:{values:function(e){f.allowAdditions||q.clear(),q.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,q.setup.menu(t),te.each(e,function(e,t){if(1==t.selected&&(q.debug("Setting initial selection to",t[l.value]),q.set.selected(t[l.value]),!q.is.multiple()))return!1}),q.has.selectInput()&&(q.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),te.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),t=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('<option value="'+n+'">'+t+"</option>")}),q.observe.select())}},event:{change:function(){U||(q.debug("Input changed, updating selection"),q.set.selected())},focus:function(){f.showOnFocus&&!O&&q.is.hidden()&&!t&&(R=!0,q.show())},blur:function(e){t=ie.activeElement===this,O||t||(q.remove.activeLabel(),q.hide())},mousedown:function(){q.is.searchSelection()?n=!0:O=!0},mouseup:function(){q.is.searchSelection()?n=!1:O=!1},click:function(e){te(e.target).is(w)&&(q.is.focusedOnSearch()?q.show():q.focusSearch())},search:{focus:function(e){O=!0,q.is.multiple()&&q.remove.activeLabel(),R||q.is.active()||!(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(R=!0,q.search())},blur:function(e){t=ie.activeElement===this,!q.is.searchSelection()||n||z||t||(f.forceSelection?q.forceSelection():f.allowAdditions||q.remove.searchTerm(),q.hide()),n=!1}},clearIcon:{click:function(e){q.clear(),q.is.searchSelection()&&q.remove.searchTerm(),q.hide(),e.stopPropagation()}},icon:{click:function(e){M=!0,q.has.search()?q.is.active()?q.blurSearch():f.showOnFocus?q.focusSearch():q.toggle():q.toggle(),e.stopPropagation()}},text:{focus:function(e){O=!0,q.focusSearch()}},input:function(e){(q.is.multiple()||q.is.searchSelection())&&q.set.filtered(),clearTimeout(q.timer),q.timer=setTimeout(q.search,f.delay.search)},label:{click:function(e){var t=te(this),n=w.find(v.label),i=n.filter("."+m.active),o=t.nextAll("."+m.active),a=t.prevAll("."+m.active),o=(0<o.length?t.nextUntil(o):t.prevUntil(a)).add(i).add(t);e.shiftKey?(i.removeClass(m.active),o.addClass(m.active)):e.ctrlKey?t.toggleClass(m.active):(i.removeClass(m.active),t.addClass(m.active)),f.onLabelSelect.apply(this,n.filter("."+m.active)),e.stopPropagation()}},remove:{click:function(e){var t=te(this).parent();t.hasClass(m.active)?q.remove.activeLabels():q.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=q.is.multiple()?q.show:q.toggle;q.is.bubbledLabelClick(e)||q.is.bubbledIconClick(e)||(q.is.multiple()&&(!q.is.multiple()||q.is.active())||(R=!0),q.determine.eventOnElement(e,t)&&e.preventDefault())},touch:function(e){q.determine.eventOnElement(e,function(){"touchstart"==e.type?q.timer=setTimeout(function(){q.hide()},f.delay.touch):"touchmove"==e.type&&clearTimeout(q.timer)}),e.stopPropagation()},hide:function(e){q.determine.eventInModule(e,q.hide)&&P.id&&te(e.target).attr("for")===P.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&q.check.disabled()})}},select:{mutation:function(e){q.debug("<select> modified, recreating menu"),q.is.selectMutation(e)&&(q.disconnect.selectObserver(),q.refresh(),q.setup.select(),q.set.selected(),q.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?te(e.addedNodes[0]):te(!1),e=e.removedNodes?te(e.removedNodes[0]):te(!1),t=t.add(e),e=t.is(v.addition)||0<t.closest(v.addition).length,t=t.is(v.message)||0<t.closest(v.message).length;e||t?(q.debug("Updating item selector cache"),q.refreshItems()):(q.debug("Menu modified, updating selector cache"),q.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=te(e.target),n=te(this),i=n.children(v.menu),o=n.siblings(v.item).children(v.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(q.itemTimer),q.itemTimer=setTimeout(function(){q.verbose("Showing sub-menu",i),te.each(o,function(){q.animate.hide(!1,te(this))}),q.animate.show(!1,i)},f.delay.show),e.preventDefault())},mouseleave:function(e){var t=te(this).children(v.menu);0<t.length&&(clearTimeout(q.itemTimer),q.itemTimer=setTimeout(function(){q.verbose("Hiding sub-menu",t),q.animate.hide(!1,t)},f.delay.hide))},click:function(e,t){var n=te(this),e=te(e?e.target:""),i=n.find(v.menu),o=q.get.choiceText(n),a=q.get.choiceValue(n,o),r=0<i.length,i=0<i.find(e).length;"input"!==ie.activeElement.tagName.toLowerCase()&&te(ie.activeElement).blur(),i||r&&!f.allowCategorySelection||(q.is.searchSelection()&&(f.allowAdditions&&q.remove.userAddition(),q.remove.searchTerm(),q.is.focusedOnSearch()||1==t||q.focusSearch(!0)),f.useLabels||(q.remove.filteredItem(),q.set.scrollPosition(n)),q.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t,n,i,o,a,r,s,l,c,u,d,f=e.which;q.is.inObject(f,g)&&((n=(t=w.find(v.label)).filter("."+m.active)).data(h.value),r=t.index(n),s=t.length,i=0<n.length,o=1<n.length,a=0===r,r=r+1==s,s=q.is.searchSelection(),l=q.is.focusedOnSearch(),c=q.is.focused(),d=(u=l&&0===q.get.caretPosition(!1))&&0!==q.get.caretPosition(!0),s&&!i&&!l||(f==g.leftArrow?!c&&!u||i?i&&(e.shiftKey?q.verbose("Adding previous label to selection"):(q.verbose("Selecting previous label"),t.removeClass(m.active)),a&&!o?n.addClass(m.active):n.prev(v.siblingLabel).addClass(m.active).end(),e.preventDefault()):(q.verbose("Selecting previous label"),t.last().addClass(m.active)):f==g.rightArrow?(c&&!i&&t.first().addClass(m.active),i&&(e.shiftKey?q.verbose("Adding next label to selection"):(q.verbose("Selecting next label"),t.removeClass(m.active)),r?s?l?t.removeClass(m.active):q.focusSearch():(o?n.next(v.siblingLabel):n).addClass(m.active):n.next(v.siblingLabel).addClass(m.active),e.preventDefault())):f==g.deleteKey||f==g.backspace?i?(q.verbose("Removing active labels"),r&&s&&!l&&q.focusSearch(),n.last().next(v.siblingLabel).addClass(m.active),q.remove.activeLabels(n),e.preventDefault()):!u||d||i||f!=g.backspace||(q.verbose("Removing last label on input backspace"),n=t.last().addClass(m.active),q.remove.activeLabels(n)):n.removeClass(m.active)))}},keydown:function(e){var t=e.which;if(q.is.inObject(t,g)){var n,i=E.not(v.unselectable).filter("."+m.selected).eq(0),o=A.children("."+m.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+m.filtered+")").addBack():A.children(":not(."+m.filtered+")"),a=i.children(v.menu),r=i.closest(v.menu),s=r.hasClass(m.visible)||r.hasClass(m.animating)||0<r.parent(v.menu).length,l=0<a.length,c=0<i.length,u=0<i.not(v.unselectable).length,d=t==g.delimiter&&f.allowAdditions&&q.is.multiple();if(f.allowAdditions&&f.hideAdditions&&(t==g.enter||d)&&u&&(q.verbose("Selecting item from keyboard shortcut",i),q.event.item.click.call(i,e),q.is.searchSelection()&&q.remove.searchTerm(),q.is.multiple()&&e.preventDefault()),q.is.visible()){if(t!=g.enter&&!d||(t==g.enter&&c&&l&&!f.allowCategorySelection?(q.verbose("Pressed enter on unselectable category, opening sub menu"),t=g.rightArrow):u&&(q.verbose("Selecting item from keyboard shortcut",i),q.event.item.click.call(i,e),q.is.searchSelection()&&(q.remove.searchTerm(),q.is.multiple()&&T.focus())),e.preventDefault()),c&&(t==g.leftArrow&&r[0]!==A[0]&&(q.verbose("Left key pressed, closing sub-menu"),q.animate.hide(!1,r),i.removeClass(m.selected),r.closest(v.item).addClass(m.selected),e.preventDefault()),t==g.rightArrow&&l&&(q.verbose("Right key pressed, opening sub-menu"),q.animate.show(!1,a),i.removeClass(m.selected),a.find(v.item).eq(0).addClass(m.selected),e.preventDefault())),t==g.upArrow){if(n=(c&&s?i.prevAll(v.item+":not("+v.unselectable+")"):E).eq(0),o.index(n)<0)return q.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();q.verbose("Up key pressed, changing active item"),i.removeClass(m.selected),n.addClass(m.selected),q.set.scrollPosition(n),f.selectOnKeydown&&q.is.single()&&q.set.selectedItem(n),e.preventDefault()}if(t==g.downArrow){if(0===(n=(c&&s?i.nextAll(v.item+":not("+v.unselectable+")"):E).eq(0)).length)return q.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();q.verbose("Down key pressed, changing active item"),E.removeClass(m.selected),n.addClass(m.selected),q.set.scrollPosition(n),f.selectOnKeydown&&q.is.single()&&q.set.selectedItem(n),e.preventDefault()}t==g.pageUp&&(q.scrollPage("up"),e.preventDefault()),t==g.pageDown&&(q.scrollPage("down"),e.preventDefault()),t==g.escape&&(q.verbose("Escape key pressed, closing dropdown"),q.hide())}else d&&e.preventDefault(),t!=g.downArrow||q.is.visible()||(q.verbose("Down key pressed, showing dropdown"),q.show(),e.preventDefault())}else q.has.search()||q.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=D[0];t&&(e=ie.createEvent("HTMLEvents"),q.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){d=!0,q.verbose("Determining action",f.action),te.isFunction(q.action[f.action])?(q.verbose("Triggering preset action",f.action,e,t),q.action[f.action].call(P,e,t,this)):te.isFunction(f.action)?(q.verbose("Triggering user action",f.action,e,t),f.action.call(P,e,t,this)):q.error(u.action,f.action),d=!1},eventInModule:function(e,t){var e=te(e.target),n=0<e.closest(ie.documentElement).length,e=0<e.closest(w).length;return t=te.isFunction(t)?t:function(){},n&&!e?(q.verbose("Triggering event",t),t(),!0):(q.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=te(e.target),i=n.closest(v.siblingLabel),e=ie.body.contains(e.target),i=0===w.find(i).length||!(q.is.multiple()&&f.useLabels),n=0===n.closest(A).length;return t=te.isFunction(t)?t:function(){},e&&i&&n?(q.verbose("Triggering event",t),t(),!0):(q.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==oe?t:e,q.can.activate(te(n))&&(q.set.selected(t,te(n)),q.is.multiple()||q.hideAndClear())},select:function(e,t,n){t=t!==oe?t:e,q.can.activate(te(n))&&(q.set.value(t,e,te(n)),q.is.multiple()||q.hideAndClear())},combo:function(e,t,n){q.set.selected(t=t!==oe?t:e,te(n)),q.hideAndClear()},hide:function(e,t,n){q.set.value(t,e,te(n)),q.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return w.data(h.defaultText)},defaultValue:function(){return w.data(h.defaultValue)},placeholderText:function(){return"auto"!=f.placeholder&&"string"==typeof f.placeholder?f.placeholder:w.data(h.placeholderText)||""},text:function(){return f.preserveHTML?C.html():C.text()},query:function(){return String(T.val()).trim()},searchWidth:function(e){return e=e!==oe?e:T.val(),S.text(e),Math.ceil(S.width()+1)},selectionCount:function(){var e=q.get.values();return q.is.multiple()?Array.isArray(e)?e.length:0:""!==q.get.value()?1:0},transition:function(e){return"auto"===f.transition?q.is.upward(e)?"slide up":"slide down":f.transition},userValues:function(){var e=q.get.values();return!!e&&(e=Array.isArray(e)?e:[e],te.grep(e,function(e){return!1===q.get.item(e)}))},uniqueArray:function(n){return te.grep(n,function(e,t){return te.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=T.get(0);return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:ie.selection?(i.focus(),n=(t=ie.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<D.length?D.val():w.data(h.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===oe||t?"":e},values:function(e){var t=q.get.value();return""===t?"":!q.has.selectInput()&&q.is.multiple()?"string"==typeof t?(e?t:q.escape.htmlEntities(t)).split(f.delimiter):"":t},remoteValues:function(){var e=q.get.values(),i=!1;return e&&te.each(e="string"==typeof e?[e]:e,function(e,t){var n=q.read.remoteData(t);q.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=t!==oe?t:f.preserveHTML,e)return 0<e.find(v.menu).length&&(q.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(v.menu).remove(),e.find(v.menuIcon).remove()),e.data(h.text)!==oe?e.data(h.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||q.get.choiceText(e),!!e&&(e.data(h.value)!==oe?String(e.data(h.value)):"string"==typeof t?String(f.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=T[0];return!!e&&(e.oninput!==oe?"input":e.onpropertychange!==oe?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return w.find("option").each(function(){var e=te(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==oe?e.attr("value"):t,o=e.data(h.text)!==oe?e.data(h.text):t,e=e.parent("optgroup");"auto"===f.placeholder&&""===i?a.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:f.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:o,disabled:n}))}),f.placeholder&&"auto"!==f.placeholder&&(q.debug("Setting placeholder value to",f.placeholder),a.placeholder=f.placeholder),f.sortSelect?(!0===f.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===f.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):te.isFunction(f.sortSelect)&&s.sort(f.sortSelect),a[l.values]=s,q.debug("Retrieved and sorted values from select",a)):(a[l.values]=s,q.debug("Retrieved values from select",a)),a},activeItem:function(){return E.filter("."+m.active)},selectedItem:function(){var e=E.not(v.unselectable).filter("."+m.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=q.get.item(e),e=q.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,o,a=!1;return n=n!==oe?n:q.get.values()!==oe?q.get.values():q.get.text(),e=(o=q.is.multiple()&&Array.isArray(n))?0<n.length:n!==oe&&null!==n,i=""===n||!1===n||!0===n||(i||!1),e&&E.each(function(){var e=te(this),t=q.get.choiceText(e),t=q.get.choiceValue(e,t);if(null!==t&&t!==oe)if(o)-1!==te.inArray(q.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(a=a?a.add(e):e);else if(i){if(q.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return a=e,!0}else if(f.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),q.escape.htmlEntities(String(t))===q.escape.htmlEntities(String(n)))return q.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return w.hasClass("column")?"flex":f.displayType}},check:{maxSelections:function(e){return!f.maxSelections||((e=e!==oe?e:q.get.selectionCount())>=f.maxSelections?(q.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(m.filtered),q.add.message(p.maxSelections)),!0):(q.verbose("No longer at maximum selection count"),q.remove.message(),q.remove.filteredItem(),q.is.searchSelection()&&q.filterItems(),!1))},disabled:function(){T.attr("tabindex",q.is.disabled()?-1:0)}},restore:{defaults:function(e){q.clear(e),q.restore.defaultText(),q.restore.defaultValue()},defaultText:function(){var e=q.get.defaultText();e===q.get.placeholderText?(q.debug("Restoring default placeholder text",e),q.set.placeholderText(e)):(q.debug("Restoring default text",e),q.set.text(e))},placeholderText:function(){q.set.placeholderText()},defaultValue:function(){var e=q.get.defaultValue();e!==oe&&(q.debug("Restoring default value",e),""!==e?(q.set.value(e),q.set.selected()):(q.remove.activeItem(),q.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(q.error(u.labels),f.useLabels=!0),q.debug("Restoring selected values"),q.create.userLabels()),q.check.maxSelections()},selected:function(){q.restore.values(),q.is.multiple()?(q.debug("Restoring previously selected values and labels"),q.restore.labels()):q.debug("Restoring previously selected values")},values:function(){q.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&q.get.remoteValues()?q.restore.remoteValues():q.set.selected();var e=q.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),q.remove.initialLoad()},remoteValues:function(){var e=q.get.remoteValues();q.debug("Recreating selected from session data",e),e&&(q.is.single()?te.each(e,function(e,t){q.set.text(t)}):te.each(e,function(e,t){q.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;q.error(u.noStorage)}},save:{defaults:function(){q.save.defaultText(),q.save.placeholderText(),q.save.defaultValue()},defaultValue:function(){var e=q.get.value();q.verbose("Saving default value as",e),w.data(h.defaultValue,e)},defaultText:function(){var e=q.get.text();q.verbose("Saving default text as",e),w.data(h.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&C.hasClass(m.placeholder)&&(e=q.get.text(),q.verbose("Saving placeholder text as",e),w.data(h.placeholderText,e))},remoteData:function(e,t){ne.Storage===oe?q.error(u.noStorage):(q.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e))}},clear:function(e){q.is.multiple()&&f.useLabels?q.remove.labels(w.find(v.label),e):(q.remove.activeItem(),q.remove.selectedItem(),q.remove.filteredItem()),q.set.placeholderText(),q.clearValue(e)},clearValue:function(e){q.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||q.get.selectedItem(),n=t.closest(v.menu),i=n.outerHeight(),o=n.scrollTop(),a=E.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=E.not(v.unselectable),i="up"==e?a.index(t)-i:a.index(t)+i,i=("up"==e?0<=i:i<a.length)?a.eq(i):"up"==e?a.first():a.last();0<i.length&&(q.debug("Scrolling page",e,i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&q.is.single()&&q.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=q.is.multiple(),t=q.is.searchSelection(),n=e&&t,t=t?q.get.query():"",i="string"==typeof t&&0<t.length,o=q.get.searchWidth(),t=""!==t;e&&i&&(q.verbose("Adjusting input width",o,f.glyphWidth),T.css("width",o)),i||n&&t?(q.verbose("Hiding placeholder text"),C.addClass(m.filtered)):e&&(!n||t)||(q.verbose("Showing placeholder text"),C.removeClass(m.filtered))},empty:function(){w.addClass(m.empty)},loading:function(){w.addClass(m.loading)},placeholderText:function(e){e=e||q.get.placeholderText(),q.debug("Setting placeholder text",e),q.set.text(e),C.addClass(m.placeholder)},tabbable:function(){q.is.searchSelection()?(q.debug("Added tabindex to searchable dropdown"),T.val(""),q.check.disabled(),A.attr("tabindex",-1)):(q.debug("Added tabindex to dropdown"),w.attr("tabindex")===oe&&(w.attr("tabindex",0),A.attr("tabindex",-1)))},initialLoad:function(){q.verbose("Setting initial load"),e=!0},activeItem:function(e){f.allowAdditions&&0<e.filter(v.addition).length?e.addClass(m.filtered):e.addClass(m.active)},partialSearch:function(e){var t=q.get.query().length;T.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||q.get.selectedItem()).closest(v.menu),a=e&&0<e.length;t=t!==oe&&t,0===q.get.activeItem().length&&(t=!1),e&&0<o.length&&a&&(e.position().top,o.addClass(m.loading),e=(a=o.scrollTop())-o.offset().top+e.offset().top,t||(i=a+o.height()<e+5,n=e-5<a),q.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(m.loading))},text:function(e){"combo"===f.action?(q.debug("Changing combo button text",e,k),f.preserveHTML?k.html(e):k.text(e)):"activate"===f.action&&(e!==q.get.placeholderText()&&C.removeClass(m.placeholder),q.debug("Changing text",e,C),C.removeClass(m.filtered),f.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=q.get.choiceValue(e),n=q.get.choiceText(e,!1),i=q.get.choiceText(e,!0);q.debug("Setting user selection to item",e),q.remove.activeItem(),q.set.partialSearch(n),q.set.activeItem(e),q.set.selected(t,e),q.set.text(i)},selectedLetter:function(e){var t=E.filter("."+m.selected),n=0<t.length&&q.has.firstLetter(t,e),i=!1;n&&(n=t.nextAll(E).eq(0),q.has.firstLetter(n,e)&&(i=n)),i||E.each(function(){if(q.has.firstLetter(te(this),e))return i=te(this),!1}),i&&(q.verbose("Scrolling to next value with letter",e),q.set.scrollPosition(i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&q.is.single()&&q.set.selectedItem(i))},direction:function(e){"auto"==f.direction?(e?q.is.upward(e)&&q.remove.upward(e):q.remove.upward(),(q.can.openDownward(e)?q.remove:q.set).upward(e),q.is.leftward(e)||q.can.openRightward(e)||q.set.leftward(e)):"upward"==f.direction&&q.set.upward(e)},upward:function(e){(e||w).addClass(m.upward)},leftward:function(e){(e||A).addClass(m.leftward)},value:function(e,t,n,i){e===oe||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection);var o=q.escape.value(e),a=0<D.length,r=q.get.values(),s=e!==oe?String(e):e;if(a){if(!f.allowReselection&&s==r&&(q.verbose("Skipping value update already same value",e,r),!q.is.initialLoad()))return;q.is.single()&&q.has.selectInput()&&q.can.extendSelect()&&(q.debug("Adding user option",e),q.add.optionValue(e)),q.debug("Updating input value",o,r),U=!0,D.val(o),!1===f.fireOnInit&&q.is.initialLoad()?q.debug("Input native change event ignored on initial load"):!0!==i&&q.trigger.change(),U=!1}else q.verbose("Storing value in metadata",o,D),o!==r&&w.data(h.value,s);!1===f.fireOnInit&&q.is.initialLoad()?q.verbose("No callback on initial load",f.onChange):!0!==i&&f.onChange.call(P,e,t,n)},active:function(){w.addClass(m.active)},multiple:function(){w.addClass(m.multiple)},visible:function(){w.addClass(m.visible)},exactly:function(e,t){q.debug("Setting selected to exact values"),q.clear(),q.set.selected(e,t)},selected:function(e,s,l,c){var u=q.is.multiple();(s=f.allowAdditions?s||q.get.itemWithAdditions(e):s||q.get.item(e))&&(q.debug("Setting selected menu item to",s),q.is.multiple()&&q.remove.searchWidth(),q.is.single()?(q.remove.activeItem(),q.remove.selectedItem()):f.useLabels&&q.remove.selectedItem(),s.each(function(){var e=te(this),t=q.get.choiceText(e),n=q.get.choiceValue(e,t),i=e.hasClass(m.filtered),o=e.hasClass(m.active),a=e.hasClass(m.addition),r=u&&1==s.length;u?!o||a?(f.apiSettings&&f.saveRemoteData&&q.save.remoteData(t,n),f.useLabels?(q.add.label(n,t,r),q.add.value(n,t,e),q.set.activeItem(e),q.filterActive(),q.select.nextAvailable(s)):(q.add.value(n,t,e),q.set.text(q.add.variables(p.count)),q.set.activeItem(e))):i||!f.useLabels&&!d||(q.debug("Selected active value, removing label"),q.remove.selected(n)):(f.apiSettings&&f.saveRemoteData&&q.save.remoteData(t,n),c||q.set.text(t),q.set.value(n,t,e,l),e.addClass(m.active).addClass(m.selected))}),c||q.remove.searchTerm())}},add:{label:function(e,t,n){var i,o=q.is.searchSelection()?T:C,a=q.escape.value(e);f.ignoreCase&&(a=a.toLowerCase()),i=te("<a />").addClass(m.label).attr("data-"+h.value,a).html(N.label(a,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,a,t),q.has.label(e)?q.debug("User selection already exists, skipping",a):(f.label.variation&&i.addClass(f.label.variation),!0===n?(q.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(o).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(q.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(v.message),e=f.templates.message(q.add.variables(e));0<t.length?t.html(e):te("<div/>").html(e).addClass(m.message).appendTo(A)},optionValue:function(e){var t=q.escape.value(e);0<D.find('option[value="'+q.escape.string(t)+'"]').length||(q.disconnect.selectObserver(),q.is.single()&&(q.verbose("Removing previous user addition"),D.find("option."+m.addition).remove()),te("<option/>").prop("value",t).addClass(m.addition).html(e).appendTo(D),q.verbose("Adding user addition as an <option>",e),q.observe.select())},userSuggestion:function(e){var t=A.children(v.addition),n=q.get.item(e),n=n&&n.not(v.addition).length,i=0<t.length;f.useLabels&&q.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(h.value,e).data(h.text,e).attr("data-"+h.value,e).attr("data-"+h.text,e).removeClass(m.filtered),f.hideAdditions||(n=f.templates.addition(q.add.variables(p.addResult,e)),t.html(n)),q.verbose("Replacing user suggestion with new value",t)):((t=q.create.userChoice(e)).prependTo(A),q.verbose("Adding item choice to menu corresponding with user choice addition",t)),f.hideAdditions&&!q.is.allFiltered()||t.addClass(m.selected).siblings().removeClass(m.selected),q.refreshItems()))},variables:function(e,t){var n,i=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return q.verbose("Adding templated variables to message",e),i&&(n=q.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=q.get.selectionCount(),e=e.replace("{maxCount}",f.maxSelections)),a&&(i=t||q.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,o=q.get.values(!0);q.has.value(e)?q.debug("Value already selected"):""===e?q.debug("Cannot select blank values from multiselect"):(i=Array.isArray(o)?(i=o.concat([e]),q.get.uniqueArray(i)):[e],q.has.selectInput()?q.can.extendSelect()&&(q.debug("Adding value to select",e,i,D),q.add.optionValue(e)):(i=i.join(f.delimiter),q.debug("Setting hidden input to delimited value",i,D)),!1===f.fireOnInit&&q.is.initialLoad()?q.verbose("Skipping onadd callback on initial load",f.onAdd):f.onAdd.call(P,e,t,n),q.set.value(i,t,n),q.check.maxSelections())}},remove:{active:function(){w.removeClass(m.active)},activeLabel:function(){w.find(v.label).removeClass(m.active)},empty:function(){w.removeClass(m.empty)},loading:function(){w.removeClass(m.loading)},initialLoad:function(){e=!1},upward:function(e){(e||w).removeClass(m.upward)},leftward:function(e){(e||A).removeClass(m.leftward)},visible:function(){w.removeClass(m.visible)},activeItem:function(){E.removeClass(m.active)},filteredItem:function(){f.useLabels&&q.has.maxSelections()||((f.useLabels&&q.is.multiple()?E.not("."+m.active):E).removeClass(m.filtered),f.hideDividers&&F.removeClass(m.hidden),q.remove.empty())},optionValue:function(e){var e=q.escape.value(e),t=D.find('option[value="'+q.escape.string(e)+'"]');0<t.length&&t.hasClass(m.addition)&&(a&&(a.disconnect(),q.verbose("Temporarily disconnecting mutation observer")),t.remove(),q.verbose("Removing user addition as an <option>",e),a&&a.observe(D[0],{childList:!0,subtree:!0}))},message:function(){A.children(v.message).remove()},searchWidth:function(){T.css("width","")},searchTerm:function(){q.verbose("Cleared search term"),T.val(""),q.set.filtered()},userAddition:function(){E.filter(v.addition).remove()},selected:function(e,t,i){if(!(t=f.allowAdditions?t||q.get.itemWithAdditions(e):t||q.get.item(e)))return!1;t.each(function(){var e=te(this),t=q.get.choiceText(e),n=q.get.choiceValue(e,t);q.is.multiple()?f.useLabels?(q.remove.value(n,t,e,i),q.remove.label(n)):(q.remove.value(n,t,e,i),0===q.get.selectionCount()?q.set.placeholderText():q.set.text(q.add.variables(p.count))):q.remove.value(n,t,e,i),e.removeClass(m.filtered).removeClass(m.active),f.useLabels&&e.removeClass(m.selected)})},selectedItem:function(){E.removeClass(m.selected)},value:function(e,t,n,i){var o,a=q.get.values();e=q.escape.htmlEntities(e),q.has.selectInput()?(q.verbose("Input is <select> removing selected option",e),o=q.remove.arrayValue(e,a),q.remove.optionValue(e)):(q.verbose("Removing from delimited values",e),o=(o=q.remove.arrayValue(e,a)).join(f.delimiter)),!1===f.fireOnInit&&q.is.initialLoad()?q.verbose("No callback on initial load",f.onRemove):f.onRemove.call(P,e,t,n),q.set.value(o,t,n,i),q.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=te.grep(e,function(e){return t!=e}),q.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=q.escape.value(e),e=w.find(v.label).filter("[data-"+h.value+'="'+q.escape.string(f.ignoreCase?e.toLowerCase():e)+'"]');q.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||w.find(v.label).filter("."+m.active),q.verbose("Removing active label selections",e),q.remove.labels(e)},labels:function(e,o){e=e||w.find(v.label),q.verbose("Removing labels",e),e.each(function(){var e=te(this),t=e.data(h.value),n=t!==oe?String(t):t,i=q.is.userValue(n);!1===f.onLabelRemove.call(e,t)?q.debug("Label remove callback cancelled removal"):(q.remove.message(),i?(q.remove.value(n,n,q.get.item(n),o),q.remove.label(n)):q.remove.selected(n,!1,o))})},tabbable:function(){q.is.searchSelection()?(q.debug("Searchable dropdown initialized"),T.removeAttr("tabindex")):(q.debug("Simple selection dropdown initialized"),w.removeAttr("tabindex")),A.removeAttr("tabindex")},diacritics:function(e){return f.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return q.has.search()&&0<T.closest(A).length},clearItem:function(){return 0<V.length},search:function(){return 0<T.length},sizer:function(){return 0<S.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return f.minCharacters&&!M?(e=e!==oe?String(e):String(q.get.query())).length>=f.minCharacters:!(M=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=q.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(v.menu).length},message:function(){return 0!==A.children(v.message).length},label:function(e){var e=q.escape.value(e),t=w.find(v.label);return f.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+h.value+'="'+q.escape.string(e)+'"]').length},maxSelections:function(){return f.maxSelections&&q.get.selectionCount()>=f.maxSelections},allResultsFiltered:function(){var e=E.not(v.addition);return e.filter(v.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(v.addition).length},query:function(){return""!==q.get.query()},value:function(e){return f.ignoreCase?q.has.valueIgnoringCase(e):q.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=q.get.values(!0);return!!(Array.isArray(t)?t&&-1!==te.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=q.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),te.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return w.hasClass(m.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return te(e.target).is("select, input")&&0<w.closest("label").length},bubbledIconClick:function(e){return 0<te(e.target).closest(H).length},chrome:function(){return!(!ne.chrome||!ne.chrome.webstore&&!ne.chrome.runtime)},alreadySetup:function(){return w.is("select")&&w.parent(v.dropdown).data(y)!==oe&&0===w.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):A.transition&&A.transition("is animating")},leftward:function(e){return(e||A).hasClass(m.leftward)},clearable:function(){return w.hasClass(m.clearable)||f.clearable},disabled:function(){return w.hasClass(m.disabled)},focused:function(){return ie.activeElement===w[0]},focusedOnSearch:function(){return ie.activeElement===T[0]},allFiltered:function(){return(q.is.multiple()||q.has.search())&&!(0==f.hideAdditions&&q.has.userSuggestion())&&!q.has.message()&&q.has.allResultsFiltered()},hidden:function(e){return!q.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return te.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return w.hasClass(m.multiple)},remote:function(){return f.apiSettings&&q.can.useAPI()},noApiCache:function(){return f.apiSettings&&!f.apiSettings.cache},single:function(){return!q.is.multiple()},selectMutation:function(e){var n=!1;return te.each(e,function(e,t){if(te(t.target).is("select")||te(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return w.hasClass(m.search)},searchSelection:function(){return q.has.search()&&1===T.parent(v.dropdown).length},selection:function(){return w.hasClass(m.selection)},userValue:function(e){return-1!==te.inArray(e,q.get.userValues())},upward:function(e){return(e||w).hasClass(m.upward)},visible:function(e){return(e||A).hasClass(m.visible)},verticallyScrollableContext:function(){var e=x.get(0)!==ne&&x.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=x.get(0)!==ne&&x.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!f.useLabels||(!q.has.maxSelections()||!(!q.has.maxSelections()||!e.hasClass(m.active)))},openDownward:function(e){var t,e=e||A,n=!0;return e.addClass(m.loading),t={context:{offset:x.get(0)===ne?{top:0,left:0}:x.offset(),scrollTop:x.scrollTop(),height:x.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},q.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),q.has.subMenu(e)&&(t.menu.height+=e.find(v.menu).first().outerHeight()),n=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(q.verbose("Dropdown can fit in context downward",t),!0):t.above?(q.verbose("Dropdown cannot fit below, opening upward",t),!1):(q.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(m.loading),n},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(m.loading),t={context:{offset:x.get(0)===ne?{top:0,left:0}:x.offset(),scrollLeft:x.scrollLeft(),width:x.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},q.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(q.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(m.loading),n},click:function(){return G||"click"==f.on},extendSelect:function(){return f.allowAdditions||f.apiSettings},show:function(){return!q.is.disabled()&&(q.has.items()||q.has.message())},useAPI:function(){return te.fn.api!==oe}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){q.hideSubMenus(),q.hideOthers(),q.set.active()};e=te.isFunction(e)?e:function(){},q.verbose("Doing menu show animation",n),q.set.direction(t),t=f.transition.showMethod||q.get.transition(t),q.is.selection()&&q.set.scrollPosition(q.get.selectedItem(),!0),(q.is.hidden(n)||q.is.animating(n))&&("none"===t?(i(),n.transition({displayType:q.get.displayType()}).transition("show"),e.call(P)):te.fn.transition!==oe&&w.transition("is supported")?n.transition({animation:t+" in",debug:f.debug,verbose:f.verbose,duration:f.transition.showDuration||f.duration,queue:!0,onStart:i,displayType:q.get.displayType(),onComplete:function(){e.call(P)}}):q.error(u.noTransition,t))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){q.can.click()&&q.unbind.intent(),q.remove.active()},t=f.transition.hideMethod||q.get.transition(t);e=te.isFunction(e)?e:function(){},(q.is.visible(n)||q.is.animating(n))&&(q.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:q.get.displayType()}).transition("hide"),e.call(P)):te.fn.transition!==oe&&w.transition("is supported")?n.transition({animation:t+" out",duration:f.transition.hideDuration||f.duration,debug:f.debug,verbose:f.verbose,queue:!1,onStart:i,displayType:q.get.displayType(),onComplete:function(){e.call(P)}}):q.error(u.transition))}},hideAndClear:function(){q.remove.searchTerm(),q.has.maxSelections()||(q.has.search()?q.hide(function(){q.remove.filteredItem()}):q.hide())},delay:{show:function(){q.verbose("Delaying show event to ensure user intent"),clearTimeout(q.timer),q.timer=setTimeout(q.show,f.delay.show)},hide:function(){q.verbose("Delaying hide event to ensure user intent"),clearTimeout(q.timer),q.timer=setTimeout(q.hide,f.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(c.quote),o=[];return i||!n?e:(q.debug("Encoding quote values for use in select",e),t?(te.each(e,function(e,t){o.push(t.replace(c.quote,"""))}),o):e.replace(c.quote,"""))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(q.debug("Changing setting",e,t),te.isPlainObject(e))te.extend(!0,f,e);else{if(t===oe)return f[e];te.isPlainObject(f[e])?te.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(te.isPlainObject(e))te.extend(!0,q,e);else{if(t===oe)return q[e];q[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?q.performance.log(arguments):(q.debug=Function.prototype.bind.call(console.info,console,f.name+":"),q.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?q.performance.log(arguments):(q.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),q.verbose.apply(console,arguments)))},error:function(){f.silent||(q.error=Function.prototype.bind.call(console.error,console,f.name+":"),q.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(K||t),K=t,J.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(q.performance.timer),q.performance.timer=setTimeout(q.performance.display,500)},display:function(){var e=f.name+":",n=0;K=!1,clearTimeout(q.performance.timer),te.each(J,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",Q&&(e+=" '"+Q+"'"),(console.group!==oe||console.table!==oe)&&0<J.length&&(console.groupCollapsed(e),console.table?console.table(J):te.each(J,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),J=[]}},invoke:function(i,e,t){var o,a,n,r=I;return e=e||ee,t=P||t,"string"==typeof i&&r!==oe&&(i=i.split(/[\. ]/),o=i.length-1,te.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(te.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==oe)return a=r[n],!1;{if(!te.isPlainObject(r[t])||e==o)return r[t]!==oe?a=r[t]:q.error(u.method,i),!1;r=r[t]}}})),te.isFunction(a)?n=a.apply(t,e):a!==oe&&(n=a),Array.isArray(B)?B.push(n):B!==oe?B=[B,n]:n!==oe&&(B=n),a}};_?(I===oe&&q.initialize(),q.invoke(Z)):(I!==oe&&I.invoke("destroy"),q.initialize())}),B!==oe?B:Y},te.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:ne,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return te(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},te.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var o=e.placeholder||!1,a="",r=te.fn.dropdown.settings.templates.escape;return a=(a=(a=(a+='<i class="dropdown icon"></i>')+(o?'<div class="default text">'+r(o,n)+"</div>":'<div class="text"></div>'))+('<div class="'+i.menu+'">'))+te.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,l,c,u){var e=e[l.values]||[],d="",f=te.fn.dropdown.settings.templates.escape,m=te.fn.dropdown.settings.templates.deQuote;return te.each(e,function(e,t){var n,i,o,a,r=t[l.type]||"item",s=-1!==r.indexOf("menu");"item"===r||s?(n=t[l.text]?' data-text="'+m(t[l.text],!0)+'"':"",o=t[l.disabled]?u.disabled+" ":"",a=t[l.descriptionVertical]?u.descriptionVertical+" ":"",i=""!=f(t[l.description]||"",c),d+='<div class="'+o+a+(t[l.class]?m(t[l.class]):u.item)+'" data-value="'+m(t[l.value],!0)+'"'+n+">",s&&(d+='<i class="'+(-1!==r.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[l.image]&&(d+='<img class="'+(t[l.imageClass]?m(t[l.imageClass]):u.image)+'" src="'+m(t[l.image])+'">'),t[l.icon]&&(d+='<i class="'+m(t[l.icon])+" "+(t[l.iconClass]?m(t[l.iconClass]):u.icon)+'"></i>'),i&&(d=(d+='<span class="'+u.description+'">'+f(t[l.description]||"",c)+"</span>")+(s?"":'<span class="'+u.text+'">')),s&&(d+='<span class="'+u.text+'">'),d+=f(t[l.name]||"",c),s?d=(d=d+'</span><div class="'+r+'">')+te.fn.dropdown.settings.templates.menu(t,l,c,u)+"</div>":i&&(d+="</span>"),d+="</div>"):"header"===r&&(o=f(t[l.name]||"",c),a=t[l.icon]?m(t[l.icon]):u.groupIcon,""===o&&""===a||(d+='<div class="'+(t[l.class]?m(t[l.class]):u.header)+'">',""!==a&&(d+='<i class="'+a+" "+(t[l.iconClass]?m(t[l.iconClass]):u.icon)+'"></i>'),d=d+o+"</div>"),t[l.divider]&&(d+='<div class="'+u.divider+'"></div>'))}),d},label:function(e,t,n,i){return(0,te.fn.dropdown.settings.templates.escape)(t,n)+'<i class="'+i.delete+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(R,I,q,L){"use strict";R.isFunction=R.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),R.fn.form=function(T){var S,D=R(this),k=D.selector||"",A=(new Date).getTime(),E=[],F=T,O=arguments[1],M="string"==typeof F,P=[].slice.call(arguments,1);return D.each(function(){var n,d,t,e,f,l,m,p,g,i,c,o,a,s,u,h=R(this),v=this,b=[],y=!1,r=!1,w=!1,x=["clean","clean"],C={initialize:function(){C.get.settings(),M?(u===L&&C.instantiate(),C.invoke(F)):(u!==L&&(u.invoke("destroy"),C.refresh()),C.verbose("Initializing form validation",h,f),C.bindEvents(),C.set.defaults(),f.autoCheckRequired&&C.set.autoCheck(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),u=C,h.data(a,C)},destroy:function(){C.verbose("Destroying previous module",u),C.removeEvents(),h.removeData(a)},refresh:function(){C.verbose("Refreshing selector cache"),n=h.find(p.field),d=h.find(p.group),t=h.find(p.message),h.find(p.prompt),e=h.find(p.submit),h.find(p.clear),h.find(p.reset)},submit:function(){C.verbose("Submitting form",h),r=!0,h.submit()},attachEvents:function(e,t){t=t||"submit",R(e).on("click"+s,function(e){C[t](),e.preventDefault()})},bindEvents:function(){C.verbose("Attaching form events"),h.on("submit"+s,C.validate.form).on("blur"+s,p.field,C.event.field.blur).on("click"+s,p.submit,C.submit).on("click"+s,p.reset,C.reset).on("click"+s,p.clear,C.clear),f.keyboardShortcuts&&h.on("keydown"+s,p.field,C.event.field.keydown),n.each(function(e,t){var t=R(t),n=t.prop("type"),n=C.get.changeEvent(n,t);t.on(n+s,C.event.field.change)}),f.preventLeaving&&R(I).on("beforeunload"+s,C.event.beforeUnload),n.on("change click keyup keydown blur",function(e){C.determine.isDirty()}),h.on("dirty"+s,function(e){f.onDirty.call()}),h.on("clean"+s,function(e){f.onClean.call()})},clear:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(d),o=i.find(p.prompt),a=t.closest(p.uiCalendar),r=t.data(m.defaultValue)||"",s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<a.length&&C.can.useElement("calendar");i.hasClass(g.error)&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),o.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?a.calendar("clear"):(C.verbose("Resetting field value",t,r),t.val(""))}),C.remove.states()},reset:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(d),o=t.closest(p.uiCalendar),a=i.find(p.prompt),r=t.data(m.defaultValue),s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<o.length&&C.can.useElement("calendar"),u=i.hasClass(g.error);r!==L&&(u&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),a.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(C.verbose("Resetting checkbox value",n,r),t.prop("checked",r)):c?o.calendar("set date",r):(C.verbose("Resetting field value",t,r),t.val(r)))}),C.remove.states()},determine:{isValid:function(){var n=!0;return R.each(l,function(e,t){C.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;n.each(function(e,t){var t=R(t),n=0<t.filter(p.checkbox).length?C.is.checkboxDirty(t):C.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i|=n}),i?C.set.dirty():C.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(f.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(p.checkbox)?!e.is(":checked"):C.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(C.verbose("Checking if field is valid",e),C.validate.field(l[e],e,!!n)):(C.verbose("Checking if form is valid"),R.each(l,function(e,t){C.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return w},clean:function(){return!w},fieldDirty:function(e){var t=e.data(m.defaultValue),e=(null==t?t="":Array.isArray(t)&&(t=t.toString()),e.val()),n=(null==e?e="":Array.isArray(e)&&(e=e.toString()),/^(true|false)$/i);return n.test(t)&&n.test(e)?!new RegExp("^"+t+"$","i").test(e):e!==t},checkboxDirty:function(e){return e.data(m.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===x[0]},justClean:function(){return"clean"===x[0]}},removeEvents:function(){h.off(s),n.off(s),e.off(s),n.off(s)},event:{field:{keydown:function(e){var t=R(this),n=e.which,i=t.is(p.input),o=t.is(p.checkbox),a=0<t.closest(p.uiDropdown).length,r=13;n==27&&(C.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||a||o||(y||(t.one("keyup"+s,C.event.field.keyup),C.submit(),C.debug("Enter pressed on input submitting form")),y=!0)},keyup:function(){y=!1},blur:function(e){var t=R(this),n=t.closest(d),i=C.get.validation(t);i&&("blur"==f.on||n.hasClass(g.error)&&f.revalidate)&&(C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0))},change:function(e){var t=R(this),n=t.closest(d),i=C.get.validation(t);i&&("change"==f.on||n.hasClass(g.error)&&f.revalidate)&&(clearTimeout(C.timer),C.timer=setTimeout(function(){C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(C.is.dirty()&&!r)return(e=e||I.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!C.is.bracketedRule(e))&&(e.value!==L?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return C.is.bracketedRule(e)?e.type.replace(e.type.match(f.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":C.get.inputEvent()},inputEvent:function(){return q.createElement("input").oninput!==L?"input":q.createElement("input").onpropertychange!==L?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return R.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},R.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=C.get.ruleName(e),o=C.get.ancillaryValue(e),a=C.get.field(t.identifier),r=a.val(),r=R.isFunction(e.prompt)?e.prompt(r):e.prompt||f.prompt[i]||f.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return o&&0<=o.indexOf("..")&&(n=o.split("..",2),e.prompt||(r+=(""===n[0]?f.prompt.maxValue.replace(/\{ruleValue\}/g,"{max}"):""===n[1]?f.prompt.minValue.replace(/\{ruleValue\}/g,"{min}"):f.prompt.range).replace(/\{name\}/g," "+f.text.and)),r=(r=r.replace(/\{min\}/g,n[0])).replace(/\{max\}/g,n[1])),s&&(r=r.replace(/\{value\}/g,a.val())),l&&(s=1==(n=a.closest(p.group).find("label").eq(0)).length?n.text():a.prop("placeholder")||f.text.unspecifiedField,r=r.replace(/\{name\}/g,s)),r=(r=r.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,o),e.prompt||C.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;R.isPlainObject(T)?0<(e=Object.keys(T)).length&&(T[e[0]].identifier!==L&&T[e[0]].rules!==L)?(f=R.extend(!0,{},R.fn.form.settings,O),l=R.extend({},R.fn.form.settings.defaults,T),C.error(f.error.oldSyntax,v),C.verbose("Extending settings from legacy parameters",l,f)):(T.fields&&(T.fields=C.get.fieldsFromShorthand(T.fields)),f=R.extend(!0,{},R.fn.form.settings,T),l=R.extend({},R.fn.form.settings.defaults,f.fields),C.verbose("Extending settings",l,f)):(f=R.fn.form.settings,l=R.fn.form.settings.defaults,C.verbose("Using default form validation",l,f)),o=f.namespace,m=f.metadata,p=f.selector,g=f.className,i=f.regExp,c=f.error,a="module-"+o,s="."+o,((u=h.data(a))||C).refresh()},field:function(e){var t;return C.verbose("Finding field with identifier",e),e=C.escape.string(e),0<(t=n.filter("#"+e)).length||0<(t=n.filter('[name="'+e+'"]')).length||0<(t=n.filter('[name="'+e+'[]"]')).length||0<(t=n.filter("[data-"+m.validate+'="'+e+'"]')).length?t:R("<input/>")},fields:function(e){var n=R();return R.each(e,function(e,t){n=n.add(C.get.field(t))}),n},validation:function(i){var o,a;return!!l&&(R.each(l,function(e,n){a=n.identifier||e,R.each(C.get.field(a),function(e,t){if(t==i[0])return n.identifier=a,o=n,!1})}),o||!1)},value:function(e){var t=[];return t.push(e),C.get.values.call(v,t)[e]},values:function(e){var e=Array.isArray(e)?C.get.fields(e):n,d={};return e.each(function(e,t){var t=R(t),n=t.closest(p.uiCalendar),i=t.prop("name"),o=t.val(),a=t.is(p.checkbox),r=t.is(p.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&C.can.useElement("calendar"),t=!!a&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),d[i]||(d[i]=[]),a?t?d[i].push(o||!0):d[i].push(!1):d[i].push(o);else if(r)d[i]!==L&&!1!==d[i]||(d[i]=!!t&&(o||!0));else if(a)d[i]=!!t&&(o||!0);else if(l){var c=n.calendar("get date");if(null!==c){if("date"==f.dateHandling)d[i]=c;else if("input"==f.dateHandling)d[i]=n.calendar("get input date");else if("formatter"==f.dateHandling){var u=n.calendar("setting","type");switch(u){case"date":d[i]=f.formatter.date(c);break;case"datetime":d[i]=f.formatter.datetime(c);break;case"time":d[i]=f.formatter.time(c);break;case"month":d[i]=f.formatter.month(c);break;case"year":d[i]=f.formatter.year(c);break;default:C.debug("Wrong calendar mode",n,u),d[i]=""}}}else d[i]=""}else d[i]=o}),d},dirtyFields:function(){return n.filter(function(e,t){return R(t).data(m.isDirty)})}},has:{field:function(e){return C.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=C.escape.string(e))&&C.error(c.identifier,e),0<n.filter("#"+e).length||(0<n.filter('[name="'+e+'"]').length||0<n.filter("[data-"+m.validate+'="'+e+'"]').length)}},can:{useElement:function(e){return R.fn[e]!==L||(C.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){C.add.field(e,t)},field:function(n,e){l[n]!==L&&l[n].rules!==L||(l[n]={rules:[]});var i={rules:[]};C.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],R.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,R.each(i.rules,function(e,t){0==R.grep(l[n].rules,function(e){return e.type==t.type}).length&&l[n].rules.push(t)}),C.debug("Adding rules",i.rules,l)},fields:function(e){l=R.extend({},l,C.get.fieldsFromShorthand(e))},prompt:function(e,t,n){var i=C.get.field(e).closest(d),o=i.children(p.prompt),a=0!==o.length;t="string"==typeof t?[t]:t,C.verbose("Adding field error state",e),n||i.addClass(g.error),f.inline&&(a||(o=f.templates.prompt(t,g.label)).appendTo(i),o.html(t[0]),a?C.verbose("Inline errors are disabled, no inline error added",e):f.transition&&C.can.useElement("transition")&&h.transition("is supported")?(C.verbose("Displaying error with css transition",f.transition),o.transition(f.transition+" in",f.duration)):(C.verbose("Displaying error with fallback javascript animation"),o.fadeIn(f.duration)))},errors:function(e){C.debug("Adding form error messages",e),C.set.error(),t.html(f.templates.error(e))}},remove:{errors:function(){C.debug("Removing form error messages"),t.empty()},states:function(){h.removeClass(g.error).removeClass(g.success),f.inline||C.remove.errors(),C.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];if(l[n]!==L&&Array.isArray(l[n].rules))return e===L?(C.debug("Removed all rules"),void(l[n].rules=[])):void R.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(C.debug("Removed rule",t.type),l[n].rules.splice(e,1))})},field:function(e){e=Array.isArray(e)?e:[e];R.each(e,function(e,t){C.remove.rule(t)})},rules:function(e,n){Array.isArray(e)?R.each(e,function(e,t){C.remove.rule(t,n)}):C.remove.rule(e,n)},fields:function(e){C.remove.field(e)},prompt:function(e){var t=C.get.field(e).closest(d),n=t.children(p.prompt);t.removeClass(g.error),f.inline&&n.is(":visible")&&(C.verbose("Removing prompt for field",e),f.transition&&C.can.useElement("transition")&&h.transition("is supported")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){h.removeClass(g.error).addClass(g.success)},defaults:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=0<t.filter(p.checkbox).length,o=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),a=t.closest(p.uiCalendar),r=0<a.length&&C.can.useElement("calendar"),i=i?t.is(":checked"):t.val();o?n.dropdown("save defaults"):r&&a.calendar("refresh"),t.data(m.defaultValue,i),t.data(m.isDirty,!1)})},error:function(){h.removeClass(g.success).addClass(g.error)},value:function(e,t){var n={};return n[e]=t,C.set.values.call(v,n)},values:function(e){R.isEmptyObject(e)||R.each(e,function(e,t){var n,i=C.get.field(e),o=i.parent(),e=i.closest(p.uiCalendar),a=Array.isArray(t),r=o.is(p.uiCheckbox)&&C.can.useElement("checkbox"),s=o.is(p.uiDropdown)&&C.can.useElement("dropdown"),l=i.is(p.radio)&&r,c=0<e.length&&C.can.useElement("calendar");0<i.length&&(a&&r?(C.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),R.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(C.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(p.uiCheckbox).checkbox("check")):r?(C.verbose("Setting checkbox value",t,o),!0===t||1===t?o.checkbox("check"):o.checkbox("uncheck")):s?(C.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(C.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){C.verbose("Setting state dirty"),w=!0,x[0]=x[1],x[1]="dirty",C.is.justClean()&&h.trigger("dirty")},clean:function(){C.verbose("Setting state clean"),w=!1,x[0]=x[1],x[1]="clean",C.is.justDirty()&&h.trigger("clean")},asClean:function(){C.set.defaults(),C.set.clean()},asDirty:function(){C.set.defaults(),C.set.dirty()},autoCheck:function(){C.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=R(t),t=R(t).closest(d),i=0<n.filter(p.checkbox).length,o=n.prop("required")||t.hasClass(g.required)||t.parent().hasClass(g.required),t=n.is(":disabled")||t.hasClass(g.disabled)||t.parent().hasClass(g.disabled),a=C.get.validation(n),r=!!a&&0!==R.grep(a.rules,function(e){return"empty"==e.type}),a=a.identifier||n.attr("id")||n.attr("name")||n.data(m.validate);!o||t||r||a===L||(i?(C.verbose("Adding 'checked' rule on field",a),C.add.rule(a,"checked")):(C.verbose("Adding 'empty' rule on field",a),C.add.rule(a,"empty")))})},optional:function(n,i){i=!1!==i,R.each(l,function(e,t){n!=e&&n!=t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=C.get.values();if(y)return!1;if(b=[],C.determine.isValid()){if(C.debug("Form has no validation errors, submitting"),C.set.success(),f.inline||C.remove.errors(),!0!==t)return f.onSuccess.call(v,e,i)}else if(C.debug("Form has errors"),r=!1,C.set.error(),f.inline||C.add.errors(b),e&&h.data("moduleApi")!==L&&e.stopImmediatePropagation(),f.errorFocus&&(e=!0,"string"==typeof f.errorFocus?(e=(n=R(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+g.error).first().find(p.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(v,b,i)},field:function(i,e,o){o=o===L||o,"string"==typeof i&&(C.verbose("Validating field",i),i=l[e=i]);var a=i.identifier||e,e=C.get.field(a),t=!!i.depends&&C.get.field(i.depends),r=!0,s=[];return i.identifier||(C.debug("Using field name as identifier",a),i.identifier=a),!e.filter(":not(:disabled)").length?C.debug("Field is disabled. Skipping",a):i.optional&&C.is.blank(e)?C.debug("Field is optional and blank. Skipping",a):i.depends&&C.is.empty(t)?C.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==L&&(o&&e.closest(d).removeClass(g.error),R.each(i.rules,function(e,t){var n;C.has.field(a)&&0<(n=C.validate.rule(i,t,!0)||[]).length&&(C.debug("Field is invalid",a,t.type),s.push(C.get.prompt(t,i)),r=!1,o&&R(n).closest(d).addClass(g.error))})),r?(o&&(C.remove.prompt(a,s),f.onValid.call(e)),!0):(o&&(b=b.concat(s),C.add.prompt(a,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?R(e).filter(":checked"):R(e)).val())===L||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,h)}var e=C.get.field(e.identifier),o=C.get.ancillaryValue(n),a=C.get.ruleName(n),r=f.rules[a],s=[],l=e.is(p.checkbox);if(R.isFunction(r))return l?i(e)||(s=e):R.each(e,function(e,t){i(t)||s.push(t)}),t?s:!(0<s.length);C.error(c.noRule,a)}},setting:function(e,t){if(R.isPlainObject(e))R.extend(!0,f,e);else{if(t===L)return f[e];f[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,C,e);else{if(t===L)return C[e];C[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,f.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),C.verbose.apply(console,arguments)))},error:function(){f.silent||(C.error=Function.prototype.bind.call(console.error,console,f.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(C.performance.timer),R.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),1<D.length&&(e+=" ("+D.length+")"),(console.group!==L||console.table!==L)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):R.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var o,a,n,r=u;return e=e||P,t=v||t,"string"==typeof i&&r!==L&&(i=i.split(/[\. ]/),o=i.length-1,R.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(R.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==L)return a=r[n],!1;{if(!R.isPlainObject(r[t])||e==o)return r[t]!==L&&(a=r[t]),!1;r=r[t]}}})),R.isFunction(a)?n=a.apply(t,e):a!==L&&(n=a),Array.isArray(S)?S.push(n):S!==L?S=[S,n]:n!==L&&(S=n),a}};C.initialize()}),S!==L?S:this},R.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!1,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]), textarea, select',group:".field",input:'input:not([type="file"])',message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noElement:"This module requires ui {element}"},templates:{error:function(e){var n='<ul class="list">';return R.each(e,function(e,t){n+="<li>"+t+"</li>"}),R(n+="</ul>")},prompt:function(e,t){return R("<div/>").addClass(t).html(e[0])}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===L||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<R(this).filter(":checked").length},email:function(e){return R.fn.form.settings.regExp.email.test(e)},url:function(e){return R.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){if(t instanceof RegExp)return e.match(t);var n,i=t.match(R.fn.form.settings.regExp.flags);return i&&(t=2<=i.length?i[1]:t,n=3<=i.length?i[2]:""),e.match(new RegExp(t,n))},minValue:function(e,t){return R.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return R.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return R.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n){var i,o;return(n="string"==typeof n?R.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=R.fn.form.settings.regExp.integer),t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?n.test(t)&&(i=o=+t):(t=t.split("..",2),n.test(t[0])&&(i=+t[0]),n.test(t[1])&&(o=+t[1]))),n.test(e)&&(i===L||i<=e)&&(o===L||e<=o)},decimal:function(e,t){return R.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return R.fn.form.settings.rules.range(e,t,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return e!==L&&e.length>=t},length:function(e,t){return e!==L&&e.length>=t},exactLength:function(e,t){return e!==L&&e.length==t},maxLength:function(e,t){return e!==L&&e.length<=t},match:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==L&&e.toString()==i.toString()},different:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==L&&e.toString()!==i.toString()},creditCard:function(n,e){var i,o={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s\-]/g,""),e&&(R.each(e,function(e,t){(i=o[t])&&(i={length:-1!==R.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&i.pattern&&(a=!0)}),!a))return!1;if((e={number:-1!==R.inArray(n.length,o.unionPay.length),pattern:-1!==n.search(o.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,r=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],l=0;t--;)l+=s[r][parseInt(n.charAt(t),10)],r^=1;return l%10==0&&0<l}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document),function(H,V,z,U){"use strict";H.isFunction=H.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},V=void 0!==V&&V.Math==Math?V:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),H.fn.modal=function(A){var E,e=H(this),F=H(V),O=H(z),M=H("body"),P=e.selector||"",R=(new Date).getTime(),I=[],q=A,L="string"==typeof q,j=[].slice.call(arguments,1),N=V.requestAnimationFrame||V.mozRequestAnimationFrame||V.webkitRequestAnimationFrame||V.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,i,t,r,s,n,l,c,u=H.isPlainObject(A)?H.extend(!0,{},H.fn.modal.settings,A):H.extend({},H.fn.modal.settings),d=u.selector,f=u.className,m=u.namespace,p=u.fields,g=u.error,h="."+m,v="module-"+m,b=H(this),y=H(u.context),w=b.find(d.close),x=this,C=b.hasClass("modal")?b.data(v):U,T=!1,S="",D="",k={initialize:function(){var a;b.hasClass("modal")||(k.create.modal(),H.isFunction(u.onHidden)||(u.onHidden=function(){k.destroy(),b.remove()})),b.addClass(u.class),""!==u.title&&b.find(d.title).html(k.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&b.find(d.content).html(k.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),k.has.configActions()&&(0===(a=b.find(d.actions).addClass(u.classActions)).length?a=H("<div/>",{class:f.actions+" "+(u.classActions||"")}).appendTo(b):a.empty(),u.actions.forEach(function(e){var t=e[p.icon]?'<i class="'+k.helpers.deQuote(e[p.icon])+' icon"></i>':"",n=k.helpers.escape(e[p.text]||"",u.preserveHTML),i=k.helpers.deQuote(e[p.class]||""),o=e[p.click]&&H.isFunction(e[p.click])?e[p.click]:function(){};a.append(H("<button/>",{html:t+n,class:f.button+" "+i,click:function(){!1!==o.call(x,b)&&k.hide()}}))})),k.cache={},k.verbose("Initializing dimmer",y),k.create.id(),k.create.dimmer(),u.allowMultiple&&k.create.innerDimmer(),u.centered||b.addClass("top aligned"),k.refreshModals(),k.bind.events(),u.observeChanges&&k.observeChanges(),k.instantiate(),u.autoShow&&k.show()},instantiate:function(){k.verbose("Storing instance of modal"),C=k,b.data(v,C)},create:{modal:function(){b=H("<div/>",{class:f.modal}),u.closeIcon&&(w=H("<i/>",{class:f.close}),b.append(w)),""!==u.title&&H("<div/>",{class:f.title}).appendTo(b),""!==u.content&&H("<div/>",{class:f.content}).appendTo(b),k.has.configActions()&&H("<div/>",{class:f.actions}).appendTo(b),y.append(b)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=H.extend(!0,e,u.dimmerSettings);H.fn.dimmer===U?k.error(g.dimmer):(k.debug("Creating dimmer"),i=y.dimmer(e),u.detachable?(k.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",b)):k.set.undetached(),t=i.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").substr(2,8),n="."+l,k.verbose("Creating unique id for element",l)},innerDimmer:function(){0==b.find(d.dimmer).length&&b.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){c&&c.disconnect(),k.verbose("Destroying previous modal"),b.removeData(v).off(h),F.off(n),t.off(n),w.off(h),y.dimmer("destroy")},observeChanges:function(){"MutationObserver"in V&&((c=new MutationObserver(function(e){k.debug("DOM tree modified, refreshing"),k.refresh()})).observe(x,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",c))},refresh:function(){k.remove.scrolling(),k.cacheSizes(),k.can.useFlex()||k.set.modalOffset(),k.set.screenHeight(),k.set.type()},refreshModals:function(){a=b.siblings(d.modal),o=a.add(b)},attachEvents:function(e,t){var n=H(e);t=H.isFunction(k[t])?k[t]:k.toggle,0<n.length?(k.debug("Attaching modal events to element",e,t),n.off(h).on("click"+h,t)):k.error(g.notFound,e)},bind:{events:function(){k.verbose("Attaching events"),b.on("click"+h,d.close,k.event.close).on("click"+h,d.approve,k.event.approve).on("click"+h,d.deny,k.event.deny),F.on("resize"+n,k.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",k.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",k.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return b},settings:function(){return u}},event:{approve:function(){T||!1===u.onApprove.call(x,H(this))?k.verbose("Approve callback returned false cancelling hide"):(T=!0,k.hide(function(){T=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){T||!1===u.onDeny.call(x,H(this))?k.verbose("Deny callback returned false cancelling hide"):(T=!0,k.hide(function(){T=!1}))},close:function(){k.hide()},mousedown:function(e){var t=H(e.target),n=k.is.rtl();(r=0<t.closest(d.modal).length)&&k.verbose("Mouse down event registered inside the modal"),(s=k.is.scrolling()&&(!n&&H(V).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&k.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(r)k.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)k.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<H(e.target).closest(d.modal).length,e=H.contains(z.documentElement,e.target);if(!t&&e&&k.is.active()&&b.hasClass(f.front)){if(k.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!k.hideAll())return}else if(!k.hide())return;k.remove.clickaway()}}else k.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(k.timer),k.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(u.closable?(k.debug("Escape key pressed hiding modal"),b.hasClass(f.front)&&k.hide()):k.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(k.is.animating()||k.is.active())&&N(k.refresh)}},toggle:function(){k.is.active()||k.is.animating()?k.hide():k.show()},show:function(e){e=H.isFunction(e)?e:function(){},k.refreshModals(),k.set.dimmerSettings(),k.set.dimmerStyles(),k.showModal(e)},hide:function(e){return e=H.isFunction(e)?e:function(){},k.refreshModals(),k.hideModal(e)},showModal:function(e){e=H.isFunction(e)?e:function(){},k.is.animating()||!k.is.active()?(k.showDimmer(),k.cacheSizes(),k.set.bodyMargin(),k.can.useFlex()?k.remove.legacy():(k.set.legacy(),k.set.modalOffset(),k.debug("Using non-flex legacy modal positioning.")),k.set.screenHeight(),k.set.type(),k.set.clickaway(),!u.allowMultiple&&k.others.active()?k.hideOthers(k.showModal):(T=!1,u.allowMultiple&&(k.others.active()&&a.filter("."+f.active).find(d.dimmer).addClass("active"),u.detachable&&b.detach().appendTo(t)),u.onShow.call(x),u.transition&&H.fn.transition!==U&&b.transition("is supported")?(k.debug("Showing modal with css animations"),b.transition({debug:u.debug,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(x),u.keyboardShortcuts&&k.add.keyboardShortcuts(),k.save.focus(),k.set.active(),u.autofocus&&k.set.autofocus(),e()}})):k.error(g.noTransition))):k.debug("Modal is already visible")},hideModal:function(e,t,n){var i=a.filter("."+f.active).last();if(e=H.isFunction(e)?e:function(){},k.debug("Hiding modal"),!1===u.onHide.call(x,H(this)))return k.verbose("Hide callback returned false cancelling hide"),T=!1;(k.is.animating()||k.is.active())&&(u.transition&&H.fn.transition!==U&&b.transition("is supported")?(k.remove.active(),b.transition({debug:u.debug,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){k.others.active()||k.others.animating()||t||k.hideDimmer(),u.keyboardShortcuts&&!k.others.active()&&k.remove.keyboardShortcuts()},onComplete:function(){k.unbind.scrollLock(),u.allowMultiple&&(i.addClass(f.front),b.removeClass(f.front),(n?o:i).find(d.dimmer).removeClass("active")),H.isFunction(u.onHidden)&&u.onHidden.call(x),k.remove.dimmerStyles(),k.restore.focus(),e()}})):k.error(g.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(k.save.bodyMargin(),k.debug("Showing dimmer"),i.dimmer("show")):k.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(k.unbind.scrollLock(),i.dimmer("hide",function(){k.restore.bodyMargin(),k.remove.clickaway(),k.remove.screenHeight()})):k.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+f.active+", ."+f.animating);if(n=H.isFunction(n)?n:function(){},0<e.length)return k.debug("Hiding all visible modals"),i=!0,H(e.get().reverse()).each(function(e,t){i=i&&H(t).modal("hide modal",n,!1,!0)}),i&&k.hideDimmer(),i},hideOthers:function(e){var t=a.filter("."+f.active+", ."+f.animating);e=H.isFunction(e)?e:function(){},0<t.length&&(k.debug("Hiding other modals",a),t.modal("hide modal",e,!0))},others:{active:function(){return 0<a.filter("."+f.active).length},animating:function(){return 0<a.filter("."+f.animating).length}},add:{keyboardShortcuts:function(){k.verbose("Adding keyboard shortcuts"),O.on("keyup"+h,k.event.keyboard)}},save:{focus:function(){0<H(z.activeElement).closest(b).length||(e=H(z.activeElement).blur())},bodyMargin:function(){S=M.css("margin-"+(k.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(S.replace(/[^\d.]/g,"")),t=V.innerWidth-z.documentElement.clientWidth;D=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";M.css("margin-"+n,S),M.find(d.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){b.removeClass(f.active)},legacy:function(){b.removeClass(f.legacy)},clickaway:function(){u.detachable||b.off("mousedown"+n),t.off("mousedown"+n),t.off("mouseup"+n)},dimmerStyles:function(){t.removeClass(f.inverted),i.removeClass(f.blurring)},bodyStyle:function(){""===M.attr("style")&&(k.verbose("Removing style attribute"),M.removeAttr("style"))},screenHeight:function(){k.debug("Removing page height"),M.css("height","")},keyboardShortcuts:function(){k.verbose("Removing keyboard shortcuts"),O.off("keyup"+h)},scrolling:function(){i.removeClass(f.scrolling),b.removeClass(f.scrolling)}},cacheSizes:function(){b.addClass(f.loading);var e=b.prop("scrollHeight"),t=b.outerWidth(),n=b.outerHeight();k.cache.pageHeight!==U&&0===n||(H.extend(k.cache,{pageHeight:H(z).outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:("body"==u.context?H(V):i).height()}),k.cache.topOffset=-k.cache.height/2),b.removeClass(f.loading),k.debug("Caching modal and container sizes",k.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return k.cache.leftBodyScrollbar===U&&(k.cache.leftBodyScrollbar=k.is.rtl()&&(k.is.iframe&&!k.is.firefox()||k.is.safari()||k.is.edge()||k.is.ie())),k.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!k.is.ie():(u.useFlex&&k.is.ie()?k.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&k.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=k.cache.contextHeight,t=k.cache.contextHeight/2,n=k.cache.topOffset,i=k.cache.scrollHeight,o=k.cache.height,a=u.padding;return o<i?t+n+i+a<e:o+2*a<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length}},is:{active:function(){return b.hasClass(f.active)},ie:function(){var e,t;return k.cache.isIE===U&&(e=!V.ActiveXObject&&"ActiveXObject"in V,t="ActiveXObject"in V,k.cache.isIE=e||t),k.cache.isIE},animating:function(){return b.transition("is supported")?b.transition("is animating"):b.is(":visible")},scrolling:function(){return i.hasClass(f.scrolling)},modernBrowser:function(){return!(V.ActiveXObject||"ActiveXObject"in V)},rtl:function(){return k.cache.isRTL===U&&(k.cache.isRTL="rtl"===M.attr("dir")||"rtl"===M.css("direction")),k.cache.isRTL},safari:function(){return k.cache.isSafari===U&&(k.cache.isSafari=/constructor/i.test(V.HTMLElement)||!!V.ApplePaySession),k.cache.isSafari},edge:function(){return k.cache.isEdge===U&&(k.cache.isEdge=!!V.setImmediate&&!k.is.ie()),k.cache.isEdge},firefox:function(){return k.cache.isFirefox===U&&(k.cache.isFirefox=!!V.InstallTrigger),k.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=b.find("[tabindex], :input").filter(":visible").filter(function(){return 0===H(this).closest(".disabled").length}),t=e.filter("[autofocus]"),t=(0<t.length?t:e).first();0<t.length&&t.focus()},bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";(u.detachable||k.can.fit())&&M.css("margin-"+n,D+"px"),M.find(d.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+D+"px)")})},clickaway:function(){u.detachable||b.on("mousedown"+n,k.event.mousedown),t.on("mousedown"+n,k.event.mousedown),t.on("mouseup"+n,k.event.mouseup)},dimmerSettings:function(){var e;H.fn.dimmer===U?k.error(g.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:k.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=H.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=e.variation!==U?e.variation+" inverted":"inverted"),y.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(f.inverted):t.removeClass(f.inverted),u.blurring?i.addClass(f.blurring):i.removeClass(f.blurring)},modalOffset:function(){var e;u.detachable?b.css({marginTop:!b.hasClass("aligned")&&k.can.fit()?-k.cache.height/2:u.padding/2,marginLeft:-k.cache.width/2}):(e=k.can.fit(),b.css({top:!b.hasClass("aligned")&&e?H(z).scrollTop()+(k.cache.contextHeight-k.cache.height)/2:!e||b.hasClass("top")?H(z).scrollTop()+u.padding:H(z).scrollTop()+(k.cache.contextHeight-k.cache.height-u.padding),marginLeft:-k.cache.width/2})),k.verbose("Setting modal offset for legacy mode")},screenHeight:function(){k.can.fit()?M.css("height",""):b.hasClass("bottom")||(k.debug("Modal is taller than page content, resizing page height"),M.css("height",k.cache.height+2*u.padding))},active:function(){b.addClass(f.active+" "+f.front),a.filter("."+f.active).removeClass(f.front)},scrolling:function(){i.addClass(f.scrolling),b.addClass(f.scrolling),k.unbind.scrollLock()},legacy:function(){b.addClass(f.legacy)},type:function(){k.can.fit()?(k.verbose("Modal fits on screen"),k.others.active()||k.others.animating()||(k.remove.scrolling(),k.bind.scrollLock())):b.hasClass("bottom")?k.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(k.verbose("Modal cannot fit on screen setting to scrolling"),k.set.scrolling())},undetached:function(){i.addClass(f.undetached)}},setting:function(e,t){if(k.debug("Changing setting",e,t),H.isPlainObject(e))H.extend(!0,u,e);else{if(t===U)return u[e];H.isPlainObject(u[e])?H.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(H.isPlainObject(e))H.extend(!0,k,e);else{if(t===U)return k[e];k[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,u.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),k.verbose.apply(console,arguments)))},error:function(){u.silent||(k.error=Function.prototype.bind.call(console.error,console,u.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(R||t),R=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=u.name+":",n=0;R=!1,clearTimeout(k.performance.timer),H.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",P&&(e+=" '"+P+"'"),(console.group!==U||console.table!==U)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):H.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var o,a,n,r=C;return e=e||j,t=x||t,"string"==typeof i&&r!==U&&(i=i.split(/[\. ]/),o=i.length-1,H.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(H.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==U)return a=r[n],!1;{if(!H.isPlainObject(r[t])||e==o)return r[t]!==U&&(a=r[t]),!1;r=r[t]}}})),H.isFunction(a)?n=a.apply(t,e):a!==U&&(n=a),Array.isArray(E)?E.push(n):E!==U?E=[E,n]:n!==U&&(E=n),a}};L?(C===U&&(H.isFunction(u.templates[q])&&(u.autoShow=!0,u.className.modal=u.className.template,u=H.extend(!0,{},u,u.templates[q].apply(k,j)),f=u.className,u.namespace,p=u.fields,g=u.error),k.initialize()),H.isFunction(u.templates[q])||k.invoke(q)):(C!==U&&C.invoke("destroy"),k.initialize(),E=b)}),E!==U?E:this},H.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},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",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input"},text:{ok:"Ok",cancel:"Cancel"}},H.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return H.isPlainObject(e[0])?H.extend({handler:function(){},content:"",title:""},e[0]):(H.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===H(H.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(H(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(L,j,N,H){"use strict";L.isFunction=L.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),L.fn.popup=function(S){var D,e=L(this),k=L(N),A=L(j),E=L("body"),F=e.selector||"",O="ontouchstart"in N.documentElement?"touchstart":"click",M=(new Date).getTime(),P=[],R=S,I="string"==typeof R,q=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,u=L.isPlainObject(S)?L.extend(!0,{},L.fn.popup.settings,S):L.extend({},L.fn.popup.settings),i=u.selector,d=u.className,f=u.error,m=u.metadata,o=u.namespace,a="."+u.namespace,r="module-"+o,p=L(this),l=L(u.context),g=L(u.scrollContext),h=L(u.boundary),v=u.target?L(u.target):p,b=0,y=!1,w=!1,x=this,C=p.data(r),T={initialize:function(){T.debug("Initializing",p),T.createID(),T.bind.events(),!T.exists()&&u.preserve&&T.create(),u.observeChanges&&T.observeChanges(),T.instantiate()},instantiate:function(){T.verbose("Storing instance",T),C=T,p.data(r,C)},observeChanges:function(){"MutationObserver"in j&&((e=new MutationObserver(T.event.documentChanged)).observe(N,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",e))},refresh:function(){u.popup?c=L(u.popup).eq(0):u.inline&&(c=v.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=T.get.offsetParent(),c.removeClass(d.loading),u.movePopup&&T.has.popup()&&T.get.offsetParent(c)[0]!==s[0]&&(T.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=u.inline?T.get.offsetParent(v):T.has.popup()?T.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(T.debug("Setting page as offset parent"),s=E),T.get.variation()&&T.set.variation()},reposition:function(){T.refresh(),T.set.position()},destroy:function(){T.debug("Destroying previous module"),e&&e.disconnect(),c&&!u.preserve&&T.removePopup(),clearTimeout(T.hideTimer),clearTimeout(T.showTimer),T.unbind.close(),T.unbind.events(),p.removeData(r)},event:{start:function(e){var t=L.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(T.hideTimer),w&&!u.addTouchEvents||(T.showTimer=setTimeout(T.show,t))},end:function(){var e=L.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(T.showTimer),T.hideTimer=setTimeout(T.hide,e)},touchstart:function(e){w=!0,u.addTouchEvents&&T.show()},resize:function(){T.is.visible()&&T.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==x||0<L(e).find(x).length)&&(T.debug("Element removed from DOM, tearing down events"),T.destroy())})})},hideGracefully:function(e){var t=L(e.target),n=L.contains(N.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(T.debug("Click occurred outside popup hiding popup"),T.hide()):T.debug("Click was inside popup, keeping popup open")}},create:function(){var e=T.get.html(),t=T.get.title(),n=T.get.content();e||n||t?(T.debug("Creating pop-up html"),e=e||u.templates.popup({title:t,content:n}),c=L("<div/>").addClass(d.popup).data(m.activator,p).html(e),u.inline?(T.verbose("Inserting popup element inline",c),c.insertAfter(p)):(T.verbose("Appending popup element to body",c),c.appendTo(l)),T.refresh(),T.set.variation(),u.hoverable&&T.bind.popup(),u.onCreate.call(c,x)):u.popup?(L(u.popup).data(m.activator,p),T.verbose("Used popup specified in settings"),T.refresh(),u.hoverable&&T.bind.popup()):0!==v.next(i.popup).length?(T.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(i.popup).data(m.activator,p),T.refresh(),u.hoverable&&T.bind.popup()):T.debug("No content specified skipping display",x)},createID:function(){n=(Math.random().toString(16)+"000000000").substr(2,8),t="."+n,T.verbose("Creating unique id for element",n)},toggle:function(){T.debug("Toggling pop-up"),T.is.hidden()?(T.debug("Popup is hidden, showing pop-up"),T.unbind.close(),T.show()):(T.debug("Popup is visible, hiding pop-up"),T.hide())},show:function(e){e=e||function(){},T.debug("Showing pop-up",u.transition),!T.is.hidden()||T.is.active()&&T.is.dropdown()||(T.exists()||T.create(),!1===u.onShow.call(c,x)?T.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||T.refresh(),c&&T.set.position()&&(T.save.conditions(),u.exclusive&&T.hideAll(),T.animate.show(e))))},hide:function(e){e=e||function(){},(T.is.visible()||T.is.animating())&&(!1===u.onHide.call(c,x)?T.debug("onHide callback returned false, cancelling popup animation"):(T.remove.visible(),T.unbind.close(),T.restore.conditions(),T.animate.hide(e)))},hideAll:function(){L(i.popup).filter("."+d.popupVisible).each(function(){L(this).data(m.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?T.has.popup():1<=c.closest(l).length)},removePopup:function(){T.has.popup()&&!u.popup&&(T.debug("Removing popup",c),c.remove(),c=H,u.onRemove.call(c,x))},save:{conditions:function(){T.cache={title:p.attr("title")},T.cache.title&&p.removeAttr("title"),T.verbose("Saving original attributes",T.cache.title)}},restore:{conditions:function(){return T.cache&&T.cache.title&&(p.attr("title",T.cache.title),T.verbose("Restoring original attributes",T.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=L.isFunction(e)?e:function(){},u.transition&&L.fn.transition!==H&&p.transition("is supported")?(T.set.visible(),c.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,duration:u.transition.showDuration||u.duration,onComplete:function(){T.bind.close(),e.call(c,x),u.onVisible.call(c,x)}})):T.error(f.noTransition)},hide:function(e){e=L.isFunction(e)?e:function(){},T.debug("Hiding pop-up"),u.transition&&L.fn.transition!==H&&p.transition("is supported")?c.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,onComplete:function(){T.reset(),e.call(c,x),u.onHidden.call(c,x)}}):T.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return p.removeData(m.html),p.data(m.html)||u.html},title:function(){return p.removeData(m.title),p.data(m.title)||u.title},content:function(){return p.removeData(m.content),p.data(m.content)||u.content||p.attr("title")},variation:function(){return p.removeData(m.variation),p.data(m.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=T.get.offsetParent(c),t=v[0],n=h[0]==j,i=v.offset(),o=u.inline||u.popup&&u.movePopup?v.offsetParent().offset():{top:0,left:0},a=n?{top:0,left:0}:h.offset(),r={},n=n?{top:A.scrollTop(),left:A.scrollLeft()}:{top:0,left:0},r={target:{element:v[0],width:v.outerWidth(),height:v.outerHeight(),top:i.top-o.top,left:i.left-o.left,margin:{}},popup:{width:c.outerWidth(),height:c.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:n.top,left:n.left},width:h.width(),height:h.height()}};return e.get(0)!==s.get(0)&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),u.setFluidWidth&&T.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(j.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?T.is.rtl()?parseInt(j.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(j.getComputedStyle(t).getPropertyValue("margin-left"),10):0,o=r.screen,r.boundary={top:o.top+o.scroll.top,bottom:o.top+o.scroll.top+o.height,left:o.left+o.scroll.left,right:o.left+o.scroll.left+o.width},r},id:function(){return n},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(e,t){var n={},i=(t=t||T.get.calculations()).popup,t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+i.width),bottom:t.bottom-(e.top+i.height)},T.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(e!==H?e:v)[0].parentNode,n=L(t);if(t)for(var i="none"===n.css("transform"),o="static"===n.css("position"),a=n.is("body");t&&!a&&o&&i;)t=t.parentNode,i="none"===(n=L(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0<n.length?n:L()},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(e){var t=e.split(" "),n=t[0],t=t[1],i="top"==n||"bottom"==n,o=!1,a=!1,r=!1;return y||(T.verbose("All available positions available"),y=T.get.positions()),T.debug("Recording last position tried",e),y[e]=!0,"opposite"===u.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),o=!0===y[r],T.debug("Trying opposite strategy",r)),"adjacent"===u.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),a=!0===y[r],T.debug("Trying adjacent strategy",r)),(a||o)&&(T.debug("Using backup position",r),r={"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"}[e]),r}},set:{position:function(e,t){if(0!==v.length&&0!==c.length){var n,i,o,a,r,s,l;if(t=t||T.get.calculations(),e=e||p.data(m.position)||u.position,n=p.data(m.offset)||u.offset,i=u.distanceAway,o=t.target,a=t.popup,r=t.parent,T.should.centerArrow(t)&&(T.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(n=(n+=o.width/2)-u.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(n=(n-=o.width/2)+u.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!T.is.svg(o.element))return T.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(T.debug("Adding margin to calculation",o.margin),"left center"==e||"right center"==e?(n+=o.margin.top,i+=-o.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=o.margin.left,i-=o.margin.top):(n+=o.margin.left,i+=o.margin.top)),T.debug("Determining popup position from calculations",e,t),T.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),T.debug("RTL: Popup position updated",e)),e=b==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:e){case"top left":s={top:"auto",bottom:r.height-o.top+i,left:o.left+n,right:"auto"};break;case"top center":s={bottom:r.height-o.top+i,left:o.left+o.width/2-a.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-o.top+i,right:r.width-o.left-o.width-n,top:"auto",left:"auto"};break;case"left center":s={top:o.top+o.height/2-a.height/2+n,right:r.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:o.top+o.height/2-a.height/2+n,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:o.top+o.height+i,left:o.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:o.top+o.height+i,right:r.width-o.left-o.width-n,left:"auto",bottom:"auto"}}if(s===H&&T.error(f.invalidPosition,e),T.debug("Calculated popup positioning values",s),c.css(s).removeClass(d.position).addClass(e).addClass(d.loading),l=T.get.popupOffset(),l=T.get.distanceFromBoundary(l,t),!u.forcePosition&&T.is.offstage(l,e)){if(T.debug("Position is outside viewport",e),b<u.maxSearchDepth)return b++,e=T.get.nextPosition(e),T.debug("Trying new position",e),!!c&&T.set.position(e,t);if(!u.lastResort)return T.debug("Popup could not find a position to display",c),T.error(f.cannotPlace,x),T.remove.attempts(),T.remove.loading(),T.reset(),u.onUnplaceable.call(c,x),!1;T.debug("No position found, showing with last position")}return T.debug("Position is on stage",e),T.remove.attempts(),T.remove.loading(),u.setFluidWidth&&T.is.fluid()&&T.set.fluidWidth(t),!0}T.error(f.notFound)},fluidWidth:function(e){e=e||T.get.calculations(),T.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},variation:function(e){(e=e||T.get.variation())&&T.has.popup()&&(T.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){p.addClass(d.visible)}},remove:{loading:function(){c.removeClass(d.loading)},variation:function(e){(e=e||T.get.variation())&&(T.verbose("Removing variation",e),c.removeClass(e))},visible:function(){p.removeClass(d.visible)},attempts:function(){T.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){T.debug("Binding popup events to module"),"click"==u.on&&p.on(O+a,T.toggle),"hover"==u.on&&p.on("touchstart"+a,T.event.touchstart),T.get.startEvent()&&p.on(T.get.startEvent()+a,T.event.start).on(T.get.endEvent()+a,T.event.end),u.target&&T.debug("Target set to element",v),A.on("resize"+t,T.event.resize)},popup:function(){T.verbose("Allowing hover events on popup to prevent closing"),c&&T.has.popup()&&c.on("mouseenter"+a,T.event.start).on("mouseleave"+a,T.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&T.bind.closeOnScroll(),T.is.closable()?T.bind.clickaway():"hover"==u.on&&w&&T.bind.touchClose()},closeOnScroll:function(){T.verbose("Binding scroll close event to document"),g.one(T.get.scrollEvent()+t,T.event.hideGracefully)},touchClose:function(){T.verbose("Binding popup touchclose event to document"),k.on("touchstart"+t,function(e){T.verbose("Touched away from popup"),T.event.hideGracefully.call(x,e)})},clickaway:function(){T.verbose("Binding popup close event to document"),k.on(O+t,function(e){T.verbose("Clicked away from popup"),T.event.hideGracefully.call(x,e)})}},unbind:{events:function(){A.off(t),p.off(a)},close:function(){k.off(t),g.off(t)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!T.is.basic()&&e.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(e,n){var i=[];return L.each(e,function(e,t){t<-u.jitter&&(T.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return T.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return p.hasClass(d.basic)},active:function(){return p.hasClass(d.active)},animating:function(){return c!==H&&c.hasClass(d.animating)},fluid:function(){return c!==H&&c.hasClass(d.fluid)},visible:function(){return c!==H&&c.hasClass(d.popupVisible)},dropdown:function(){return p.hasClass(d.dropdown)},hidden:function(){return!T.is.visible()},rtl:function(){return"rtl"===p.attr("dir")||"rtl"===p.css("direction")}},reset:function(){T.remove.visible(),u.preserve?L.fn.transition!==H&&c.transition("remove transition"):T.removePopup()},setting:function(e,t){if(L.isPlainObject(e))L.extend(!0,u,e);else{if(t===H)return u[e];u[e]=t}},internal:function(e,t){if(L.isPlainObject(e))L.extend(!0,T,e);else{if(t===H)return T[e];T[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,u.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),T.verbose.apply(console,arguments)))},error:function(){u.silent||(T.error=Function.prototype.bind.call(console.error,console,u.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(M||t),M=t,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=u.name+":",n=0;M=!1,clearTimeout(T.performance.timer),L.each(P,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",F&&(e+=" '"+F+"'"),(console.group!==H||console.table!==H)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):L.each(P,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(i,e,t){var o,a,n,r=C;return e=e||q,t=x||t,"string"==typeof i&&r!==H&&(i=i.split(/[\. ]/),o=i.length-1,L.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(L.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==H)return a=r[n],!1;{if(!L.isPlainObject(r[t])||e==o)return r[t]!==H&&(a=r[t]),!1;r=r[t]}}})),L.isFunction(a)?n=a.apply(t,e):a!==H&&(n=a),Array.isArray(D)?D.push(n):D!==H?D=[D,n]:n!==H&&(D=n),a}};I?(C===H&&T.initialize(),T.invoke(R)):(C!==H&&C.invoke("destroy"),T.initialize())}),D!==H?D:this},L.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:j,addTouchEvents:!0,position:"top left",forcePosition:!1,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:j,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,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",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=L.fn.popup.settings.templates.escape;return typeof e!==H&&(typeof e.title!==H&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==H&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(S,e,D,k){"use strict";S.isFunction=S.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")(),S.fn.progress=function(h){var v,e=S(this),b=e.selector||"",y=(new Date).getTime(),w=[],x=h,C="string"==typeof x,T=[].slice.call(arguments,1);return e.each(function(){var r=S.isPlainObject(h)?S.extend(!0,{},S.fn.progress.settings,h):S.extend({},S.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,i=r.selector,s=r.error,o="."+e,a="module-"+e,c=S(this),u=S(this).find(i.bar),l=S(this).find(i.progress),d=S(this).find(i.label),f=this,m=c.data(a),p=!1,g={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var n=0,i=1,o=e/t;n<10&&!(1<(o*=i));)i=Math.pow(10,n++);return i},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){g.set.duration(),g.set.transitionEvent(),g.debug(f),g.read.metadata(),g.read.settings(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of progress",g),m=g,c.data(a,g)},destroy:function(){g.verbose("Destroying previous progress for",c),clearInterval(m.interval),g.remove.state(),c.removeData(a),m=k},reset:function(){g.remove.nextValue(),g.update.progress(0)},complete:function(e){(g.percent===k||g.percent<100)&&(g.remove.progressPoll(),!0!==e&&g.set.percent(100))},read:{metadata:function(){var e={percent:g.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:g.helper.forceArray(c.data(t.value))};e.total!==k&&(g.debug("Total value set from metadata",e.total),g.set.total(e.total)),0<e.value.length&&(g.debug("Current value set from metadata",e.value),g.set.value(e.value),g.set.progress(e.value)),0<e.percent.length&&(g.debug("Current percent value set from metadata",e.percent),g.set.percent(e.percent))},settings:function(){!1!==r.total&&(g.debug("Current total set in settings",r.total),g.set.total(r.total)),!1!==r.value&&(g.debug("Current value set in settings",r.value),g.set.value(r.value),g.set.progress(g.value)),!1!==r.percent&&(g.debug("Current percent set in settings",r.percent),g.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=g.get.transitionEnd();u.one(e+o,function(e){clearTimeout(g.failSafeTimer),t.call(this,e)}),g.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},r.duration+r.failSafeDelay),g.verbose("Adding fail safe timer",g.timer)}},increment:function(e){var t;e=g.has.total()?(t=g.get.value(),e||1):(t=g.get.percent(),e||g.get.randomValue()),g.debug("Incrementing percentage by",t,t=t+e,e),t=g.get.normalizedValue(t),g.set.progress(t)},decrement:function(e){var t,n;g.get.total()?(n=(t=g.get.value())-(e=e||1),g.debug("Decrementing value by",e,t)):(n=(t=g.get.percent())-(e=e||g.get.randomValue()),g.debug("Decrementing percentage by",e,t)),n=g.get.normalizedValue(n),g.set.progress(n)},has:{progressPoll:function(){return g.progressPoll},total:function(){return!1!==g.get.total()}},get:{text:function(e,t){var t=t||0,n=g.get.value(t),i=g.get.total(),o=p?g.get.displayPercent(t):g.get.percent(t),a=!1!==i?Math.max(0,i-n):100-o;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",a).replace("{percent}",o).replace("{bar}",r.text.bars[t]||""),g.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return g.debug("Value cannot decrement below 0"),0;if(g.has.total()){if(e>g.total)return g.debug("Value cannot increment above total",g.total),g.total}else if(100<e)return g.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return g.debug("Generating random increment percentage"),Math.floor(Math.random()*r.random.max+r.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=D.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==k)return n[e]},displayPercent:function(e){var e=S(u[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:g.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return g.percent&&g.percent[e||0]||0},value:function(e){return g.nextValue||g.value&&g.value[e||0]||0},total:function(){return g.total!==k&&g.total}},create:{progressPoll:function(){g.progressPoll=setTimeout(function(){g.update.toNextValue(),g.remove.progressPoll()},g.get.updateInterval())}},is:{complete:function(){return g.is.success()||g.is.warning()||g.is.error()},success:function(){return c.hasClass(n.success)},warning:function(){return c.hasClass(n.warning)},error:function(){return c.hasClass(n.error)},active:function(){return c.hasClass(n.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){g.verbose("Removing progress poll timer"),g.progressPoll&&(clearTimeout(g.progressPoll),delete g.progressPoll)},nextValue:function(){g.verbose("Removing progress value stored for next update"),delete g.nextValue},state:function(){g.verbose("Removing stored state"),delete g.total,delete g.percent,delete g.value},active:function(){g.verbose("Removing active state"),c.removeClass(n.active)},success:function(){g.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){g.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){g.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){g.debug("set bar width with ",e),e=g.helper.forceArray(e);var o=-1,a=-1,r=g.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=S(u[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1==o&&(o=t),a=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){S(u[t]).css({borderTopLeftRadius:t==o?"":0,borderBottomLeftRadius:t==o?"":0,borderTopRightRadius:t==a?"":0,borderBottomRightRadius:t==a?"":0})}),c.attr("data-percent",t)},duration:function(e){e=e||r.duration,g.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=g.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,r.limitValues?Math.max(0,Math.min(100,e)):e});var t,n=g.has.total(),i=g.helper.sum(e),o=1<e.length&&n,a=g.helper.sum(g.helper.forceArray(g.value));o&&a>g.total?g.error(s.sumExceedsTotal,a,g.total):!o&&100<i?g.error(s.tooHigh,i):i<0?g.error(s.tooLow,i):(t=0<r.precision?r.precision:o?g.helper.derivePrecision(Math.min.apply(null,g.value),g.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),g.percent=a,n&&(g.value=e.map(function(e){return 0<t?Math.round(e/100*g.total*(10*t))/(10*t):Math.round(e/100*g.total*10)/10})),g.set.barWidth(e),g.set.labelInterval()),r.onChange.call(f,e,g.value,g.total)},labelInterval:function(){clearInterval(g.interval),g.bind.transitionEnd(function(){g.verbose("Bar finished animating, removing continuous label updates"),clearInterval(g.interval),p=!1,g.set.labels()}),p=!0,g.interval=setInterval(function(){S.contains(D.documentElement,f)||(clearInterval(g.interval),p=!1),g.set.labels()},r.framerate)},labels:function(){g.verbose("Setting both bar progress and outer label text"),g.set.barLabel(),g.set.state()},label:function(e){(e=e||"")&&(e=g.get.text(e),g.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=e!==k?e:g.helper.sum(g.percent))?r.autoSuccess&&1===u.length&&!(g.is.warning()||g.is.error()||g.is.success())?(g.set.success(),g.debug("Automatically triggering success at 100%")):(g.verbose("Reached 100% removing active state"),g.remove.active(),g.remove.progressPoll()):0<e?(g.verbose("Adjusting active progress bar label",e),g.set.active()):(g.remove.active(),g.set.label(r.text.active))},barLabel:function(n){l.map(function(e,t){t=S(t);n!==k?t.text(g.get.text(n,e)):"ratio"==r.label&&g.has.total()?(g.verbose("Adding ratio to bar label"),t.text(g.get.text(r.text.ratio,e))):"percent"==r.label&&(g.verbose("Adding percentage to bar label"),t.text(g.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,g.debug("Setting active state"),r.showActivity&&!g.is.active()&&c.addClass(n.active),g.remove.warning(),g.remove.error(),g.remove.success(),(e=r.onLabelUpdate("active",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onActive.call(f,g.value,g.total)})},success:function(e,t){e=e||r.text.success||r.text.active,g.debug("Setting success state"),c.addClass(n.success),g.remove.active(),g.remove.warning(),g.remove.error(),g.complete(t),e=r.text.success?r.onLabelUpdate("success",e,g.value,g.total):r.onLabelUpdate("active",e,g.value,g.total),g.set.label(e),g.bind.transitionEnd(function(){r.onSuccess.call(f,g.total)})},warning:function(e,t){e=e||r.text.warning,g.debug("Setting warning state"),c.addClass(n.warning),g.remove.active(),g.remove.success(),g.remove.error(),g.complete(t),(e=r.onLabelUpdate("warning",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onWarning.call(f,g.value,g.total)})},error:function(e,t){e=e||r.text.error,g.debug("Setting error state"),c.addClass(n.error),g.remove.active(),g.remove.success(),g.remove.warning(),g.complete(t),(e=r.onLabelUpdate("error",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onError.call(f,g.value,g.total)})},transitionEvent:function(){g.get.transitionEnd()},total:function(e){g.total=e},value:function(e){g.value=g.helper.forceArray(e)},progress:function(e){g.has.progressPoll()?(g.debug("Updated within interval, setting next update to use new value",e),g.set.nextValue(e)):(g.debug("First update in progress update interval, immediately updating",e),g.update.progress(e),g.create.progressPoll())},nextValue:function(e){g.nextValue=e}},update:{toNextValue:function(){var e=g.nextValue;e&&(g.debug("Update interval complete using last updated value",e),g.update.progress(e),g.remove.nextValue())},progress:function(e){var n=g.has.total(),e=(n&&g.set.value(e),g.helper.forceArray(e).map(function(e){var t;return!1===(e=g.get.numericValue(e))&&g.error(s.nonNumeric,e),e=g.get.normalizedValue(e),n?(t=0<g.total?e/g.total*100:100,g.debug("Calculating percent complete from total",t)):(t=e,g.debug("Setting value to exact percentage value",t)),t}));g.set.percent(e)}},setting:function(e,t){if(g.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,r,e);else{if(t===k)return r[e];S.isPlainObject(r[e])?S.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,g,e);else{if(t===k)return g[e];g[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){r.silent||(g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(g.performance.timer),S.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==k||console.table!==k)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):S.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var o,a,n,r=m;return e=e||T,t=f||t,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),o=i.length-1,S.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(S.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==k)return a=r[n],!1;{if(!S.isPlainObject(r[t])||e==o)return r[t]!==k?a=r[t]:g.error(s.method,i),!1;r=r[t]}}})),S.isFunction(a)?n=a.apply(t,e):a!==k&&(n=a),Array.isArray(v)?v.push(n):v!==k?v=[v,n]:n!==k&&(v=n),a}};C?(m===k&&g.initialize(),g.invoke(x)):(m!==k&&m.invoke("destroy"),g.initialize())}),v!==k?v:this},S.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multple values exceed total"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(R,I,q,L){"use strict";R.isFunction=R.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),R.fn.sidebar=function(w){var x,e=R(this),C=R(I),T=R(q),S=R("html"),D=R("head"),k=e.selector||"",A=(new Date).getTime(),E=[],F=w,O="string"==typeof F,M=[].slice.call(arguments,1),P=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,t,r,s=R.isPlainObject(w)?R.extend(!0,{},R.fn.sidebar.settings,w):R.extend({},R.fn.sidebar.settings),n=s.selector,l=s.className,i=s.namespace,c=s.regExp,u=s.error,d="."+i,f="module-"+i,m=R(this),p=R(s.context),g=m.children(n.sidebar),h=(p.children(n.fixed),p.children(n.pusher)),v=this,b=m.data(f),y={initialize:function(){y.debug("Initializing sidebar",w),y.create.id(),r=y.get.transitionEvent(),s.delaySetup?P(y.setup.layout):y.setup.layout(),P(function(){y.setup.cache()}),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),b=y,m.data(f,y)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),a="."+e,y.verbose("Creating unique id for element",e)}},destroy:function(){y.verbose("Destroying previous module for",m),m.off(d).removeData(f),y.is.ios()&&y.remove.ios(),p.off(a),C.off(a),T.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<h.find(e.target).length||h.is(e.target),e=p.is(e.target),t&&(y.verbose("User clicked on dimmed page"),y.hide()),e&&(y.verbose("User clicked on dimmable context (scaled out page)"),y.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===R(e.target).closest(n.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){y.verbose("Adding clickaway events to context",p),p.on("click"+a,y.event.clickaway).on("touchend"+a,y.event.clickaway)},scrollLock:function(){s.scrollLock&&(y.debug("Disabling page scroll"),C.on("DOMMouseScroll"+a,y.event.scroll)),y.verbose("Adding events to contain sidebar scroll"),T.on("touchmove"+a,y.event.touch),m.on("scroll"+d,y.event.containScroll)}},unbind:{clickaway:function(){y.verbose("Removing clickaway events from context",p),p.off(a)},scrollLock:function(){y.verbose("Removing scroll lock from page"),T.off(a),C.off(a),m.off("scroll"+d)}},add:{inlineCSS:function(){var e=y.cache.width||m.outerWidth(),t=y.cache.height||m.outerHeight(),n=y.is.rtl(),i=y.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(y.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(y.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),y.is.ie()&&("left"===i||"right"===i?(y.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=R(n+="</style>").appendTo(D),y.debug("Adding sizing css to head",o)}},refresh:function(){y.verbose("Refreshing selector cache"),p=R(s.context),g=p.children(n.sidebar),h=p.children(n.pusher),p.children(n.fixed),y.clear.cache()},refreshSidebars:function(){y.verbose("Refreshing other sidebars"),g=p.children(n.sidebar)},repaint:function(){y.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){y.cache={width:m.outerWidth(),height:m.outerHeight()}},layout:function(){0===p.children(n.pusher).length&&(y.debug("Adding wrapper element for sidebar"),y.error(u.pusher),h=R('<div class="pusher" />'),p.children().not(n.omitted).not(g).wrapAll(h),y.refresh()),0!==m.nextAll(n.pusher).length&&m.nextAll(n.pusher)[0]===h[0]||(y.debug("Moved sidebar to correct parent element"),y.error(u.movedSidebar,v),m.detach().prependTo(p),y.refresh()),y.clear.cache(),y.set.pushable(),y.set.direction()}},attachEvents:function(e,t){var n=R(e);t=R.isFunction(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):y.error(u.notFound,e)},show:function(e){if(e=R.isFunction(e)?e:function(){},y.is.hidden()){if(y.refreshSidebars(),s.overlay&&(y.error(u.overlay),s.transition="overlay"),y.refresh(),y.othersActive())if(y.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!=s.transition)return void y.hideOthers(y.show);y.hideOthers()}else s.transition="overlay";y.pushPage(function(){e.call(v),s.onShow.call(v)}),s.onChange.call(v),s.onVisible.call(v)}else y.debug("Sidebar is already visible")},hide:function(e){e=R.isFunction(e)?e:function(){},(y.is.visible()||y.is.animating())&&(y.debug("Hiding sidebar",e),y.refreshSidebars(),y.pullPage(function(){e.call(v),s.onHidden.call(v)}),s.onChange.call(v),s.onHide.call(v))},othersAnimating:function(){return 0<g.not(m).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(m).filter("."+l.visible).length},othersActive:function(){return y.othersVisible()||y.othersAnimating()},hideOthers:function(e){var t=g.not(m).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){y.verbose("Determining toggled direction"),y.is.hidden()?y.show():y.hide()},pushPage:function(t){var e,n,i=y.get.transition(),o="overlay"===i||y.othersActive()?m:h;t=R.isFunction(t)?t:function(){},"scale down"==s.transition&&y.scrollToTop(),y.set.transition(i),y.repaint(),i=function(){y.bind.clickaway(),y.add.inlineCSS(),y.set.animating(),y.set.visible()},e=function(){y.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(r+a,n),y.remove.animating(),y.bind.scrollLock(),t.call(v))},o.off(r+a),o.on(r+a,n),P(i),s.dimPage&&!y.othersVisible()&&P(e)},pullPage:function(t){var e,n,i=y.get.transition(),o="overlay"==i||y.othersActive()?m:h;t=R.isFunction(t)?t:function(){},y.verbose("Removing context push state",y.get.direction()),y.unbind.clickaway(),y.unbind.scrollLock(),e=function(){y.set.transition(i),y.set.animating(),y.remove.visible(),s.dimPage&&!y.othersVisible()&&h.removeClass(l.dimmed)},n=function(e){e.target==o[0]&&(o.off(r+a,n),y.remove.animating(),y.remove.transition(),y.remove.inlineCSS(),("scale down"==i||s.returnScroll&&y.is.mobile())&&y.scrollBack(),t.call(v))},o.off(r+a),o.on(r+a,n),P(e)},scrollToTop:function(){y.verbose("Scrolling to top of page to avoid animation issues"),t=R(I).scrollTop(),m.scrollTop(0),I.scrollTo(0,0)},scrollBack:function(){y.verbose("Scrolling back to original page position"),I.scrollTo(0,t)},clear:{cache:function(){y.verbose("Clearing cached dimensions"),y.cache={}}},set:{ios:function(){S.addClass(l.ios)},pushed:function(){p.addClass(l.pushed)},pushable:function(){p.addClass(l.pushable)},dimmed:function(){h.addClass(l.dimmed)},active:function(){m.addClass(l.active)},animating:function(){m.addClass(l.animating)},transition:function(e){e=e||y.get.transition(),m.addClass(e)},direction:function(e){e=e||y.get.direction(),m.addClass(l[e])},visible:function(){m.addClass(l.visible)},overlay:function(){m.addClass(l.overlay)}},remove:{inlineCSS:function(){y.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){S.removeClass(l.ios)},pushed:function(){p.removeClass(l.pushed)},pushable:function(){p.removeClass(l.pushable)},active:function(){m.removeClass(l.active)},animating:function(){m.removeClass(l.animating)},transition:function(e){e=e||y.get.transition(),m.removeClass(e)},direction:function(e){e=e||y.get.direction(),m.removeClass(l[e])},visible:function(){m.removeClass(l.visible)},overlay:function(){m.removeClass(l.overlay)}},get:{direction:function(){return m.hasClass(l.top)?l.top:m.hasClass(l.right)?l.right:m.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=y.get.direction(),e=y.is.mobile()?"auto"==s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"==s.transition?s.defaultTransition.computer[e]:s.transition;return y.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=q.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==L)return n[e]}},is:{ie:function(){var e=!I.ActiveXObject&&"ActiveXObject"in I,t="ActiveXObject"in I;return e||t},ios:function(){var e=navigator.userAgent,t=e.match(c.ios),n=e.match(c.mobileChrome);return!(!t||n)&&(y.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(c.mobile)?(y.verbose("Browser was found to be mobile",e),!0):(y.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!y.is.visible()},visible:function(){return m.hasClass(l.visible)},open:function(){return y.is.visible()},closed:function(){return y.is.hidden()},vertical:function(){return m.hasClass(l.top)},animating:function(){return p.hasClass(l.animating)},rtl:function(){return y.cache.rtl===L&&(y.cache.rtl="rtl"===m.attr("dir")||"rtl"===m.css("direction")),y.cache.rtl}},setting:function(e,t){if(y.debug("Changing setting",e,t),R.isPlainObject(e))R.extend(!0,s,e);else{if(t===L)return s[e];R.isPlainObject(s[e])?R.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,y,e);else{if(t===L)return y[e];y[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,s.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),y.verbose.apply(console,arguments)))},error:function(){s.silent||(y.error=Function.prototype.bind.call(console.error,console,s.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=s.name+":",n=0;A=!1,clearTimeout(y.performance.timer),R.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),(console.group!==L||console.table!==L)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):R.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var o,a,n,r=b;return e=e||M,t=v||t,"string"==typeof i&&r!==L&&(i=i.split(/[\. ]/),o=i.length-1,R.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(R.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==L)return a=r[n],!1;{if(!R.isPlainObject(r[t])||e==o)return r[t]!==L?a=r[t]:y.error(u.method,i),!1;r=r[t]}}})),R.isFunction(a)?n=a.apply(t,e):a!==L&&(n=a),Array.isArray(x)?x.push(n):x!==L?x=[x,n]:n!==L&&(x=n),a}};O?(b===L&&y.initialize(),y.invoke(F)):(b!==L&&y.invoke("destroy"),y.initialize())}),x!==L?x:this},R.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(O,M,P,R){"use strict";O.isWindow=O.isWindow||function(e){return null!=e&&e===e.window},O.isFunction=O.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},M=void 0!==M&&M.Math==Math?M:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.fn.tab=function(c){var u,d=O.isFunction(this)?O(M):O(this),f=d.selector||"",S=(new Date).getTime(),D=[],k=c,A="string"==typeof k,E=[].slice.call(arguments,1),F=!1;return d.each(function(){var m,o,p,g,h,v=O.isPlainObject(c)?O.extend(!0,{},O.fn.tab.settings,c):O.extend({},O.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,w=v.error,n=v.regExp,e="."+v.namespace,i="module-"+v.namespace,x=O(this),a={},C=!0,r=0,s=this,l=x.data(i),T={initialize:function(){T.debug("Initializing tab menu item",x),T.fix.callbacks(),T.determineTabs(),T.debug("Determining tabs",v.context,o),v.auto&&T.set.auto(),T.bind.events(),v.history&&!F&&(T.initializeHistory(),F=!0),v.autoTabActivation&&l===R&&null==T.determine.activeTab()&&(T.debug("No active tab detected, setting first tab active",T.get.initialPath()),T.changeTab(!0===v.autoTabActivation?T.get.initialPath():v.autoTabActivation)),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),l=T,x.data(i,T)},destroy:function(){T.debug("Destroying tabs",x),x.removeData(i).off(e)},bind:{events:function(){O.isWindow(s)||(T.debug("Attaching tab activation events to element",x),x.on("click"+e,T.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<x.closest(t.ui).length?(e=x.closest(t.ui),T.verbose("Using closest UI element as parent",e)):e=x,m=e.parent(),T.verbose("Determined parent element for creating context",m)):v.context?(m=O(v.context),T.verbose("Using selector for tab context",v.context,m)):m=O("body"),v.childrenOnly?(o=m.children(t.tabs),T.debug("Searching tab context children for tabs",m,o)):(o=m.find(t.tabs),T.debug("Searching tab context for tabs",m,o))},fix:{callbacks:function(){O.isPlainObject(c)&&(c.onTabLoad||c.onTabInit)&&(c.onTabLoad&&(c.onLoad=c.onTabLoad,delete c.onTabLoad,T.error(w.legacyLoad,c.onLoad)),c.onTabInit&&(c.onFirstLoad=c.onTabInit,delete c.onTabInit,T.error(w.legacyInit,c.onFirstLoad)),v=O.extend(!0,{},O.fn.tab.settings,c))}},initializeHistory:function(){if(T.debug("Initializing page state"),O.address===R)return T.error(w.state),!1;if("state"==v.historyType){if(T.debug("Using HTML5 to manage state"),!1===v.path)return T.error(w.path),!1;O.address.history(!0).state(v.path)}O.address.bind("change",T.event.history.change)},event:{click:function(e){var t=O(this).data(y.tab);t!==R?(v.history?(T.verbose("Updating page state",e),O.address.value(t)):(T.verbose("Changing tab",e),T.changeTab(t)),e.preventDefault()):T.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||T.get.initialPath(),n=v.templates.determineTitle(t)||!1;T.performance.display(),T.debug("History change event",t,e),h=e,t!==R&&T.changeTab(t),n&&O.address.title(n)}}},refresh:function(){p&&(T.debug("Refreshing tab",p),T.changeTab(p))},cache:{read:function(e){return e!==R&&a[e]},add:function(e,t){e=e||p,T.debug("Adding cached content for",e),a[e]=t},remove:function(e){e=e||p,T.debug("Removing cached content for",e),delete a[e]}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";T.verbose("Setting up automatic tab retrieval from server",e),O.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=T.get.tabElement(e);t.hasClass(b.loading)||(T.verbose("Setting loading state for",t),t.addClass(b.loading).siblings(o).removeClass(b.active+" "+b.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){O.address.value(e)}},changeTab:function(c){var u=M.history&&M.history.pushState&&v.ignoreFirstLoad&&C,d=v.auto||O.isPlainObject(v.apiSettings),f=d&&!u?T.utilities.pathToArray(c):T.get.defaultPathArray(c);c=T.utilities.arrayToPath(f),O.each(f,function(e,t){var n,i,o=f.slice(0,e+1),a=T.utilities.arrayToPath(o),r=T.is.tab(a),s=e+1==f.length,l=T.get.tabElement(a);return T.verbose("Looking for tab",t),r?(T.verbose("Tab was found",t),p=a,g=T.utilities.filterArray(f,o),s?i=!0:(r=f.slice(0,e+2),t=T.utilities.arrayToPath(r),(i=!T.is.tab(t))&&T.verbose("Tab parameters found",r)),i&&d?(u?(T.debug("Ignoring remote content on first tab load",a),C=!1,T.cache.add(c,l.html()),T.activate.all(a),v.onFirstLoad.call(l[0],a,g,h),v.onLoad.call(l[0],a,g,h)):(T.activate.navigation(a),T.fetch.content(a,c)),!1):(T.debug("Opened local tab",a),T.activate.all(a),T.cache.read(a)||(T.cache.add(a,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),void v.onLoad.call(l[0],a,g,h))):-1!=c.search("/")||""===c?(T.error(w.missingTab,x,m,a),!1):(c=T.escape.string(c),a=(n=O("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=T.get.tabElement(a),n&&0<n.length&&a?(T.debug("Anchor link used, opening parent tab",l,n),l.hasClass(b.active)||setTimeout(function(){T.scrollTo(n)},0),T.activate.all(a),T.cache.read(a)||(T.cache.add(a,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),v.onLoad.call(l[0],a,g,h),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(T.debug("Forcing scroll to an in-page link in a hidden tab",t,e),O(P).scrollTop(t))},update:{content:function(e,t,n){var i=T.get.tabElement(e),o=i[0];n=n!==R?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(O(t).clone(!0)):n?(T.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(T.debug("Updating HTML",e,t),o.innerHTML=t)}},fetch:{content:function(t,n){var e,i=T.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&T.cache.add(n,e),T.update.content(t,e),t==p?(T.debug("Content loaded",t),T.activate.tab(t)):T.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,g,h),v.onLoad.call(i[0],t,g,h),v.loadOnce?T.cache.add(n,!0):"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=(e=i.children().clone(!0)).not("script");T.cache.add(n,e)},0):T.cache.add(n,i.html())},urlData:{tab:n}},a=i.api("get request")||!1,a=a&&"pending"===a.state();n=n||t,e=T.cache.read(n),v.cache&&e?(T.activate.tab(t),T.debug("Adding cached content",n),v.loadOnce||("once"==v.evaluateScripts?T.update.content(t,e,!1):T.update.content(t,e)),v.onLoad.call(i[0],t,g,h)):a?(T.set.loading(t),T.debug("Content is already loading",n)):O.api!==R?(e=O.extend(!0,{},v.apiSettings,o),T.debug("Retrieving remote content",n,e),T.set.loading(t),i.api(e)):T.error(w.api)}},activate:{all:function(e){T.activate.tab(e),T.activate.navigation(e)},tab:function(e){var t=T.get.tabElement(e),n="siblings"==v.deactivate?t.siblings(o):o.not(t),i=t.hasClass(b.active);T.verbose("Showing tab content for",t),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=T.get.navElement(e),n="siblings"==v.deactivate?t.siblings(d):d.not(t),i=t.hasClass(b.active);T.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){T.deactivate.navigation(),T.deactivate.tabs()},navigation:function(){d.removeClass(b.active)},tabs:function(){o.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return e!==R&&0<T.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||o.eq(0).data(y.tab)},path:function(){return O.address.value()},defaultPathArray:function(e){return T.utilities.pathToArray(T.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+T.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(T.debug("Found default tab",t),r<v.maxDepth)return r++,T.get.defaultPath(t);T.error(w.recursion)}else T.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||p,d.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||p,t=T.utilities.pathToArray(e),t=T.utilities.last(t),e=o.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]'),t=o.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return p}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){O(t).hasClass(b.active)&&(t=O(this).data(y.tab),d.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]').hasClass(b.active)&&(n=t))}),n}},utilities:{filterArray:function(e,t){return O.grep(e,function(e){return-1==O.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===R?p:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(T.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,v,e);else{if(t===R)return v[e];O.isPlainObject(v[e])?O.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,T,e);else{if(t===R)return T[e];T[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,v.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),T.verbose.apply(console,arguments)))},error:function(){v.silent||(T.error=Function.prototype.bind.call(console.error,console,v.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(S||t),S=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=v.name+":",n=0;S=!1,clearTimeout(T.performance.timer),O.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==R||console.table!==R)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):O.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||E,t=s||t,"string"==typeof i&&r!==R&&(i=i.split(/[\. ]/),o=i.length-1,O.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(O.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==R)return a=r[n],!1;{if(!O.isPlainObject(r[t])||e==o)return r[t]!==R?a=r[t]:T.error(w.method,i),!1;r=r[t]}}})),O.isFunction(a)?n=a.apply(t,e):a!==R&&(n=a),Array.isArray(u)?u.push(n):u!==R?u=[u,n]:n!==R&&(u=n),a}};A?(l===R&&T.initialize(),T.invoke(k)):(l!==R&&l.invoke("destroy"),T.initialize())}),u!==R?u:this},O.tab=function(){O(M).tab.apply(this,arguments)},O.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(F,e,O){"use strict";F.isFunction=F.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")(),F.fn.toast=function(x){var C,e=F(this),T=e.selector||"",S=(new Date).getTime(),D=[],k=x,A="string"==typeof k,E=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,r,s,l,c=F.isPlainObject(x)?F.extend(!0,{},F.fn.toast.settings,x):F.extend({},F.fn.toast.settings),u=c.className,d=c.selector,f=c.error,e=c.namespace,m=c.fields,t="."+e,p=e+"-module",g=F(this),h=c.context?F(c.context):F("body"),v=g.hasClass("toast")||g.hasClass("message")||g.hasClass("card"),b=this,y=v?g.data(p):O,w={initialize:function(){w.verbose("Initializing element"),w.has.container()||w.create.container(),(v||""!==c.message||""!==c.title||""!==w.get.iconClass()||c.showImage||w.has.configActions())&&("string"==typeof c.showProgress&&-1!==[u.top,u.bottom].indexOf(c.showProgress)||(c.showProgress=!1),w.create.toast(),c.closeOnClick&&(c.closeIcon||0<F(i).find(d.input).length||w.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(u.unclickable),w.bind.events()),w.instantiate(),n&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,g.data(p,y)},destroy:function(){n&&(w.debug("Removing toast",n),w.unbind.events(),n.remove(),s=i=n=O,c.onRemove.call(n,b),l=r=o=O),g.removeData(p)},show:function(e){e=e||function(){},w.debug("Showing toast"),!1===c.onShow.call(n,b)?w.debug("onShow callback returned false, cancelling toast animation"):w.animate.show(e)},close:function(e){e=e||function(){},w.remove.visible(),w.unbind.events(),w.animate.close(e)},create:{container:function(){w.verbose("Creating container"),h.append(F("<div/>",{class:c.position+" "+u.container+" "+(c.horizontal?u.horizontal:"")}))},toast:function(){n=F("<div/>",{class:u.box});var e,t=w.get.iconClass();v?(i=c.cloneModule?g.clone().removeAttr("id"):g,l=i.find("> i"+w.helpers.toClass(u.close)),c.closeIcon=0<l.length,""!==t&&i.find(d.icon).attr("class",t+" "+u.icon),c.showImage&&i.find(d.image).attr("src",c.showImage),""!==c.title&&i.find(d.title).html(w.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(d.message).html(w.helpers.escape(c.message,c.preserveHTML))):(w.verbose("Creating toast"),i=F("<div/>"),e=F("<div/>",{class:u.content}),""!==t&&i.append(F("<i/>",{class:t+" "+u.icon})),c.showImage&&i.append(F("<img>",{class:u.image+" "+c.classImage,src:c.showImage})),""!==c.title&&e.append(F("<div/>",{class:u.title,text:c.title})),e.append(F("<div/>",{class:u.message,html:w.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+u.toast).append(e),i.css("opacity",c.opacity),c.closeIcon&&((l=F("<i/>",{class:u.close+" "+("string"==typeof c.closeIcon?c.closeIcon:"")})).hasClass(u.left)?i.prepend(l):i.append(l))),i.hasClass(u.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),a=i.find(".actions"),w.has.configActions()&&(0===a.length&&(a=F("<div/>",{class:u.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(u.attached)&&(a.addClass(u.extraContent),a.hasClass(u.vertical)&&(a.removeClass(u.vertical),w.error(f.verticalCard))),c.actions.forEach(function(e){var t=e[m.icon]?'<i class="'+w.helpers.deQuote(e[m.icon])+' icon"></i>':"",n=w.helpers.escape(e[m.text]||"",c.preserveHTML),i=w.helpers.deQuote(e[m.class]||""),o=e[m.click]&&F.isFunction(e[m.click])?e[m.click]:function(){};a.append(F("<button/>",{html:t+n,class:u.button+" "+i,click:function(){!1!==o.call(b,g)&&w.close()}}))})),a&&a.hasClass(u.vertical)&&i.addClass(u.vertical),0<a.length&&!a.hasClass(u.attached)&&(!a||a.hasClass(u.basic)&&!a.hasClass(u.left)||i.addClass(u.actions)),"auto"===c.displayTime&&(c.displayTime=Math.max(c.minDisplayTime,i.text().split(" ").length/c.wordsPerMinute*6e4)),n.append(i),0<a.length&&a.hasClass(u.attached)&&(a.addClass(u.buttons),a.detach(),i.addClass(u.attached),a.hasClass(u.vertical)?(i.wrap(F("<div/>",{class:u.vertical+" "+u.attached+" "+(c.compact?u.compact:"")})),a.hasClass(u.left)?i.addClass(u.left).parent().addClass(u.left).prepend(a):i.parent().append(a)):a.hasClass(u.top)?(n.prepend(a),i.addClass(u.bottom)):(n.append(a),i.addClass(u.top))),g!==i&&(b=(g=i)[0]),0<c.displayTime&&(t=u.progressing+" "+(c.pauseOnHover?u.pausable:""),c.showProgress&&(o=F("<div/>",{class:u.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(u.inverted)?o.addClass(u.inverted):o.removeClass(u.inverted)),r=F("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),o.addClass(c.showProgress).append(r),o.hasClass(u.top)?n.prepend(o):n.append(o),r.css("animation-duration",c.displayTime/1e3+"s")),(s=F("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(u.compact),i.addClass(u.compact),o&&o.addClass(u.compact)),c.newestOnTop?n.prependTo(w.get.container()):n.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),(c.closeOnClick||c.closeIcon)&&(c.closeIcon?l:i).on("click"+t,w.event.click),s&&s.on("animationend"+t,w.close),n.on("click"+t,d.approve,w.event.approve).on("click"+t,d.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),(c.closeOnClick||c.closeIcon)&&(c.closeIcon?l:i).off("click"+t),s&&s.off("animationend"+t),n.off("click"+t)}},animate:{show:function(e){e=F.isFunction(e)?e:function(){},c.transition&&w.can.useElement("transition")&&g.transition("is supported")&&(w.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,duration:c.transition.showDuration,onComplete:function(){e.call(n,b),c.onVisible.call(n,b)}}))},close:function(e){e=F.isFunction(e)?e:function(){},w.debug("Closing toast"),!1===c.onHide.call(n,b)?w.debug("onHide callback returned false, cancelling toast animation"):c.transition&&F.fn.transition!==O&&g.transition("is supported")?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,interval:50,onBeforeHide:function(e){e=F.isFunction(e)?e:function(){},""!==c.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(c.transition.closeDuration,c.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,b),c.onHidden.call(n,b),w.destroy()}}):w.error(f.noTransition)},pause:function(){s.css("animationPlayState","paused"),r&&r.css("animationPlayState","paused")},continue:function(){s.css("animationPlayState","running"),r&&r.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<h.find(w.helpers.toClass(c.position)+d.container+(c.horizontal?w.helpers.toClass(u.horizontal):"")).length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{container:function(){return h.find(w.helpers.toClass(c.position)+d.container)[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return F(w.get.container()).find(d.box)},iconClass:function(){return"string"==typeof c.showIcon?c.showIcon:c.showIcon&&c.icons[c.class]?c.icons[c.class]:""},remainingTime:function(){return s?s.css("opacity")*c.displayTime:0}},set:{visible:function(){i.addClass(u.visible)}},remove:{visible:function(){i.removeClass(u.visible)}},event:{click:function(e){0===F(e.target).closest("a").length&&(c.onClick.call(n,b),w.close())},approve:function(){!1===c.onApprove.call(b,g)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===c.onDeny.call(b,g)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.split(" "),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return F.fn[e]!==O||(w.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(w.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,c,e);else{if(t===O)return c[e];F.isPlainObject(c[e])?F.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,w,e);else{if(t===O)return w[e];w[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(S||t),S=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=c.name+":",n=0;S=!1,clearTimeout(w.performance.timer),F.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",T&&(e+=" '"+T+"'"),(console.group!==O||console.table!==O)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):F.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||E,t=b||t,"string"==typeof i&&r!==O&&(i=i.split(/[\. ]/),o=i.length-1,F.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==O)return a=r[n],!1;{if(!F.isPlainObject(r[t])||e==o)return r[t]!==O?a=r[t]:w.error(f.method,i),!1;r=r[t]}}})),F.isFunction(a)?n=a.apply(t,e):a!==O&&(n=a),Array.isArray(C)?C.push(n):C!==O?C=[C,n]:n!==O&&(C=n),a}};A?(y===O&&w.initialize(),w.invoke(k)):(y!==O&&y.invoke("destroy"),w.initialize(),C=g)}),C!==O?C:this},F.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},F.extend(F.easing,{easeOutBounce:function(e,t,n,i,o){return(t/=o)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,void document),function(E,F,O){"use strict";E.isWindow=E.isWindow||function(e){return null!=e&&e===e.window},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),E.api=E.fn.api=function(w){var x,e=E.isFunction(this)?E(F):E(this),C=e.selector||"",T=(new Date).getTime(),S=[],D=w,k="string"==typeof D,A=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,r,s=E.isPlainObject(w)?E.extend(!0,{},E.fn.api.settings,w):E.extend({},E.fn.api.settings),t=s.namespace,o=s.metadata,l=s.selector,c=s.error,u=s.className,d="."+t,f="module-"+t,m=E(this),p=m.closest(l.form),g=s.stateContext?E(s.stateContext):m,h=this,v=g[0],b=m.data(f),y={initialize:function(){k||y.bind.events(),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),b=y,m.data(f,b)},destroy:function(){y.verbose("Destroying previous module for",h),m.removeData(f).off(d)},bind:{events:function(){var e=y.get.event();e?(y.verbose("Attaching API events to element",e),m.on(e+d,y.event.trigger)):"now"==s.on&&(y.debug("Querying API endpoint immediately"),y.query())}},decode:{json:function(e){if(e!==O&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==O)return t=sessionStorage.getItem(e),y.debug("Using cached response",e,t),y.decode.json(t);y.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?y.debug("Response empty, not caching",t):F.Storage===O?y.error(c.noStorage):(E.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),y.verbose("Storing cached response for url",e,t))}},query:function(){if(y.is.disabled())y.debug("Element is disabled API request aborted");else{if(y.is.loading()){if(!s.interruptRequests)return void y.debug("Cancelling request, previous request is still pending");y.debug("Interrupting previous request"),y.abort()}if(s.defaultData&&E.extend(!0,s.urlData,y.get.defaultData()),s.serializeForm&&(s.data=y.add.formData(s.data)),!1===(i=y.get.settings()))return y.cancelled=!0,void y.error(c.beforeSend);if(y.cancelled=!1,(n=y.get.templatedURL())||y.is.mocked()){if((n=y.add.urlData(n))||y.is.mocked()){if(i.url=s.base+n,a=E.extend(!0,{},s,{type:s.method||s.type,data:e,url:s.base+n,beforeSend:s.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),y.debug("Querying URL",a.url),y.verbose("Using AJAX settings",a),"local"===s.cache&&y.read.cachedResponse(n))return y.debug("Response returned from local cache"),y.request=y.create.request(),void y.request.resolveWith(v,[y.read.cachedResponse(n)]);s.throttle?s.throttleFirstRequest||y.timer?(y.debug("Throttling request",s.throttle),clearTimeout(y.timer),y.timer=setTimeout(function(){y.timer&&delete y.timer,y.debug("Sending throttled request",e,a.method),y.send.request()},s.throttle)):(y.debug("Sending request",e,a.method),y.send.request(),y.timer=setTimeout(function(){},s.throttle)):(y.debug("Sending request",e,a.method),y.send.request())}}else y.error(c.missingURL)}},should:{removeError:function(){return!0===s.hideError||"auto"===s.hideError&&!y.is.form()}},is:{disabled:function(){return 0<m.filter(l.disabled).length},expectingJSON:function(){return"json"===s.dataType||"jsonp"===s.dataType},form:function(){return m.is("form")||g.is("form")},mocked:function(){return s.mockResponse||s.mockResponseAsync||s.response||s.responseAsync},input:function(){return m.is("input")},loading:function(){return!!y.request&&"pending"==y.request.state()},abortedRequest:function(e){return e&&e.readyState!==O&&0===e.readyState?(y.verbose("XHR request determined to be aborted"),!0):(y.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return y.is.expectingJSON()&&E.isFunction(s.successTest)?(y.debug("Checking JSON returned success",s.successTest,e),s.successTest(e)?(y.debug("Response passed success test",e),!0):(y.debug("Response failed success test",e),!1)):(y.verbose("Response is not JSON, skipping validation",s.successTest,e),!0)}},was:{cancelled:function(){return y.cancelled||!1},succesful:function(){return y.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),y.was.successful()},successful:function(){return y.request&&"resolved"==y.request.state()},failure:function(){return y.request&&"rejected"==y.request.state()},complete:function(){return y.request&&("resolved"==y.request.state()||"rejected"==y.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(s.regExp.required),t=o.match(s.regExp.optional),a=a||s.urlData,e&&(y.debug("Looking for required URL variables",e),E.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.substr(2,t.length-3):t.substr(1,t.length-2),i=E.isPlainObject(a)&&a[n]!==O?a[n]:m.data(n)!==O?m.data(n):g.data(n)!==O?g.data(n):a[n];if(i===O)return y.error(c.requiredParameter,n,o),o=!1;y.verbose("Found required variable",n,i),i=s.encodeParameters?y.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t&&(y.debug("Looking for optional URL variables",e),E.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.substr(3,t.length-4):t.substr(2,t.length-3),i=E.isPlainObject(a)&&a[n]!==O?a[n]:m.data(n)!==O?m.data(n):g.data(n)!==O?g.data(n):a[n];o=i!==O?(y.verbose("Optional variable Found",n,i),o.replace(t,i)):(y.verbose("Optional variable not found",n),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(e){var t=E.fn.serializeObject!==O,n=t?p.serializeObject():p.serialize();return e=e||s.data,e=E.isPlainObject(e)?t?(y.debug("Extending existing data with form data",e,n),E.extend(!0,{},e,n)):(y.error(c.missingSerialize),y.debug("Cant extend data. Replacing data with form data",e,n),n):(y.debug("Adding form data",n),n)}},send:{request:function(){y.set.loading(),y.request=y.create.request(),y.is.mocked()?y.mockedXHR=y.create.mockedXHR():y.xhr=y.create.xhr(),s.onRequest.call(v,y.request,y.xhr)}},event:{trigger:function(e){y.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=(new Date).getTime()-r,o=s.loadingDuration-o,a=!!E.isFunction(s.onResponse)&&(y.is.expectingJSON()&&!s.rawResponse?s.onResponse.call(i,E.extend(!0,{},e)):s.onResponse.call(i,e)),o=0<o?o:0;a&&(y.debug("Modified API response in onResponse callback",s.onResponse,a,e),e=a),0<o&&y.debug("Response completed early delaying state change by",o),setTimeout(function(){y.is.validResponse(e)?y.request.resolveWith(i,[e,n]):y.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-r,o=s.loadingDuration-o;0<(o=0<o?o:0)&&y.debug("Response completed early delaying state change by",o),setTimeout(function(){y.is.abortedRequest(e)?y.request.rejectWith(i,[e,"aborted",n]):y.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){y.debug("Successful API Response",e),"local"===s.cache&&n&&(y.write.cachedResponse(n,e),y.debug("Saving server response locally",y.cache)),s.onSuccess.call(v,e,m,t)},complete:function(e,t){var n,i;y.was.successful()?(i=e,n=t):i=y.get.responseFromXHR(n=e),y.remove.loading(),s.onComplete.call(v,i,m,n)},fail:function(e,t,n){var i=y.get.responseFromXHR(e),o=y.get.errorFromRequest(i,t,n);if("aborted"==t)return y.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),s.onAbort.call(v,t,m,e),!0;"invalid"==t?y.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==O&&(y.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==O&&""!==n&&y.error(c.statusMessage+n,a.url),s.onError.call(v,o,m,e)),s.errorDuration&&"aborted"!==t&&(y.debug("Adding error state"),y.set.error(),y.should.removeError()&&setTimeout(y.remove.error,s.errorDuration)),y.debug("API Request failed",o,e),s.onFailure.call(v,i,m,e)}}},create:{request:function(){return E.Deferred().always(y.event.request.complete).done(y.event.request.done).fail(y.event.request.fail)},mockedXHR:function(){var e=s.mockResponse||s.response,t=s.mockResponseAsync||s.responseAsync,n=E.Deferred().always(y.event.xhr.complete).done(y.event.xhr.done).fail(y.event.xhr.fail);return e?(e=E.isFunction(e)?(y.debug("Using specified synchronous callback",e),e.call(v,i)):(y.debug("Using settings specified response",e),e),n.resolveWith(v,[e,!1,{responseText:e}])):E.isFunction(t)&&(e=function(e){y.debug("Async callback returned response",e),e?n.resolveWith(v,[e,!1,{responseText:e}]):n.rejectWith(v,[{responseText:e},!1,!1])},y.debug("Using specified async response callback",t),t.call(v,i,e)),n},xhr:function(){var e=E.ajax(a).always(y.event.xhr.always).done(y.event.xhr.done).fail(y.event.xhr.fail);return y.verbose("Created server request",e,a),e}},set:{error:function(){y.verbose("Adding error state to element",g),g.addClass(u.error)},loading:function(){y.verbose("Adding loading state to element",g),g.addClass(u.loading),r=(new Date).getTime()}},remove:{error:function(){y.verbose("Removing error state from element",g),g.removeClass(u.error)},loading:function(){y.verbose("Removing loading state from element",g),g.removeClass(u.loading)}},get:{responseFromXHR:function(e){return!!E.isPlainObject(e)&&(y.is.expectingJSON()?y.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return E.isPlainObject(e)&&e.error!==O?e.error:s.error[t]!==O?s.error[t]:n},request:function(){return y.request||!1},xhr:function(){return y.xhr||!1},settings:function(){var e=s.beforeSend.call(m,s);return e&&(e.success!==O&&(y.debug("Legacy success callback detected",e),y.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==O&&(y.debug("Legacy failure callback detected",e),y.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==O&&(y.debug("Legacy complete callback detected",e),y.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===O&&y.error(c.noReturnedValue),!1===e?e:e!==O?E.extend(!0,{},e):E.extend(!0,{},s)},urlEncodedValue:function(e){var t=F.decodeURIComponent(e),n=F.encodeURIComponent(e);return t!==e?(y.debug("URL value is already encoded, avoiding double encoding",e),e):(y.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return E.isWindow(h)||(y.is.input()?e.value=m.val():y.is.form()||(e.text=m.text())),e},event:function(){return E.isWindow(h)||"now"==s.on?(y.debug("API called without element, no events attached"),!1):"auto"==s.on?m.is("input")?h.oninput!==O?"input":h.onpropertychange!==O?"propertychange":"keyup":m.is("form")?"submit":"click":s.on},templatedURL:function(e){if(e=e||m.data(o.action)||s.action||!1,n=m.data(o.url)||s.url||!1)return y.debug("Using specified url",n),n;if(e){if(y.debug("Looking up url for action",e,s.api),s.api[e]===O&&!y.is.mocked())return void y.error(c.missingAction,s.action,s.api);n=s.api[e]}else y.is.form()&&(n=m.attr("action")||g.attr("action")||!1,y.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=y.get.xhr();e&&"resolved"!==e.state()&&(y.debug("Cancelling API request"),e.abort())},reset:function(){y.remove.error(),y.remove.loading()},setting:function(e,t){if(y.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,s,e);else{if(t===O)return s[e];E.isPlainObject(s[e])?E.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,y,e);else{if(t===O)return y[e];y[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,s.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),y.verbose.apply(console,arguments)))},error:function(){s.silent||(y.error=Function.prototype.bind.call(console.error,console,s.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=s.name+":",n=0;T=!1,clearTimeout(y.performance.timer),E.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",C&&(e+=" '"+C+"'"),(console.group!==O||console.table!==O)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):E.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=b;return e=e||A,t=h||t,"string"==typeof i&&r!==O&&(i=i.split(/[\. ]/),o=i.length-1,E.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(E.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==O)return a=r[n],!1;{if(!E.isPlainObject(r[t])||e==o)return r[t]!==O?a=r[t]:y.error(c.method,i),!1;r=r[t]}}})),E.isFunction(a)?n=a.apply(t,e):a!==O&&(n=a),Array.isArray(x)?x.push(n):x!==O?x=[x,n]:n!==O&&(x=n),a}};k?(b===O&&y.initialize(),y.invoke(D)):(b!==O&&b.invoke("destroy"),y.initialize())}),x!==O?x:this},E.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,void document),function(x,e,C,T){"use strict";x.isFunction=x.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")(),x.fn.transition=function(){var m,r=x(this),p=r.selector||"",g=(new Date).getTime(),h=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),w="string"==typeof b;return r.each(function(n){var l,s,t,c,i,o,e,a,u=x(this),d=this,f={initialize:function(){l=f.get.settings.apply(d,v),c=l.className,t=l.error,i=l.metadata,a="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||f,o=f.get.animationEndEvent(),!1===(w=w&&f.invoke(b))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.animate):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),s=f,u.data(e,s)},destroy:function(){f.verbose("Destroying previous module for",d),u.removeData(e)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){f.verbose("Repainting element");d.offsetWidth},delay:function(e){var t=(t=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");e=e!==T?e:l.interval,e="auto"==l.reverse&&t==c.outward||1==l.reverse?(r.length-n)*l.interval:n*l.interval,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(e){if(l=e||l,!f.is.supported())return f.error(t.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),s.complete()}f.can.animate()?f.set.animating(l.animation):f.error(t.noAnimation,l.animation,d)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(e){f.debug("Queueing animation of",e),f.queuing=!0,u.one(o+".queue"+a,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(e){e&&e.target===d&&e.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(d)))},force:{visible:function(){var e=u.attr("style"),e=f.get.userStyle(e),t=f.get.displayType(),e=e+"display: "+t+" !important;",n=u[0].style.display;return!t||"none"===n&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),t=u.css("display"),e=e===T||""===e;"none"===t||f.is.hidden()?e&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(e){var n=!1;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),x.each(e,function(e,t){t!==c.inward&&t!==c.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){f.remove.completeCallback(),e=e||l.animation;e=f.get.animationClass(e);f.save.animation(e),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(f.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||f.get.direction())==c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(e){e=e||f.get.animationClass(),f.debug("Starting tween",e),u.addClass(e).one(o+".complete"+a,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(d)}},save:{animation:function(e){f.cache||(f.cache={}),f.cache.animation=e},displayType:function(e){"none"!==e&&u.data(i.displayType,e)},transitionExists:function(e,t){x.fn.transition.exists[e]=t,f.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=f.get.currentAnimation();e&&(u.removeClass(e),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var e=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(o)},e+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+a)},completeCallback:function(){u.off(".complete"+a)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?x.extend(!0,{},x.fn.transition.settings,e):"function"==typeof n?x.extend({},x.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?x.extend({},x.fn.transition.settings,t,{animation:e}):"function"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,onComplete:t}):x.extend({},x.fn.transition.settings,{animation:e})},animationClass:function(e){var e=e||l.animation,t=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+t+e},currentAnimation:function(){return!(!f.cache||f.cache.animation===T)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.is.visible()?c.inward:c.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),x.each(e,function(e,t){t===c.inward?n=c.inward:t===c.outward&&(n=c.outward)})),n||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||l.duration)?u.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return l.displayType||((e=e===T||e)&&u.data(i.displayType)===T&&(""===(e=u.css("display"))||"none"===e?f.can.transition(!0):f.save.displayType(e)),u.data(i.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return x.fn.transition.exists[e]},animationStartEvent:function(){var e,t=C.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(t.style[e]!==T)return n[e];return!1},animationEndEvent:function(){var e,t=C.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(t.style[e]!==T)return n[e];return!1}},can:{transition:function(e){var t,n,i,o,a=l.animation,r=f.get.transitionExists(a),s=f.get.displayType(!1);if(r===T||e){if(f.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=x("<"+t+" />").addClass(e).insertAfter(u)).addClass(a).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),i=t.addClass(c.inward).css("animationName"),s||(s=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),t.remove(),n!=i)f.debug("Direction exists for animation",a),o=!0;else{if("none"==n||!n)return void f.debug("No animation defined in css",a);f.debug("Static animation found",a,s),o=!1}f.save.transitionExists(a,o)}return r!==T?r:o},animate:function(){return f.can.transition()!==T}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.looping)},occurring:function(e){return e="."+(e=e||l.animation).replace(" ","."),0<u.filter(e).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==o}},hide:function(){f.verbose("Hiding element"),f.is.animating()&&f.reset(),d.blur(),f.remove.display(),f.remove.visible(),x.isFunction(l.onBeforeHide)?l.onBeforeHide.call(d,function(){f.hideNow()}):f.hideNow()},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHide.call(d),l.onComplete.call(d)},show:function(e){f.verbose("Showing element",e),f.force.visible()&&(f.remove.hidden(),f.set.visible(),l.onShow.call(d),l.onComplete.call(d))},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(o)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(o)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(e,t){if(f.debug("Changing setting",e,t),x.isPlainObject(e))x.extend(!0,l,e);else{if(t===T)return l[e];x.isPlainObject(l[e])?x.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(x.isPlainObject(e))x.extend(!0,f,e);else{if(t===T)return f[e];f[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(g||t),g=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=l.name+":",n=0;g=!1,clearTimeout(f.performance.timer),x.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",p&&(e+=" '"+p+"'"),1<r.length&&(e+=" ("+r.length+")"),(console.group!==T||console.table!==T)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):x.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||y,t=d||t,"string"==typeof i&&r!==T&&(i=i.split(/[\. ]/),o=i.length-1,x.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(x.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==T)return a=r[n],!1;{if(!x.isPlainObject(r[t])||e==o)return r[t]!==T&&(a=r[t]),!1;r=r[t]}}})),x.isFunction(a)?n=a.apply(t,e):a!==T&&(n=a),Array.isArray(m)?m.push(n):m!==T?m=[m,n]:n!==T&&(m=n),a!==T&&a}};f.initialize()}),m!==T?m:this},x.fn.transition.exists={},x.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,skipInlineHidden:!1,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); |