!function(e,t,n,i){e.site=e.fn.site=function(i){var o,a,r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1),d=e.isPlainObject(i)?e.extend(!0,{},e.site.settings,i):e.extend({},e.site.settings),f=d.namespace,m=d.error,g="module-"+f,v=e(n),p=v,h=this,b=p.data(g);return o={initialize:function(){o.instantiate()},instantiate:function(){o.verbose("Storing instance of site",o),b=o,p.data(g,o)},normalize:function(){o.fix.console(),o.fix.requestAnimationFrame()},fix:{console:function(){o.debug("Normalizing window.console"),void 0!==console&&void 0!==console.log||(o.verbose("Console not available, normalizing events"),o.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(o.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(o.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){o.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){o.debug("Normalizing requestAnimationFrame"),void 0===t.requestAnimationFrame&&(o.debug("RequestAnimationFrame not available, normalizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return void 0!==e.fn[t]&&void 0!==e.fn[t].settings},enabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,function(e,t){o.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,function(e,t){o.moduleExists(t)||n.push(t)}),n}},change:{setting:function(t,n,i,a){i="string"==typeof i?"all"===i?d.modules:[i]:i||d.modules,a=void 0===a||a,e.each(i,function(i,r){var s,c=!o.moduleExists(r)||(e.fn[r].settings.namespace||!1);o.moduleExists(r)&&(o.verbose("Changing default setting",t,n,r),e.fn[r].settings[t]=n,a&&c&&(s=e(":data(module-"+c+")"),s.length>0&&(o.verbose("Modifying existing settings",s),s[r]("setting",t,n))))})},settings:function(t,n,i){n="string"==typeof n?[n]:n||d.modules,i=void 0===i||i,e.each(n,function(n,a){var r;o.moduleExists(a)&&(o.verbose("Changing default setting",t,a),e.extend(!0,e.fn[a].settings,t),i&&f&&(r=e(":data(module-"+f+")"),r.length>0&&(o.verbose("Modifying existing settings",r),r[a]("setting",t))))})}},enable:{console:function(){o.console(!0)},debug:function(e,t){e=e||d.modules,o.debug("Enabling debug for modules",e),o.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Enabling verbose debug for modules",e),o.change.setting("verbose",!0,e,t)}},disable:{console:function(){o.console(!1)},debug:function(e,t){e=e||d.modules,o.debug("Disabling debug for modules",e),o.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Disabling verbose debug for modules",e),o.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(void 0===b.cache.console)return void o.error(m.console);o.debug("Restoring console function"),t.console=b.cache.console}else o.debug("Disabling console function"),b.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){o.verbose("Destroying previous site for",p),p.removeData(g)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,d,t);else{if(void 0===n)return d[t];d[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(void 0===n)return o[t];o[t]=n}},debug:function(){d.debug&&(d.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,d.name+":"),o.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,d.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;d.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Element:h,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,500)},display:function(){var t=d.name+":",n=0;r=!1,clearTimeout(o.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",(void 0!==console.group||void 0!==console.table)&&s.length>0&&(console.table||e.each(s,function(e,t){})),s=[]}},invoke:function(t,n,i){var r,s,c,l=b;return n=n||u,i=h||i,"string"==typeof t&&void 0!==l&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,i){var a=n!=r?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(void 0!==l[a])return s=l[a],!1;if(!e.isPlainObject(l[i])||n==r)return void 0!==l[i]?(s=l[i],!1):(o.error(m.method,t),!1);l=l[i]}})),e.isFunction(s)?c=s.apply(i,n):void 0!==s&&(c=s),e.isArray(a)?a.push(c):void 0!==a?a=[a,c]:void 0!==c&&(a=c),s}},l?(void 0===b&&o.initialize(),o.invoke(c)):(void 0!==b&&o.destroy(),o.initialize()),void 0!==a?a:this},e.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","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.form=function(t){var i,o=e(this),a=o.selector||"",r=(new Date).getTime(),s=[],c=arguments[0],l=arguments[1],u="string"==typeof c,d=[].slice.call(arguments,1);return o.each(function(){var f,m,g,v,p,h,b,y,x,C,w,k,S,T,A,R,P,E,F=e(this),D=this,O=[],q=!1;E={initialize:function(){E.get.settings(),u?(void 0===P&&E.instantiate(),E.invoke(c)):(E.verbose("Initializing form validation",F,y),E.bindEvents(),E.set.defaults(),E.instantiate())},instantiate:function(){E.verbose("Storing instance of module",E),P=E,F.data(A,E)},destroy:function(){E.verbose("Destroying previous module",P),E.removeEvents(),F.removeData(A)},refresh:function(){E.verbose("Refreshing selector cache"),f=F.find(w.field),m=F.find(w.group),g=F.find(w.message),v=F.find(w.prompt),p=F.find(w.submit),h=F.find(w.clear),b=F.find(w.reset)},submit:function(){E.verbose("Submitting form",F),F.submit()},attachEvents:function(t,n){n=n||"submit",e(t).on("click"+R,function(e){E[n](),e.preventDefault()})},bindEvents:function(){E.verbose("Attaching form events"),F.on("submit"+R,E.validate.form).on("blur"+R,w.field,E.event.field.blur).on("click"+R,w.submit,E.submit).on("click"+R,w.reset,E.reset).on("click"+R,w.clear,E.clear),y.keyboardShortcuts&&F.on("keydown"+R,w.field,E.event.field.keydown),f.each(function(){var t=e(this),n=t.prop("type"),i=E.get.changeEvent(n,t);e(this).on(i+R,E.event.field.change)})},clear:function(){f.each(function(){var t=e(this),n=t.parent(),i=t.closest(m),o=i.find(w.prompt),a=t.data(C.defaultValue)||"",r=n.is(w.uiCheckbox),s=n.is(w.uiDropdown);i.hasClass(k.error)&&(E.verbose("Resetting error on field",i),i.removeClass(k.error),o.remove()),s?(E.verbose("Resetting dropdown value",n,a),n.dropdown("clear")):r?t.prop("checked",!1):(E.verbose("Resetting field value",t,a),t.val(""))})},reset:function(){f.each(function(){var t=e(this),n=t.parent(),i=t.closest(m),o=i.find(w.prompt),a=t.data(C.defaultValue),r=n.is(w.uiCheckbox),s=n.is(w.uiDropdown),c=i.hasClass(k.error);void 0!==a&&(c&&(E.verbose("Resetting error on field",i),i.removeClass(k.error),o.remove()),s?(E.verbose("Resetting dropdown value",n,a),n.dropdown("restore defaults")):r?(E.verbose("Resetting checkbox value",n,a),t.prop("checked",a)):(E.verbose("Resetting field value",t,a),t.val(a)))})},is:{bracketedRule:function(e){return e.type&&e.type.match(y.regExp.bracket)},valid:function(){var t=!0;return E.verbose("Checking if form is valid"),e.each(x,function(e,n){E.validate.field(n,e)||(t=!1)}),t}},removeEvents:function(){F.off(R),f.off(R),p.off(R),f.off(R)},event:{field:{keydown:function(t){var n=e(this),i=t.which,o={enter:13,escape:27};i==o.escape&&(E.verbose("Escape key pressed blurring field"),n.blur()),!t.ctrlKey&&i==o.enter&&n.is(w.input)&&n.not(w.checkbox).length>0&&(q||(n.one("keyup"+R,E.event.field.keyup),E.submit(),E.debug("Enter pressed on input submitting form")),q=!0)},keyup:function(){q=!1},blur:function(t){var n=e(this),i=n.closest(m),o=E.get.validation(n);i.hasClass(k.error)?(E.debug("Revalidating field",n,o),E.validate.form.call(E,t,!0)):"blur"!=y.on&&"change"!=y.on||E.validate.field(o)},change:function(t){var n=e(this),i=n.closest(m);("change"==y.on||i.hasClass(k.error)&&y.revalidate)&&(clearTimeout(E.timer),E.timer=setTimeout(function(){E.debug("Revalidating field",n,E.get.validation(n)),E.validate.form.call(E,t,!0)},y.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!E.is.bracketedRule(e))&&e.type.match(y.regExp.bracket)[1]+""},ruleName:function(e){return E.is.bracketedRule(e)?e.type.replace(e.type.match(y.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":E.get.inputEvent()},inputEvent:function(){return void 0!==n.createElement("input").oninput?"input":void 0!==n.createElement("input").onpropertychange?"propertychange":"keyup"},prompt:function(e,t){var n,i,o,a=E.get.ruleName(e),r=E.get.ancillaryValue(e),s=e.prompt||y.prompt[a]||y.text.unspecifiedRule,c=s.search("{value}")!==-1,l=s.search("{name}")!==-1;return(l||c)&&(i=E.get.field(t.identifier)),c&&(s=s.replace("{value}",i.val())),l&&(n=i.closest(w.group).find("label").eq(0),o=1==n.size()?n.text():i.prop("placeholder")||y.text.unspecifiedField,s=s.replace("{name}",o)),s=s.replace("{identifier}",t.identifier),s=s.replace("{ruleValue}",r),e.prompt||E.verbose("Using default validation prompt for type",s,a),s},settings:function(){if(e.isPlainObject(t)){var n,i=Object.keys(t),o=i.length>0&&(void 0!==t[i[0]].identifier&&void 0!==t[i[0]].rules);o?(y=e.extend(!0,{},e.fn.form.settings,l),x=e.extend({},e.fn.form.settings.defaults,t),E.error(y.error.oldSyntax,D),E.verbose("Extending settings from legacy parameters",x,y)):(t.fields&&(n=Object.keys(t.fields),("string"==typeof t.fields[n[0]]||e.isArray(t.fields[n[0]]))&&e.each(t.fields,function(n,i){"string"==typeof i&&(i=[i]),t.fields[n]={rules:[]},e.each(i,function(e,i){t.fields[n].rules.push({type:i})})})),y=e.extend(!0,{},e.fn.form.settings,t),x=e.extend({},e.fn.form.settings.defaults,y.fields),E.verbose("Extending settings",x,y))}else y=e.fn.form.settings,x=e.fn.form.settings.defaults,E.verbose("Using default form validation",x,y);T=y.namespace,C=y.metadata,w=y.selector,k=y.className,S=y.error,A="module-"+T,R="."+T,P=F.data(A),E.refresh()},field:function(t){return E.verbose("Finding field with identifier",t),f.filter("#"+t).length>0?f.filter("#"+t):f.filter('[name="'+t+'"]').length>0?f.filter('[name="'+t+'"]'):f.filter('[name="'+t+'[]"]').length>0?f.filter('[name="'+t+'[]"]'):f.filter("[data-"+C.validate+'="'+t+'"]').length>0?f.filter("[data-"+C.validate+'="'+t+'"]'):e("")},fields:function(t){var n=e();return e.each(t,function(e,t){n=n.add(E.get.field(t))}),n},validation:function(t){var n,i;return!!x&&(e.each(x,function(e,o){i=o.identifier||e,E.get.field(i)[0]==t[0]&&(o.identifier=i,n=o)}),n||!1)},value:function(e){var t,n=[];return n.push(e),t=E.get.values.call(D,n),t[e]},values:function(t){var n=e.isArray(t)?E.get.fields(t):f,i={};return n.each(function(t,n){var o=e(n),a=(o.prop("type"),o.prop("name")),r=o.val(),s=o.is(w.checkbox),c=o.is(w.radio),l=a.indexOf("[]")!==-1,u=!!s&&o.is(":checked");a&&(l?(a=a.replace("[]",""),i[a]||(i[a]=[]),s?u?i[a].push(r||!0):i[a].push(!1):i[a].push(r)):c?u&&(i[a]=r):i[a]=s?!!u&&(r||!0):r)}),i}},has:{field:function(e){return E.verbose("Checking for existence of a field with identifier",e),"string"!=typeof e&&E.error(S.identifier,e),f.filter("#"+e).length>0||(f.filter('[name="'+e+'"]').length>0||f.filter("[data-"+C.validate+'="'+e+'"]').length>0)}},add:{prompt:function(t,n){var i=E.get.field(t),o=i.closest(m),a=o.children(w.prompt),r=0!==a.length;n="string"==typeof n?[n]:n,E.verbose("Adding field error state",t),o.addClass(k.error),y.inline&&(r||(a=y.templates.prompt(n),a.appendTo(o)),a.html(n[0]),r?E.verbose("Inline errors are disabled, no inline error added",t):y.transition&&void 0!==e.fn.transition&&F.transition("is supported")?(E.verbose("Displaying error with css transition",y.transition),a.transition(y.transition+" in",y.duration)):(E.verbose("Displaying error with fallback javascript animation"),a.fadeIn(y.duration)))},errors:function(e){E.debug("Adding form error messages",e),E.set.error(),g.html(y.templates.error(e))}},remove:{prompt:function(t){var n=E.get.field(t),i=n.closest(m),o=i.children(w.prompt);i.removeClass(k.error),y.inline&&o.is(":visible")&&(E.verbose("Removing prompt for field",t),y.transition&&void 0!==e.fn.transition&&F.transition("is supported")?o.transition(y.transition+" out",y.duration,function(){o.remove()}):o.fadeOut(y.duration,function(){o.remove()}))}},set:{success:function(){F.removeClass(k.error).addClass(k.success)},defaults:function(){f.each(function(){var t=e(this),n=t.filter(w.checkbox).length>0,i=n?t.is(":checked"):t.val();t.data(C.defaultValue,i)})},error:function(){F.removeClass(k.success).addClass(k.error)},value:function(e,t){var n={};return n[e]=t,E.set.values.call(D,n)},values:function(t){e.isEmptyObject(t)||e.each(t,function(t,n){var i,o=E.get.field(t),a=o.parent(),r=e.isArray(n),s=a.is(w.uiCheckbox),c=a.is(w.uiDropdown),l=o.is(w.radio)&&s,u=o.length>0;u&&(r&&s?(E.verbose("Selecting multiple",n,o),a.checkbox("uncheck"),e.each(n,function(e,t){i=o.filter('[value="'+t+'"]'),a=i.parent(),i.length>0&&a.checkbox("check")})):l?(E.verbose("Selecting radio value",n,o),o.filter('[value="'+n+'"]').parent(w.uiCheckbox).checkbox("check")):s?(E.verbose("Setting checkbox value",n,a),n===!0?a.checkbox("check"):a.checkbox("uncheck")):c?(E.verbose("Setting dropdown value",n,a),a.dropdown("set selected",n)):(E.verbose("Setting field value",n,o),o.val(n)))})}},validate:{form:function(e,t){var n=E.get.values();if(q)return!1;if(O=[],E.is.valid()){if(E.debug("Form has no validation errors, submitting"),E.set.success(),t!==!0)return y.onSuccess.call(D,e,n)}else if(E.debug("Form has errors"),E.set.error(),y.inline||E.add.errors(O),void 0!==F.data("moduleApi")&&e.stopImmediatePropagation(),t!==!0)return y.onFailure.call(D,O,n)},field:function(t,n){var i=t.identifier||n,o=E.get.field(i),a=!0,r=[];return t.identifier||(E.debug("Using field name as identifier",i),t.identifier=i),o.prop("disabled")?(E.debug("Field is disabled. Skipping",i),a=!0):t.optional&&""===e.trim(o.val())?(E.debug("Field is optional and empty. Skipping",i),a=!0):void 0!==t.rules&&e.each(t.rules,function(e,n){E.has.field(i)&&!E.validate.rule(t,n)&&(E.debug("Field is invalid",i,n.type),r.push(E.get.prompt(n,t)),a=!1)}),a?(E.remove.prompt(i,r),y.onValid.call(o),!0):(O=O.concat(r),E.add.prompt(i,r),y.onInvalid.call(o,r),!1)},rule:function(t,n){var i=E.get.field(t.identifier),o=(n.type,i.val()),a=E.get.ancillaryValue(n),r=E.get.ruleName(n),s=y.rules[r];return e.isFunction(s)?(o=void 0===o||""===o||null===o?"":e.trim(o+""),s.call(i,o,a)):void E.error(S.noRule,r)}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,y,t);else{if(void 0===n)return y[t];y[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,E,t);else{if(void 0===n)return E[t];E[t]=n}},debug:function(){y.debug&&(y.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,y.name+":"),E.debug.apply(console,arguments)))},verbose:function(){y.verbose&&y.debug&&(y.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),E.verbose.apply(console,arguments)))},error:function(){E.error=Function.prototype.bind.call(console.error,console,y.name+":"),E.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;y.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:D,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var t=y.name+":",n=0;r=!1,clearTimeout(E.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),o.length>1&&(t+=" ("+o.length+")"),(void 0!==console.group||void 0!==console.table)&&s.length>0&&(console.table||e.each(s,function(e,t){})),s=[]}},invoke:function(t,n,o){var a,r,s,c=P;return n=n||d,o=D||o,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,i){var o=n!=a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[o])&&n!=a)c=c[o];else{if(void 0!==c[o])return r=c[o],!1;if(!e.isPlainObject(c[i])||n==a)return void 0!==c[i]&&(r=c[i],!1);c=c[i]}})),e.isFunction(r)?s=r.apply(o,n):void 0!==r&&(s=r),e.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),r}},E.initialize()}),void 0!==i?i:this},e.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,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{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-]*[a-z0-9])?",escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{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} cannot contain "{ruleValue}"',containExactly:'{name} cannot contain exactly "{ruleValue}"',doesntContain:'{name} must contain "{ruleValue}"',doesntContainExactly:'{name} must 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, textarea, select",group:".field",input:"input",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"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},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."},templates:{error:function(t){var n='",e(n)},prompt:function(t){return e("
").addClass("ui basic red pointing prompt label").html(t[0])}},rules:{empty:function(t){return!(void 0===t||""===t||e.isArray(t)&&0===t.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return new RegExp(e.fn.form.settings.regExp.email,"i").test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,n){var i,o=n.match(e.fn.form.settings.regExp.flags);return o&&(n=o.length>=2?o[1]:n,i=o.length>=3?o[2]:""),t.match(new RegExp(n,i))},integer:function(t,n){var i,o,a,r=e.fn.form.settings.regExp.integer;return void 0===n||""===n||".."===n||(n.indexOf("..")==-1?r.test(n)&&(i=o=n-0):(a=n.split("..",2),r.test(a[0])&&(i=a[0]-0),r.test(a[1])&&(o=a[1]-0))),r.test(t)&&(void 0===i||t>=i)&&(void 0===o||t<=o)},decimal:function(t){return e.fn.form.settings.regExp.decimal.test(t)},number:function(t){return e.fn.form.settings.regExp.number.test(t)},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,e!=t},notExactly:function(e,t){return e!=t},contains:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))!==-1},containsExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))!==-1},doesntContain:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))===-1},doesntContainExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))===-1},minLength:function(e,t){return void 0!==e&&e.length>=t},length:function(e,t){return void 0!==e&&e.length>=t},exactLength:function(e,t){return void 0!==e&&e.length==t},maxLength:function(e,t){return void 0!==e&&e.length<=t},match:function(t,n){var i;e(this);return e('[data-validate="'+n+'"]').length>0?i=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?i=e("#"+n).val():e('[name="'+n+'"]').length>0?i=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(i=e('[name="'+n+'[]"]')),void 0!==i&&t.toString()==i.toString()},different:function(t,n){var i;e(this);return e('[data-validate="'+n+'"]').length>0?i=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?i=e("#"+n).val():e('[name="'+n+'"]').length>0?i=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(i=e('[name="'+n+'[]"]')),void 0!==i&&t.toString()!==i.toString()},creditCard:function(t,n){var i,o,a={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]}},r={},s=!1,c="string"==typeof n&&n.split(",");if("string"==typeof t&&0!==t.length){if(c&&(e.each(c,function(n,i){(o=a[i])&&(r={length:e.inArray(t.length,o.length)!==-1,pattern:t.search(o.pattern)!==-1},r.length&&r.pattern&&(s=!0))}),!s))return!1;if(i={number:e.inArray(t.length,a.unionPay.length)!==-1,pattern:t.search(a.unionPay.pattern)!==-1},i.number&&i.pattern)return!0;for(var l=t.length,u=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;l--;)f+=d[u][parseInt(t.charAt(l),10)],u^=1;return f%10==0&&f>0}},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&&e.search(",")===-1:e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?e.search(",")===-1:e.split(",").length<=t)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.accordion=function(n){var i,o=e(this),a=(new Date).getTime(),r=[],s=arguments[0],c="string"==typeof s,l=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame;return o.each(function(){var u,d,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),m=f.className,g=f.namespace,v=f.selector,p=f.error,h="."+g,b="module-"+g,y=o.selector||"",x=e(this),C=x.find(v.title),w=x.find(v.content),k=this,S=x.data(b);d={initialize:function(){d.debug("Initializing",x),d.bind.events(),f.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){S=d,x.data(b,d)},destroy:function(){d.debug("Destroying previous instance",x),x.off(h).removeData(b)},refresh:function(){C=x.find(v.title),w=x.find(v.content)},observeChanges:function(){"MutationObserver"in t&&(u=new MutationObserver(function(e){d.debug("DOM tree modified, updating selector cache"),d.refresh()}),u.observe(k,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",u))},bind:{events:function(){d.debug("Binding delegated events"),x.on(f.on+h,v.trigger,d.event.click)}},event:{click:function(){d.toggle.call(this)}},toggle:function(t){var n=void 0!==t?"number"==typeof t?C.eq(t):e(t).closest(v.title):e(this).closest(v.title),i=n.next(w),o=i.hasClass(m.animating),a=i.hasClass(m.active),r=a&&!o,s=!a&&o;d.debug("Toggling visibility of content",n),r||s?f.collapsible?d.close.call(n):d.debug("Cannot close accordion content collapsing is disabled"):d.open.call(n)},open:function(t){var n=void 0!==t?"number"==typeof t?C.eq(t):e(t).closest(v.title):e(this).closest(v.title),i=n.next(w),o=i.hasClass(m.animating);if(i.hasClass(m.active)||o)return void d.debug("Accordion already open, skipping",i);d.debug("Opening accordion content",n),f.onOpening.call(i),f.exclusive&&d.closeOthers.call(n),n.addClass(m.active),i.stop(!0,!0).addClass(m.animating),f.animateChildren&&(void 0!==e.fn.transition&&x.transition("is supported")?i.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):i.children().stop(!0,!0).animate({opacity:1},f.duration,d.resetOpacity)),i.slideDown(f.duration,f.easing,function(){i.removeClass(m.animating).addClass(m.active),d.reset.display.call(this),f.onOpen.call(this),f.onChange.call(this)})},close:function(t){var n=void 0!==t?"number"==typeof t?C.eq(t):e(t).closest(v.title):e(this).closest(v.title),i=n.next(w),o=i.hasClass(m.animating),a=i.hasClass(m.active),r=!a&&o,s=a&&o;!a&&!r||s||(d.debug("Closing accordion content",i),f.onClosing.call(i),n.removeClass(m.active),i.stop(!0,!0).addClass(m.animating),f.animateChildren&&(void 0!==e.fn.transition&&x.transition("is supported")?i.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):i.children().stop(!0,!0).animate({opacity:0},f.duration,d.resetOpacity)),i.slideUp(f.duration,f.easing,function(){i.removeClass(m.animating).removeClass(m.active),d.reset.display.call(this),f.onClose.call(this),f.onChange.call(this)}))},closeOthers:function(t){var n,i,o,a=void 0!==t?C.eq(t):e(this).closest(v.title),r=a.parents(v.content).prev(v.title),s=a.closest(v.accordion),c=v.title+"."+m.active+":visible",l=v.content+"."+m.active+":visible";f.closeNested?(n=s.find(c).not(r),o=n.next(w)):(n=s.find(c).not(r),i=s.find(l).find(c).not(r),n=n.not(i),o=n.next(w)),n.length>0&&(d.debug("Exclusive enabled, closing other content",n),n.removeClass(m.active),o.removeClass(m.animating).stop(!0,!0),f.animateChildren&&(void 0!==e.fn.transition&&x.transition("is supported")?o.children().transition({animation:"fade out",useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):o.children().stop(!0,!0).animate({opacity:0},f.duration,d.resetOpacity)),o.slideUp(f.duration,f.easing,function(){e(this).removeClass(m.active),d.reset.display.call(this)}))},reset:{display:function(){d.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){d.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(d.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===n)return f[t];f[t]=n}},internal:function(t,n){if(d.debug("Changing internal",t,n),void 0===n)return d[t];e.isPlainObject(t)?e.extend(!0,d,t):d[t]=n},debug:function(){f.debug&&(f.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,f.name+":"),d.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),d.verbose.apply(console,arguments)))},error:function(){d.error=Function.prototype.bind.call(console.error,console,f.name+":"),d.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,r.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var t=f.name+":",n=0;a=!1,clearTimeout(d.performance.timer),e.each(r,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",y&&(t+=" '"+y+"'"),(void 0!==console.group||void 0!==console.table)&&r.length>0&&(console.table||e.each(r,function(e,t){})),r=[]}},invoke:function(t,n,o){var a,r,s,c=S;return n=n||l,o=k||o,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,i){var o=n!=a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[o])&&n!=a)c=c[o];else{if(void 0!==c[o])return r=c[o],!1;if(!e.isPlainObject(c[i])||n==a)return void 0!==c[i]?(r=c[i],!1):(d.error(p.method,t),!1);c=c[i]}})),e.isFunction(r)?s=r.apply(o,n):void 0!==r&&(s=r),e.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),r}},c?(void 0===S&&d.initialize(),d.invoke(s)):(void 0!==S&&S.invoke("destroy"),d.initialize())}),void 0!==i?i:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onOpen:function(){},onClosing:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.checkbox=function(n){var i,o=e(this),a=o.selector||"",r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return o.each(function(){var o,d,f=e.extend(!0,{},e.fn.checkbox.settings,n),m=f.className,g=f.namespace,v=f.selector,p=f.error,h="."+g,b="module-"+g,y=e(this),x=e(this).children(v.label),C=e(this).children(v.input),w=C[0],k=!1,S=!1,T=y.data(b),A=this;d={ initialize:function(){d.verbose("Initializing checkbox",f),d.create.label(),d.bind.events(),d.set.tabbable(),d.hide.input(),d.observeChanges(),d.instantiate(),d.setup()},instantiate:function(){d.verbose("Storing instance of module",d),T=d,y.data(b,d)},destroy:function(){d.verbose("Destroying module"),d.unbind.events(),d.show.input(),y.removeData(b)},fix:{reference:function(){y.is(v.input)&&(d.debug("Behavior called on adjusting invoked element"),y=y.closest(v.checkbox),d.refresh())}},setup:function(){d.set.initialLoad(),d.is.indeterminate()?(d.debug("Initial value is indeterminate"),d.indeterminate()):d.is.checked()?(d.debug("Initial value is checked"),d.check()):(d.debug("Initial value is unchecked"),d.uncheck()),d.remove.initialLoad()},refresh:function(){x=y.children(v.label),C=y.children(v.input),w=C[0]},hide:{input:function(){d.verbose("Modfying z-index to be unselectable"),C.addClass(m.hidden)}},show:{input:function(){d.verbose("Modfying z-index to be selectable"),C.removeClass(m.hidden)}},observeChanges:function(){"MutationObserver"in t&&(o=new MutationObserver(function(e){d.debug("DOM tree modified, updating selector cache"),d.refresh()}),o.observe(A,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",o))},attachEvents:function(t,n){var i=e(t);n=e.isFunction(d[n])?d[n]:d.toggle,i.length>0?(d.debug("Attaching checkbox events to element",t,n),i.on("click"+h,n)):d.error(p.notFound)},event:{click:function(t){var n=e(t.target);return n.is(v.input)?void d.verbose("Using default check action on initialized checkbox"):n.is(v.link)?void d.debug("Clicking link inside checkbox, skipping toggle"):(d.toggle(),C.focus(),void t.preventDefault())},keydown:function(e){var t=e.which,n={enter:13,space:32,escape:27};t==n.escape?(d.verbose("Escape key pressed blurring field"),C.blur(),S=!0):e.ctrlKey||t!=n.space&&t!=n.enter?S=!1:(d.verbose("Enter/space key pressed, toggling checkbox"),d.toggle(),S=!0)},keyup:function(e){S&&e.preventDefault()}},check:function(){d.should.allowCheck()&&(d.debug("Checking checkbox",C),d.set.checked(),d.should.ignoreCallbacks()||(f.onChecked.call(w),f.onChange.call(w)))},uncheck:function(){d.should.allowUncheck()&&(d.debug("Unchecking checkbox"),d.set.unchecked(),d.should.ignoreCallbacks()||(f.onUnchecked.call(w),f.onChange.call(w)))},indeterminate:function(){if(d.should.allowIndeterminate())return void d.debug("Checkbox is already indeterminate");d.debug("Making checkbox indeterminate"),d.set.indeterminate(),d.should.ignoreCallbacks()||(f.onIndeterminate.call(w),f.onChange.call(w))},determinate:function(){if(d.should.allowDeterminate())return void d.debug("Checkbox is already determinate");d.debug("Making checkbox determinate"),d.set.determinate(),d.should.ignoreCallbacks()||(f.onDeterminate.call(w),f.onChange.call(w))},enable:function(){if(d.is.enabled())return void d.debug("Checkbox is already enabled");d.debug("Enabling checkbox"),d.set.enabled(),f.onEnable.call(w)},disable:function(){if(d.is.disabled())return void d.debug("Checkbox is already disabled");d.debug("Disabling checkbox"),d.set.disabled(),f.onDisable.call(w)},get:{radios:function(){return e('input[name="'+d.get.name()+'"]').closest(v.checkbox)},otherRadios:function(){return d.get.radios().not(y)},name:function(){return C.attr("name")}},is:{initialLoad:function(){return k},radio:function(){return C.hasClass(m.radio)||"radio"==C.attr("type")},indeterminate:function(){return void 0!==C.prop("indeterminate")&&C.prop("indeterminate")},checked:function(){return void 0!==C.prop("checked")&&C.prop("checked")},disabled:function(){return void 0!==C.prop("disabled")&&C.prop("disabled")},enabled:function(){return!d.is.disabled()},determinate:function(){return!d.is.indeterminate()},unchecked:function(){return!d.is.checked()}},should:{allowCheck:function(){return d.is.determinate()&&d.is.checked()&&!d.should.forceCallbacks()?(d.debug("Should not allow check, checkbox is already checked"),!1):f.beforeChecked.apply(w)!==!1||(d.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return d.is.determinate()&&d.is.unchecked()&&!d.should.forceCallbacks()?(d.debug("Should not allow uncheck, checkbox is already unchecked"),!1):f.beforeUnchecked.apply(w)!==!1||(d.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return d.is.indeterminate()&&!d.should.forceCallbacks()?(d.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):f.beforeIndeterminate.apply(w)!==!1||(d.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return d.is.determinate()&&!d.should.forceCallbacks()?(d.debug("Should not allow determinate, checkbox is already determinate"),!1):f.beforeDeterminate.apply(w)!==!1||(d.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return d.is.initialLoad()&&f.fireOnInit},ignoreCallbacks:function(){return k&&!f.fireOnInit}},can:{change:function(){return!(y.hasClass(m.disabled)||y.hasClass(m.readOnly)||C.prop("disabled")||C.prop("readonly"))},uncheck:function(){return"boolean"==typeof f.uncheckable?f.uncheckable:!d.is.radio()}},set:{initialLoad:function(){k=!0},checked:function(){if(d.verbose("Setting class to checked"),y.removeClass(m.indeterminate).addClass(m.checked),d.is.radio()&&d.uncheckOthers(),!d.is.indeterminate()&&d.is.checked())return void d.debug("Input is already checked, skipping input property change");d.verbose("Setting state to checked",w),C.prop("indeterminate",!1).prop("checked",!0),d.trigger.change()},unchecked:function(){if(d.verbose("Removing checked class"),y.removeClass(m.indeterminate).removeClass(m.checked),!d.is.indeterminate()&&d.is.unchecked())return void d.debug("Input is already unchecked");d.debug("Setting state to unchecked"),C.prop("indeterminate",!1).prop("checked",!1),d.trigger.change()},indeterminate:function(){if(d.verbose("Setting class to indeterminate"),y.addClass(m.indeterminate),d.is.indeterminate())return void d.debug("Input is already indeterminate, skipping input property change");d.debug("Setting state to indeterminate"),C.prop("indeterminate",!0),d.trigger.change()},determinate:function(){if(d.verbose("Removing indeterminate class"),y.removeClass(m.indeterminate),d.is.determinate())return void d.debug("Input is already determinate, skipping input property change");d.debug("Setting state to determinate"),C.prop("indeterminate",!1)},disabled:function(){if(d.verbose("Setting class to disabled"),y.addClass(m.disabled),d.is.disabled())return void d.debug("Input is already disabled, skipping input property change");d.debug("Setting state to disabled"),C.prop("disabled","disabled"),d.trigger.change()},enabled:function(){if(d.verbose("Removing disabled class"),y.removeClass(m.disabled),d.is.enabled())return void d.debug("Input is already enabled, skipping input property change");d.debug("Setting state to enabled"),C.prop("disabled",!1),d.trigger.change()},tabbable:function(){d.verbose("Adding tabindex to checkbox"),void 0===C.attr("tabindex")&&C.attr("tabindex",0)}},remove:{initialLoad:function(){k=!1}},trigger:{change:function(){d.verbose("Triggering change event from programmatic change"),C.trigger("change")}},create:{label:function(){C.prevAll(v.label).length>0?(C.prev(v.label).detach().insertAfter(C),d.debug("Moving existing label",x)):d.has.label()||(x=e("