wishthis/node_modules/fomantic-ui/dist/semantic.min.js
2023-08-17 11:47:40 +02:00

11 lines
No EOL
391 KiB
JavaScript

/*
* # Fomantic UI - 2.9.2
* https://github.com/fomantic/Fomantic-UI
* https://fomantic-ui.com/
*
* Copyright 2023 Contributors
* Released under the MIT license
* https://opensource.org/licenses/MIT
*
*/
!function(p,h,v){"use strict";h=void 0!==h&&h.Math===Math?h:globalThis,p.fn.site=function(e){var l,i=Date.now(),o=[],t=e,n="string"==typeof t,c=[].slice.call(arguments,1),r=p.isPlainObject(e)?p.extend(!0,{},p.site.settings,e):p.extend({},p.site.settings),a=r.namespace,d=r.error,s="module-"+a,u=p(v),f=this,m=u.data(s),g={initialize:function(){g.instantiate()},instantiate:function(){g.verbose("Storing instance of site",g),m=g,u.data(s,g)},normalize:function(){},fix:{consoleClear:function(){g.debug("Disabling programmatic console clearing"),h.console.clear=function(){}}},moduleExists:function(e){return void 0!==p.fn[e]&&void 0!==p.fn[e].settings},enabled:{modules:function(e){var n=[];return e=e||r.modules,p.each(e,function(e,t){g.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,p.each(e,function(e,t){g.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=void 0===a||a,p.each(e,function(e,t){var n=!g.moduleExists(t)||(p.fn[t].settings.namespace||!1);g.moduleExists(t)&&(g.verbose("Changing default setting",i,o,t),p.fn[t].settings[i]=o,a&&n&&0<(n=p(":data(module-"+n+")")).length&&(g.verbose("Modifying existing settings",n),n[t]("setting",i,o)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||r.modules,o=void 0===o||o,p.each(e,function(e,t){var n;g.moduleExists(t)&&(g.verbose("Changing default setting",i,t),p.extend(!0,p.fn[t].settings,i),o&&a&&0<(n=p(":data(module-"+a+")")).length&&(g.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){g.console(!0)},debug:function(e,t){e=e||r.modules,g.debug("Enabling debug for modules",e),g.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,g.debug("Enabling verbose debug for modules",e),g.change.setting("verbose",!0,e,t)}},disable:{console:function(){g.console(!1)},debug:function(e,t){e=e||r.modules,g.debug("Disabling debug for modules",e),g.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,g.debug("Disabling verbose debug for modules",e),g.change.setting("verbose",!1,e,t)}},console:function(e){e?void 0===m.cache.console?g.error(d.console):(g.debug("Restoring console function"),h.console=m.cache.console):(g.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(){},table:function(){},warn:function(){}})},destroy:function(){g.verbose("Destroying previous site for",u),u.removeData(s)},cache:{},setting:function(e,t){if(p.isPlainObject(e))p.extend(!0,r,e);else{if(void 0===t)return r[e];r[e]=t}},internal:function(e,t){if(p.isPlainObject(e))p.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){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.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(){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=Date.now())-(i||t),i=t,o.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(g.performance.timer),p.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):p.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,s=m;return e=e||c,t=t||f,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,p.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(p.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!p.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:g.error(d.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(l)?l.push(n):void 0!==l?l=[l,n]:void 0!==n&&(l=n),a}};return n?(void 0===m&&g.initialize(),g.invoke(t)):(void 0!==m&&g.destroy(),g.initialize()),void 0!==l?l:this},p.site=p.fn.site,p.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","flyout","form","modal","nag","popup","progress","rating","search","shape","sidebar","slider","state","sticky","tab","toast","transition","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},p.extend(p.expr.pseudos,{data:p.expr.createPseudo(function(t){return function(e){return!!p.data(e,t)}})})}(jQuery,window,document),function(R,F,I){"use strict";function j(e){return"function"==typeof e&&"number"!=typeof e.nodeType}F=void 0!==F&&F.Math===Math?F:globalThis,R.fn.form=function(k){var S,T=R(this),D=T.selector||"",A=Date.now(),E=[],O=k,P="string"==typeof O,M=[].slice.call(arguments,1);return T.each(function(){var o,u,e,t,f,l,m,g,p,n,c,i,a,s,d,r=R(this),h=this,v=[],b=!1,y=!1,x=!1,C=["clean","clean"],w={initialize:function(){w.get.settings(),P?(void 0===d&&w.instantiate(),w.invoke(O)):(void 0!==d&&(d.invoke("destroy"),w.refresh()),w.verbose("Initializing form validation",r,f),w.bindEvents(),w.set.defaults(),f.autoCheckRequired&&w.set.autoCheck(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of module",w),d=w,r.data(a,w)},destroy:function(){w.verbose("Destroying previous module",d),w.removeEvents(),r.removeData(a)},refresh:function(){w.verbose("Refreshing selector cache"),o=r.find(g.field),u=r.find(g.group),e=r.find(g.message),r.find(g.prompt),t=r.find(g.submit),r.find(g.clear),r.find(g.reset)},refreshEvents:function(){w.removeEvents(),w.bindEvents()},submit:function(){w.verbose("Submitting form",r),y=!0,r.trigger("submit")},attachEvents:function(e,t){t=t||"submit",R(e).on("click"+s,function(e){w[t](),e.preventDefault()})},bindEvents:function(){w.verbose("Attaching form events"),r.on("submit"+s,w.validate.form).on("blur"+s,g.field,w.event.field.blur).on("click"+s,g.submit,w.submit).on("click"+s,g.reset,w.reset).on("click"+s,g.clear,w.clear),f.keyboardShortcuts&&r.on("keydown"+s,g.field,w.event.field.keydown),o.each(function(e,t){var t=R(t),n=t.prop("type"),n=w.get.changeEvent(n,t);t.on(n+s,w.event.field.change)}),f.preventLeaving&&R(F).on("beforeunload"+s,w.event.beforeUnload),o.on("change click keyup keydown blur",function(e){w.determine.isDirty()}),r.on("dirty"+s,function(e){f.onDirty.call()}),r.on("clean"+s,function(e){f.onClean.call()})},clear:function(){o.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(u),o=i.find(g.prompt),a=t.closest(g.uiCalendar),r=t.data(m.defaultValue)||"",s=t.is(g.checkbox),l=n.is(g.uiDropdown)&&w.can.useElement("dropdown"),c=0<a.length&&w.can.useElement("calendar");i.hasClass(p.error)&&(w.verbose("Resetting error on field",i),i.removeClass(p.error),o.remove()),l?(w.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?a.calendar("clear"):(w.verbose("Resetting field value",t,r),t.val(""))}),w.remove.states()},reset:function(){o.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(u),o=t.closest(g.uiCalendar),a=i.find(g.prompt),r=t.data(m.defaultValue),s=t.is(g.checkbox),l=n.is(g.uiDropdown)&&w.can.useElement("dropdown"),c=0<o.length&&w.can.useElement("calendar"),d=i.hasClass(p.error);void 0!==r&&(d&&(w.verbose("Resetting error on field",i),i.removeClass(p.error),a.remove()),l?(w.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(w.verbose("Resetting checkbox value",t,r),t.prop("checked",r)):c?o.calendar("set date",r):(w.verbose("Resetting field value",t,r),t.val(r)))}),w.remove.states()},determine:{isValid:function(){var n=!0;return R.each(l,function(e,t){w.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;o.each(function(e,t){var t=R(t),n=0<t.filter(g.checkbox).length?w.is.checkboxDirty(t):w.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i=i||n}),i?w.set.dirty():w.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(g.checkbox)?!e.is(":checked"):w.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(w.verbose("Checking if field is valid",e),w.validate.field(l[e],e,!!n)):(w.verbose("Checking if form is valid"),R.each(l,function(e,t){w.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return x},clean:function(){return!x},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"===C[0]},justClean:function(){return"clean"===C[0]}},removeEvents:function(){r.off(s),o.off(s),t.off(s)},event:{field:{keydown:function(e){var t=R(this),n=e.which,i=t.is(g.input),o=t.is(g.checkbox),a=0<t.closest(g.uiDropdown).length,r=13;n===27&&(w.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!==r||!i||a||o||(b||(t.one("keyup"+s,w.event.field.keyup),w.submit(),w.debug("Enter pressed on input submitting form"),e.preventDefault()),b=!0)},keyup:function(){b=!1},blur:function(e){var t=R(this),n=t.closest(u),i=w.get.validation(t);i&&("blur"===f.on||n.hasClass(p.error)&&f.revalidate)&&(w.debug("Revalidating field",t,i),w.validate.field(i),f.inline||w.validate.form(!1,!0))},change:function(e){var t=R(this),n=t.closest(u),i=w.get.validation(t);i&&("change"===f.on||n.hasClass(p.error)&&f.revalidate)&&(clearTimeout(w.timer),w.timer=setTimeout(function(){w.debug("Revalidating field",t,i),w.validate.field(i),f.inline||w.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(w.is.dirty()&&!y)return(e=e||F.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!w.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return w.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":w.get.inputEvent()},inputEvent:function(){return void 0!==I.createElement("input").oninput?"input":void 0!==I.createElement("input").onpropertychange?"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=w.get.ruleName(e),o=w.get.ancillaryValue(e),a=w.get.field(t.identifier),r=a.val(),r=j(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<=["integer","decimal","number","size"].indexOf(i)&&0<=o.indexOf("..")&&(n=o.split("..",2),e.prompt||"size"===i||(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])),o&&0<=["match","different"].indexOf(i)&&(r=r.replace(/{ruleValue}/g,w.get.fieldLabel(o,!0))),s&&(r=r.replace(/{value}/g,a.val())),r=(r=(r=l?r.replace(/{name}/g,w.get.fieldLabel(a)):r).replace(/{identifier}/g,t.identifier)).replace(/{ruleValue}/g,o),e.prompt||w.verbose("Using default validation prompt for type",r,i),r},settings:function(){R.isPlainObject(k)?(k.fields&&(k.fields=w.get.fieldsFromShorthand(k.fields)),f=R.extend(!0,{},R.fn.form.settings,k),l=R.extend(!0,{},R.fn.form.settings.defaults,f.fields),w.verbose("Extending settings",l,f)):(f=R.extend(!0,{},R.fn.form.settings),l=R.extend(!0,{},R.fn.form.settings.defaults),w.verbose("Using default form validation",l,f)),i=f.namespace,m=f.metadata,g=f.selector,p=f.className,n=f.regExp,c=f.error,a="module-"+i,s="."+i,((d=r.data(a))||w).refresh()},field:function(e,t){var n;return w.verbose("Finding field with identifier",e),e=w.escape.string(e),0<(n=o.filter("#"+e)).length||0<(n=o.filter('[name="'+e+'"]')).length||0<(n=o.filter('[name="'+e+'[]"]')).length||0<(n=o.filter("[data-"+m.validate+'="'+e+'"]')).length?n:(w.error(c.noField.replace("{identifier}",e)),t?R():R("<input/>"))},fields:function(e,n){var i=R();return R.each(e,function(e,t){i=i.add(w.get.field(t,n))}),i},fieldLabel:function(e,t){var n="string"==typeof e?w.get.field(e):e,i=n.closest(g.group).find("label").eq(0);return 1===i.length?i.text():n.prop("placeholder")||(t?e:f.text.unspecifiedField)},validation:function(i){var o,a;return!!l&&(R.each(l,function(e,n){a=n.identifier||e,R.each(w.get.field(a),function(e,t){if(t==i[0])return n.identifier=a,o=n,!1})}),o||!1)},value:function(e,t){var n=[];return n.push(e),e=w.get.values.call(h,n,t),0<(n=Object.keys(e)).length?e[n[0]]:void 0},values:function(e,t){var e=Array.isArray(e)&&0<e.length?w.get.fields(e,t):o,u={};return e.each(function(e,t){var t=R(t),n=t.closest(g.uiCalendar),i=t.prop("name"),o=t.val(),a=t.is(g.checkbox),r=t.is(g.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&w.can.useElement("calendar"),t=!!a&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),u[i]||(u[i]=[]),a?t?u[i].push(o||!0):u[i].push(!1):u[i].push(o);else if(r)void 0!==u[i]&&!1!==u[i]||(u[i]=!!t&&(o||!0));else if(a)u[i]=!!t&&(o||!0);else if(l){var c=n.calendar("get date");if(null!==c)switch(f.dateHandling){case"date":u[i]=c;break;case"input":u[i]=n.calendar("get input date");break;case"formatter":var d=n.calendar("setting","type");switch(d){case"date":u[i]=f.formatter.date(c);break;case"datetime":u[i]=f.formatter.datetime(c);break;case"time":u[i]=f.formatter.time(c);break;case"month":u[i]=f.formatter.month(c);break;case"year":u[i]=f.formatter.year(c);break;default:w.debug("Wrong calendar mode",n,d),u[i]=""}}else u[i]=""}else u[i]=o}),u},dirtyFields:function(){return o.filter(function(e,t){return R(t).data(m.isDirty)})}},has:{field:function(e){return w.verbose("Checking for existence of a field with identifier",e),0<w.get.field(e,!0).length}},can:{useElement:function(e){return void 0!==R.fn[e]||(w.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},checkErrors:function(e,t){return e&&0!==e.length?!t&&"string"==typeof e?[e]:e:(t||w.error(f.error.noErrorMessage),!1)},add:{rule:function(e,t){w.add.field(e,t)},field:function(n,e){void 0!==l[n]&&void 0!==l[n].rules||(l[n]={rules:[]});var i={rules:[]};w.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)}),w.debug("Adding rules",i.rules,l),w.refreshEvents()},fields:function(e){l=R.extend(!0,{},l,w.get.fieldsFromShorthand(e)),w.refreshEvents()},prompt:function(e,t,n){var i,o,a;!1!==(t=w.checkErrors(t))&&(a=0<(o=(i=w.get.field(e).closest(u)).children(g.prompt)).length,w.verbose("Adding field error state",e),n||i.addClass(p.error),f.inline&&(a||(o=R("<div/>").addClass(p.label)).appendTo(i),o.html(f.templates.prompt(t)),a?w.verbose("Inline errors are disabled, no inline error added",e):f.transition&&w.can.useElement("transition")?(w.verbose("Displaying error with css transition",f.transition),o.transition(f.transition+" in",f.duration)):(w.verbose("Displaying error with fallback javascript animation"),o.fadeIn(f.duration))))},errors:function(t){var i,o;!1!==(t=w.checkErrors(t))&&(w.debug("Adding form error messages",t),w.set.error(),i=[],R.isPlainObject(t)?R.each(Object.keys(t),function(e,n){!1!==w.checkErrors(t[n],!0)&&(f.inline?w.add.prompt(n,t[n]):!1!==(o=w.checkErrors(t[n]))&&R.each(o,function(e,t){i.push(f.prompt.addErrors.replace(/{name}/g,w.get.fieldLabel(n)).replace(/{error}/g,t))}))}):i=t,0<i.length&&e.html(f.templates.error(i)))}},remove:{errors:function(){w.debug("Removing form error messages"),e.empty()},states:function(){r.removeClass(p.error).removeClass(p.success),f.inline||w.remove.errors(),w.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];if(void 0!==l[n]&&Array.isArray(l[n].rules))return void 0===e?(w.debug("Removed all rules"),void(w.has.field(n)?l[n].rules=[]:delete l[n])):void R.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(w.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){w.remove.rule(t)}),w.refreshEvents()},rules:function(e,n){Array.isArray(e)?R.each(e,function(e,t){w.remove.rule(t,n)}):w.remove.rule(e,n)},fields:function(e){w.remove.field(e)},prompt:function(e){var t=w.get.field(e).closest(u),n=t.children(g.prompt);t.removeClass(p.error),f.inline&&n.is(":visible")&&(w.verbose("Removing prompt for field",e),f.transition&&w.can.useElement("transition")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){r.removeClass(p.error).addClass(p.success)},defaults:function(){o.each(function(e,t){var t=R(t),n=t.parent(),i=0<t.filter(g.checkbox).length,o=(n.is(g.uiDropdown)||t.is(g.uiDropdown))&&w.can.useElement("dropdown"),a=t.closest(g.uiCalendar),r=0<a.length&&w.can.useElement("calendar"),i=i?t.is(":checked"):t.val();o?(n.is(g.uiDropdown)?n:t).dropdown("save defaults"):r&&a.calendar("refresh"),t.data(m.defaultValue,i),t.data(m.isDirty,!1)})},error:function(){r.removeClass(p.success).addClass(p.error)},value:function(e,t){var n={};return n[e]=t,w.set.values.call(h,n)},values:function(e){R.isEmptyObject(e)||R.each(e,function(e,t){var n,i=w.get.field(e),o=i.parent(),e=i.closest(g.uiCalendar),a=Array.isArray(t),r=o.is(g.uiCheckbox)&&w.can.useElement("checkbox"),s=o.is(g.uiDropdown)&&w.can.useElement("dropdown"),l=i.is(g.radio)&&r,c=0<e.length&&w.can.useElement("calendar");0<i.length&&(a&&r?(w.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?(w.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(g.uiCheckbox).checkbox("check")):r?(w.verbose("Setting checkbox value",t,o),!0===t||1===t||"on"===t?o.checkbox("check"):o.checkbox("uncheck"),"string"==typeof t&&i.val(t)):s?(w.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(w.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){w.verbose("Setting state dirty"),x=!0,C[0]=C[1],C[1]="dirty",w.is.justClean()&&r.trigger("dirty")},clean:function(){w.verbose("Setting state clean"),x=!1,C[0]=C[1],C[1]="clean",w.is.justDirty()&&r.trigger("clean")},asClean:function(){w.set.defaults(),w.set.clean()},asDirty:function(){w.set.defaults(),w.set.dirty()},autoCheck:function(){w.debug("Enabling auto check on required fields"),l&&R.each(l,function(e){w.has.field(e)||(w.verbose("Field not found, removing from validation",e),w.remove.field(e))}),o.each(function(e,t){var t=R(t),n=t.closest(u),i=0<t.filter(g.checkbox).length,o=t.prop("required")||n.hasClass(p.required)||n.parent().hasClass(p.required),n=t.is(":disabled")||n.hasClass(p.disabled)||n.parent().hasClass(p.disabled),a=w.get.validation(t),r=!!a&&0!==R.grep(a.rules,function(e){return"empty"===e.type}),a=a.identifier||t.attr("id")||t.attr("name")||t.data(m.validate);!o||n||r||void 0===a||(i?(w.verbose("Adding 'checked' rule on field",a),w.add.rule(a,"checked")):(w.verbose("Adding 'empty' rule on field",a),w.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=w.get.values();if(b)return!1;if(v=[],w.determine.isValid()){if(w.debug("Form has no validation errors, submitting"),w.set.success(),f.inline||w.remove.errors(),!0!==t)return f.onSuccess.call(h,e,i)}else if(w.debug("Form has errors"),y=!1,w.set.error(),f.inline||w.add.errors(v),e&&void 0!==r.data("moduleApi")&&e.stopImmediatePropagation(),f.errorFocus&&!0!==t&&(e=!0,"string"==typeof f.errorFocus?(e=(n=R(I).find(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=u.filter("."+p.error).first().find(g.field),n.trigger("focus"),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(h,v,i)},field:function(i,e,o){if(o=void 0===o||o,"string"==typeof i&&(w.verbose("Validating field",i),i=l[e=i]),!i)return w.debug("Unable to find field validation. Skipping",e),!0;var a=i.identifier||e,e=w.get.field(a),t=!!i.depends&&w.get.field(i.depends),r=!0,s=[];return i.identifier||(w.debug("Using field name as identifier",a),i.identifier=a),0===e.filter(":not(:disabled)").length?w.debug("Field is disabled. Skipping",a):i.optional&&w.is.blank(e)?w.debug("Field is optional and blank. Skipping",a):i.depends&&w.is.empty(t)?w.debug("Field depends on another value that is not present or empty. Skipping",t):void 0!==i.rules&&(o&&e.closest(u).removeClass(p.error),R.each(i.rules,function(e,t){var n;w.has.field(a)&&0<(n=w.validate.rule(i,t,!0)||[]).length&&(w.debug("Field is invalid",a,t.type),s.push(w.get.prompt(t,i)),r=!1,o&&R(n).closest(u).addClass(p.error))})),r?(o&&(w.remove.prompt(a,s),f.onValid.call(e)),!0):(o&&(v=v.concat(s),w.add.prompt(a,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=void 0===(t=(l?R(e).filter(":checked"):R(e)).val())||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,w)}var e=w.get.field(e.identifier),o=w.get.ancillaryValue(n),a=w.get.ruleName(n),r=f.rules[a],s=[],l=e.is(g.checkbox);if(j(r))return l?i(e)||(s=e):R.each(e,function(e,t){i(t)||s.push(t)}),t?s:0===s.length;w.error(c.noRule,a)}},setting:function(e,t){if(R.isPlainObject(e))R.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,w,e);else{if(void 0===t)return w[e];w[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,f.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),w.verbose.apply(console,arguments)))},error:function(){f.silent||(w.error=Function.prototype.bind.call(console.error,console,f.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=Date.now())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:h,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(w.performance.timer),R.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",D&&(e+=" '"+D+"'"),1<T.length&&(e+=" ("+T.length+")"),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=d;return e=e||M,t=t||h,"string"==typeof i&&void 0!==r&&(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(void 0!==r[n])return a=r[n],!1;{if(!R.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:w.error(c.method,i),!1;r=r[t]}}})),j(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(S)?S.push(n):void 0!==S?S=[S,n]:void 0!==n&&(S=n),a}};w.initialize()}),void 0!==S?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:!0,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:/^[\w!#$%&'*+./=?^`{|}~-]+@[\da-z]([\da-z-]*[\da-z])?(\.[\da-z]([\da-z-]*[\da-z])?)*$/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",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",size:"{name} must have a length between {min} and {max} 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",addErrors:"{name}: {error}"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), 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:{method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",noField:"Field identifier {identifier} not found",noElement:"This module requires ui {element}",noErrorMessage:"No error message provided"},templates:{error:function(e){var n='<ul class="list">';return R.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>"},prompt:function(e){if(1===e.length)return e[0];var n='<ul class="ui list">';return R.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>"}},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!(void 0===e||""===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,i){var o,a;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)&&(a=o=+t):(t=t.split("..",2),n.test(t[0])&&(o=+t[0]),n.test(t[1])&&(a=+t[1]))),i&&(e=e.length),n.test(e)&&(void 0===o||o<=e)&&(void 0===a||e<=a)},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 R.fn.form.settings.rules.range(e,t+"..","integer",!0)},exactLength:function(e,t){return R.fn.form.settings.rules.range(e,t+".."+t,"integer",!0)},maxLength:function(e,t){return R.fn.form.settings.rules.range(e,".."+t,"integer",!0)},size:function(e,t){return R.fn.form.settings.rules.range(e,t,"integer",!0)},match:function(e,t,n){n=n.get.value(t,!0);return void 0!==n&&e.toString()===n.toString()},different:function(e,t,n){n=n.get.value(t,!0);return void 0!==n&&e.toString()!==n.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]\d|[2-8]\d{2}|9[01]\d|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]\d)/,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])&&0<(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=Number(t))||(1===t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0===(t=Number(t))?""===e:1===t?""!==e&&-1===e.search(","):e.split(",").length===t},maxCount:function(e,t){return 0!==(t=Number(t))&&(1===t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document),function(k,S){"use strict";S=void 0!==S&&S.Math===Math?S:globalThis,k.fn.accordion=function(p){var h,v=k(this),b=Date.now(),y=[],x=p,C="string"==typeof x,w=[].slice.call(arguments,1);return v.each(function(){var e,a=k.isPlainObject(p)?k.extend(!0,{},k.fn.accordion.settings,p):k.extend({},k.fn.accordion.settings),r=a.className,t=a.namespace,s=a.selector,l=a.error,n="."+t,i="module-"+t,o=v.selector||"",c=k(this),d=c.find(s.title),u=c.find(s.content),f=this,m=c.data(i),g={initialize:function(){g.debug("Initializing",c),g.bind.events(),a.observeChanges&&g.observeChanges(),g.instantiate()},instantiate:function(){m=g,c.data(i,g)},destroy:function(){g.debug("Destroying previous instance",c),c.off(n).removeData(i)},refresh:function(){d=c.find(s.title),u=c.find(s.content)},observeChanges:function(){"MutationObserver"in S&&((e=new MutationObserver(function(e){g.debug("DOM tree modified, updating selector cache"),g.refresh()})).observe(f,{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",e))},bind:{events:function(){g.debug("Binding delegated events"),c.on(a.on+n,s.trigger,g.event.click)}},event:{click:function(e){0===k(e.target).closest(s.ignore).length&&g.toggle.call(this)}},toggle:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating),t=t.hasClass(r.active),i=t&&!n,t=!t&&n;g.debug("Toggling visibility of content",e),i||t?a.collapsible?g.close.call(e):g.debug("Cannot close accordion content collapsing is disabled"):g.open.call(e)},open:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating);t.hasClass(r.active)||n?g.debug("Accordion already open, skipping",t):(g.debug("Opening accordion content",e),a.onOpening.call(t),a.onChanging.call(t),a.exclusive&&g.closeOthers.call(e),e.addClass(r.active),t.stop(!0,!0).addClass(r.animating),a.animateChildren&&(void 0!==k.fn.transition?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0,onComplete:function(){t.children().removeClass(r.transition)}}):t.children().stop(!0,!0).animate({opacity:1},a.duration,g.resetOpacity)),t.slideDown(a.duration,a.easing,function(){t.removeClass(r.animating).addClass(r.active),g.reset.display.call(this),a.onOpen.call(this),a.onChange.call(this)}))},close:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating),i=t.hasClass(r.active);!i&&!(!i&&n)||i&&n||(g.debug("Closing accordion content",t),a.onClosing.call(t),a.onChanging.call(t),e.removeClass(r.active),t.stop(!0,!0).addClass(r.animating),a.animateChildren&&(void 0!==k.fn.transition?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):t.children().stop(!0,!0).animate({opacity:0},a.duration,g.resetOpacity)),t.slideUp(a.duration,a.easing,function(){t.removeClass(r.animating).removeClass(r.active),g.reset.display.call(this),a.onClose.call(this),a.onChange.call(this)}))},closeOthers:function(e){var t,e=void 0!==e?d.eq(e):k(this).closest(s.title),n=e.parents(s.content).prev(s.title),e=e.closest(s.accordion),i=s.title+"."+r.active+":visible",o=s.content+"."+r.active+":visible",o=a.closeNested?(t=e.find(i).not(n)).next(u):(t=e.find(i).not(n),e=e.find(o).find(i).not(n),(t=t.not(e)).next(u));0<t.length&&(g.debug("Exclusive enabled, closing other content",t),t.removeClass(r.active),o.removeClass(r.animating).stop(!0,!0),a.animateChildren&&(void 0!==k.fn.transition?o.children().transition({animation:"fade out",useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},a.duration,g.resetOpacity)),o.slideUp(a.duration,a.easing,function(){k(this).removeClass(r.active),g.reset.display.call(this)}))},reset:{display:function(){g.verbose("Removing inline display from element",this);var e=k(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){g.verbose("Removing inline opacity from element",this);var e=k(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,t){if(g.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(void 0===t)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(g.debug("Changing internal",e,t),void 0===t)return g[e];k.isPlainObject(e)?k.extend(!0,g,e):g[e]=t},debug:function(){!a.silent&&a.debug&&(a.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,a.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),g.verbose.apply(console,arguments)))},error:function(){a.silent||(g.error=Function.prototype.bind.call(console.error,console,a.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(b||t),b=t,y.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=a.name+":",n=0;b=!1,clearTimeout(g.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",o&&(e+=" '"+o+"'"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.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,s=m;return e=e||w,t=t||f,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,k.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!k.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:g.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};C?(void 0===m&&g.initialize(),g.invoke(x)):(void 0!==m&&m.invoke("destroy"),g.initialize())}),void 0!==h?h:this},k.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},k.extend(k.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document),function(ae,T,D){"use strict";T=void 0!==T&&T.Math===Math?T:globalThis,ae.fn.calendar=function(p){var h,e=ae(this),v=ae(D),b=e.selector||"",y=Date.now(),x=[],C=p,w="string"==typeof C,k=[].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}},oe=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var u,e,$=ae.isPlainObject(p)?ae.extend(!0,{},ae.fn.calendar.settings,p):ae.extend({},ae.fn.calendar.settings),G=$.className,n=$.namespace,i=$.selector,J=$.formatter,Z=$.parser,_=$.metadata,ee=S[$.minTimeGap],l=$.error,t="."+n,o="module-"+n,a=ae(this),r=a.find(i.input),s=a.find(i.activator),c=this,d=a.data(o),te=d&&d.popupId?v.find("#"+d.popupId):a.find(i.popup),f=!1,ne=a.hasClass(G.inverted),m=!1,g=!1,ie={initialize:function(){ie.debug("Initializing calendar for",c,a),u=ie.get.isTouch(),ie.setup.config(),ie.setup.popup(),ie.setup.inline(),ie.setup.input(),ie.setup.date(),ie.create.calendar(),ie.bind.events(),ie.observeChanges(),ie.instantiate()},instantiate:function(){ie.verbose("Storing instance of calendar"),d=ie,a.data(o,d)},destroy:function(){ie.verbose("Destroying previous calendar for",c),a.removeData(o),ie.unbind.events(),ie.disconnect.classObserver()},setup:{config:function(){null!==ie.get.minDate()&&ie.set.minDate(a.data(_.minDate)),null!==ie.get.maxDate()&&ie.set.maxDate(a.data(_.maxDate)),ie.setting("type",ie.get.type()),ie.setting("on",$.on||"click")},popup:function(){var e,t;$.inline||0===s.length&&0===(s=a.children().first()).length||(void 0===ae.fn.popup?ie.error(l.popup):((te=0===te.length?$.context?(ie.popupId=n+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),ae("<div/>",{id:ie.popupId}).addClass(G.popup).appendTo(v.find($.context))):(e=0<(t=s.parent()).closest(i.append).length?"appendTo":"prependTo",ae("<div/>").addClass(G.popup)[e](t)):te).addClass(G.calendar),ne&&te.addClass(G.inverted),e=function(){return ie.refreshTooltips(),$.onVisible.apply(te,arguments)},0===r.length&&(te.attr("tabindex","0"),e=function(){return ie.refreshTooltips(),ie.focus(),$.onVisible.apply(te,arguments)}),t=ie.setting("on"),t=ae.extend({},$.popupOptions,{popup:te,movePopup:!$.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ie.set.focusDate(ie.get.date()),ie.set.mode(ie.get.validatedMode($.startMode)),$.onShow.apply(te,arguments)},onVisible:e,onHide:$.onHide,onHidden:function(){return ie.blur(),$.onHidden.apply(te,arguments)}}),ie.popup(t)))},inline:function(){0<s.length&&!$.inline||($.inline=!0,te=ae("<div/>").addClass(G.calendar).appendTo(a),0===r.length&&te.attr("tabindex","0"))},input:function(){$.touchReadonly&&0<r.length&&u&&r.prop("readonly",!0),ie.check.disabled()},date:function(){var e;$.initialDate?e=Z.date($.initialDate,$):void 0!==a.data(_.date)?e=Z.date(a.data(_.date),$):0<r.length&&(e=Z.date(r.val(),$)),ie.set.date(e,$.formatInput,!1),ie.set.mode(ie.get.mode(),!1)}},trigger:{change:function(){var e,t=r[0];t&&(e=D.createEvent("HTMLEvents"),ie.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,L,n=ie.get.mode(),i=new Date,V=ie.get.date(),o=ie.get.focusDate(),a=ie.helper.dateInRange(o||V||Z.date($.initialDate,$)||i),r=(o||ie.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,d="minute"===n,N="time"===$.type,q=Math.max($.multiMonth,1),z=l?ie.get.monthOffset():0,u=a.getMinutes(),f=a.getHours(),m=a.getDate(),H=a.getMonth()+z,g=a.getFullYear(),p=l?$.showWeekNumbers?8:7:c?4:ee.column,U=l||c?6:ee.row,h=l?q:1,v=(b=te).hasClass("left")?"right center":"left center";for(b.empty(),1<h&&(L=ae("<div/>").addClass(G.grid).appendTo(b)),t=0;t<h;t++){1<h&&(b=ae("<div/>").addClass(G.column).appendTo(L));var b,y=H+t,B=(new Date(g,y,1).getDay()-$.firstDayOfWeek%7+7)%7,x=(!$.constantHeight&&l&&(x=new Date(g,y+1,0).getDate()+B,U=Math.ceil(x/7)),r?10:s?1:0),C=l?1:0,w=c||d?1:0,k=c||d?m:1,S=new Date(g-x,y-C,k-w,f),C=new Date(g+x,y+C,k+w,f),k=r?new Date(10*Math.ceil(g/10)-9,0,0):s?new Date(g,0,0):l?new Date(g,y,0):new Date(g,y,m,-1),w=r?new Date(10*Math.ceil(g/10)+1,0,1):s?new Date(g+1,0,1):l?new Date(g,y+1,1):new Date(g,y,m+1),T=n,T=(l&&$.showWeekNumbers&&(T+=" andweek"),ae("<table/>").addClass(G.table).addClass(T).addClass(oe[p]+" column").appendTo(b)),W=(ne&&T.addClass(G.inverted),p);if(!N){var Y=ae("<thead/>").appendTo(T),D=ae("<tr/>").appendTo(Y),A=ae("<th/>").attr("colspan",""+p).appendTo(D),E=r||s?new Date(g,0,1):l?new Date(g,y,1):new Date(g,y,m,f,u),O=ae("<span/>").addClass(G.link).appendTo(A),E=(O.text(ie.helper.dateFormat(J[n+"Header"],E)),s?$.disableYear?"day":"year":l?$.disableMonth?"year":"month":"day");if(O.data(_.mode,E),0===t&&((O=ae("<span/>").addClass(G.prev).appendTo(A)).data(_.focusDate,S),O.toggleClass(G.disabledCell,!ie.helper.isDateInRange(k,n)),ae("<i/>").addClass(G.prevIcon).appendTo(O)),t===h-1&&((E=ae("<span/>").addClass(G.next).appendTo(A)).data(_.focusDate,C),E.toggleClass(G.disabledCell,!ie.helper.isDateInRange(w,n)),ae("<i/>").addClass(G.nextIcon).appendTo(E)),l)for(D=ae("<tr/>").appendTo(Y),$.showWeekNumbers&&((A=ae("<th/>").appendTo(D)).text($.text.weekNo),A.addClass(G.weekCell),W--),P=0;P<W;P++)(A=ae("<th/>").appendTo(D)).text(J.dayColumnHeader((P+$.firstDayOfWeek)%7,$))}for(var Q=ae("<tbody/>").appendTo(T),P=r?10*Math.ceil(g/10)-9:l?1-B:0,K=0;K<U;K++)for(D=ae("<tr/>").appendTo(Q),l&&$.showWeekNumbers&&((A=ae("<th/>").appendTo(D)).text(ie.get.weekOfYear(g,y,P+1-$.firstDayOfWeek)),A.addClass(G.weekCell)),e=0;e<W;e++,P++){var M,R=r?new Date(P,y,1,f,u):s?new Date(g,P,1,f,u):l?new Date(g,y,P,f,u):c?new Date(g,y,m,P):new Date(g,y,m,f,P*$.minTimeGap),F=r?P:s?$.text.monthsShort[P]:l?R.getDate():ie.helper.dateFormat(J.cellTime,R),F=((A=ae("<td/>").addClass(G.cell).appendTo(D)).text(F),A.data(_.date,R),l&&R.getMonth()!==(y+12)%12),I=!$.selectAdjacentDays&&F||!ie.helper.isDateInRange(R,n)||$.isDisabled(R,n)||ie.helper.isDisabled(R,n)||!ie.helper.isEnabled(R,n),j=(I?(null!==(j=ie.helper.findDayAsObject(R,n,$.disabledDates))&&j[_.message]&&(A.attr("data-tooltip",j[_.message]),A.attr("data-position",j[_.position]||v),(j[_.inverted]||ne&&void 0===j[_.inverted])&&A.attr("data-inverted",""),j[_.variation]&&A.attr("data-variation",j[_.variation])),"hour"===n&&null!==(j=ie.helper.findHourAsObject(R,n,$.disabledHours))&&j[_.message]&&(A.attr("data-tooltip",j[_.message]),A.attr("data-position",j[_.position]||v),(j[_.inverted]||ne&&void 0===j[_.inverted])&&A.attr("data-inverted",""),j[_.variation]&&A.attr("data-variation",j[_.variation]))):null!==(M=ie.helper.findDayAsObject(R,n,$.eventDates))&&(A.addClass(M[_.class]||$.eventClass),M[_.message]&&(A.attr("data-tooltip",M[_.message]),A.attr("data-position",M[_.position]||v),(M[_.inverted]||ne&&void 0===M[_.inverted])&&A.attr("data-inverted",""),M[_.variation]&&A.attr("data-variation",M[_.variation]))),ie.helper.dateEqual(R,V,n)),X=ie.helper.dateEqual(R,i,n),F=(A.toggleClass(G.adjacentCell,F&&!M),A.toggleClass(G.disabledCell,I),A.toggleClass(G.activeCell,j&&!(F&&I)),c||d||A.toggleClass(G.todayCell,!F&&X),{mode:n,adjacent:F,disabled:I,active:j,today:X});J.cell(A,R,F),ie.helper.dateEqual(R,o,n)&&ie.set.focusDate(R,!1,!1)}$.today&&(S=ae("<tr/>").appendTo(Q),(k=ae("<td/>").attr("colspan",""+p).addClass(G.today).appendTo(S)).text(J.today($)),k.data(_.date,i)),ie.update.focus(!1,T),$.inline&&ie.refreshTooltips()}}},update:{focus:function(e,t){t=t||te;var r=ie.get.mode(),n=ie.get.date(),s=ie.get.focusDate(),l=ie.get.startDate(),c=ie.get.endDate(),d=(e?s:null)||n||(u?null:s);t.find("td").each(function(){var e,t,n,i,o=ae(this),a=o.data(_.date);a&&(e=o.hasClass(G.disabledCell),t=o.hasClass(G.activeCell),n=o.hasClass(G.adjacentCell),i=ie.helper.dateEqual(a,s,r),a=!!d&&(!!l&&ie.helper.isDateInRange(a,r,l,d)||!!c&&ie.helper.isDateInRange(a,r,d,c)),o.toggleClass(G.focusCell,i&&(!u||f)&&(!n||$.selectAdjacentDays&&n)&&!e),ie.helper.isTodayButton(o)||o.toggleClass(G.rangeCell,a&&!t&&!e))})}},refresh:function(){ie.create.calendar()},refreshTooltips:function(){var i=ae(T).width();te.find("td[data-position]").each(function(){var e=ae(this),t=T.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/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(){ie.debug("Binding events"),te.on("mousedown"+t,ie.event.mousedown),te.on("touchstart"+t,ie.event.mousedown),te.on("mouseup"+t,ie.event.mouseup),te.on("touchend"+t,ie.event.mouseup),te.on("mouseover"+t,ie.event.mouseover),0<r.length?(r.on("input"+t,ie.event.inputChange),r.on("focus"+t,ie.event.inputFocus),r.on("blur"+t,ie.event.inputBlur),r.on("keydown"+t,ie.event.keydown)):te.on("keydown"+t,ie.event.keydown)}},unbind:{events:function(){ie.debug("Unbinding events"),te.off(t),0<r.length&&r.off(t)}},event:{mouseover:function(e){var t=ae(e.target).data(_.date),e=1===e.buttons;t&&ie.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<r.length&&e.preventDefault(),f=0<=e.type.indexOf("touch");e=ae(e.target).data(_.date);e&&ie.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ie.focus(),e.preventDefault(),e.stopPropagation(),f=!1;var t,n,i,e=ae(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(_.date)||t.data(_.focusDate)||t.data(_.mode)?t:e).data(_.date),n=e.data(_.focusDate),i=e.data(_.mode),t&&!1!==$.onSelect.call(c,t,ie.get.mode())?(e=e.hasClass(G.today),ie.selectDate(t,e)):n?ie.set.focusDate(n):i&&ie.set.mode(i))},keydown:function(e){var t=e.which;if(9===t&&ie.popup("hide"),ie.popup("is visible")){var n=ie.get.mode();switch(t){case 37:case 38:case 39:case 40:var i="day"===n?7:"hour"===n?4:"minute"===n?ee.column:3,i=37===t?-1:38===t?-i:39===t?1:i,o=(i*="minute"===n?$.minTimeGap:1,ie.get.focusDate()||ie.get.date()||new Date),a=o.getFullYear()+("year"===n?i:0),r=o.getMonth()+("month"===n?i:0),s=o.getDate()+("day"===n?i:0),l=o.getHours()+("hour"===n?i:0),i=o.getMinutes()+("minute"===n?i:0),a=new Date(a,r,s,l,i);"time"===$.type&&(a=ie.helper.mergeDateTime(o,a)),ie.helper.isDateInRange(a,n)&&ie.set.focusDate(a);break;case 13:r=ie.get.focusDate();r&&!$.isDisabled(r,n)&&!ie.helper.isDisabled(r,n)&&ie.helper.isEnabled(r,n)&&!1!==$.onSelect.call(c,r,ie.get.mode())&&ie.selectDate(r),e.preventDefault(),e.stopPropagation();break;case 27:ie.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ie.popup("show"))},inputChange:function(){var e=r.val(),e=Z.date(e,$);ie.set.date(e,!1)},inputFocus:function(){te.addClass(G.active)},inputBlur:function(){var e;te.removeClass(G.active),$.formatInput&&(e=ie.get.date(),e=ie.helper.dateFormat(J[$.type],e),r.val(e)),g&&(ie.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ie.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ie.event.class.mutation),ie.debug("Setting up mutation observer",e),ie.observe.class())},disconnect:{classObserver:function(){0<r.length&&e&&e.disconnect()}},observe:{class:function(){0<r.length&&e&&e.observe(a[0],{attributes:!0})}},is:{disabled:function(){return a.hasClass(G.disabled)}},check:{disabled:function(){r.attr("tabindex",ie.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){e=Date.UTC(e,t,n+3)/864e5,t=Math.floor(e/7),n=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(n,0,7)/6048e5)+1},formattedDate:function(e,t){return ie.helper.dateFormat(e||J[$.type],t||ie.get.date())},date:function(){return ie.helper.sanitiseDate(a.data(_.date))||null},inputDate:function(){return r.val()},focusDate:function(){return a.data(_.focusDate)||null},startDate:function(){var e=ie.get.calendarModule($.startCalendar);return(e?e.get.date():a.data(_.startDate))||null},endDate:function(){var e=ie.get.calendarModule($.endCalendar);return(e?e.get.date():a.data(_.endDate))||null},minDate:function(){return a.data(_.minDate)||null},maxDate:function(){return a.data(_.maxDate)||null},monthOffset:function(){return a.data(_.monthOffset)||$.monthOffset||0},mode:function(){var e=a.data(_.mode)||$.startMode;return ie.get.validatedMode(e)},validatedMode:function(e){var t=ie.get.validModes();return 0<=ae.inArray(e,t)?e:"time"===$.type?"hour":"month"===$.type?"month":"year"===$.type?"year":"day"},type:function(){return a.data(_.type)||$.type},validModes:function(){var e=[];return"time"!==$.type&&($.disableYear&&"year"!==$.type||e.push("year"),($.disableMonth||"year"===$.type)&&"month"!==$.type||e.push("month"),0<=$.type.indexOf("date")&&e.push("day")),0<=$.type.indexOf("time")&&(e.push("hour"),$.disableMinute||e.push("minute")),e},isTouch:function(){try{return D.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof ae?e:v.find(e).first()).data(o):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ie.helper.sanitiseDate(e),e=ie.helper.dateInRange(e);var i=ie.get.mode(),o=ie.helper.dateFormat(J[$.type],e);if(n&&!1===$.onBeforeChange.call(c,e,o,i))return!1;if(ie.set.focusDate(e),$.isDisabled(e,i))return!1;var a=ie.get.endDate();a&&e&&a<e&&ie.set.endDate(),ie.set.dataKeyValue(_.date,e),t&&0<r.length&&r.val(o),n&&$.onChange.call(c,e,o,i)},startDate:function(e,t){e=ie.helper.sanitiseDate(e);var n=ie.get.calendarModule($.startCalendar);n&&n.set.date(e),ie.set.dataKeyValue(_.startDate,e,t)},endDate:function(e,t){e=ie.helper.sanitiseDate(e);var n=ie.get.calendarModule($.endCalendar);n&&n.set.date(e),ie.set.dataKeyValue(_.endDate,e,t)},focusDate:function(e,t,n,i){e=ie.helper.sanitiseDate(e),e=ie.helper.dateInRange(e);var o="day"===ie.get.mode(),a=ie.get.focusDate(),o=(o&&e&&a&&((o=12*(e.getFullYear()-a.getFullYear())+e.getMonth()-a.getMonth())&&(a=ie.get.monthOffset()-o,ie.set.monthOffset(a,!1))),ie.set.dataKeyValue(_.focusDate,e,!!e&&t));n=!1!==n&&o&&!1===t||m!=i,m=i,n&&ie.update.focus(i)},minDate:function(e){e=ie.helper.sanitiseDate(e),null!==$.maxDate&&$.maxDate<=e?ie.verbose("Unable to set minDate variable bigger that maxDate variable",e,$.maxDate):(ie.setting("minDate",e),ie.set.dataKeyValue(_.minDate,e))},maxDate:function(e){e=ie.helper.sanitiseDate(e),null!==$.minDate&&$.minDate>=e?ie.verbose("Unable to set maxDate variable lower that minDate variable",e,$.minDate):(ie.setting("maxDate",e),ie.set.dataKeyValue(_.maxDate,e))},monthOffset:function(e,t){var n=Math.max($.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ie.set.dataKeyValue(_.monthOffset,e,t)},mode:function(e,t){ie.set.dataKeyValue(_.mode,e,t)},dataKeyValue:function(e,t,n){var i=a.data(e),i=i===t||i<=t&&t<=i;return t?a.data(e,t):a.removeData(e),(n=!1!==n&&!i)&&ie.refresh(),!i}},selectDate:function(e,t){ie.verbose("New date selection",e);var n=ie.get.mode();t||"minute"===n||$.disableMinute&&"hour"===n||"date"===$.type&&"day"===n||"month"===$.type&&"month"===n||"year"===$.type&&"year"===n?!1!==ie.set.date(e)&&(g=!0,$.closable&&(ie.popup("hide"),(t=ie.get.calendarModule($.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?$.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ie.set.mode(t),"hour"===n||"day"===n&&ie.get.date()?ie.set.date(e,!0,!1):ie.set.focusDate(e))},changeDate:function(e){ie.set.date(e)},clear:function(){ie.set.date()},popup:function(){return s.popup.apply(s,arguments)},focus:function(){(0<r.length?r:te).trigger("focus")},blur:function(){(0<r.length?r:te).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(ie,t,$);var n=t.getDate(),i=t.getMonth(),o=t.getFullYear(),a=t.getDay(),r=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ie.get.weekOfYear(o,i,n+1-$.firstDayOfWeek),c=r%12||12,d=(r<12?$.text.am:$.text.pm).toLowerCase(),u={D:n,DD:("0"+n).slice(-2),M:i+1,MM:("0"+(i+1)).slice(-2),MMM:$.text.monthsShort[i],MMMM:$.text.months[i],Y:o,YY:String(o).slice(2),YYYY:o,d:a,dd:$.text.dayNamesShort[a].slice(0,2),ddd:$.text.dayNamesShort[a],dddd:$.text.dayNames[a],h:c,hh:("0"+c).slice(-2),H:r,HH:("0"+r).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:d,A:d.toUpperCase(),S:["th","st","nd","rd"][3<n%10||n%100-n%10==10?0:n%10],w:l,ww:("0"+l).slice(-2)};return e.replace($.regExp.token,function(e){return e in u?u[e]:e.slice(1,-1)})},isDisabled:function(i,o){return("day"===o||"month"===o||"year"===o||"hour"===o)&&("day"===o&&-1!==$.disabledDaysOfWeek.indexOf(i.getDay())||$.disabledDates.some(function(e){var t,n=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?n=ie.helper.dateEqual(i,e,o):null!==e&&"object"==typeof e&&(e[_.year]?"number"==typeof e[_.year]?n=i.getFullYear()===e[_.year]:Array.isArray(e[_.year])&&(n=-1<e[_.year].indexOf(i.getFullYear())):e[_.month]?"number"==typeof e[_.month]?n=i.getMonth()===e[_.month]:Array.isArray(e[_.month])?n=-1<e[_.month].indexOf(i.getMonth()):e[_.month]instanceof Date&&(t=ie.helper.sanitiseDate(e[_.month]),n=i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()):e[_.date]&&"day"===o&&(e[_.date]instanceof Date?n=ie.helper.dateEqual(i,ie.helper.sanitiseDate(e[_.date]),o):Array.isArray(e[_.date])&&(n=e[_.date].some(function(e){return ie.helper.dateEqual(i,e,o)})))),n})||"hour"===o&&$.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?t=ie.helper.dateEqual(i,e,o):"number"==typeof e?t=i.getHours()===e:null!==e&&"object"==typeof e&&(e[_.date]&&(e[_.date]instanceof Date?t=ie.helper.dateEqual(i,ie.helper.sanitiseDate(e[_.date])):Array.isArray(e[_.date])&&(t=e[_.date].some(function(e){return ie.helper.dateEqual(i,e,o)}))),e[_.days]&&("number"==typeof e[_.days]?t=i.getDay()===e[_.days]:Array.isArray(e[_.days])&&(t=-1<e[_.days].indexOf(i.getDay()))),e[_.hours]&&("number"==typeof e[_.hours]?t=t&&i.getHours()===e[_.hours]:Array.isArray(e[_.hours])&&(t=t&&-1<e[_.hours].indexOf(i.getHours())))),t}))},isEnabled:function(n,i){return"day"!==i||(0===$.enabledDates.length||$.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?t=ie.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e&&e[_.date]&&(t=ie.helper.dateEqual(n,ie.helper.sanitiseDate(e[_.date]),i)),t}))},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])?ie.helper.sanitiseDate(i):i)instanceof Date&&ie.helper.dateEqual(t,i,n))return(a={})[_.date]=i,a;if(null!==i&&"object"==typeof i)if(i[_.year]){if("number"==typeof i[_.year]&&t.getFullYear()===i[_.year])return i;if(Array.isArray(i[_.year])&&-1<i[_.year].indexOf(t.getFullYear()))return i}else if(i[_.month]){if("number"==typeof i[_.month]&&t.getMonth()===i[_.month])return i;if(Array.isArray(i[_.month])){if(-1<i[_.month].indexOf(t.getMonth()))return i}else if(i[_.month]instanceof Date){var a=ie.helper.sanitiseDate(i[_.month]);if(t.getMonth()===a.getMonth()&&t.getFullYear()===a.getFullYear())return i}}else if(i[_.date]&&"day"===n){if(i[_.date]instanceof Date&&ie.helper.dateEqual(t,ie.helper.sanitiseDate(i[_.date]),n))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ie.helper.dateEqual(t,e,n)}))return i}}return null},findHourAsObject:function(t,n,e){if("hour"===n)for(var i,o=function(e,t){if(t[_.hours])return"number"==typeof t[_.hours]&&e.getHours()===t[_.hours]||Array.isArray(t[_.hours])&&-1<t[_.hours].indexOf(e.getHours())?t:void 0},a=0;a<e.length;a++){if("number"==typeof(i=e[a])&&t.getHours()===i)return null;if(null!==i&&"object"==typeof i)if(i[_.days]&&o(t,i)){if("number"==typeof i[_.days]&&t.getDay()===i[_.days])return i;if(Array.isArray(i[_.days])&&-1<i[_.days].indexOf(t.getDay()))return i}else if(i[_.date]&&o(t,i)){if(i[_.date]instanceof Date&&ie.helper.dateEqual(t,ie.helper.sanitiseDate(i[_.date])))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ie.helper.dateEqual(t,e,n)}))return i}else if(o(t,i))return i}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:Z.date(""+e,$))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===$.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?$.minTimeGap*Math.floor(e.getMinutes()/$.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||o?0:t.getMonth(),i||a?1:t.getDate(),n?t.getHours():0,r?$.minTimeGap*Math.floor(t.getMinutes()/$.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ie.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var o;return n||i||(n=(o=ie.get.startDate())&&$.minDate?new Date(Math.max(o,$.minDate)):o||$.minDate,i=$.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),$.minTimeGap*Math.ceil(n.getMinutes()/$.minTimeGap)),!(!e||n&&0<ie.helper.dateDiff(e,n,t)||i&&0<ie.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ie.get.startDate())&&$.minDate?new Date(Math.max(i,$.minDate)):i||$.minDate,n=$.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),$.minTimeGap*Math.ceil(t.getMinutes()/$.minTimeGap));var i="time"===$.type;return e&&(t&&0<ie.helper.dateDiff(e,t,"minute")?i?ie.helper.mergeDateTime(e,t):t:n&&0<ie.helper.dateDiff(n,e,"minute")?i?ie.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()===$.text.today}},setting:function(e,t){if(ie.debug("Changing setting",e,t),ae.isPlainObject(e))ae.extend(!0,$,e);else{if(void 0===t)return $[e];ae.isPlainObject($[e])?ae.extend(!0,$[e],t):$[e]=t}},internal:function(e,t){if(ae.isPlainObject(e))ae.extend(!0,ie,e);else{if(void 0===t)return ie[e];ie[e]=t}},debug:function(){!$.silent&&$.debug&&($.performance?ie.performance.log(arguments):(ie.debug=Function.prototype.bind.call(console.info,console,$.name+":"),ie.debug.apply(console,arguments)))},verbose:function(){!$.silent&&$.verbose&&$.debug&&($.performance?ie.performance.log(arguments):(ie.verbose=Function.prototype.bind.call(console.info,console,$.name+":"),ie.verbose.apply(console,arguments)))},error:function(){$.silent||(ie.error=Function.prototype.bind.call(console.error,console,$.name+":"),ie.error.apply(console,arguments))},performance:{log:function(e){var t,n;$.performance&&(n=(t=Date.now())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(ie.performance.timer),ie.performance.timer=setTimeout(ie.performance.display,500)},display:function(){var e=$.name+":",n=0;y=!1,clearTimeout(ie.performance.timer),ae.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):ae.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=d;return e=e||k,t=t||c,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,ae.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ae.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!ae.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:ie.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};w?(void 0===d&&ie.initialize(),ie.invoke(C)):(void 0!==d&&d.invoke("destroy"),ie.initialize())}),void 0!==h?h:this},ae.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!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,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],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:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",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().replace(/([./:-])\s+/g,"$1").replace(/\s+([./:-])/g,"$1").replace(/\s+/g," ")).length)return null;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var n,i,o,a=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(a.getDate()))return a;e=e.toLowerCase();var r,s,l,c,d=-1,u=-1,f=-1,m=-1,g=-1,a="time"===t.type,p=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!p)for(r=0<=ae.inArray(t.text.am.toLowerCase(),h)||!(0<=ae.inArray(t.text.pm.toLowerCase(),h))&&void 0,n=0;n<v.length;n++)if(0<=(l=v[n]).indexOf(":")){if(u<0||d<0)for(c=l.split(":"),o=0;o<Math.min(2,c.length);o++)i=parseInt(c[o],10),isNaN(i)&&(i=0),0===o?u=i%24:d=i%60;v.splice(n,1)}if(!a){for(n=0;n<h.length;n++)if(!((s=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].slice(0,s.length).toLowerCase()===s){m=i+1;break}if(0<=m)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),g=i,v.splice(n,1);break}if(m<0)for(n=0;n<v.length;n++)if(o=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[o],10),!isNaN(i)&&1<=i&&i<=12){m=i,v.splice(o,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&1<=i&&i<=31){f=i,v.splice(n,1);break}if(g<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n],10),!isNaN(i)){i<=99&&(i+=t.currentCentury),g=i,v.splice(n,1);break}}if(!p){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(d<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&0<=i&&i<=59){d=i,v.splice(n,1);break}}if(d<0&&u<0&&f<0&&m<0&&g<0)return null;d<0&&(d=0),u<0&&(u=0),f<0&&(f=1),m<0&&(m=1),g<0&&(g=(new Date).getFullYear()),void 0!==r&&(r?12===u&&(u=0):u<12&&(u+=12));e=new Date(g,m-1,f,u,d);return e.getMonth()===m-1&&e.getFullYear()===g||(e=new Date(g,m,0,u,d)),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,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[ASYa]|"[^"]*"|'[^']*'/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",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document),function(T,D,A){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}D=void 0!==D&&D.Math===Math?D:globalThis,T.fn.checkbox=function(d){var u,e=T(this),f=e.selector||"",x=Date.now(),C=[],w=d,k="string"==typeof w,S=[].slice.call(arguments,1);return e.each(function(){var e,m=T.extend(!0,{},T.fn.checkbox.settings,d),t=m.className,n=m.namespace,g=m.selector,s=m.error,i="."+n,o="module-"+n,p=T(this),a=T(this).children(g.label),h=T(this).children(g.input),v=h[0],r=!1,b=!1,l=p.data(o),c=this,y={initialize:function(){y.verbose("Initializing checkbox",m),y.create.label(),y.bind.events(),y.set.tabbable(),y.hide.input(),y.observeChanges(),y.instantiate(),y.setup()},instantiate:function(){y.verbose("Storing instance of module",y),l=y,p.data(o,y)},destroy:function(){y.verbose("Destroying module"),y.unbind.events(),y.show.input(),p.removeData(o)},fix:{reference:function(){p.is(g.input)&&(y.debug("Behavior called on <input> adjusting invoked element"),p=p.closest(g.checkbox),y.refresh())}},setup:function(){y.set.initialLoad(),y.is.indeterminate()?(y.debug("Initial value is indeterminate"),y.indeterminate()):y.is.checked()?(y.debug("Initial value is checked"),y.check()):(y.debug("Initial value is unchecked"),y.uncheck()),y.remove.initialLoad()},refresh:function(){a=p.children(g.label),h=p.children(g.input),v=h[0]},hide:{input:function(){y.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying <input> z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in D&&((e=new MutationObserver(function(e){y.debug("DOM tree modified, updating selector cache"),y.refresh()})).observe(c,{childList:!0,subtree:!0}),y.debug("Setting up mutation observer",e))},attachEvents:function(e,t){var n=T(e);t=E(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):y.error(s.notFound)},preventDefaultOnInputTarget:function(){void 0!==event&&null!==event&&T(event.target).is(g.input)&&(y.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){y.should.ignoreCallbacks()||m.onChange.call(v)},click:function(e){var t=T(e.target);t.is(g.input)?y.verbose("Using default check action on initialized checkbox"):t.is(g.link)?y.debug("Clicking link inside checkbox, skipping toggle"):(y.toggle(),h.trigger("focus"),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,o=27,a=37,r=38,s=39,l=40,c=y.get.radios(),d=c.index(p),u=c.length,f=!1;if(t===a||t===r?f=(0===d?u:d)-1:t!==s&&t!==l||(f=d===u-1?0:d+1),!y.should.ignoreCallbacks()&&!1!==f){if(!1===m.beforeUnchecked.apply(v))return y.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===m.beforeChecked.apply(T(c[f]).children(g.input)[0]))return y.verbose("Next option should not allow check, cancelling key navigation"),!1}b=!1,t===o?(y.verbose("Escape key pressed blurring field"),h.trigger("blur"),b=!0,e.stopPropagation()):!e.ctrlKey&&y.can.change()&&(t===i||t===n&&m.enableEnterKey?(y.verbose("Enter/space key pressed, toggling checkbox"),y.toggle(),b=!0):p.is(".toggle, .slider")&&!y.is.radio()&&(t===a&&y.is.checked()?(y.uncheck(),b=!0):t===s&&y.is.unchecked()&&(y.check(),b=!0)))},keyup:function(e){b&&e.preventDefault()}},check:function(){y.should.allowCheck()&&(y.debug("Checking checkbox",h),y.set.checked(),y.should.ignoreCallbacks()||(m.onChecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},uncheck:function(){y.should.allowUncheck()&&(y.debug("Unchecking checkbox"),y.set.unchecked(),y.should.ignoreCallbacks()||(m.onUnchecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},indeterminate:function(){y.should.allowIndeterminate()?y.debug("Checkbox is already indeterminate"):(y.debug("Making checkbox indeterminate"),y.set.indeterminate(),y.should.ignoreCallbacks()||(m.onIndeterminate.call(v),y.trigger.change()))},determinate:function(){y.should.allowDeterminate()?y.debug("Checkbox is already determinate"):(y.debug("Making checkbox determinate"),y.set.determinate(),y.should.ignoreCallbacks()||(m.onDeterminate.call(v),y.trigger.change()))},enable:function(){y.is.enabled()?y.debug("Checkbox is already enabled"):(y.debug("Enabling checkbox"),y.set.enabled(),y.should.ignoreCallbacks()||(m.onEnable.call(v),m.onEnabled.call(v)))},disable:function(){y.is.disabled()?y.debug("Checkbox is already disabled"):(y.debug("Disabling checkbox"),y.set.disabled(),y.should.ignoreCallbacks()||(m.onDisable.call(v),m.onDisabled.call(v)))},get:{radios:function(){var e=y.get.name();return T('input[name="'+e+'"]').closest(g.checkbox)},otherRadios:function(){return y.get.radios().not(p)},name:function(){return h.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return h.hasClass(t.radio)||"radio"===h.attr("type")},indeterminate:function(){return void 0!==h.prop("indeterminate")&&h.prop("indeterminate")},checked:function(){return void 0!==h.prop("checked")&&h.prop("checked")},disabled:function(){return void 0!==h.prop("disabled")&&h.prop("disabled")},enabled:function(){return!y.is.disabled()},determinate:function(){return!y.is.indeterminate()},unchecked:function(){return!y.is.checked()}},should:{allowCheck:function(){return y.is.determinate()&&y.is.checked()&&!y.is.initialLoad()?(y.debug("Should not allow check, checkbox is already checked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeChecked.apply(v))||(y.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return y.is.determinate()&&y.is.unchecked()&&!y.is.initialLoad()?(y.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeUnchecked.apply(v))||(y.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return y.is.indeterminate()&&!y.is.initialLoad()?(y.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeIndeterminate.apply(v))||(y.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return y.is.determinate()&&!y.is.initialLoad()?(y.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeDeterminate.apply(v))||(y.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return r&&!m.fireOnInit}},can:{change:function(){return!(p.hasClass(t.disabled)||p.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!y.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){y.verbose("Setting class to checked"),p.removeClass(t.indeterminate).addClass(t.checked),y.is.radio()&&y.uncheckOthers(),!y.is.indeterminate()&&y.is.checked()?y.debug("Input is already checked, skipping input property change"):(y.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){y.verbose("Removing checked class"),p.removeClass(t.indeterminate).removeClass(t.checked),!y.is.indeterminate()&&y.is.unchecked()?y.debug("Input is already unchecked"):(y.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){y.verbose("Setting class to indeterminate"),p.addClass(t.indeterminate),y.is.indeterminate()?y.debug("Input is already indeterminate, skipping input property change"):(y.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){y.verbose("Removing indeterminate class"),p.removeClass(t.indeterminate),y.is.determinate()?y.debug("Input is already determinate, skipping input property change"):(y.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){y.verbose("Setting class to disabled"),p.addClass(t.disabled),y.is.disabled()?y.debug("Input is already disabled, skipping input property change"):(y.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){y.verbose("Removing disabled class"),p.removeClass(t.disabled),y.is.enabled()?y.debug("Input is already enabled, skipping input property change"):(y.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){y.verbose("Adding tabindex to checkbox"),void 0===h.attr("tabindex")&&h.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e,t=h[0];t&&(e=A.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(g.label).length?(h.prev(g.label).detach().insertAfter(h),y.debug("Moving existing label",a)):y.has.label()||(a=T("<label>").insertAfter(h),y.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){y.verbose("Attaching checkbox events"),p.on("click"+i,y.event.click).on("change"+i,y.event.change).on("keydown"+i,g.input,y.event.keydown).on("keyup"+i,g.input,y.event.keyup)}},unbind:{events:function(){y.debug("Removing events"),p.off(i)}},uncheckOthers:function(){var e=y.get.otherRadios();y.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){y.can.change()?y.is.indeterminate()||y.is.unchecked()?(y.debug("Currently unchecked"),y.check()):y.is.checked()&&y.can.uncheck()&&(y.debug("Currently checked"),y.uncheck()):y.is.radio()||y.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(y.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,m,e);else{if(void 0===t)return m[e];T.isPlainObject(m[e])?T.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,y,e);else{if(void 0===t)return y[e];y[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,m.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),y.verbose.apply(console,arguments)))},error:function(){m.silent||(y.error=Function.prototype.bind.call(console.error,console,m.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=Date.now())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=m.name+":",n=0;x=!1,clearTimeout(y.performance.timer),T.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):T.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||S,t=t||c,"string"==typeof i&&void 0!==r&&(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(void 0!==r[n])return a=r[n],!1;{if(!T.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:y.error(s.method,i),!1;r=r[t]}}})),E(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(u)?u.push(n):void 0!==u?u=[u,n]:void 0!==n&&(u=n),a}};k?(void 0===l&&y.initialize(),y.invoke(w)):(void 0!==l&&l.invoke("destroy"),y.initialize())}),void 0!==u?u:this},T.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!1,performance:!0,uncheckable:"auto",fireOnInit:!1,enableEnterKey:!0,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(k,e,S){"use strict";function T(e){return"function"==typeof e&&"number"!=typeof e.nodeType}e=void 0!==e&&e.Math===Math?e:globalThis,k.fn.dimmer=function(p){var h,v=k(this),b=Date.now(),y=[],x=p,C="string"==typeof x,w=[].slice.call(arguments,1);return v.each(function(){var o,t,a=k.isPlainObject(p)?k.extend(!0,{},k.fn.dimmer.settings,p):k.extend({},k.fn.dimmer.settings),n=a.selector,e=a.namespace,i=a.className,s=a.error,r="."+e,l="module-"+e,c=v.selector||"",d="ontouchstart"in S.documentElement?"touchstart":"click",u=k(this),f=this,m=u.data(l),g={preinitialize:function(){o=g.is.dimmer()?(t=u.parent(),u):(t=u,g.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):g.create())},initialize:function(){g.debug("Initializing dimmer",a),g.bind.events(),g.set.dimmable(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),m=g,u.data(l,m)},destroy:function(){g.verbose("Destroying previous module",o),g.unbind.events(),g.remove.variation(),t.off(r)},bind:{events:function(){"hover"===a.on?t.on("mouseenter"+r,g.show).on("mouseleave"+r,g.hide):"click"===a.on&&t.on(d+r,g.toggle),g.is.page()&&(g.debug("Setting as a page dimmer",t),g.set.pageDimmer()),g.is.closable()&&(g.verbose("Adding dimmer close event",o),t.on(d+r,n.dimmer,g.event.click))}},unbind:{events:function(){u.removeData(l),t.off(r)}},event:{click:function(e){g.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!k(e.target).is(n.content)||(g.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);g.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=k(a.template.dimmer(a));return a.dimmerName&&(g.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=T(e)?e:function(){},g.is.dimmed()&&!g.is.animating()||!g.is.enabled()?g.debug("Dimmer is already shown or disabled"):!1===a.onShow.call(f)?g.verbose("Show callback returned false cancelling dimmer show"):(g.debug("Showing dimmer",o,a),g.set.variation(),g.animate.show(e),a.onChange.call(f))},hide:function(e){e=T(e)?e:function(){},g.is.dimmed()||g.is.animating()?!1===a.onHide.call(f)?g.verbose("Hide callback returned false cancelling dimmer hide"):(g.debug("Hiding dimmer",o),g.animate.hide(e),a.onChange.call(f)):g.debug("Dimmer is not visible")},toggle:function(){g.verbose("Toggling dimmer visibility",o),g.is.dimmed()?g.is.closable()&&g.hide():g.show()},animate:{show:function(e){e=T(e)?e:function(){},a.useCSS&&void 0!==k.fn.transition?(a.useFlex?(g.debug("Using flex dimmer"),g.remove.legacy()):(g.debug("Using legacy non-flex dimmer"),g.set.legacy()),"auto"!==a.opacity&&g.set.opacity(),o.transition({debug:a.debug,verbose:a.verbose,silent:a.silent,displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:g.get.duration(),useFailSafe:!0,onStart:function(){g.set.dimmed()},onComplete:function(){g.set.active(),a.onVisible.call(o),e()}})):(g.verbose("Showing dimmer animation with javascript"),g.set.dimmed(),"auto"===a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(g.get.duration(),a.opacity,function(){o.removeAttr("style"),g.set.active(),a.onVisible.call(o),e()}))},hide:function(e){e=T(e)?e:function(){},a.useCSS&&void 0!==k.fn.transition?(g.verbose("Hiding dimmer with css"),o.transition({debug:a.debug,verbose:a.verbose,silent:a.silent,displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:g.get.duration(),useFailSafe:!0,onComplete:function(){g.remove.dimmed(),g.remove.variation(),g.remove.active(),a.onHidden.call(o),e()}})):(g.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(g.get.duration(),function(){g.remove.dimmed(),g.remove.active(),o.removeAttr("style"),a.onHidden.call(o),e()}))}},get:{dimmer:function(){return o},duration:function(){return g.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<u.find(n.dimmer).filter("."+a.dimmerName).length:0<u.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 u.hasClass(i.dimmer)},dimmable:function(){return u.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!g.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+")",g.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(g.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(void 0===t)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,a.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),g.verbose.apply(console,arguments)))},error:function(){a.silent||(g.error=Function.prototype.bind.call(console.error,console,a.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(b||t),b=t,y.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=a.name+":",n=0;b=!1,clearTimeout(g.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.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||w,t=t||f,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,k.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!k.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:g.error(s.method,i),!1;r=r[t]}}})),T(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};g.preinitialize(),C?(void 0===m&&g.initialize(),g.invoke(x)):(void 0!==m&&m.invoke("destroy"),g.initialize())}),void 0!==h?h:this},k.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(){},onVisible:function(){},onHidden: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=k("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=k("<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(_,ee,te){"use strict";function ne(e){return"function"==typeof e&&"number"!=typeof e.nodeType}ee=void 0!==ee&&ee.Math===Math?ee:globalThis,_.fn.dropdown=function(B){var W,Y=_(this),Q=_(te),K=Y.selector||"",X=Date.now(),$=[],G=B,J="string"==typeof G,Z=[].slice.call(arguments,1);return Y.each(function(L){var f,e,t,n,i,o,a,r,s,m=_.isPlainObject(B)?_.extend(!0,{},_.fn.dropdown.settings,B):_.extend({},_.fn.dropdown.settings),p=m.className,g=m.message,l=m.fields,h=m.keys,v=m.metadata,V=m.namespace,c=m.regExp,b=m.selector,d=m.error,N=m.templates,u="."+V,y="module-"+V,x=_(this),C=[ee,te].indexOf(m.context)<0?Q.find(m.context):_(m.context),w=x.find(b.text),k=x.find(b.search),S=x.find(b.sizer),T=x.find(b.input),q=x.find(b.icon),z=x.find(b.clearIcon),D=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),O=m.hideDividers?E.parent().children(b.divider):_(),P=!1,H=!1,U=!1,M=!1,R=this,F=!1,I=x.data(y),j={initialize:function(){j.debug("Initializing dropdown",m),j.is.alreadySetup()?j.setup.reference():(m.ignoreDiacritics&&!String.prototype.normalize&&(m.ignoreDiacritics=!1,j.error(d.noNormalize,R)),j.create.id(),j.setup.layout(),m.values&&(j.set.initialLoad(),j.change.values(m.values),j.remove.initialLoad()),j.refreshData(),j.save.defaults(),j.restore.selected(),j.bind.events(),j.observeChanges(),j.instantiate())},instantiate:function(){j.verbose("Storing instance of dropdown",j),I=j,x.data(y,j)},destroy:function(){j.verbose("Destroying previous dropdown",x),j.remove.tabbable(),j.remove.active(),A.transition("stop all"),A.removeClass(p.visible).addClass(p.hidden),x.off(u).removeData(y),A.off(u),Q.off(i),j.disconnect.menuObserver(),j.disconnect.selectObserver(),j.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ee&&(a=new MutationObserver(j.event.select.mutation),r=new MutationObserver(j.event.menu.mutation),s=new MutationObserver(j.event.class.mutation),j.debug("Setting up mutation observer",a,r,s),j.observe.select(),j.observe.menu(),j.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){a&&a.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){j.has.input()&&a&&a.observe(x[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){j.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){j.has.search()&&s&&s.observe(x[0],{attributes:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),i="."+o,j.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i;return!!(e=e||j.get.userValues())&&(e=Array.isArray(e)?e:[e],_.each(e,function(e,t){!1===j.get.item(t)&&(i=m.templates.addition(j.add.variables(g.addResult,t)),i=_("<div />").html(i).attr("data-"+v.value,t).attr("data-"+v.text,t).addClass(p.addition).addClass(p.item),m.hideAdditions&&i.addClass(p.hidden),n=void 0===n?i:n.add(i),j.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=j.get.userValues();t&&(j.debug("Adding user labels",t),_.each(t,function(e,t){j.verbose("Adding custom user value"),j.add.label(t,t)}))},menu:function(){A=_("<div />").addClass(p.menu).appendTo(x)},sizer:function(){S=_("<span />").addClass(p.sizer).insertAfter(k)}},search:function(e){e=void 0!==e?e:j.get.query(),j.verbose("Searching for query",e),!1===m.fireOnInit&&j.is.initialLoad()?j.verbose("Skipping callback on initial load",m.onSearch):j.has.minCharacters(e)&&!1!==m.onSearch.call(R,e)?j.filter(e):j.hide(null,!0)},select:{firstUnfiltered:function(){j.verbose("Selecting first non-filtered element"),j.remove.selectedItem(),E.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(p.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(j.verbose("Moving selection to",t),t.addClass(p.selected)):(j.verbose("Moving selection to",e),e.addClass(p.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:j.get.value(),query:j.get.query()},on:!1};j.verbose("First request, initializing API"),x.api(e)},layout:function(){var e;x.is("select")&&(j.setup.select(),j.setup.returnedObject()),j.has.menu()||j.create.menu(),j.is.clearable()&&!j.has.clearItem()&&(j.verbose("Adding clear icon"),z=_("<i />").addClass("remove icon").insertBefore(w)),j.is.search()&&!j.has.search()&&(j.verbose("Adding search input"),e=x.prev("label"),k=_("<input />").addClass(p.search).prop("autocomplete",j.is.chrome()?"fomantic-search":"off"),0<e.length&&(e.attr("id")||e.attr("id","_"+j.get.id()+"_formLabel"),k.attr("aria-labelledby",e.attr("id"))),k.insertBefore(w)),j.is.multiple()&&j.is.searchSelection()&&!j.has.sizer()&&j.create.sizer(),m.allowTab&&j.set.tabbable()},select:function(){var e=j.get.selectValues();j.debug("Dropdown initialized on a select",e),0<(T=x.is("select")?x:T).parent(b.dropdown).length?(j.debug("UI dropdown already exists. Creating dropdown menu only"),x=T.closest(b.dropdown),j.has.menu()||j.create.menu(),A=x.children(b.menu),j.setup.menu(e)):(j.debug("Creating entire dropdown from select"),x=_("<div />").attr("class",T.attr("class")).addClass(p.selection).addClass(p.dropdown).html(N.dropdown(e,l,m.preserveHTML,m.className)).insertBefore(T),T.hasClass(p.multiple)&&!1===T.prop("multiple")&&(j.error(d.missingMultiple),T.prop("multiple",!0)),T.is("[multiple]")&&j.set.multiple(),T.prop("disabled")&&(j.debug("Disabling dropdown"),x.addClass(p.disabled)),T.is("[required]")&&(m.forceSelection=!0),m.allowTab||T.removeAttr("tabindex"),T.prop("required",!1).removeAttr("class").detach().prependTo(x)),j.refresh()},menu:function(e){A.html(N.menu(e,l,m.preserveHTML,m.className)),E=A.find(b.item),O=m.hideDividers?E.parent().children(b.divider):_()},reference:function(){j.debug("Dropdown behavior was called on select, replacing with closest dropdown"),x=x.parent(b.dropdown),I=x.data(y),R=x[0],j.refresh(),j.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,L),t=Y.slice(L+1);Y=e.add(x).add(t)}},refresh:function(){j.refreshSelectors(),j.refreshData()},refreshItems:function(){E=A.find(b.item),O=m.hideDividers?E.parent().children(b.divider):_()},refreshSelectors:function(){j.verbose("Refreshing selector cache"),w=x.find(b.text),k=x.find(b.search),T=x.find(b.input),q=x.find(b.icon),D=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),O=m.hideDividers?E.parent().children(b.divider):_()},refreshData:function(){j.verbose("Refreshing cached metadata"),E.removeData(v.text).removeData(v.value)},clearData:function(){j.verbose("Clearing metadata"),E.removeData(v.text).removeData(v.value),x.removeData(v.defaultText).removeData(v.defaultValue).removeData(v.placeholderText)},clearItems:function(){A.empty(),j.refreshItems()},toggle:function(){j.verbose("Toggling menu visibility"),j.is.active()?j.hide():j.show()},show:function(e,t){if(e=ne(e)?e:function(){},(F||M)&&j.is.remote()&&j.is.noApiCache()&&j.clearItems(),!j.can.show()&&j.is.remote()&&(j.debug("No API results retrieved, searching before show"),j.queryRemote(j.get.query(),j.show,[e,t])),j.can.show()&&!j.is.active()){if(j.debug("Showing dropdown"),!j.has.message()||j.has.maxSelections()||j.has.allResultsFiltered()||j.remove.message(),j.is.allFiltered())return!0;!1!==m.onShow.call(R)&&(j.remove.empty(),j.animate.show(function(){j.bind.intent(),j.has.search()&&!t&&j.focusSearch(),j.set.visible(),e.call(R)}))}},hide:function(e,t){var n;e=ne(e)?e:function(){},j.is.active()&&!j.is.animatingOutward()?(j.debug("Hiding dropdown"),!1!==m.onHide.call(R)&&(j.animate.hide(function(){j.remove.visible(),j.is.focusedOnSearch()&&!0!==t&&k.trigger("blur"),e.call(R)}),0<(n=x.find(b.menu)).length&&(j.verbose("Hiding sub-menu",n),n.each(function(){j.animate.hide(!1,_(this))})))):j.unbind.intent(),F=M=!1},hideOthers:function(){j.verbose("Finding other dropdowns to hide"),Y.not(x).has(b.menu+"."+p.visible).dropdown("hide")},hideMenu:function(){j.verbose("Hiding menu instantaneously"),j.remove.active(),j.remove.visible(),A.transition("destroy").transition("hide")},hideSubMenus:function(){var e=A.children(b.item).find(b.menu);j.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){j.bind.keyboardEvents(),j.bind.inputEvents(),j.bind.mouseEvents()},keyboardEvents:function(){j.verbose("Binding keyboard events"),x.on("keydown"+u,j.event.keydown),j.has.search()&&x.on(j.get.inputEvent()+u,b.search,j.event.input),j.is.multiple()&&Q.on("keydown"+i,j.event.document.keydown)},inputEvents:function(){j.verbose("Binding input change events"),x.on("change"+u,b.input,j.event.change),j.is.multiple()&&j.is.searchSelection()&&x.on("paste"+u,b.search,j.event.paste)},mouseEvents:function(){j.verbose("Binding mouse events"),j.is.multiple()&&x.on("click"+u,b.label,j.event.label.click).on("click"+u,b.remove,j.event.remove.click),j.is.searchSelection()?(x.on("mousedown"+u,j.event.mousedown).on("mouseup"+u,j.event.mouseup).on("mousedown"+u,b.menu,j.event.menu.mousedown).on("mouseup"+u,b.menu,j.event.menu.mouseup).on("click"+u,b.icon,j.event.icon.click).on("click"+u,b.clearIcon,j.event.clearIcon.click).on("focus"+u,b.search,j.event.search.focus).on("click"+u,b.search,j.event.search.focus).on("blur"+u,b.search,j.event.search.blur).on("click"+u,b.text,j.event.text.focus),j.is.multiple()&&x.on("click"+u,j.event.click).on("click"+u,j.event.search.focus)):("click"===m.on?x.on("click"+u,b.icon,j.event.icon.click).on("click"+u,j.event.test.toggle):"hover"===m.on?x.on("mouseenter"+u,j.delay.show).on("mouseleave"+u,j.delay.hide).on("touchstart"+u,j.event.test.toggle).on("touchstart"+u,b.icon,j.event.icon.click):x.on(m.on+u,j.toggle),x.on("mousedown"+u,j.event.mousedown).on("mouseup"+u,j.event.mouseup).on("focus"+u,j.event.focus).on("click"+u,b.clearIcon,j.event.clearIcon.click),j.has.menuSearch()?x.on("blur"+u,b.search,j.event.search.blur):x.on("blur"+u,j.event.blur)),A.on("mouseenter"+u,b.item,j.event.item.mouseenter).on("touchstart"+u,b.item,j.event.item.mouseenter).on("mouseleave"+u,b.item,j.event.item.mouseleave).on("click"+u,b.item,j.event.item.click)},intent:function(){j.verbose("Binding hide intent event to document"),Q.on("click"+i,j.event.test.hide)}},unbind:{intent:function(){j.verbose("Removing hide intent event from document"),Q.off("click"+i)}},filter:function(e){function t(){j.is.multiple()&&j.filterActive(),(e||!e&&0===j.get.activeItem().length)&&j.select.firstUnfiltered(),j.has.allResultsFiltered()?m.onNoResults.call(R,n)?m.allowAdditions?m.hideAdditions&&(j.verbose("User addition with no menu, setting empty style"),j.set.empty(),j.hideMenu()):(j.verbose("All items filtered, showing message",n),j.add.message(g.noResults)):(j.verbose("All items filtered, hiding dropdown",n),j.set.empty(),j.hideMenu()):(j.remove.empty(),j.remove.message()),m.allowAdditions&&j.add.userSuggestion(j.escape.htmlEntities(e)),j.is.searchSelection()&&j.can.show()&&j.is.focusedOnSearch()&&!j.is.empty()&&j.show()}var n=void 0!==e?e:j.get.query();m.useLabels&&j.has.maxSelections()||(m.apiSettings?j.can.useAPI()?j.queryRemote(n,function(){m.filterRemoteData&&j.filterItems(n);var e=T.val();Array.isArray(e)||(e=e&&""!==e?e.split(m.delimiter):[]),j.is.multiple()&&_.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(p.filtered)}),j.focusSearch(!0),t()}):j.error(d.noAPI):(j.filterItems(n),t()))},queryRemote:function(e,a,r){Array.isArray(r)||(r=[r]);var e={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e}},t={onError:function(e,t,n){j.add.message(g.serverError),F=M=!1,a.apply(null,r),"function"==typeof m.apiSettings.onError&&m.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){j.add.message(g.serverError),F=M=!1,a.apply(null,r),"function"==typeof m.apiSettings.onFailure&&m.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){var i=e[l.remoteValues],o=(Array.isArray(i)||(i=[]),j.remove.message(),{});o[l.values]=i,j.setup.menu(o),0!==i.length||m.allowAdditions?""!==(o=j.is.multiple()?j.get.values():j.get.value())&&(j.verbose("Value(s) present after click icon, select value(s) in items"),j.set.selected(o,null,!0,!0)):j.add.message(g.noResults),F=M=!1,a.apply(null,r),"function"==typeof m.apiSettings.onSuccess&&m.apiSettings.onSuccess.call(this,e,t,n)}};x.api("get request")||j.setup.api(),e=_.extend(!0,{},e,m.apiSettings,t),x.api("setting",e).api("query")},filterItems:function(e){var n=j.remove.diacritics(void 0!==e?e:j.get.query()),i=null,e=j.escape.string(n),t=(m.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);j.has.query()&&(i=[],j.verbose("Searching for matching values",n),E.each(function(){var e,t=_(this);return!t.hasClass(p.unfilterable)&&("both"!==m.match&&"text"!==m.match||!(-1!==(e=j.remove.diacritics(String(j.get.choiceText(t,!1)))).search(o)||"exact"===m.fullTextSearch&&j.exactSearch(n,e)||!0===m.fullTextSearch&&j.fuzzySearch(n,e)))&&("both"!==m.match&&"value"!==m.match||!(-1!==(t=j.remove.diacritics(String(j.get.choiceValue(t,e)))).search(o)||"exact"===m.fullTextSearch&&j.exactSearch(n,t)||!0===m.fullTextSearch&&j.fuzzySearch(n,t)))?void 0:(i.push(this),!0)})),j.debug("Showing only matched items",n),j.remove.filteredItem(),i&&E.not(i).addClass(p.filtered),j.has.query()?!0===m.hideDividers?O.addClass(p.hidden):"empty"===m.hideDividers&&O.removeClass(p.hidden).filter(function(){var e=_(this).nextUntil(b.item);return 0===(0<e.length?e:_(this)).nextUntil(b.divider).filter(b.item+":not(."+p.filtered+")").length}).addClass(p.hidden):O.removeClass(p.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=m.ignoreSearchCase?e.toLowerCase():e,t=m.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;for(var o=0,a=0;o<i;o++){for(var r=!1,s=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===s){r=!0;break}if(!r)return!1}return!0},exactSearch:function(e,t){return e=m.ignoreSearchCase?e.toLowerCase():e,-1<(t=m.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){m.useLabels&&E.filter("."+p.active).addClass(p.filtered)},focusSearch:function(e){j.has.search()&&!j.is.focusedOnSearch()&&(e?(x.off("focus"+u,b.search),k.trigger("focus"),x.on("focus"+u,b.search,j.event.search.focus)):k.trigger("focus"))},blurSearch:function(){j.has.search()&&k.trigger("blur")},forceSelection:function(){var e=E.not(p.filtered).filter("."+p.selected).eq(0),t=E.not(p.filtered).filter("."+p.active).eq(0),e=0<e.length?e:t,t=0<e.length;m.allowAdditions||t&&!j.is.multiple()?(j.debug("Forcing partial selection to selected item",e),j.event.item.click.call(e,{},!0)):j.remove.searchTerm()},change:{values:function(e){m.allowAdditions||j.clear(),j.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,j.setup.menu(t),_.each(e,function(e,t){if(!0===t.selected&&(j.debug("Setting initial selection to",t[l.value]),j.set.selected(t[l.value]),!j.is.multiple()))return!1}),j.has.selectInput()&&(j.disconnect.selectObserver(),T.html(""),T.append("<option disabled selected value></option>"),_.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),i=m.templates.escape(t[l.name]||"",m.preserveHTML);T.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),j.observe.select())}},event:{paste:function(e){var t,n,i,o,a,r=(e.originalEvent.clipboardData||ee.clipboardData).getData("text").split(m.delimiter),s=[];r.forEach(function(e){!1===j.set.selected(j.escape.htmlEntities(e.trim()),null,!0,!0)&&s.push(e)}),e.preventDefault(),0<s.length&&(t=(r=k[0]).selectionStart,n=r.selectionEnd,i=r.value,a=t+(o=s.join(m.delimiter)).length,k.val(i.slice(0,t)+o+i.slice(n)),r.selectionStart=a,r.selectionEnd=a,j.event.input(e))},change:function(){U||(j.debug("Input changed, updating selection"),j.set.selected())},focus:function(){m.showOnFocus&&!P&&j.is.hidden()&&!t&&(F=!0,j.show())},blur:function(e){t=te.activeElement===this,P||t||(j.remove.activeLabel(),j.hide())},mousedown:function(){j.is.searchSelection(!0)?n=!0:P=!0},mouseup:function(){j.is.searchSelection(!0)?n=!1:P=!1},click:function(e){_(e.target).is(x)&&(j.is.focusedOnSearch()?j.show():j.focusSearch())},search:{focus:function(e){P=!0,j.is.multiple()&&j.remove.activeLabel(),F||j.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(F=!0,j.search())},blur:function(e){t=te.activeElement===this,!j.is.searchSelection(!0)||n||H||t||(m.forceSelection?j.forceSelection():m.allowAdditions||j.remove.searchTerm(),j.hide()),n=!1}},clearIcon:{click:function(e){j.clear(),j.is.searchSelection()&&j.remove.searchTerm(),j.hide(),e.stopPropagation()}},icon:{click:function(e){M=!0,j.has.search()?j.is.active()?j.blurSearch():m.showOnFocus?j.focusSearch():j.toggle():j.toggle(),e.stopPropagation()}},text:{focus:function(e){P=!0,j.focusSearch()}},input:function(e){(j.is.multiple()||j.is.searchSelection())&&j.set.filtered(),clearTimeout(j.timer),j.timer=setTimeout(j.search,m.delay.search)},label:{click:function(e){var t=_(this),n=x.find(b.label),i=n.filter("."+p.active),o=t.nextAll("."+p.active),a=t.prevAll("."+p.active),o=(0<o.length?t.nextUntil(o):t.prevUntil(a)).add(i).add(t);e.shiftKey?(i.removeClass(p.active),o.addClass(p.active)):e.ctrlKey?t.toggleClass(p.active):(i.removeClass(p.active),t.addClass(p.active)),m.onLabelSelect.apply(this,n.filter("."+p.active)),e.stopPropagation()}},remove:{click:function(e){var t=_(this).parent();t.hasClass(p.active)?j.remove.activeLabels():j.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=j.is.multiple()?j.show:j.toggle;j.is.bubbledLabelClick(e)||j.is.bubbledIconClick(e)||(j.is.multiple()&&(!j.is.multiple()||j.is.active())||(F=!0),j.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){j.determine.eventInModule(e,j.hide)&&R.id&&_(e.target).attr("for")===R.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&j.check.disabled()})}},select:{mutation:function(e){j.is.selectMutation(e)&&(j.debug("<select> modified, recreating menu"),j.disconnect.selectObserver(),j.refresh(),j.setup.select(),j.set.selected(),j.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?_(e.addedNodes[0]):_(!1),e=e.removedNodes?_(e.removedNodes[0]):_(!1),t=t.add(e),e=t.is(b.addition)||0<t.closest(b.addition).length,t=t.is(b.message)||0<t.closest(b.message).length;e||t?(j.debug("Updating item selector cache"),j.refreshItems()):(j.debug("Menu modified, updating selector cache"),j.refresh())},mousedown:function(){H=!0},mouseup:function(){H=!1}},item:{mouseenter:function(e){var t=_(e.target),n=_(this),i=n.children(b.menu),o=n.siblings(b.item).children(b.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(j.itemTimer),j.itemTimer=setTimeout(function(){j.verbose("Showing sub-menu",i),_.each(o,function(){j.animate.hide(!1,_(this))}),j.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=_(this).find(b.menu);0<t.length&&(clearTimeout(j.itemTimer),j.itemTimer=setTimeout(function(){j.verbose("Hiding sub-menu",t),t.each(function(){j.animate.hide(!1,_(this))})},m.delay.hide))},click:function(e,t){var n=_(this),e=_(e&&e.target||""),i=n.find(b.menu),o=j.get.choiceText(n),a=j.get.choiceValue(n,o),r=0<i.length,i=0<i.find(e).length;"input"!==te.activeElement.tagName.toLowerCase()&&_(te.activeElement).trigger("blur"),i||r&&!m.allowCategorySelection||(j.is.searchSelection()&&(m.allowAdditions&&j.remove.userAddition(),j.remove.filteredItem(),!j.is.visible()&&0<e.length&&j.show(),j.remove.searchTerm(),j.is.focusedOnSearch()||!0===t||j.focusSearch(!0)),m.useLabels||(j.remove.filteredItem(),j.set.scrollPosition(n)),j.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t=e.which;if(j.is.inObject(t,h)){var n=x.find(b.label),i=n.filter("."+p.active),o=(i.data(v.value),n.index(i)),a=n.length,r=0<i.length,s=1<i.length,l=0===o,c=o+1===a,d=j.is.searchSelection(),u=j.is.focusedOnSearch(),f=j.is.focused(),m=u&&0===j.get.caretPosition(!1),g=m&&0!==j.get.caretPosition(!0);if(!d||r||u)switch(t){case h.leftArrow:!f&&!m||r?r&&(e.shiftKey?j.verbose("Adding previous label to selection"):(j.verbose("Selecting previous label"),n.removeClass(p.active)),l&&!s?i.addClass(p.active):i.prev(b.siblingLabel).addClass(p.active).end(),e.preventDefault()):(j.verbose("Selecting previous label"),n.last().addClass(p.active));break;case h.rightArrow:f&&!r&&n.first().addClass(p.active),r&&(e.shiftKey?j.verbose("Adding next label to selection"):(j.verbose("Selecting next label"),n.removeClass(p.active)),c?d?u?n.removeClass(p.active):j.focusSearch():(s?i.next(b.siblingLabel):i).addClass(p.active):i.next(b.siblingLabel).addClass(p.active),e.preventDefault());break;case h.deleteKey:case h.backspace:r?(j.verbose("Removing active labels"),c&&d&&!u&&j.focusSearch(),i.last().next(b.siblingLabel).addClass(p.active),j.remove.activeLabels(i),j.is.visible()||j.show(),e.preventDefault()):!m||g||r||t!==h.backspace||(j.verbose("Removing last label on input backspace"),i=n.last().addClass(p.active),j.remove.activeLabels(i),j.is.visible()||j.show());break;default:i.removeClass(p.active)}}}},keydown:function(e){var t=e.which;if(j.is.inObject(t,h)||e.key===m.delimiter){var n,i=E.not(b.unselectable).filter("."+p.selected).eq(0),o=A.children("."+p.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+p.filtered+")").addBack():A.children(":not(."+p.filtered+")"),a=i.children(b.menu),r=i.closest(b.menu),s=r.hasClass(p.visible)||r.hasClass(p.animating)||0<r.parent(b.menu).length,l=0<a.length,c=0<i.length,d=0<i.not(b.unselectable).length,u=e.key===m.delimiter&&j.is.multiple();if(m.allowAdditions&&(t===h.enter||u)&&(d&&m.hideAdditions&&(j.verbose("Selecting item from keyboard shortcut",i),j.event.item.click.call(i,e)),j.is.searchSelection()&&j.remove.searchTerm(),j.is.multiple()&&e.preventDefault()),j.is.visible()){if(t!==h.enter&&!u||(t===h.enter&&c&&l&&!m.allowCategorySelection?(j.verbose("Pressed enter on unselectable category, opening sub menu"),t=h.rightArrow):d&&(j.verbose("Selecting item from keyboard shortcut",i),j.event.item.click.call(i,e),j.is.searchSelection()&&(j.remove.searchTerm(),j.is.multiple()&&k.trigger("focus"))),e.preventDefault()),c&&(t===h.leftArrow&&r[0]!==A[0]&&(j.verbose("Left key pressed, closing sub-menu"),j.animate.hide(!1,r),i.removeClass(p.selected),r.closest(b.item).addClass(p.selected),e.preventDefault()),t===h.rightArrow&&l&&(j.verbose("Right key pressed, opening sub-menu"),j.animate.show(!1,a),i.removeClass(p.selected),a.find(b.item).eq(0).addClass(p.selected),e.preventDefault())),t===h.upArrow){if(n=(c&&s?i.prevAll(b.item+":not("+b.unselectable+")"):E).eq(0),o.index(n)<0)return j.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();j.verbose("Up key pressed, changing active item"),i.removeClass(p.selected),n.addClass(p.selected),j.set.scrollPosition(n),m.selectOnKeydown&&j.is.single()&&!n.hasClass(p.actionable)&&j.set.selectedItem(n),e.preventDefault()}if(t===h.downArrow){if(0===(n=(c&&s?i.nextAll(b.item+":not("+b.unselectable+")"):E).eq(0)).length)return j.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();j.verbose("Down key pressed, changing active item"),E.removeClass(p.selected),n.addClass(p.selected),j.set.scrollPosition(n),m.selectOnKeydown&&j.is.single()&&!n.hasClass(p.actionable)&&j.set.selectedItem(n),e.preventDefault()}t===h.pageUp&&(j.scrollPage("up"),e.preventDefault()),t===h.pageDown&&(j.scrollPage("down"),e.preventDefault()),t===h.escape&&(j.verbose("Escape key pressed, closing dropdown"),j.hide(),e.stopPropagation())}else t!==h.enter&&!u||e.preventDefault(),t!==h.downArrow||j.is.visible()||(j.verbose("Down key pressed, showing dropdown"),j.show(),e.preventDefault())}else j.has.search()||j.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=T[0];t&&(e=te.createEvent("HTMLEvents"),j.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){f=!0,j.verbose("Determining action",m.action),ne(j.action[m.action])?(j.verbose("Triggering preset action",m.action,e,t),j.action[m.action].call(R,e,t,this)):ne(m.action)?(j.verbose("Triggering user action",m.action,e,t),m.action.call(R,e,t,this)):j.error(d.action,m.action),f=!1},eventInModule:function(e,t){var e=_(e.target),n=0<e.closest(te.documentElement).length,e=0<e.closest(x).length;return t=ne(t)?t:function(){},n&&!e?(j.verbose("Triggering event",t),t(),!0):(j.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=_(e.target),i=n.closest(b.siblingLabel),e=te.body.contains(e.target),i=0===x.find(i).length||!(j.is.multiple()&&m.useLabels),n=0===n.closest(A).length;return t=ne(t)?t:function(){},e&&i&&n?(j.verbose("Triggering event",t),t(),!0):(j.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,j.can.activate(_(n))&&(j.set.selected(t,_(n)),j.is.multiple()||!m.collapseOnActionable&&_(n).hasClass(p.actionable)||j.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,j.can.activate(_(n))&&(j.set.value(t,e,_(n)),j.is.multiple()||!m.collapseOnActionable&&_(n).hasClass(p.actionable)||j.hideAndClear())},combo:function(e,t,n){j.set.selected(t=void 0!==t?t:e,_(n)),j.hideAndClear()},hide:function(e,t,n){j.set.value(t,e,_(n)),j.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return x.data(v.defaultText)},defaultValue:function(){return x.data(v.defaultValue)},placeholderText:function(){return"auto"!==m.placeholder&&"string"==typeof m.placeholder?m.placeholder:x.data(v.placeholderText)||""},text:function(){return m.preserveHTML?w.html():w.text()},query:function(){return String(k.val()).trim()},searchWidth:function(e){return e=void 0!==e?e:k.val(),S.text(e),Math.ceil(S.width()+(j.is.edge()?3:1))},selectionCount:function(){var e=j.get.values();return j.is.multiple()?Array.isArray(e)?e.length:0:""!==j.get.value()?1:0},transition:function(e){return"auto"===m.transition?j.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=j.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],_.grep(e,function(e){return!1===j.get.item(e)}))},uniqueArray:function(n){return _.grep(n,function(e,t){return _.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=k[0];return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:te.selection?(i.focus(),n=(t=te.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<T.length?T.val():x.data(v.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(e){var t=j.get.value();return""===t?"":!j.has.selectInput()&&j.is.multiple()?"string"==typeof t?(e?t:j.escape.htmlEntities(t)).split(m.delimiter):"":t},remoteValues:function(){var e=j.get.values(),i=!1;return e&&_.each(e="string"==typeof e?[e]:e,function(e,t){var n=j.read.remoteData(t);j.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=void 0!==t?t:m.preserveHTML,e)return 0<e.find(b.menu).length&&(j.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),void 0!==e.data(v.text)?e.data(v.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||j.get.choiceText(e),!!e&&(void 0!==e.data(v.value)?String(e.data(v.value)):"string"==typeof t?String(m.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=k[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return x.find("option").each(function(){var e=_(this),t=e.html(),n=e.attr("disabled"),i=void 0!==e.attr("value")?e.attr("value"):t,o=void 0!==e.data(v.text)?e.data(v.text):t,e=e.parent("optgroup");"auto"===m.placeholder&&""===i?a.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:m.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:o,disabled:n}))}),m.placeholder&&"auto"!==m.placeholder&&(j.debug("Setting placeholder value to",m.placeholder),a.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===m.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):ne(m.sortSelect)&&s.sort(m.sortSelect),a[l.values]=s,j.debug("Retrieved and sorted values from select",a)):(a[l.values]=s,j.debug("Retrieved values from select",a)),a},activeItem:function(){return E.filter("."+p.active)},selectedItem:function(){var e=E.not(b.unselectable).filter("."+p.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=j.get.item(e),e=j.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=void 0!==n?n:void 0!==j.get.values()?j.get.values():j.get.text(),e=(o=j.is.multiple()&&Array.isArray(n))?0<n.length:null!=n,i=""===n||!1===n||!0===n||(i||!1),e&&E.each(function(){var e=_(this),t=j.get.choiceText(e),t=j.get.choiceValue(e,t);if(null!=t)if(o)-1!==_.inArray(j.escape.htmlEntities(String(t)),n.map(String))&&(a=a?a.add(e):e);else if(i){if(j.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return a=e,!0}else if(m.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),j.escape.htmlEntities(String(t))===j.escape.htmlEntities(String(n)))return j.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return x.hasClass("column")?"flex":m.displayType}},check:{maxSelections:function(e){return!m.maxSelections||((e=void 0!==e?e:j.get.selectionCount())>=m.maxSelections?(j.debug("Maximum selection count reached"),m.useLabels&&(E.addClass(p.filtered),j.add.message(g.maxSelections)),!0):(j.verbose("No longer at maximum selection count"),j.remove.message(),j.remove.filteredItem(),j.is.searchSelection()&&j.filterItems(),!1))},disabled:function(){k.attr("tabindex",j.is.disabled()?-1:0)}},restore:{defaults:function(e){j.clear(e),j.restore.defaultText(),j.restore.defaultValue()},defaultText:function(){var e=j.get.defaultText();e===j.get.placeholderText?(j.debug("Restoring default placeholder text",e),j.set.placeholderText(e)):(j.debug("Restoring default text",e),j.set.text(e))},placeholderText:function(){j.set.placeholderText()},defaultValue:function(){var e=j.get.defaultValue();void 0!==e&&(j.debug("Restoring default value",e),""!==e?(j.set.value(e),j.set.selected()):(j.remove.activeItem(),j.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(j.error(d.labels),m.useLabels=!0),j.debug("Restoring selected values"),j.create.userLabels()),j.check.maxSelections()},selected:function(){j.restore.values(),j.is.multiple()?(j.debug("Restoring previously selected values and labels"),j.restore.labels()):j.debug("Restoring previously selected values")},values:function(){j.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&j.get.remoteValues()?j.restore.remoteValues():j.set.selected();var e=j.get.value();!e||""===e||Array.isArray(e)&&0===e.length?T.addClass(p.noselection):T.removeClass(p.noselection),j.remove.initialLoad()},remoteValues:function(){var e=j.get.remoteValues();j.debug("Recreating selected from session data",e),e&&(j.is.single()?_.each(e,function(e,t){j.set.text(t)}):_.each(e,function(e,t){j.add.label(e,t)}))}},read:{remoteData:function(e){if(void 0!==ee.Storage)return void 0!==(e=sessionStorage.getItem(e+i))&&e;j.error(d.noStorage)}},save:{defaults:function(){j.save.defaultText(),j.save.placeholderText(),j.save.defaultValue()},defaultValue:function(){var e=j.get.value();j.verbose("Saving default value as",e),x.data(v.defaultValue,e)},defaultText:function(){var e=j.get.text();j.verbose("Saving default text as",e),x.data(v.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&w.hasClass(p.placeholder)&&(e=j.get.text(),j.verbose("Saving placeholder text as",e),x.data(v.placeholderText,e))},remoteData:function(e,t){void 0===ee.Storage?j.error(d.noStorage):(j.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){j.is.multiple()&&m.useLabels?j.remove.labels(x.find(b.label),e):(j.remove.activeItem(),j.remove.selectedItem(),j.remove.filteredItem()),j.set.placeholderText(),j.clearValue(e)},clearValue:function(e){j.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||j.get.selectedItem(),n=t.closest(b.menu),i=n.outerHeight(),o=n.scrollTop(),a=E.eq(0).outerHeight(),i=Math.floor(i/a),o="up"===e?o-a*i:o+a*i,a=E.not(b.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&&(j.debug("Scrolling page",e,i),t.removeClass(p.selected),i.addClass(p.selected),m.selectOnKeydown&&j.is.single()&&!i.hasClass(p.actionable)&&j.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=j.is.multiple(),t=j.is.searchSelection(),n=e&&t,t=t?j.get.query():"",i="string"==typeof t&&0<t.length,o=j.get.searchWidth(),t=""!==t;e&&i&&(j.verbose("Adjusting input width",o,m.glyphWidth),k.css("width",o+"px")),i||n&&t?(j.verbose("Hiding placeholder text"),w.addClass(p.filtered)):e&&(!n||t)||(j.verbose("Showing placeholder text"),w.removeClass(p.filtered))},empty:function(){x.addClass(p.empty)},loading:function(){x.addClass(p.loading)},placeholderText:function(e){e=e||j.get.placeholderText(),j.debug("Setting placeholder text",e),j.set.text(e),w.addClass(p.placeholder)},tabbable:function(){j.is.searchSelection()?(j.debug("Added tabindex to searchable dropdown"),k.val(""),j.check.disabled(),A.attr("tabindex",-1)):(j.debug("Added tabindex to dropdown"),void 0===x.attr("tabindex")&&(x.attr("tabindex",T.attr("tabindex")||0),A.attr("tabindex",-1))),T.removeAttr("tabindex")},initialLoad:function(){j.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(b.addition).length?e.addClass(p.filtered):e.addClass(p.active)},partialSearch:function(e){var t=j.get.query().length;k.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||j.get.selectedItem()).closest(b.menu),a=e&&0<e.length;t=void 0!==t&&t,0===j.get.activeItem().length&&(t=!1),e&&0<o.length&&a&&(e.position().top,o.addClass(p.loading),e=(a=o.scrollTop())-o.offset().top+e.offset().top,t||(i=a+o.height()<e+5,n=e-5<a),j.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(p.loading))},text:function(e,t){"combo"===m.action?(j.debug("Changing combo button text",e,D),m.preserveHTML?D.html(e):D.text(e)):"activate"===m.action&&(e===j.get.placeholderText()&&!t||w.removeClass(p.placeholder),j.debug("Changing text",e,w),w.removeClass(p.filtered),m.preserveHTML?w.html(e):w.text(e))},selectedItem:function(e){var t=j.get.choiceValue(e),n=j.get.choiceText(e,!1),i=j.get.choiceText(e);j.debug("Setting user selection to item",e),j.remove.activeItem(),j.set.partialSearch(n),j.set.activeItem(e),j.set.selected(t,e),j.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+p.selected),i=0<n.length&&j.has.firstLetter(n,e),o=!1;i&&(t=n.nextAll(E).eq(0),j.has.firstLetter(t,e)&&(o=t)),o||E.each(function(){if(j.has.firstLetter(_(this),e))return o=_(this),!1}),o&&(j.verbose("Scrolling to next value with letter",e),j.set.scrollPosition(o),n.removeClass(p.selected),o.addClass(p.selected),m.selectOnKeydown&&j.is.single()&&!t.hasClass(p.actionable)&&j.set.selectedItem(o))},direction:function(e){"auto"===m.direction?(e?j.is.upward(e)&&j.remove.upward(e):j.remove.upward(),(j.can.openDownward(e)?j.remove:j.set).upward(e),j.is.leftward(e)||j.can.openRightward(e)||j.set.leftward(e)):"upward"===m.direction&&j.set.upward(e)},upward:function(e){(e||x).addClass(p.upward)},leftward:function(e){(e||A).addClass(p.leftward)},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0),void 0===e||""===e||Array.isArray(e)&&0===e.length?T.addClass(p.noselection):T.removeClass(p.noselection);var o=j.escape.value(e),a=0<T.length,r=j.get.values(),s=void 0!==e?String(e):e;if(a){if(!m.allowReselection&&s==r&&(j.verbose("Skipping value update already same value",e,r),!j.is.initialLoad()))return;j.is.single()&&j.has.selectInput()&&j.can.extendSelect()&&(j.debug("Adding user option",e),j.add.optionValue(e)),j.debug("Updating input value",o,r),U=!0,T.val(o),!1===m.fireOnInit&&j.is.initialLoad()?j.debug("Input native change event ignored on initial load"):!0!==i&&j.trigger.change(),U=!1}else j.verbose("Storing value in metadata",o,T),o!==r&&x.data(v.value,s);!1===m.fireOnInit&&j.is.initialLoad()?j.verbose("No callback on initial load",m.onChange):!0!==i&&m.onChange.call(R,e,t,n)},active:function(){x.addClass(p.active)},multiple:function(){x.addClass(p.multiple)},visible:function(){x.addClass(p.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),j.debug("Setting selected to exact values"),j.clear(),j.set.selected(e,t,n)},selected:function(e,l,c,d){"boolean"==typeof l&&(d=c,c=l,l=void 0);var u=j.is.multiple();if(!(l=m.allowAdditions?l||j.get.itemWithAdditions(e):l||j.get.item(e)))return!1;j.debug("Setting selected menu item to",l),j.is.multiple()&&j.remove.searchWidth(),j.is.single()?(j.remove.activeItem(),j.remove.selectedItem()):m.useLabels&&j.remove.selectedItem(),l.each(function(){var e=_(this),t=j.get.choiceText(e),n=j.get.choiceValue(e,t),i=e.hasClass(p.filtered),o=e.hasClass(p.active),a=e.hasClass(p.actionable),r=e.hasClass(p.addition),s=u&&l&&1===l.length;a?(u&&o&&!r||!m.apiSettings||!m.saveRemoteData||j.save.remoteData(t,n),m.onActionable.call(R,n,t,e)):u?!o||r?(m.apiSettings&&m.saveRemoteData&&j.save.remoteData(t,n),m.useLabels?(j.add.value(n,t,e,c),j.add.label(n,t,s),j.set.activeItem(e),j.filterActive(),j.select.nextAvailable(l)):(j.add.value(n,t,e,c),j.set.text(j.add.variables(g.count)),j.set.activeItem(e))):i||!m.useLabels&&!f||(j.debug("Selected active value, removing label"),j.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&j.save.remoteData(t,n),d||e.hasClass(p.actionable)||j.set.text(t,!0),j.set.value(n,t,e,c),e.addClass(p.active).addClass(p.selected))}),d||j.remove.searchTerm(),j.is.allFiltered()&&(j.set.empty(),j.hideMenu())}},add:{label:function(e,t,n){var i,o=j.is.searchSelection()?k:w,a=j.escape.value(e);m.ignoreCase&&(a=a.toLowerCase()),i=_("<a />").addClass(p.label).attr("data-"+v.value,a).html(N.label(a,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,a,t),j.has.label(e)?j.debug("User selection already exists, skipping",a):(m.label.variation&&i.addClass(m.label.variation),!0===n&&m.label.transition?(j.debug("Animating in label",i),i.addClass(p.hidden).insertBefore(o).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.label.duration})):(j.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(b.message),e=m.templates.message(j.add.variables(e));0<t.length?t.html(e):_("<div/>").html(e).addClass(p.message).appendTo(A)},optionValue:function(e){var t=j.escape.value(e);0<T.find('option[value="'+j.escape.string(t)+'"]').length||(j.disconnect.selectObserver(),j.is.single()&&(j.verbose("Removing previous user addition"),T.find("option."+p.addition).remove()),_("<option/>").prop("value",t).addClass(p.addition).text(e).appendTo(T),j.verbose("Adding user addition as an <option>",e),j.observe.select())},userSuggestion:function(e){var t=A.children(b.addition),n=j.get.item(e),n=n&&0<n.not(b.addition).length,i=0<t.length;m.useLabels&&j.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(v.value,e).data(v.text,e).attr("data-"+v.value,e).attr("data-"+v.text,e).removeClass(p.filtered),m.hideAdditions||(n=m.templates.addition(j.add.variables(g.addResult,e)),t.html(n)),j.verbose("Replacing user suggestion with new value",t)):((t=j.create.userChoice(e)).prependTo(A),j.verbose("Adding item choice to menu corresponding with user choice addition",t)),m.hideAdditions&&!j.is.allFiltered()||t.addClass(p.selected).siblings().removeClass(p.selected),j.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),o=-1!==e.search("{term}");return j.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",j.get.selectionCount())),i&&(e=e.replace("{maxCount}",m.maxSelections)),o&&(n=t||j.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0);var o,a=j.get.values(!0);j.has.value(e)?j.debug("Value already selected"):""===e?j.debug("Cannot select blank values from multiselect"):(o=Array.isArray(a)?(o=n&&n.hasClass(p.actionable)?a:a.concat([e]),j.get.uniqueArray(o)):[e],j.has.selectInput()?j.can.extendSelect()&&(j.debug("Adding value to select",e,o,T),j.add.optionValue(e)):(o=o.join(m.delimiter),j.debug("Setting hidden input to delimited value",o,T)),!1===m.fireOnInit&&j.is.initialLoad()?j.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(R,e,t,n),j.set.value(o,t,n,i),j.check.maxSelections())}},remove:{active:function(){x.removeClass(p.active)},activeLabel:function(){x.find(b.label).removeClass(p.active)},empty:function(){x.removeClass(p.empty)},loading:function(){x.removeClass(p.loading)},initialLoad:function(){e=!1},upward:function(e){(e||x).removeClass(p.upward)},leftward:function(e){(e||A).removeClass(p.leftward)},visible:function(){x.removeClass(p.visible)},activeItem:function(){E.removeClass(p.active)},filteredItem:function(){m.useLabels&&j.has.maxSelections()||((m.useLabels&&j.is.multiple()?E.not("."+p.active):E).removeClass(p.filtered),m.hideDividers&&O.removeClass(p.hidden),j.remove.empty())},optionValue:function(e){var e=j.escape.value(e),t=T.find('option[value="'+j.escape.string(e)+'"]');0<t.length&&t.hasClass(p.addition)&&(j.disconnect.selectObserver(),t.remove(),j.verbose("Removing user addition as an <option>",e),j.observe.select())},message:function(){A.children(b.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){j.verbose("Cleared search term"),k.val(""),j.set.filtered()},userAddition:function(){E.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=m.allowAdditions?t||j.get.itemWithAdditions(e):t||j.get.item(e)))return!1;t.each(function(){var e=_(this),t=j.get.choiceText(e),n=j.get.choiceValue(e,t);j.is.multiple()?m.useLabels?(j.remove.value(n,t,e,i),j.remove.label(n)):(j.remove.value(n,t,e,i),0===j.get.selectionCount()?j.set.placeholderText():j.set.text(j.add.variables(g.count))):j.remove.value(n,t,e,i),e.removeClass(p.filtered).removeClass(p.active),m.useLabels&&e.removeClass(p.selected)})},selectedItem:function(){E.removeClass(p.selected)},value:function(e,t,n,i){var o,a=j.get.values(!0);j.has.selectInput()?(j.verbose("Input is <select> removing selected option",e),o=j.remove.arrayValue(e,a),j.remove.optionValue(e)):(j.verbose("Removing from delimited values",e),o=(o=j.remove.arrayValue(e,a)).join(m.delimiter)),!1===m.fireOnInit&&j.is.initialLoad()?j.verbose("No callback on initial load",m.onRemove):m.onRemove.call(R,e,t,n),j.set.value(o,t,n,i),j.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=_.grep(e,function(e){return t!=e}),j.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=j.escape.value(e),e=x.find(b.label).filter("[data-"+v.value+'="'+j.escape.string(m.ignoreCase?e.toLowerCase():e)+'"]');j.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||x.find(b.label).filter("."+p.active),j.verbose("Removing active label selections",e),j.remove.labels(e)},labels:function(e,o){e=e||x.find(b.label),j.verbose("Removing labels",e),e.each(function(){var e=_(this),t=e.data(v.value),n=void 0!==t?String(t):t,i=j.is.userValue(n);!1===m.onLabelRemove.call(e,t)?j.debug("Label remove callback cancelled removal"):(j.remove.message(),i?(j.remove.value(n,n,j.get.item(n),o),j.remove.label(n)):j.remove.selected(n,!1,o))})},tabbable:function(){j.is.searchSelection()?(j.debug("Searchable dropdown initialized"),k.removeAttr("tabindex")):(j.debug("Simple selection dropdown initialized"),x.removeAttr("tabindex")),A.removeAttr("tabindex")},diacritics:function(e){return m.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},has:{menuSearch:function(){return j.has.search()&&0<k.closest(A).length},clearItem:function(){return 0<z.length},search:function(){return 0<k.length},sizer:function(){return 0<S.length},selectInput:function(){return T.is("select")},minCharacters:function(e){return m.minCharacters&&!M?(e=void 0!==e?String(e):String(j.get.query())).length>=m.minCharacters:!(M=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=j.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<T.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(b.menu).length},message:function(){return 0<A.children(b.message).length},label:function(e){var e=j.escape.value(e),t=x.find(b.label);return m.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+v.value+'="'+j.escape.string(e)+'"]').length},maxSelections:function(){return m.maxSelections&&j.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=E.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(b.addition).length},query:function(){return""!==j.get.query()},value:function(e){return m.ignoreCase?j.has.valueIgnoringCase(e):j.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=j.get.values(!0);return!!(Array.isArray(t)?t&&-1!==_.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=j.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),_.each(e,function(e,t){if(String(n).toLowerCase()===String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return x.hasClass(p.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return _(e.target).is("select, input")&&0<x.closest("label").length},bubbledIconClick:function(e){return 0<_(e.target).closest(q).length},edge:function(){return!!ee.chrome&&!!ee.StyleMedia},empty:function(){return x.hasClass(p.empty)},chrome:function(){return!!ee.chrome&&!ee.StyleMedia},alreadySetup:function(){return x.is("select")&&void 0!==x.parent(b.dropdown).data(y)&&0===x.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(p.leftward)},clearable:function(){return x.hasClass(p.clearable)||m.clearable},disabled:function(){return x.hasClass(p.disabled)},focused:function(){return te.activeElement===x[0]},focusedOnSearch:function(){return te.activeElement===k[0]},allFiltered:function(){return(j.is.multiple()||j.has.search())&&!(!m.hideAdditions&&j.has.userSuggestion())&&!j.has.message()&&j.has.allResultsFiltered()},hidden:function(e){return!j.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return _.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return x.hasClass(p.multiple)},remote:function(){return m.apiSettings&&j.can.useAPI()},noApiCache:function(){return m.apiSettings&&!m.apiSettings.cache},single:function(){return!j.is.multiple()},selectMutation:function(e){var n=!1;return _.each(e,function(e,t){if(_(t.target).is("select, option, optgroup")||_(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return x.hasClass(p.search)},searchSelection:function(e){return j.has.search()&&1===(e?k.parents(b.dropdown):k.parent(b.dropdown)).length},selection:function(){return x.hasClass(p.selection)},userValue:function(e){return-1!==_.inArray(e,j.get.userValues())},upward:function(e){return(e||x).hasClass(p.upward)},visible:function(e){return(e||A).hasClass(p.visible)},verticallyScrollableContext:function(){var e=C[0]!==ee&&C.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=C[0]!==ee&&C.css("overflow-X");return"auto"===e||"scroll"===e}},can:{activate:function(e){return m.useLabels||!j.has.maxSelections()||j.has.maxSelections()&&e.hasClass(p.active)},openDownward:function(e){var t,e=e||A;return e.addClass(p.loading),t={context:{offset:C[0]===ee?{top:0,left:0}:C.offset(),scrollTop:C.scrollTop(),height:C.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},j.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),j.has.subMenu(e)&&(t.menu.height+=e.find(b.menu).first().outerHeight()),t=(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?(j.verbose("Dropdown can fit in context downward",t),!0):t.above?(j.verbose("Dropdown cannot fit below, opening upward",t),!1):(j.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(p.loading),t},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(p.loading),t={context:{offset:C[0]===ee?{top:0,left:0}:C.offset(),scrollLeft:C.scrollLeft(),width:C.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},j.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)&&(j.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(p.loading),n},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!j.is.disabled()&&(j.has.items()||j.has.message())},useAPI:function(){return void 0!==_.fn.api},useElement:function(e){return void 0!==_.fn[e]||(j.error(d.noElement.replace("{element}",e)),!1)}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){j.hideSubMenus(),j.hideOthers(),j.set.active()};e=ne(e)?e:function(){},j.verbose("Doing menu show animation",n),j.set.direction(t),t=m.transition.showMethod||j.get.transition(t),j.is.selection()&&j.set.scrollPosition(j.get.selectedItem(),!0),(j.is.hidden(n)||j.is.animating(n))&&("none"===t?(i(),n.transition({displayType:j.get.displayType()}).transition("show"),e.call(R)):j.can.useElement("transition")&&n.transition({animation:t+" in",debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.transition.showDuration||m.duration,queue:!0,onStart:i,displayType:j.get.displayType(),onComplete:function(){e.call(R)}}))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){j.unbind.intent(),j.remove.active()},t=m.transition.hideMethod||j.get.transition(t);e=ne(e)?e:function(){},(j.is.visible(n)||j.is.animating(n))&&(j.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:j.get.displayType()}).transition("hide"),e.call(R)):void 0!==_.fn.transition?n.transition({animation:t+" out",duration:m.transition.hideDuration||m.duration,debug:m.debug,verbose:m.verbose,silent:m.silent,queue:!1,onStart:i,displayType:j.get.displayType(),onComplete:function(){e.call(R)}}):j.error(d.transition))}},hideAndClear:function(){j.remove.searchTerm(),j.has.maxSelections()||(j.has.search()?j.hide(function(){j.remove.filteredItem()}):j.hide())},delay:{show:function(){j.verbose("Delaying show event to ensure user intent"),clearTimeout(j.timer),j.timer=setTimeout(j.show,m.delay.show)},hide:function(){j.verbose("Delaying hide event to ensure user intent"),clearTimeout(j.timer),j.timer=setTimeout(j.hide,m.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:(j.debug("Encoding quote values for use in select",e),t?(_.each(e,function(e,t){o.push(t.replace(c.quote,"&quot;"))}),o):e.replace(c.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(j.debug("Changing setting",e,t),_.isPlainObject(e))_.extend(!0,m,e);else{if(void 0===t)return m[e];_.isPlainObject(m[e])?_.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(_.isPlainObject(e))_.extend(!0,j,e);else{if(void 0===t)return j[e];j[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?j.performance.log(arguments):(j.debug=Function.prototype.bind.call(console.info,console,m.name+":"),j.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?j.performance.log(arguments):(j.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),j.verbose.apply(console,arguments)))},error:function(){m.silent||(j.error=Function.prototype.bind.call(console.error,console,m.name+":"),j.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=Date.now())-(X||t),X=t,$.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(j.performance.timer),j.performance.timer=setTimeout(j.performance.display,500)},display:function(){var e=m.name+":",n=0;X=!1,clearTimeout(j.performance.timer),_.each($,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),0<$.length&&(console.groupCollapsed(e),console.table?console.table($):_.each($,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),$=[]}},invoke:function(i,e,t){var o,a,n,r=I;return e=e||Z,t=t||R,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,_.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(_.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!_.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:j.error(d.method,i),!1;r=r[t]}}})),ne(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(W)?W.push(n):void 0!==W?W=[W,n]:void 0!==n&&(W=n),a}};J?(void 0===I&&j.initialize(),j.invoke(G)):(void 0!==I&&I.invoke("destroy"),j.initialize())}),void 0!==W?W:Y},_.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:ee,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:"exact",ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!1,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!1,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,collapseOnActionable:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onActionable:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return _(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",noElement:"This module requires ui {element}",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",actionable:"actionable"},keys:{backspace:8,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",actionable:"actionable"}},_.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?"&quot;":"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var o=e.placeholder||!1,a="",r=_.fn.dropdown.settings.templates.escape,s=_.fn.dropdown.settings.templates.deQuote;return(a+='<i class="dropdown icon"></i>')+(o?'<div class="default text">'+r(o,n)+"</div>":'<div class="text"></div>')+('<div class="'+s(i.menu)+'">')+_.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,c,d,u){var e=e[c.values]||[],f="",m=_.fn.dropdown.settings.templates.escape,g=_.fn.dropdown.settings.templates.deQuote;return _.each(e,function(e,t){var n,i,o,a,r,s=t[c.type]||"item",l=-1!==s.indexOf("menu");"item"===s||l?(n=t[c.text]?' data-text="'+g(t[c.text],!0)+'"':"",a=t[c.actionable]?u.actionable+" ":"",r=t[c.disabled]?u.disabled+" ":"",i=t[c.descriptionVertical]?u.descriptionVertical+" ":"",o=""!==m(t[c.description]||"",d),f+='<div class="'+g(a+r+i+(t[c.class]||u.item))+'" data-value="'+g(t[c.value],!0)+'"'+n+">",l&&(f+='<i class="'+(-1!==s.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[c.image]&&(f+='<img class="'+g(t[c.imageClass]||u.image)+'" src="'+g(t[c.image])+'">'),t[c.icon]&&(f+='<i class="'+g(t[c.icon]+" "+(t[c.iconClass]||u.icon))+'"></i>'),o&&(f=(f+='<span class="'+g(u.description)+'">'+m(t[c.description]||"",d)+"</span>")+(l?"":'<span class="'+g(u.text)+'">')),l&&(f+='<span class="'+g(u.text)+'">'),f+=m(t[c.name]||"",d),l?f=(f=(f+="</span>")+'<div class="'+g(s)+'">')+_.fn.dropdown.settings.templates.menu(t,c,d,u)+"</div>":o&&(f+="</span>"),f+="</div>"):"header"===s&&(a=m(t[c.name]||"",d),r=g(t[c.icon]||u.groupIcon),""===a&&""===r||(f+='<div class="'+g(t[c.class]||u.header)+'">',""!==r&&(f+='<i class="'+g(r+" "+(t[c.iconClass]||u.icon))+'"></i>'),f=f+a+"</div>"),t[c.divider]&&(f+='<div class="'+g(u.divider)+'"></div>'))}),f},label:function(e,t,n,i){var o=_.fn.dropdown.settings.templates.escape,a=_.fn.dropdown.settings.templates.deQuote;return o(t,n)+'<i class="'+a(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(S,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,S.fn.embed=function(p){var h,v=S(this),b=v.selector||"",y=Date.now(),x=[],C=p,w="string"==typeof C,k=[].slice.call(arguments,1);return v.each(function(){var i=S.isPlainObject(p)?S.extend(!0,{},S.fn.embed.settings,p):S.extend({},S.fn.embed.settings),e=i.selector,t=i.className,o=i.sources,l=i.error,a=i.metadata,n=i.namespace,r=i.templates,s="."+n,c="module-"+n,d=S(this),u=(d.find(e.placeholder),d.find(e.icon),d.find(e.embed)),f=this,m=d.data(c),g={initialize:function(){g.debug("Initializing embed"),g.determine.autoplay(),g.create(),g.bind.events(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),m=g,d.data(c,g)},destroy:function(){g.verbose("Destroying previous instance of embed"),g.reset(),d.removeData(c).off(s)},refresh:function(){g.verbose("Refreshing selector cache"),d.find(e.placeholder),d.find(e.icon),u=d.find(e.embed)},bind:{events:function(){g.has.placeholder()&&(g.debug("Adding placeholder events"),d.on("click"+s,e.placeholder,g.createAndShow).on("click"+s,e.icon,g.createAndShow))}},create:function(){g.get.placeholder()?g.createPlaceholder():g.createAndShow()},createPlaceholder:function(e){var t=g.get.icon();e=e||g.get.placeholder(),d.html(r.placeholder(e,t)),g.debug("Creating placeholder for embed",e,t)},createEmbed:function(e){g.refresh(),e=e||g.get.url(),u=S("<div/>").addClass(t.embed).html(g.generate.embed(e)).appendTo(d),i.onCreate.call(f,e),g.debug("Creating embed object",u)},changeEmbed:function(e){u.html(g.generate.embed(e))},createAndShow:function(){g.createEmbed(),g.show()},change:function(e,t,n){g.debug("Changing video to ",e,t,n),d.data(a.source,e).data(a.id,t),n?d.data(a.url,n):d.removeData(a.url),g.has.embed()?g.changeEmbed():g.create()},reset:function(){g.debug("Clearing embed and showing placeholder"),g.remove.data(),g.remove.active(),g.remove.embed(),g.showPlaceholder(),i.onReset.call(f)},show:function(){g.debug("Showing embed"),g.set.active(),i.onDisplay.call(f)},hide:function(){g.debug("Hiding embed"),g.showPlaceholder()},showPlaceholder:function(){g.debug("Showing placeholder image"),g.remove.active(),i.onPlaceholderDisplay.call(f)},get:{id:function(){return i.id||d.data(a.id)},placeholder:function(){return i.placeholder||d.data(a.placeholder)},icon:function(){return i.icon||(void 0!==d.data(a.icon)?d.data(a.icon):g.determine.icon())},source:function(e){return i.source||(void 0!==d.data(a.source)?d.data(a.source):g.determine.source())},type:function(){var e=g.get.source();return void 0!==o[e]&&o[e].type},url:function(){return i.url||(void 0!==d.data(a.url)?d.data(a.url):g.determine.url())}},determine:{autoplay:function(){g.should.autoplay()&&(i.autoplay=!0)},source:function(n){var i=!1;return(n=n||g.get.url())&&S.each(o,function(e,t){if(-1!==n.search(t.domain))return i=e,!1}),i},icon:function(){var e=g.get.source();return void 0!==o[e]&&o[e].icon},url:function(){var e=i.id||d.data(a.id),t=i.source||d.data(a.source),t=void 0!==o[t]&&o[t].url.replace("{id}",e);return t&&d.data(a.url,t),t}},set:{active:function(){d.addClass(t.active)}},remove:{data:function(){d.removeData(a.id).removeData(a.icon).removeData(a.placeholder).removeData(a.source).removeData(a.url)},active:function(){d.removeClass(t.active)},embed:function(){u.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&amp;")}},generate:{embed:function(e){g.debug("Generating embed html");var t,n=g.get.source();return(e=g.get.url(e))?(n=g.generate.parameters(n),t=r.iframe(e,n)):g.error(l.noURL,d),t},parameters:function(e,t){e=o[e]&&void 0!==o[e].parameters?o[e].parameters(i):{};return(t=t||i.parameters)&&(e=S.extend({},e,t)),e=i.onEmbed(e),g.encode.parameters(e)}},has:{embed:function(){return 0<u.length},placeholder:function(){return i.placeholder||d.data(a.placeholder)}},should:{autoplay:function(){return"auto"===i.autoplay?i.placeholder||void 0!==d.data(a.placeholder):i.autoplay}},is:{video:function(){return"video"===g.get.type()}},setting:function(e,t){if(g.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,i,e);else{if(void 0===t)return i[e];S.isPlainObject(i[e])?S.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,i.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),g.verbose.apply(console,arguments)))},error:function(){i.silent||(g.error=Function.prototype.bind.call(console.error,console,i.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;i.performance&&(n=(t=Date.now())-(y||t),y=t,x.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=i.name+":",n=0;y=!1,clearTimeout(g.performance.timer),S.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),1<v.length&&(e+=" ("+v.length+")"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):S.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=m;return e=e||k,t=t||f,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!S.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:g.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};w?(void 0===m&&g.initialize(),g.invoke(C)):(void 0!==m&&m.invoke("destroy"),g.initialize())}),void 0!==h?h:this},S.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{deQuote:function(e,t){return String(e).replace(/"/g,t?"&quot;":"")},iframe:function(e,t){return t&&(e+="?"+t),'<iframe src="'+(0,S.fn.embed.settings.templates.deQuote)(e)+'" width="100%" height="100%" msallowFullScreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="",i=S.fn.embed.settings.templates.deQuote;return t&&(n+='<i class="'+i(t)+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+i(e)+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document),function(W,Y,Q){"use strict";function K(e){return"function"==typeof e&&"number"!=typeof e.nodeType}Y=void 0!==Y&&Y.Math===Math?Y:globalThis,W.fn.flyout=function(M){var R,e=W(this),F=W(Y),I=W(Q),j=W("html"),L=W("head"),V=W("body"),N=e.selector||"",q=Date.now(),z=[],H=M,U="string"==typeof H,B=[].slice.call(arguments,1);return e.each(function(){var n,e,o,a,t,i,r,s=W.isPlainObject(M)?W.extend(!0,{},W.fn.flyout.settings,M):W.extend({},W.fn.flyout.settings),l=s.selector,c=s.className,d=s.namespace,u=s.fields,f=s.regExp,m=s.error,g="."+d,p="module-"+d,h=W(this),v=[Y,Q].indexOf(s.context)<0?I.find(s.context):V,b=h.find(l.close),y=h.children(l.flyout),x=v.children(l.pusher),C=h.hasClass("flyout"),w=this,k=C?h.data(p):void 0,S=!1,T=v[0]===V[0],D="",A="",E=!1,O=!1,P={initialize:function(){var a;P.debug("Initializing flyout",M),P.create.id(),C||(P.create.flyout(),K(s.onHidden)||(s.onHidden=function(){P.destroy(),h.remove()}),s.autoShow||(s.autoShow=!0)),h.addClass(s.class),""!==s.title&&h.find(l.header).html(P.helpers.escape(s.title,s.preserveHTML)).addClass(s.classTitle),""!==s.content&&h.find(l.content).html(P.helpers.escape(s.content,s.preserveHTML)).addClass(s.classContent),P.has.configActions()&&(0===(a=h.find(l.actions).addClass(s.classActions)).length?a=W("<div/>",{class:c.actions+" "+(s.classActions||"")}).appendTo(h):a.empty(),s.actions.forEach(function(e){var t=e[u.icon]?"<i "+(e[u.text]?'aria-hidden="true"':"")+' class="'+P.helpers.deQuote(e[u.icon])+' icon"></i>':"",n=P.helpers.escape(e[u.text]||"",s.preserveHTML),i=P.helpers.deQuote(e[u.class]||""),o=e[u.click]&&K(e[u.click])?e[u.click]:function(){};a.append(W("<button/>",{html:t+n,"aria-label":(e[u.text]||e[u.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(w,h)&&P.hide()}}}))})),s.delaySetup?requestAnimationFrame(P.setup.layout):P.setup.layout(),requestAnimationFrame(function(){P.setup.cache()}),"left"!==P.get.direction()&&"right"!==P.get.direction()||(P.setup.heights(),P.bind.resize()),P.bind.events(),P.observeChanges(),P.instantiate(),s.autoShow&&P.show()},instantiate:function(){P.verbose("Storing instance of module",P),k=P,h.data(p,k)},create:{flyout:function(){var e;P.verbose("Programmaticaly create flyout",v),h=W("<div/>",{class:c.flyout,role:"dialog","aria-modal":s.dimPage}),s.closeIcon&&(b=W("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":s.text.close}),h.append(b)),""!==s.title&&(e="_"+P.get.id()+"title",h.attr("aria-labelledby",e),W("<div/>",{class:c.header,id:e}).appendTo(h)),""!==s.content&&(e="_"+P.get.id()+"desc",h.attr("aria-describedby",e),W("<div/>",{class:c.content,id:e}).appendTo(h)),P.has.configActions()&&W("<div/>",{class:c.actions}).appendTo(h),h.prependTo(v),w=h[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),a="."+t,P.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),P.verbose("Destroying previous module for",h),h.off(g).removeData(p),P.is.ios()&&P.remove.ios(),b.off(a),n&&n.off(a),v.off(a),F.off(a),I.off(a)},event:{keyboard:function(e){e.which===s.keys.escape&&(s.closable?(P.debug("Escape key pressed hiding flyout"),P.hide()):P.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){P.setup.heights()},focus:function(){P.is.visible()&&s.autofocus&&s.dimPage&&requestAnimationFrame(P.set.autofocus)},clickaway:function(e){var t;s.closable&&(t=0<x.find(e.target).length||x.is(e.target),e=v.is(e.target),t&&(P.verbose("User clicked on dimmed page"),P.hide()),e&&(P.verbose("User clicked on dimmable context (scaled out page)"),P.hide()))},close:function(e){P.hide()},closeKeyUp:function(e){e=e.which;e!==s.keys.enter&&e!==s.keys.space||P.hide()},inputKeyDown:{first:function(e){e.which===s.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==s.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){S||!1===s.onApprove.call(P.element,W(this))?P.verbose("Approve callback returned false cancelling close"):(S=!0,P.hide(function(){S=!1}))},deny:function(e){S||!1===s.onDeny.call(P.element,W(this))?P.verbose("Deny callback returned false cancelling close"):(S=!0,P.hide(function(){S=!1}))},touch:function(e){},containScroll:function(e){w.scrollTop<=0&&(w.scrollTop=1),w.scrollTop+w.offsetHeight>=w.scrollHeight&&(w.scrollTop=w.scrollHeight-w.offsetHeight-1)},scroll:function(e){0===W(e.target).closest(l.flyout).length&&e.preventDefault()}},bind:{resize:function(){P.verbose("Adding resize event to window",F),F.on("resize"+a,P.event.resize)},events:function(){P.verbose("Attaching events"),h.on("click"+g,l.close,P.event.close).on("click"+g,l.approve,P.event.approve).on("click"+g,l.deny,P.event.deny),b.on("keyup"+a,P.event.closeKeyUp),F.on("focus"+a,P.event.focus)},clickaway:function(){P.verbose("Adding clickaway events to context",v),v.on("click"+a,P.event.clickaway).on("touchend"+a,P.event.clickaway)},scrollLock:function(){s.scrollLock&&(P.debug("Disabling page scroll"),(E=P.has.scrollbar())&&(P.save.bodyMargin(),P.set.bodyMargin()),v.addClass(c.locked)),P.verbose("Adding events to contain flyout scroll"),I.on("touchmove"+a,P.event.touch),h.on("scroll"+g,P.event.containScroll)}},unbind:{clickaway:function(){P.verbose("Removing clickaway events from context",v),v.off(a)},scrollLock:function(){P.verbose("Removing scroll lock from page"),E&&P.restore.bodyMargin(),v.removeClass(c.locked),I.off(a),h.off("scroll"+g)}},add:{inlineCSS:function(){var e=P.cache.width||h.outerWidth(),t=P.cache.height||h.outerHeight(),n=P.is.rtl(),i=P.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(P.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(P.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),P.is.ie()&&("left"===i||"right"===i?(P.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=W(n+="</style>").appendTo(L),P.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){P.verbose("Adding keyboard shortcuts"),I.on("keydown"+g,P.event.keyboard)}},observeChanges:function(){"MutationObserver"in Y&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1;e.every(function(e){var t;return"attributes"===e.type?O&&("disabled"===e.attributeName||0<W(e.target).find(":input").addBack(":input").length)&&(n=!0):(t=W(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=W(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0)),!n}),n&&P.refreshInputs()})).observe(w,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),P.debug("Setting up mutation observer",i))},refresh:function(){P.verbose("Refreshing selector cache"),v=[Y,Q].indexOf(s.context)<0?I.find(s.context):V,P.refreshFlyouts(),x=v.children(l.pusher),P.clear.cache()},refreshFlyouts:function(){P.verbose("Refreshing other flyouts"),y=v.children(l.flyout)},refreshInputs:function(){n&&n.off("keydown"+a),s.dimPage&&(0===(n=h.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).length?(n=h).attr("tabindex",-1):h.removeAttr("tabindex"),n.first().on("keydown"+a,P.event.inputKeyDown.first),n.last().on("keydown"+a,P.event.inputKeyDown.last),s.autofocus&&0===n.filter(":focus").length&&P.set.autofocus())},setup:{cache:function(){P.cache={width:h.outerWidth(),height:h.outerHeight()}},layout:function(){0===v.children(l.pusher).length&&(P.debug("Adding wrapper element for flyout"),P.error(m.pusher),x=W('<div class="pusher" />'),v.children().not(l.omitted).not(y).wrapAll(x),P.refresh()),0!==h.nextAll(l.pusher).length&&h.nextAll(l.pusher)[0]===x[0]||(P.debug("Moved flyout to correct parent element"),P.error(m.movedFlyout,w),h.detach().prependTo(v),P.refresh()),P.is.mobile()&&h.addClass(c.fullscreen),P.clear.cache(),P.set.pushable(),P.set.direction()},heights:function(){P.debug("Setting up heights",h);var e=h.children(l.header),t=h.children(l.content),n=h.children(l.actions),e=(v.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=W(e);t=K(P[t])?P[t]:P.toggle,0<n.length?(P.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):P.error(m.notFound,e)},show:function(e){e=K(e)?e:function(){},P.is.hidden()?!1===s.onShow.call(w)?P.verbose("Show callback returned false cancelling show"):(P.refresh(),P.othersActive()&&(P.debug("Other flyouts currently visible"),s.exclusive?P.hideOthers():S=!1),P.set.dimmerStyles(),P.set.observeAttributes(!1),P.pushPage(function(){e.call(w),s.onVisible.call(w),s.keyboardShortcuts&&P.add.keyboardShortcuts(),P.save.focus(),P.refreshInputs(),requestAnimationFrame(P.set.observeAttributes)}),s.onChange.call(w)):P.debug("Flyout is already visible")},hide:function(e){if(e=K(e)?e:function(){},!1===s.onHide.call(w,W(this)))return P.verbose("Hide callback returned false cancelling hide"),S=!1;(P.is.visible()||P.is.animating())&&(P.debug("Hiding flyout",e),P.refreshFlyouts(),P.set.observeAttributes(!1),P.pullPage(function(){e.call(w),K(s.onHidden)&&s.onHidden.call(w),P.restore.focus()}),s.onChange.call(w))},othersAnimating:function(){return 0<y.not(h).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(h).filter("."+c.visible).length},othersActive:function(){return P.othersVisible()||P.othersAnimating()},hideOthers:function(e){var t=y.not(h).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){P.verbose("Determining toggled direction"),P.is.hidden()?P.show():P.hide()},pushPage:function(t){var e,n,i;t=K(t)?t:function(){},P.set.overlay(),s.returnScroll&&(r=(T?F:v).scrollTop()),P.bind.scrollLock(),e=function(){P.bind.clickaway(),P.add.inlineCSS(),P.set.animating(),P.set.visible()},n=function(){P.set.dimmed()},i=function(e){e.target===h[0]&&(h.off("transitionend"+a,i),P.remove.animating(),t.call(w))},h.off("transitionend"+a),h.on("transitionend"+a,i),requestAnimationFrame(e),s.dimPage&&!P.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=K(t)?t:function(){},P.verbose("Removing context push state",P.get.direction()),P.unbind.clickaway(),P.othersActive()||(P.unbind.scrollLock(),s.keyboardShortcuts&&P.remove.keyboardShortcuts()),e=function(){P.set.overlay(),P.set.animating(),s.dimPage&&!P.othersVisible()&&P.set.closing(),P.remove.visible()},n=function(e){e.target===h[0]&&(h.off("transitionend"+a,n),P.remove.animating(),P.remove.closing(),P.remove.overlay(),P.remove.inlineCSS(),s.returnScroll&&P.scrollBack(),s.dimPage&&!P.othersVisible()&&x.removeClass(c.dimmed),t.call(w))},h.off("transitionend"+a),h.on("transitionend"+a,n),requestAnimationFrame(e)},scrollToTop:function(){P.verbose("Scrolling to top of page to avoid animation issues"),h.scrollTop(0),(T?F:v)[0].scrollTo(0,0)},scrollBack:function(){P.verbose("Scrolling back to original page position"),(T?F:v)[0].scrollTo(0,r)},clear:{cache:function(){P.verbose("Clearing cached dimensions"),P.cache={}}},set:{observeAttributes:function(e){O=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},dimmerStyles:function(){s.blurring?x.addClass(c.blurring):x.removeClass(c.blurring)},bodyMargin:function(){var n=P.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,A+"px"),v.find(l.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+A+"px)")})},ios:function(){j.addClass(c.ios)},pushed:function(){v.addClass(c.pushed)},pushable:function(){v.addClass(c.pushable)},dimmed:function(){x.addClass(c.dimmed)},active:function(){h.addClass(c.active)},animating:function(){h.addClass(c.animating)},closing:function(){x.addClass(c.closing)},direction:function(e){e=e||P.get.direction(),h.addClass(c[e])},visible:function(){h.addClass(c.visible)},overlay:function(){h.addClass(c.overlay)}},remove:{inlineCSS:function(){P.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){P.verbose("Removing keyboard shortcuts"),I.off("keydown"+g)},ios:function(){j.removeClass(c.ios)},pushed:function(){v.removeClass(c.pushed)},pushable:function(){v.removeClass(c.pushable)},active:function(){h.removeClass(c.active)},animating:function(){h.removeClass(c.animating)},closing:function(){x.removeClass(c.closing)},direction:function(e){e=e||P.get.direction(),h.removeClass(c[e])},visible:function(){h.removeClass(c.visible)},overlay:function(){h.removeClass(c.overlay)}},get:{direction:function(){return h.hasClass(c.top)?c.top:h.hasClass(c.right)?c.right:h.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return h},settings:function(){return s}},can:{leftBodyScrollbar:function(){return void 0===P.cache.leftBodyScrollbar&&(P.cache.leftBodyScrollbar=P.is.rtl()&&(P.is.iframe&&!P.is.firefox()||P.is.safari()||P.is.edge()||P.is.ie())),P.cache.leftBodyScrollbar}},save:{focus:function(){0<W(Q.activeElement).closest(h).length||(e=W(Q.activeElement).trigger("blur"))},bodyMargin:function(){D=v.css((T?"margin-":"padding-")+(P.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(D.replace(/[^\d.]/g,""),10),t=T?Y.innerWidth-Q.documentElement.clientWidth:v[0].offsetWidth-v[0].clientWidth;A=e+t}},is:{safari:function(){return void 0===P.cache.isSafari&&(P.cache.isSafari=/constructor/i.test(Y.HTMLElement)||!!Y.ApplePaySession),P.cache.isSafari},edge:function(){return void 0===P.cache.isEdge&&(P.cache.isEdge=!!Y.setImmediate&&!P.is.ie()),P.cache.isEdge},firefox:function(){return void 0===P.cache.isFirefox&&(P.cache.isFirefox=!!Y.InstallTrigger),P.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===P.cache.isIE&&(e=!Y.ActiveXObject&&"ActiveXObject"in Y,t="ActiveXObject"in Y,P.cache.isIE=e||t),P.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(P.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(P.verbose("Browser was found to be mobile",e),!0):(P.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!P.is.visible()},visible:function(){return h.hasClass(c.visible)},animating:function(){return v.hasClass(c.animating)},rtl:function(){return void 0===P.cache.isRTL&&(P.cache.isRTL="rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===V.attr("dir")||"rtl"===V.css("direction")||"rtl"===v.attr("dir")||"rtl"===v.css("direction")),P.cache.isRTL}},has:{configActions:function(){return Array.isArray(s.actions)&&0<s.actions.length},scrollbar:function(){return T||"hidden"!==v.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&s.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=P.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,D),v.find(l.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(P.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,s,e);else{if(void 0===t)return s[e];W.isPlainObject(s[e])?W.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,s.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),P.verbose.apply(console,arguments)))},error:function(){s.silent||(P.error=Function.prototype.bind.call(console.error,console,s.name+":"),P.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=Date.now())-(q||t),q=t,z.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var e=s.name+":",n=0;q=!1,clearTimeout(P.performance.timer),W.each(z,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),0<z.length&&(console.groupCollapsed(e),console.table?console.table(z):W.each(z,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),z=[]}},invoke:function(i,e,t){var o,a,n,r=k;return e=e||B,t=w||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,W.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!W.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:P.error(m.method,i),!1;r=r[t]}}})),K(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(R)?R.push(n):void 0!==R?R=[R,n]:void 0!==n&&(R=n),a}};U?(void 0===k&&(K(s.templates[H])&&(s.autoShow=!0,s.className.flyout=s.className.template,s=W.extend(!0,{},s,s.templates[H].apply(P,B)),c=s.className,s.namespace,u=s.fields,m=s.error),P.initialize()),K(s.templates[H])||P.invoke(H)):(void 0!==k&&k.invoke("destroy"),P.initialize(),R=h)}),void 0!==R?R:this},W.flyout=W.fn.flyout,W.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},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",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},W.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(K(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===W(W.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(W(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(W,Y,Q){"use strict";function K(e){return"function"==typeof e&&"number"!=typeof e.nodeType}Y=void 0!==Y&&Y.Math===Math?Y:globalThis,W.fn.modal=function(F){var I,e=W(this),j=W(Y),L=W(Q),V=W("body"),N=e.selector||"",q=Date.now(),z=[],H=F,U="string"==typeof H,B=[].slice.call(arguments,1);return e.each(function(){var n,o,a,e,i,t,r,s,l,c,d,u=W.isPlainObject(F)?W.extend(!0,{},W.fn.modal.settings,F):W.extend({},W.fn.modal.settings),f=u.selector,m=u.className,g=u.namespace,p=u.fields,h=u.error,v="."+g,b="module-"+g,y=W(this),x=[Y,Q].indexOf(u.context)<0?L.find(u.context):V,C=x[0]===V[0],w=y.find(f.closeIcon),k=y.hasClass("modal"),S=this,T=k?y.data(b):void 0,D=!1,A="",E="",O=!1,P=!1,M=!1,R={initialize:function(){var a;R.create.id(),k||(R.create.modal(),K(u.onHidden)||(u.onHidden=function(){R.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(f.title).html(R.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(R.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),R.has.configActions()&&(0===(a=y.find(f.actions).addClass(u.classActions)).length?a=W("<div/>",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):a.empty(),u.actions.forEach(function(e){var t=e[p.icon]?"<i "+(e[p.text]?'aria-hidden="true"':"")+' class="'+R.helpers.deQuote(e[p.icon])+' icon"></i>':"",n=R.helpers.escape(e[p.text]||"",u.preserveHTML),i=R.helpers.deQuote(e[p.class]||""),o=e[p.click]&&K(e[p.click])?e[p.click]:function(){};a.append(W("<button/>",{html:t+n,"aria-label":(e[p.text]||e[p.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+i,on:{click:function(){var e=W(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(S,y)||R.hide()}}}))})),R.cache={},R.verbose("Initializing dimmer",x),R.create.dimmer(),u.allowMultiple&&R.create.innerDimmer(),u.centered||y.addClass("top aligned"),R.refreshModals(),R.bind.events(),R.observeChanges(),R.instantiate(),u.autoShow&&R.show()},instantiate:function(){R.verbose("Storing instance of modal"),T=R,y.data(b,T)},create:{modal:function(){var e;y=W("<div/>",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(w=W("<i/>",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(w)),""!==u.title&&(e="_"+R.get.id()+"title",y.attr("aria-labelledby",e),W("<div/>",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+R.get.id()+"desc",y.attr("aria-describedby",e),W("<div/>",{class:m.content,id:e}).appendTo(y)),R.has.configActions()&&W("<div/>",{class:m.actions}).appendTo(y),x.append(y),S=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=W.extend(!0,e,u.dimmerSettings);void 0===W.fn.dimmer?R.error(h.dimmer):(R.debug("Creating dimmer"),i=x.dimmer(e),O=R.is.scrolling(),u.detachable?(R.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):R.set.undetached(),t=i.dimmer("get dimmer"))},id:function(){c=(Math.random().toString(16)+"000000000").slice(2,10),l="."+c,R.verbose("Creating unique id for element",c)},innerDimmer:function(){0===y.find(f.dimmer).length&&W("<div/>",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),R.verbose("Destroying previous modal"),y.removeData(b).off(v),j.off(l),t.off(l),w.off(l),n&&n.off(l),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in Y&&((d=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!1;e.every(function(e){var t;return"attributes"===e.type?M&&("disabled"===e.attributeName||0<W(e.target).find(":input").addBack(":input").length)&&(i=!0):(n=!0,t=W(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=W(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(i=!0)),!i}),n&&u.observeChanges&&(R.debug("DOM tree modified, refreshing"),R.refresh()),i&&R.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),R.debug("Setting up mutation observer",d))},refresh:function(){R.remove.scrolling(),R.cacheSizes(),R.can.useFlex()||R.set.modalOffset(),R.set.screenHeight(),R.set.type()},refreshModals:function(){a=y.siblings(f.modal),o=a.add(y)},refreshInputs:function(){n&&n.off("keydown"+l),0===(n=y.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).length?(n=y).attr("tabindex",-1):y.removeAttr("tabindex"),n.first().on("keydown"+l,R.event.inputKeyDown.first),n.last().on("keydown"+l,R.event.inputKeyDown.last),u.autofocus&&0===n.filter(":focus").length&&R.set.autofocus()},attachEvents:function(e,t){var n=W(e);t=K(R[t])?R[t]:R.toggle,0<n.length?(R.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):R.error(h.notFound,e)},bind:{events:function(){R.verbose("Attaching events"),y.on("click"+v,f.close,R.event.close).on("click"+v,f.approve,R.event.approve).on("click"+v,f.deny,R.event.deny),w.on("keyup"+l,R.event.closeKeyUp),j.on("resize"+l,R.event.resize).on("focus"+l,R.event.focus)},scrollLock:function(){i[0].addEventListener("touchmove",R.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i[0].removeEventListener("touchmove",R.event.preventScroll,{passive:!1})}},get:{id:function(){return c},element:function(){return y},settings:function(){return u}},event:{approve:function(){D||!1===u.onApprove.call(S,W(this))?R.verbose("Approve callback returned false cancelling hide"):(D=!0,R.hide(function(){D=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){D||!1===u.onDeny.call(S,W(this))?R.verbose("Deny callback returned false cancelling hide"):(D=!0,R.hide(function(){D=!1}))},close:function(){R.hide()},closeKeyUp:function(e){e=e.which;e!==u.keys.enter&&e!==u.keys.space||!y.hasClass(m.front)||R.hide()},inputKeyDown:{first:function(e){e.which===u.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==u.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},mousedown:function(e){var t=W(e.target),n=R.is.rtl();(r=0<t.closest(f.modal).length)&&R.verbose("Mouse down event registered inside the modal"),(s=R.is.scrolling()&&(!n&&j.outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&R.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(r)R.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)R.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<W(e.target).closest(f.modal).length,e=W.contains(Q.documentElement,e.target);if(!t&&e&&R.is.active()&&y.hasClass(m.front)){if(R.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!R.hideAll())return}else if(!R.hide())return;R.remove.clickaway()}}else R.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(R.timer),R.timer=setTimeout(e,t)},keyboard:function(e){e.which===u.keys.escape&&(u.closable?(R.debug("Escape key pressed hiding modal"),y.hasClass(m.front)&&R.hide()):R.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(R.is.animating()||R.is.active())&&requestAnimationFrame(R.refresh)},focus:function(){i.dimmer("is active")&&R.is.active()&&u.autofocus&&requestAnimationFrame(R.set.autofocus)}},toggle:function(){R.is.active()||R.is.animating()?R.hide():R.show()},show:function(e){e=K(e)?e:function(){},R.refreshModals(),R.set.dimmerSettings(),R.set.dimmerStyles(),R.showModal(e)},hide:function(e){return e=K(e)?e:function(){},R.refreshModals(),R.hideModal(e)},showModal:function(e){e=K(e)?e:function(){},R.is.animating()||!R.is.active()?!1===u.onShow.call(S)?R.verbose("Show callback returned false cancelling show"):(P=R.has.scrollbar(),R.showDimmer(),R.cacheSizes(),P&&R.set.bodyMargin(),R.can.useFlex()?R.remove.legacy():(R.set.legacy(),R.set.modalOffset(),R.debug("Using non-flex legacy modal positioning.")),R.set.screenHeight(),R.set.type(),R.set.clickaway(),!u.allowMultiple&&R.others.active()?R.hideOthers(R.showModal):(D=!1,u.allowMultiple&&(R.others.active()&&a.filter("."+m.active).find(f.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(t)),u.transition&&void 0!==W.fn.transition?(R.debug("Showing modal with css animations"),R.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(S),u.keyboardShortcuts&&R.add.keyboardShortcuts(),R.save.focus(),R.set.active(),R.refreshInputs(),requestAnimationFrame(R.set.observeAttributes),e()}})):R.error(h.noTransition))):R.debug("Modal is already visible")},hideModal:function(e,t,n){var i=a.filter("."+m.active).last();if(e=K(e)?e:function(){},!1===u.onHide.call(S,W(this)))return R.verbose("Hide callback returned false cancelling hide"),D=!1;(R.is.animating()||R.is.active())&&(R.debug("Hiding modal"),u.transition&&void 0!==W.fn.transition?(R.remove.active(),R.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){R.others.active()||R.others.animating()||t||R.hideDimmer(),u.keyboardShortcuts&&!R.others.active()&&R.remove.keyboardShortcuts()},onComplete:function(){R.unbind.scrollLock(),R.remove.active(),u.allowMultiple&&(i.addClass(m.front),y.removeClass(m.front),(n?o:i).find(f.dimmer).removeClass("active")),K(u.onHidden)&&u.onHidden.call(S),R.remove.dimmerStyles(),R.restore.focus(),e()}})):R.error(h.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(P&&(C||t.css("top",i.scrollTop()),R.save.bodyMargin()),R.debug("Showing dimmer"),i.dimmer("show")):R.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(R.unbind.scrollLock(),i.dimmer("hide",function(){P&&R.restore.bodyMargin(),R.remove.clickaway(),R.remove.screenHeight()})):R.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+m.active+", ."+m.animating);if(n=K(n)?n:function(){},0<e.length)return R.debug("Hiding all visible modals"),i=!0,W(e.get().reverse()).each(function(e,t){i=i&&W(t).modal("hide modal",n,!1,!0)}),i&&R.hideDimmer(),i},hideOthers:function(e){var t=a.filter("."+m.active+", ."+m.animating);e=K(e)?e:function(){},0<t.length&&(R.debug("Hiding other modals",a),t.modal("hide modal",e,!0))},others:{active:function(){return 0<a.filter("."+m.active).length},animating:function(){return 0<a.filter("."+m.animating).length}},add:{keyboardShortcuts:function(){R.verbose("Adding keyboard shortcuts"),L.on("keydown"+v,R.event.keyboard)}},save:{focus:function(){0<W(Q.activeElement).closest(y).length||(e=W(Q.activeElement).trigger("blur"))},bodyMargin:function(){A=x.css((C?"margin-":"padding-")+(R.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(A.replace(/[^\d.]/g,""),10),t=C?Y.innerWidth-Q.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;E=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=R.can.leftBodyScrollbar()?"left":"right";x.css((C?"margin-":"padding-")+n,A),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(m.active)},legacy:function(){y.removeClass(m.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+l),t.off("mousedown"+l),t.off("mouseup"+l)},dimmerStyles:function(){t.removeClass(m.inverted),i.removeClass(m.blurring)},bodyStyle:function(){""===x.attr("style")&&(R.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){R.debug("Removing page height"),x.css("height",""),R.remove.bodyStyle()},keyboardShortcuts:function(){R.verbose("Removing keyboard shortcuts"),L.off("keydown"+v)},scrolling:function(){O||i.removeClass(m.scrolling),y.removeClass(m.scrolling)}},cacheSizes:function(){y.addClass(m.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();void 0!==R.cache.pageHeight&&0===n||(W.extend(R.cache,{pageHeight:L.outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:(C?j:i).height()}),R.cache.topOffset=-R.cache.height/2),y.removeClass(m.loading),R.debug("Caching modal and container sizes",R.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return void 0===R.cache.leftBodyScrollbar&&(R.cache.leftBodyScrollbar=R.is.rtl()&&(R.is.iframe&&!R.is.firefox()||R.is.safari()||R.is.edge()||R.is.ie())),R.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!R.is.ie():(u.useFlex&&R.is.ie()?R.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&R.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=R.cache.contextHeight,t=R.cache.contextHeight/2,n=R.cache.topOffset,i=R.cache.scrollHeight,o=R.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},scrollbar:function(){return C||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(m.active)},ie:function(){var e,t;return void 0===R.cache.isIE&&(e=!Y.ActiveXObject&&"ActiveXObject"in Y,t="ActiveXObject"in Y,R.cache.isIE=e||t),R.cache.isIE},animating:function(){return y.transition("is animating")},scrolling:function(){return i.hasClass(m.scrolling)},modernBrowser:function(){return!(Y.ActiveXObject||"ActiveXObject"in Y)},rtl:function(){return void 0===R.cache.isRTL&&(R.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===V.attr("dir")||"rtl"===V.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),R.cache.isRTL},safari:function(){return void 0===R.cache.isSafari&&(R.cache.isSafari=/constructor/i.test(Y.HTMLElement)||!!Y.ApplePaySession),R.cache.isSafari},edge:function(){return void 0===R.cache.isEdge&&(R.cache.isEdge=!!Y.setImmediate&&!R.is.ie()),R.cache.isEdge},firefox:function(){return void 0===R.cache.isFirefox&&(R.cache.isFirefox=!!Y.InstallTrigger),R.cache.isFirefox},iframe:function(){return!(self===top)}},set:{observeAttributes:function(e){M=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},bodyMargin:function(){var n=R.can.leftBodyScrollbar()?"left":"right";(u.detachable||R.can.fit())&&x.css((C?"margin-":"padding-")+n,E+"px"),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+l,R.event.mousedown),t.on("mousedown"+l,R.event.mousedown),t.on("mouseup"+l,R.event.mouseup)},dimmerSettings:function(){var e;void 0===W.fn.dimmer?R.error(h.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:R.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=W.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(m.inverted):t.removeClass(m.inverted),u.blurring?i.addClass(m.blurring):i.removeClass(m.blurring)},modalOffset:function(){var e;u.detachable?y.css({marginTop:!y.hasClass("aligned")&&R.can.fit()?-R.cache.height/2:u.padding/2,marginLeft:-R.cache.width/2}):(e=R.can.fit(),y.css({top:!y.hasClass("aligned")&&e?L.scrollTop()+(R.cache.contextHeight-R.cache.height)/2:!e||y.hasClass("top")?L.scrollTop()+u.padding:L.scrollTop()+(R.cache.contextHeight-R.cache.height-u.padding),marginLeft:-R.cache.width/2})),R.verbose("Setting modal offset for legacy mode")},screenHeight:function(){R.can.fit()?x.css("height",""):y.hasClass("bottom")||(R.debug("Modal is taller than page content, resizing page height"),x.css("height",R.cache.height+2*u.padding+"px"))},active:function(){y.addClass(m.active+" "+m.front),a.filter("."+m.active).removeClass(m.front)},scrolling:function(){i.addClass(m.scrolling),y.addClass(m.scrolling),R.unbind.scrollLock()},legacy:function(){y.addClass(m.legacy)},type:function(){R.can.fit()?(R.verbose("Modal fits on screen"),R.others.active()||R.others.animating()||(R.remove.scrolling(),R.bind.scrollLock())):y.hasClass("bottom")?R.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(R.verbose("Modal cannot fit on screen setting to scrolling"),R.set.scrolling())},undetached:function(){i.addClass(m.undetached)}},setting:function(e,t){if(R.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,u,e);else{if(void 0===t)return u[e];W.isPlainObject(u[e])?W.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,R,e);else{if(void 0===t)return R[e];R[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,u.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),R.verbose.apply(console,arguments)))},error:function(){u.silent||(R.error=Function.prototype.bind.call(console.error,console,u.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=Date.now())-(q||t),q=t,z.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=u.name+":",n=0;q=!1,clearTimeout(R.performance.timer),W.each(z,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),0<z.length&&(console.groupCollapsed(e),console.table?console.table(z):W.each(z,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),z=[]}},invoke:function(i,e,t){var o,a,n,r=T;return e=e||B,t=t||S,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,W.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!W.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:R.error(h.method,i),!1;r=r[t]}}})),K(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(I)?I.push(n):void 0!==I?I=[I,n]:void 0!==n&&(I=n),a}};U?(void 0===T&&(K(u.templates[H])&&(u.autoShow=!0,u.className.modal=u.className.template,u=W.extend(!0,{},u,u.templates[H].apply(R,B)),m=u.className,u.namespace,p=u.fields,h=u.error),R.initialize()),K(u.templates[H])||R.invoke(H)):(void 0!==T&&T.invoke("destroy"),R.initialize(),I=y)}),void 0!==I?I:this},W.modal=W.fn.modal,W.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},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .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",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},W.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(K(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),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];o.handler(W(e).val())}function t(){o.handler(null)}var n=this,i=this.get.settings(),o=i.templates.getArguments(arguments);return 0===W(W.parseHTML(o.content)).filter(".ui.input").length&&(o.content+='<p><div class="'+this.helpers.deQuote(i.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(o.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(o.defaultValue||"")+'"></div></p>'),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document),function(x,C,w){"use strict";C=void 0!==C&&C.Math===Math?C:globalThis,x.fn.nag=function(f){var m,e=x(this),g=e.selector||"",p=Date.now(),h=[],v=f,b="string"==typeof v,y=[].slice.call(arguments,1);return e.each(function(){var i,o=x.isPlainObject(f)?x.extend(!0,{},x.fn.nag.settings,f):x.extend({},x.fn.nag.settings),e=o.selector,l=o.error,t=o.namespace,n="."+t,a=t+"-module",r=x(this),s=o.context?[C,w].indexOf(o.context)<0?x(w).find(o.context):x(o.context):x("body"),c=this,d=r.data(a),u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof o.value&&(o.value=JSON.stringify(o.value)),i=u.get.storage(),r.on("click"+n,e.close,u.dismiss).data(a,u),o.detachable&&r.parent()[0]!==s[0]&&r.detach().prependTo(s),0<o.displayTime&&setTimeout(u.hide,o.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),r.removeData(a).off(n)},show:function(){if(u.should.show()&&!r.is(":visible")){if(!1===o.onShow.call(c))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",o.animation.show),"fade"===o.animation.show?r.fadeIn(o.duration,o.easing,o.onVisible):r.slideDown(o.duration,o.easing,o.onVisible)}},hide:function(){if(!1===o.onHide.call(c))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",o.animation.hide),"fade"===o.animation.hide?r.fadeOut(o.duration,o.easing,o.onHidden):r.slideUp(o.duration,o.easing,o.onHidden)},dismiss:function(e){!1!==u.hide()&&o.storageMethod&&(u.debug("Dismissing nag",o.storageMethod,o.key,o.value,o.expires),u.storage.set(o.key,o.value)),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return o.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(o.key)!=o.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(o.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(o.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(l.expiresFormat)},storage:function(){return"localstorage"===o.storageMethod&&void 0!==C.localStorage?(u.debug("Using local storage"),C.localStorage):"sessionstorage"===o.storageMethod&&void 0!==C.sessionStorage?(u.debug("Using session storage"),C.sessionStorage):"cookie"in w?(u.debug("Using cookie"),{setItem:function(e,t,n){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),t=encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);var i,o="";for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(o+="; "+i,"string"==typeof n[i]&&(o+="="+n[i].split(";")[0]));w.cookie=e+"="+t+o},getItem:function(e){for(var t=w.cookie.split("; "),n=0,i=t.length;n<i;n++){var o=t[n].split("=");if(e===o[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return o[1]||""}},removeItem:function(e,t){i.setItem(e,"",t)}}):void u.error(l.noStorage)},storageOptions:function(){var e={};return o.expires&&(e.expires=u.get.expirationDate(o.expires)),o.domain&&(e.domain=o.domain),o.path&&(e.path=o.path),o.secure&&(e.secure=o.secure),o.samesite&&(e.samesite=o.samesite),e}},clear:function(){u.storage.remove(o.key)},storage:{set:function(e,t){var n=u.get.storageOptions();i===C.localStorage&&n.expires&&(u.debug("Storing expiration value in localStorage",e,n.expires),i.setItem(e+o.expirationKey,n.expires)),u.debug("Value stored",e,t);try{i.setItem(e,t,n)}catch(e){u.error(l.setItem,e)}},get:function(e){var t,n=i.getItem(e);return i===C.localStorage&&null!=(t=i.getItem(e+o.expirationKey))&&new Date(t)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),n=null),n="undefined"!==n&&"null"!==n&&null!=n?n:void 0},remove:function(e){var t=u.get.storageOptions();t.expires=u.get.expirationDate(-1),i===C.localStorage&&i.removeItem(e+o.expirationKey),i.removeItem(e,t)}},setting:function(e,t){if(u.debug("Changing setting",e,t),x.isPlainObject(e))x.extend(!0,o,e);else{if(void 0===t)return o[e];x.isPlainObject(o[e])?x.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(x.isPlainObject(e))x.extend(!0,u,e);else{if(void 0===t)return u[e];u[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,o.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),u.verbose.apply(console,arguments)))},error:function(){o.silent||(u.error=Function.prototype.bind.call(console.error,console,o.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=Date.now())-(p||t),p=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=o.name+":",n=0;p=!1,clearTimeout(u.performance.timer),x.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",g&&(e+=" '"+g+"'"),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=d;return e=e||y,t=t||c,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!x.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:u.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(m)?m.push(n):void 0!==m?m=[m,n]:void 0!==n&&(m=n),a}};b?(void 0===d&&u.initialize(),u.invoke(v)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==m?m:this},x.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{noStorage:"Unsupported storage method",method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},x.extend(x.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document),function(L,V,N){"use strict";function q(e){return"function"==typeof e&&"number"!=typeof e.nodeType}V=void 0!==V&&V.Math===Math?V:globalThis,L.fn.popup=function(S){var T,e=L(this),D=L(N),A=L(V),E=L("body"),O=e.selector||"",P="ontouchstart"in N.documentElement?"touchstart":"click",M=Date.now(),R=[],F=S,I="string"==typeof F,j=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,d=L.isPlainObject(S)?L.extend(!0,{},L.fn.popup.settings,S):L.extend({},L.fn.popup.settings),i=d.selector,u=d.className,f=d.error,m=d.metadata,o=d.namespace,a="."+d.namespace,r="module-"+o,g=L(this),l=[V,N].indexOf(d.context)<0?D.find(d.context):L(d.context),p=[V,N].indexOf(d.scrollContext)<0?D.find(d.scrollContext):L(d.scrollContext),h=[V,N].indexOf(d.boundary)<0?D.find(d.boundary):L(d.boundary),v=d.target?[V,N].indexOf(d.target)<0?D.find(d.target):L(d.target):g,b=0,y=!1,x=!1,C=this,w=g.data(r),k={initialize:function(){k.debug("Initializing",g),k.createID(),k.bind.events(),!k.exists()&&d.preserve&&k.create(),d.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),w=k,g.data(r,w)},observeChanges:function(){"MutationObserver"in V&&((e=new MutationObserver(k.event.documentChanged)).observe(N,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){d.popup?c=D.find(d.popup).eq(0):d.inline&&(c=v.nextAll(i.popup).eq(0),d.popup=c),d.popup?(k.set.invisible(),s=k.get.offsetParent(),k.remove.invisible(),d.movePopup&&k.has.popup()&&k.get.offsetParent(c)[0]!==s[0]&&(k.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=d.inline?k.get.offsetParent(v):k.has.popup()?k.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(k.debug("Setting page as offset parent"),s=E),k.get.variation()&&k.set.variation()},reposition:function(){k.refresh(),k.set.position()},destroy:function(){k.debug("Destroying previous module"),e&&e.disconnect(),c&&!d.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),g.removeData(r)},event:{start:function(e){var t=L.isPlainObject(d.delay)?d.delay.show:d.delay;clearTimeout(k.hideTimer),x&&!d.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=L.isPlainObject(d.delay)?d.delay.hide:d.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){x=!0,d.addTouchEvents&&k.show()},resize:function(){k.is.visible()&&k.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===C||0<L(e).find(C).length)&&(k.debug("Element removed from DOM, tearing down events"),k.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?(k.debug("Click occurred outside popup hiding popup"),k.hide()):k.debug("Click was inside popup, keeping popup open")}},create:function(){var e=k.get.html(),t=k.get.title(),n=k.get.content();e||n||t?(k.debug("Creating pop-up html"),e=e||d.templates.popup({title:t,content:n}),c=L("<div/>").addClass(u.popup).data(m.activator,g).html(e),d.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(g)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),d.hoverable&&k.bind.popup(),d.onCreate.call(c,C)):d.popup?(D.find(d.popup).data(m.activator,g),k.verbose("Used popup specified in settings"),k.refresh(),d.hoverable&&k.bind.popup()):0<v.next(i.popup).length?(k.verbose("Pre-existing popup found"),d.inline=!0,d.popup=v.next(i.popup).data(m.activator,g),k.refresh(),d.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",C)},createID:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),t="."+n,k.verbose("Creating unique id for element",n)},toggle:function(){k.debug("Toggling pop-up"),k.is.hidden()?(k.debug("Popup is hidden, showing pop-up"),k.unbind.close(),k.show()):(k.debug("Popup is visible, hiding pop-up"),k.hide())},show:function(e){e=e||function(){},k.debug("Showing pop-up",d.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===d.onShow.call(c,C)?k.debug("onShow callback returned false, cancelling popup animation"):(d.preserve||d.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),d.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===d.onHide.call(c,C)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){D.find(i.popup).filter("."+u.popupVisible).each(function(){L(this).data(m.activator).popup("hide")})},exists:function(){return!!c&&(d.inline||d.popup?k.has.popup():0<c.closest(l).length)},removePopup:function(){k.has.popup()&&!d.popup&&(k.debug("Removing popup",c),c.remove(),c=void 0,d.onRemove.call(c,C))},save:{conditions:function(){k.cache={title:g.attr("title")},k.cache.title&&g.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(g.attr("title",k.cache.title),k.verbose("Restoring original attributes",k.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=q(e)?e:function(){},d.transition&&k.can.useElement("transition")&&(k.set.visible(),c.transition({animation:(d.transition.showMethod||d.transition)+" in",queue:!1,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.transition.showDuration||d.duration,onComplete:function(){k.bind.close(),e.call(c,C),d.onVisible.call(c,C)}}))},hide:function(e){e=q(e)?e:function(){},k.debug("Hiding pop-up"),d.transition&&void 0!==L.fn.transition?c.transition({animation:(d.transition.hideMethod||d.transition)+" out",queue:!1,duration:d.transition.hideDuration||d.duration,debug:d.debug,verbose:d.verbose,silent:d.silent,onComplete:function(){k.reset(),e.call(c,C),d.onHidden.call(c,C)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return g.removeData(m.html),g.data(m.html)||d.html},title:function(){return g.removeData(m.title),g.data(m.title)||d.title},content:function(){return g.removeData(m.content),g.data(m.content)||d.content||g.attr("title")},variation:function(){return g.removeData(m.variation),g.data(m.variation)||d.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]===V,i=v.offset(),o=d.inline||d.popup&&d.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[0]!==s[0]&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),d.setFluidWidth&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=d.inline?parseInt(V.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=d.inline?k.is.rtl()?parseInt(V.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(V.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"===d.on?"mouseenter":"focus"===d.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"===d.on?"mouseleave":"focus"===d.on&&"blur"},distanceFromBoundary:function(e,t){var n={},i=(t=t||k.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)},k.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(void 0!==e?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||(k.verbose("All available positions available"),y=k.get.positions()),k.debug("Recording last position tried",e),y[e]=!0,"opposite"===d.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),o=!0===y[r],k.debug("Trying opposite strategy",r)),"adjacent"===d.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),a=!0===y[r],k.debug("Trying adjacent strategy",r)),(a||o)&&(k.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||k.get.calculations(),e=e||g.data(m.position)||d.position,n=g.data(m.offset)||d.offset,i=d.distanceAway,o=t.target,a=t.popup,r=t.parent,k.should.centerArrow(t)&&(k.verbose("Adjusting offset to center arrow on small target element"),"top left"!==e&&"bottom left"!==e||(n=(n+=o.width/2)-d.arrowPixelsFromEdge),"top right"!==e&&"bottom right"!==e||(n=(n-=o.width/2)+d.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!k.is.svg(o.element))return k.debug("Popup target is hidden, no action taken"),!1;switch(d.inline&&(k.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)),k.debug("Determining popup position from calculations",e,t),k.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"===e?"right":"left"}),k.debug("RTL: Popup position updated",e)),e=b===d.maxSearchDepth&&"string"==typeof d.lastResort?d.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(void 0===s&&k.error(f.invalidPosition,e),k.debug("Calculated popup positioning values",s),c.css(s).removeClass(u.position).addClass(e),k.set.invisible(),l=k.get.popupOffset(),l=k.get.distanceFromBoundary(l,t),!d.forcePosition&&k.is.offstage(l,e)){if(k.debug("Position is outside viewport",e),b<d.maxSearchDepth)return b++,e=k.get.nextPosition(e),k.debug("Trying new position",e),!!c&&k.set.position(e,t);if(!d.lastResort)return k.debug("Popup could not find a position to display",c),k.error(f.cannotPlace,C),k.remove.attempts(),k.remove.invisible(),k.reset(),d.onUnplaceable.call(c,C),!1;k.debug("No position found, showing with last position")}return k.debug("Position is on stage",e),k.remove.attempts(),k.remove.invisible(),d.setFluidWidth&&k.is.fluid()&&k.set.fluidWidth(t),!0}k.error(f.notFound)},fluidWidth:function(e){e=e||k.get.calculations(),k.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},loading:function(){c.addClass(u.loading)},invisible:function(){c.addClass(u.invisible)},variation:function(e){(e=e||k.get.variation())&&k.has.popup()&&(k.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){g.addClass(u.visible)}},remove:{loading:function(){c.removeClass(u.loading)},invisible:function(){c.removeClass(u.invisible)},variation:function(e){(e=e||k.get.variation())&&(k.verbose("Removing variation",e),c.removeClass(e))},visible:function(){g.removeClass(u.visible)},attempts:function(){k.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){k.debug("Binding popup events to module"),"click"===d.on&&g.on(P+a,k.toggle),"hover"===d.on&&g.on("touchstart"+a,k.event.touchstart),k.get.startEvent()&&g.on(k.get.startEvent()+a,k.event.start).on(k.get.endEvent()+a,k.event.end),d.target&&k.debug("Target set to element",v),A.on("resize"+t,k.event.resize)},popup:function(){k.verbose("Allowing hover events on popup to prevent closing"),c&&k.has.popup()&&c.on("mouseenter"+a,k.event.start).on("mouseleave"+a,k.event.end)},close:function(){(!0===d.hideOnScroll||"auto"===d.hideOnScroll&&"click"!==d.on)&&k.bind.closeOnScroll(),k.is.closable()?k.bind.clickaway():"hover"===d.on&&x&&k.bind.touchClose()},closeOnScroll:function(){k.verbose("Binding scroll close event to document"),p.one(k.get.scrollEvent()+t,k.event.hideGracefully)},touchClose:function(){k.verbose("Binding popup touchclose event to document"),D.on("touchstart"+t,function(e){k.verbose("Touched away from popup"),k.event.hideGracefully.call(C,e)})},clickaway:function(){k.verbose("Binding popup close event to document"),D.on(P+t,function(e){k.verbose("Clicked away from popup"),k.event.hideGracefully.call(C,e)})}},unbind:{events:function(){A.off(t),g.off(a)},close:function(){D.off(t),p.off(t)}},can:{useElement:function(e){return void 0!==L.fn[e]||(k.error(f.noElement.replace("{element}",e)),!1)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!k.is.basic()&&e.target.width<=2*d.arrowPixelsFromEdge}},is:{closable:function(){return"auto"===d.closable?"hover"!==d.on:d.closable},offstage:function(e,n){var i=[];return L.each(e,function(e,t){t<-d.jitter&&(k.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return k.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return g.hasClass(u.basic)},active:function(){return g.hasClass(u.active)},animating:function(){return void 0!==c&&c.hasClass(u.animating)},fluid:function(){return void 0!==c&&c.hasClass(u.fluid)},visible:function(){return void 0!==c&&c.hasClass(u.popupVisible)},dropdown:function(){return g.hasClass(u.dropdown)},hidden:function(){return!k.is.visible()},rtl:function(){return"rtl"===g.attr("dir")||"rtl"===g.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){k.remove.visible(),d.preserve?void 0!==L.fn.transition&&c.transition("remove transition"):k.removePopup()},setting:function(e,t){if(L.isPlainObject(e))L.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(L.isPlainObject(e))L.extend(!0,k,e);else{if(void 0===t)return k[e];k[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,d.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),k.verbose.apply(console,arguments)))},error:function(){d.silent||(k.error=Function.prototype.bind.call(console.error,console,d.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(M||t),M=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=d.name+":",n=0;M=!1,clearTimeout(k.performance.timer),L.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):L.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,a,n,r=w;return e=e||j,t=t||C,"string"==typeof i&&void 0!==r&&(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(void 0!==r[n])return a=r[n],!1;{if(!L.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:k.error(f.method,i),!1;r=r[t]}}})),q(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(T)?T.push(n):void 0!==T?T=[T,n]:void 0!==n&&(T=n),a}};I?(void 0===w&&k.initialize(),k.invoke(F)):(void 0!==w&&w.invoke("destroy"),k.initialize())}),void 0!==T?T: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:V,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:V,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.",noElement:"This module requires ui {element}",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",invisible:"invisible",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={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=L.fn.popup.settings.templates.escape;return void 0!==e&&(e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(S,e,T){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,S.fn.progress=function(h){var v,e=S(this),b=e.selector||"",y=Date.now(),x=[],C=h,w="string"==typeof C,k=[].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,l=r.error,o="."+e,a="module-"+e,c=S(this),d=S(this).find(i.bar),s=S(this).find(i.progress),u=S(this).find(i.label),f=this,m=c.data(a),g=!1,p={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(){p.set.duration(),p.debug(f),p.read.metadata(),p.read.settings(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of progress",p),m=p,c.data(a,p)},destroy:function(){p.verbose("Destroying previous progress for",c),clearInterval(m.interval),p.remove.state(),c.removeData(a),m=void 0},reset:function(){p.remove.nextValue(),p.update.progress(0)},complete:function(e){(void 0===p.percent||p.percent<100)&&(p.remove.progressPoll(),!0!==e&&p.set.percent(100))},read:{metadata:function(){var e={percent:p.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:p.helper.forceArray(c.data(t.value))};void 0!==e.total&&(p.debug("Total value set from metadata",e.total),p.set.total(e.total)),0<e.value.length&&(p.debug("Current value set from metadata",e.value),p.set.value(e.value),p.set.progress(e.value)),0<e.percent.length&&(p.debug("Current percent value set from metadata",e.percent),p.set.percent(e.percent))},settings:function(){!1!==r.total&&(p.debug("Current total set in settings",r.total),p.set.total(r.total)),!1!==r.value&&(p.debug("Current value set in settings",r.value),p.set.value(r.value),p.set.progress(p.value)),!1!==r.percent&&(p.debug("Current percent set in settings",r.percent),p.set.percent(r.percent))}},bind:{transitionEnd:function(t){d.one("transitionend"+o,function(e){clearTimeout(p.failSafeTimer),t.call(this,e)}),p.failSafeTimer=setTimeout(function(){d.triggerHandler("transitionend")},r.duration+r.failSafeDelay),p.verbose("Adding fail safe timer",p.timer)}},increment:function(e){var t;e=p.has.total()?(t=p.get.value(),e||1):(t=p.get.percent(),e||p.get.randomValue()),p.debug("Incrementing percentage by",t,t=t+e,e),t=p.get.normalizedValue(t),p.set.progress(t)},decrement:function(e){var t,n;p.get.total()?(n=(t=p.get.value())-(e=e||1),p.debug("Decrementing value by",e,t)):(n=(t=p.get.percent())-(e=e||p.get.randomValue()),p.debug("Decrementing percentage by",e,t)),n=p.get.normalizedValue(n),p.set.progress(n)},has:{progressPoll:function(){return p.progressPoll},total:function(){return!1!==p.get.total()}},get:{text:function(e,t){var n=p.get.value(t=t||0),i=p.get.total(),o=g?p.get.displayPercent(t):p.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]||""),p.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return p.debug("Value cannot decrement below 0"),0;if(p.has.total()){if(e>p.total)return p.debug("Value cannot increment above total",p.total),p.total}else if(100<e)return p.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"===r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return p.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},displayPercent:function(e){var e=S(d[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:p.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return p.percent&&p.percent[e||0]||0},value:function(e){return p.nextValue||p.value&&p.value[e||0]||0},total:function(){return void 0!==p.total&&p.total}},create:{progressPoll:function(){p.progressPoll=setTimeout(function(){p.update.toNextValue(),p.remove.progressPoll()},p.get.updateInterval())}},is:{complete:function(){return p.is.success()||p.is.warning()||p.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(){p.verbose("Removing progress poll timer"),p.progressPoll&&(clearTimeout(p.progressPoll),delete p.progressPoll)},nextValue:function(){p.verbose("Removing progress value stored for next update"),delete p.nextValue},state:function(){p.verbose("Removing stored state"),delete p.total,delete p.percent,delete p.value},active:function(){p.verbose("Removing active state"),c.removeClass(n.active)},success:function(){p.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){p.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){p.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){p.debug("set bar width with ",e),e=p.helper.forceArray(e);var o=-1,a=-1,r=p.helper.sum(e),s=d.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=S(d[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(d[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,p.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),d.css({"transition-duration":e})},percent:function(e){e=p.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=p.has.total(),i=p.helper.sum(e),o=1<e.length&&n,a=p.helper.sum(p.helper.forceArray(p.value));o&&a>p.total?p.error(l.sumExceedsTotal,a,p.total):!o&&100<i?p.error(l.tooHigh,i):i<0?p.error(l.tooLow,i):(t=0<r.precision?r.precision:o?p.helper.derivePrecision(Math.min.apply(null,p.value),p.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),p.percent=a,n&&(p.value=e.map(function(e){return 0<t?Math.round(e/100*p.total*(10*t))/(10*t):Math.round(e/100*p.total*10)/10})),p.set.barWidth(e),p.set.labelInterval()),r.onChange.call(f,e,p.value,p.total)},labelInterval:function(){clearInterval(p.interval),p.bind.transitionEnd(function(){p.verbose("Bar finished animating, removing continuous label updates"),clearInterval(p.interval),g=!1,p.set.labels()}),g=!0,p.interval=setInterval(function(){S.contains(T.documentElement,f)||(clearInterval(p.interval),g=!1),p.set.labels()},r.framerate)},labels:function(){p.verbose("Setting both bar progress and outer label text"),p.set.barLabel(),p.set.state()},label:function(e){e&&(e=p.get.text(e),p.verbose("Setting label to text",e),u.text(e))},state:function(e){100===(e=void 0!==e?e:p.helper.sum(p.percent))?r.autoSuccess&&1===d.length&&!(p.is.warning()||p.is.error()||p.is.success())?(p.set.success(),p.debug("Automatically triggering success at 100%")):(p.verbose("Reached 100% removing active state"),p.remove.active(),p.remove.progressPoll()):0<e?(p.verbose("Adjusting active progress bar label",e),p.set.active()):(p.remove.active(),p.remove.warning(),p.remove.error(),p.remove.success(),p.set.label(r.text.active))},barLabel:function(n){s.each(function(e,t){t=S(t);void 0!==n?t.text(p.get.text(n,e)):"ratio"===r.label&&p.has.total()?(p.verbose("Adding ratio to bar label"),t.text(p.get.text(r.text.ratio,e))):"percent"===r.label&&(p.verbose("Adding percentage to bar label"),t.text(p.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,p.debug("Setting active state"),r.showActivity&&!p.is.active()&&c.addClass(n.active),p.remove.warning(),p.remove.error(),p.remove.success(),(e=r.onLabelUpdate("active",e,p.value,p.total))&&p.set.label(e),p.bind.transitionEnd(function(){r.onActive.call(f,p.value,p.total)})},success:function(e,t){e=e||r.text.success||r.text.active,p.debug("Setting success state"),c.addClass(n.success),p.remove.active(),p.remove.warning(),p.remove.error(),p.complete(t),e=r.text.success?r.onLabelUpdate("success",e,p.value,p.total):r.onLabelUpdate("active",e,p.value,p.total),p.set.label(e),p.bind.transitionEnd(function(){r.onSuccess.call(f,p.total)})},warning:function(e,t){e=e||r.text.warning,p.debug("Setting warning state"),c.addClass(n.warning),p.remove.active(),p.remove.success(),p.remove.error(),p.complete(t),(e=r.onLabelUpdate("warning",e,p.value,p.total))&&p.set.label(e),p.bind.transitionEnd(function(){r.onWarning.call(f,p.value,p.total)})},error:function(e,t){e=e||r.text.error,p.debug("Setting error state"),c.addClass(n.error),p.remove.active(),p.remove.success(),p.remove.warning(),p.complete(t),(e=r.onLabelUpdate("error",e,p.value,p.total))&&p.set.label(e),p.bind.transitionEnd(function(){r.onError.call(f,p.value,p.total)})},total:function(e){p.total=e},value:function(e){p.value=p.helper.forceArray(e)},progress:function(e){p.has.progressPoll()?(p.debug("Updated within interval, setting next update to use new value",e),p.set.nextValue(e)):(p.debug("First update in progress update interval, immediately updating",e),p.update.progress(e),p.create.progressPoll())},nextValue:function(e){p.nextValue=e}},update:{toNextValue:function(){var e=p.nextValue;e&&(p.debug("Update interval complete using last updated value",e),p.update.progress(e),p.remove.nextValue())},progress:function(e){var n=p.has.total(),e=(n&&p.set.value(e),p.helper.forceArray(e).map(function(e){var t;return!1===(e=p.get.numericValue(e))&&p.error(l.nonNumeric,e),e=p.get.normalizedValue(e),n?(t=0<p.total?e/p.total*100:100,p.debug("Calculating percent complete from total",t)):(t=e,p.debug("Setting value to exact percentage value",t)),t}));p.set.percent(e)}},setting:function(e,t){if(p.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,r,e);else{if(void 0===t)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,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){!r.silent&&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.silent&&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(){r.silent||(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=Date.now())-(y||t),y=t,x.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=r.name+":",n=0;y=!1,clearTimeout(p.performance.timer),S.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):S.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=m;return e=e||k,t=t||f,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!S.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:p.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(v)?v.push(n):void 0!==v?v=[v,n]:void 0!==n&&(v=n),a}};w?(void 0===m&&p.initialize(),p.invoke(C)):(void 0!==m&&m.invoke("destroy"),p.initialize())}),void 0!==v?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 multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},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(B,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,B.fn.slider=function(M){var R,e=B(this),F=B(n),I=B(t),j=e.selector||"",L=Date.now(),V=[],N=M,q="string"==typeof N,z=[].slice.call(arguments,1),H=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],U=0;return e.each(function(){var c,r,s,l,e,d,u,t,f,m,g,p,o,h,a,v,b=B.isPlainObject(M)?B.extend(!0,{},B.fn.slider.settings,M):B.extend({},B.fn.slider.settings),n=b.className,i=b.metadata,y=b.namespace,x=b.error,C=b.keys,w=b.interpretLabel,k=!1,S="."+y,T="module-"+y,D=B(this),A=this,E=D.data(T),O=1,P={initialize:function(){P.debug("Initializing slider",b),v=!0,t=U+=1,P.setup.layout(),P.setup.labels(),P.is.disabled()||P.bind.events(),P.read.metadata(),P.read.settings(),v=!1,P.instantiate()},instantiate:function(){P.verbose("Storing instance of slider",P),E=P,D.data(T,P)},destroy:function(){P.verbose("Destroying previous slider for",D),clearInterval(E.interval),P.unbind.events(),P.unbind.slidingEvents(),D.removeData(T),E=void 0},setup:{layout:function(){void 0===D.attr("tabindex")&&D.attr("tabindex",0),0===D.find(".inner").length&&D.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=P.get.precision(),s=D.find(".thumb:not(.second)"),c=s,P.is.range()&&(0===D.find(".thumb.second").length&&D.find(".inner").append("<div class='thumb second'></div>"),l=D.find(".thumb.second")),e=D.find(".track"),d=D.find(".track-fill"),p=s.width()/2},labels:function(){P.is.labeled()&&(0<(u=D.find(".labels:not(.auto)")).length?P.setup.customLabel():P.setup.autoLabel(),b.showLabelTicks&&D.addClass(n.ticked))},customLabel:function(){var n,e=u.find(".label"),i=e.length,o=P.get.min(),a=P.get.max();e.each(function(e){var t=B(this).attr("data-value");n=t?((t=a<t?a:t<o?o:t)-o)/(a-o):(e+1)/(i+1),P.update.labelPosition(n,B(this))})},autoLabel:function(){0<(u=D.find(".labels")).length?u.empty():u=D.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=P.get.numLabels();e<=t;e++){var n=P.get.label(e),n=""!==n?e%P.get.gapRatio()?B('<li class="halftick label"></li>'):B('<li class="label">'+n+"</li>"):null;n&&(P.update.labelPosition(e/t,n),u.append(n))}}},bind:{events:function(){P.bind.globalKeyboardEvents(),P.bind.keyboardEvents(),P.bind.mouseEvents(),b.autoAdjustLabels&&P.bind.windowEvents()},keyboardEvents:function(){P.verbose("Binding keyboard events"),D.on("keydown"+S,P.event.keydown)},globalKeyboardEvents:function(){F.on("keydown"+S+t,P.event.activateFocus)},mouseEvents:function(){P.verbose("Binding mouse and touch events"),D.find(".track, .thumb, .inner").on("mousedown"+S,function(e){e.stopImmediatePropagation(),e.preventDefault(),P.event.down(e)}),D.on("mousedown"+S,P.event.down),D.on("mouseenter"+S,function(e){k=!0}),D.on("mouseleave"+S,function(e){k=!1}),D.find(".thumb").on("touchstart"+S,P.event.touchDown).on("touchmove"+S,P.event.move).on("touchend"+S,P.event.up).on("touchcancel"+S,P.event.touchCancel)},slidingEvents:function(){P.verbose("Binding page wide events while handle is being draged"),F.on("mousemove"+S,P.event.move),F.on("mouseup"+S,P.event.up)},windowEvents:function(){I.on("resize"+S,P.event.resize)}},unbind:{events:function(){D.find(".track, .thumb, .inner").off("mousedown"+S),D.off("mousedown"+S),D.off("mouseenter"+S),D.off("mouseleave"+S),D.find(".thumb").off("touchstart"+S).off("touchmove"+S).off("touchend"+S).off("touchcancel"+S),D.off("keydown"+S),D.off("focusout"+S),F.off("keydown"+S+t,P.event.activateFocus),I.off("resize"+S)},slidingEvents:function(){F.off("mousemove"+S),F.off("mouseup"+S)}},event:{down:function(e){e.preventDefault(),P.is.range()?(e=P.determine.eventPos(e),e=P.determine.pos(e),c=b.preventCrossover&&P.is.range()&&P.thumbVal===P.secondThumbVal?void(a=e):P.determine.closestThumb(e),void 0===h&&(h=P.get.currentThumbValue())):void 0===h&&(h=P.get.value()),P.is.disabled()||P.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),void 0===r&&(c=B(e.target),e=e.touches?e:e.originalEvent,r=e.targetTouches[0].identifier,void 0===h&&(h=P.get.currentThumbValue()))},move:function(e){var t,n,i;"mousemove"===e.type&&e.preventDefault(),P.is.disabled()||(t=P.determine.valueFromEvent(e),"mousemove"===e.type&&void 0===c&&(n=P.determine.eventPos(e),n=P.determine.pos(n),c=n<a?s:l),0===P.get.step()||P.is.smooth()?(n=P.thumbVal,i=P.secondThumbVal,e=P.determine.smoothValueFromEvent(e),c.hasClass("second")?(b.preventCrossover&&P.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),i=t):(b.preventCrossover&&P.is.range()&&(t=Math.min(i,t),e=Math.min(i,e)),n=t),t=Math.abs(n-(i||0)),P.update.position(e),b.onMove.call(A,t,n,i)):P.update.value(t,function(e,t,n){b.onMove.call(A,e,t,n)}))},up:function(e){e.preventDefault(),P.is.disabled()||(e=P.determine.valueFromEvent(e),P.set.value(e),P.unbind.slidingEvents(),(r=void 0)!==h&&(h=void 0))},touchCancel:function(e){e.preventDefault(),(r=void 0)!==h&&(P.update.value(h),h=void 0)},keydown:function(e,t){if(b.preventCrossover&&P.is.range()&&P.thumbVal===P.secondThumbVal&&(c=void 0),P.is.focused()&&F.trigger(e),t||P.is.focused()){t=P.determine.keyMovement(e);if(0!==t)switch(e.preventDefault(),t){case 1:P.takeStep();break;case 2:P.takeStep(P.get.multiplier());break;case-1:P.backStep();break;case-2:P.backStep(P.get.multiplier())}}},activateFocus:function(e){!P.is.focused()&&P.is.hover()&&0!==P.determine.keyMovement(e)&&(e.preventDefault(),P.event.keydown(e,!0),D.trigger("focus"))},resize:function(e){O!==P.get.gapRatio()&&(P.setup.labels(),O=P.get.gapRatio())}},resync:function(){P.verbose("Resyncing thumb position based on value"),P.is.range()&&P.update.position(P.secondThumbVal,l),P.update.position(P.thumbVal,s),P.setup.labels()},takeStep:function(e){e=e||1;var t=P.get.step(),n=P.get.currentThumbValue();P.verbose("Taking a step"),0<t?P.set.value(n+t*e):0===t&&(t=P.get.precision(),P.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e||1;var t=P.get.step(),n=P.get.currentThumbValue();P.verbose("Going back a step"),0<t?P.set.value(n-t*e):0===t&&(t=P.get.precision(),P.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return D.hasClass(b.className.range)},hover:function(){return k},focused:function(){return D.is(":focus")},disabled:function(){return D.hasClass(b.className.disabled)},labeled:function(){return D.hasClass(b.className.labeled)},reversed:function(){return D.hasClass(b.className.reversed)},vertical:function(){return D.hasClass(b.className.vertical)},smooth:function(){return b.smooth||D.hasClass(b.className.smooth)}},get:{trackOffset:function(){return P.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return P.is.vertical()?e.height():e.width()},trackLeft:function(){return P.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return P.is.reversed()?P.get.trackLeft()+P.get.trackLength():P.get.trackLeft()},trackEndPos:function(){return P.is.reversed()?P.get.trackLeft():P.get.trackLeft()+P.get.trackLength()},trackStartMargin:function(){var e=P.is.vertical()?P.is.reversed()?D.css("padding-bottom"):D.css("padding-top"):P.is.reversed()?D.css("padding-right"):D.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=P.is.vertical()?P.is.reversed()?D.css("padding-top"):D.css("padding-bottom"):P.is.reversed()?D.css("padding-left"):D.css("padding-right");return e||"0px"},precision:function(){var e=P.get.step(),e=(e=0!==e?2===(e=String(e).split(".")).length?e[1].length:0:b.decimalPlaces,Math.pow(10,e));return P.debug("Precision determined",e),e},min:function(){return b.min},max:function(){var e=P.get.step(),t=P.get.min(),n=0===e?0:Math.floor((b.max-t)/e);return 0==(0===e?0:(b.max-t)%e)?b.max:t+n*e},step:function(){return b.step},numLabels:function(){var e=Math.round((P.get.max()-P.get.min())/(0===P.get.step()?1:P.get.step()));return P.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return b.labelType},label:function(e){if(w)return w(e);switch(b.labelType){case b.labelTypes.number:return Math.round((e*(0===P.get.step()?1:P.get.step())+P.get.min())*o)/o;case b.labelTypes.letter:return H[e%26];default:return e}},value:function(){return f},currentThumbValue:function(){return void 0!==c&&c.hasClass("second")?P.secondThumbVal:P.thumbVal},thumbValue:function(e){return"second"!==e?P.thumbVal:P.is.range()?P.secondThumbVal:void P.error(x.notrange)},multiplier:function(){return b.pageMultiplier},thumbPosition:function(e){return"second"!==e?m:P.is.range()?g:void P.error(x.notrange)},gapRatio:function(){var e=1;if(b.autoAdjustLabels){var t=P.get.numLabels(),n=P.get.trackLength(),i=1;if(0<n)for(;n/t*i<b.labelDistance;)t%i||(e=i),i+=1}return e}},determine:{pos:function(e){return P.is.reversed()?P.get.trackStartPos()-e+P.get.trackOffset():e-P.get.trackOffset()-P.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(P.determine.thumbPos(s)),t=Math.abs(e-t),n=parseFloat(P.determine.thumbPos(l)),e=Math.abs(e-n);return(t!==e||P.get.thumbValue()!==P.get.min())&&t<=e?s:l},closestThumbPos:function(e){var t=parseFloat(P.determine.thumbPos(s)),n=Math.abs(e-t),i=parseFloat(P.determine.thumbPos(l));return n<=Math.abs(e-i)?t:i},thumbPos:function(e){return P.is.vertical()?P.is.reversed()?e.css("bottom"):e.css("top"):P.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=P.get.min(),n=P.get.max(),e=n<e?n:e<t?t:e,i=P.get.trackLength(),n=Math.round((e-t)/(n-t)*i);return P.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=P.get.trackLength(),n=P.get.step(),e=Math.round(e*t);return 0===n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=P.determine.eventPos(e),t=P.determine.pos(e),e=e<P.get.trackOffset()?P.is.reversed()?P.get.max():P.get.min():e>P.get.trackOffset()+P.get.trackLength()?P.is.reversed()?P.get.min():P.get.max():P.determine.value(t);return e},smoothValueFromEvent:function(e){var t=P.get.min(),n=P.get.max(),i=P.get.trackLength(),e=P.determine.eventPos(e)-P.get.trackOffset(),e=(e=e<0?0:i<e?i:e)/i;return(e=P.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],i=0;i<t.touches.length;i++)if(t.touches[i].identifier===r){n=t.touches[i];break}var o=n.pageY,a=n.pageX;return P.is.vertical()?o:a}o=e.pageY||e.originalEvent.pageY,a=e.pageX||e.originalEvent.pageX;return P.is.vertical()?o:a},value:function(e){var t=P.is.reversed()?P.get.trackEndPos():P.get.trackStartPos(),t=(e-t)/((P.is.reversed()?P.get.trackStartPos():P.get.trackEndPos())-t),n=P.get.max()-P.get.min(),i=P.get.step(),t=t*n,n=0===i?t:Math.round(t/i)*i;return P.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&P.verbose("Rounding value to closest step: "+n),P.verbose("Cutting off additional decimal places"),Math.round((n+P.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!P.is.vertical()||P.is.reversed()?C.downArrow:C.upArrow,n=!P.is.vertical()||P.is.reversed()?C.upArrow:C.downArrow,i=!P.is.vertical()&&P.is.reversed()?C.rightArrow:C.leftArrow,o=!P.is.vertical()&&P.is.reversed()?C.leftArrow:C.rightArrow;return e===t||e===i?-1:e===n||e===o?1:e===C.pageDown?-2:e===C.pageUp?2:0}},handleNewValuePosition:function(e){var t=P.get.min(),n=P.get.max();return e<=t?e=t:n<=e&&(e=n),P.determine.positionFromValue(e)},set:{value:function(i,o){o=!1!==o;var a=void 0===h;h=void 0===h?P.get.value():h,P.update.value(i,function(e,t,n){v&&!b.fireOnInit||!o||(i!==h&&b.onChange.call(A,e,t,n),b.onMove.call(A,e,t,n)),a&&(h=void 0)})},rangeValue:function(e,t,n){var i,o,a;n=!1!==n,P.is.range()?(i=P.get.min(),o=P.get.max(),h=(a=void 0===h)?P.get.value():h,e<=i?e=i:o<=e&&(e=o),t<=i?t=i:o<=t&&(t=o),P.thumbVal=e,P.secondThumbVal=t,f=Math.abs(P.thumbVal-P.secondThumbVal),P.update.position(P.thumbVal,s),P.update.position(P.secondThumbVal,l),v&&!b.fireOnInit||!n||(f!==h&&b.onChange.call(A,f,P.thumbVal,P.secondThumbVal),b.onMove.call(A,f,P.thumbVal,P.secondThumbVal)),a&&(h=void 0)):P.error(x.notrange)},position:function(e,t){e=P.determine.value(e);"second"===t?(P.secondThumbVal=e,P.update.position(e,l)):(P.thumbVal=e,P.update.position(e,s)),f=Math.abs(P.thumbVal-(P.secondThumbVal||0)),P.set.value(f)}},update:{value:function(e,t){var n=P.get.min(),i=P.get.max();e<=n?e=n:i<=e&&(e=i),P.is.range()?((c=void 0===c?e<=P.get.currentThumbValue()?s:l:c).hasClass("second")?(b.preventCrossover&&P.is.range()&&(e=Math.max(P.thumbVal,e)),P.secondThumbVal=e):(b.preventCrossover&&P.is.range()&&(e=Math.min(P.secondThumbVal,e)),P.thumbVal=e),f=Math.abs(P.thumbVal-P.secondThumbVal)):(f=e,P.thumbVal=f),P.update.position(e),P.debug("Setting slider value to "+f),"function"==typeof t&&t(f,P.thumbVal,P.secondThumbVal)},position:function(e,t){var n=P.handleNewValuePosition(e),t=t||c,i=P.thumbVal||P.get.min(),o=P.secondThumbVal||P.get.min();P.is.range()&&t.hasClass("second")?(g=n,o=e):(m=n,i=e);var a,r=P.get.min(),s=P.get.max(),e=(e-r)/(s-r)*100,l=(Math.min(i,o)-r)/(s-r)*100,i=100*(1-(Math.max(i,o)-r)/(s-r)),o=P.is.vertical()?P.is.reversed()?(a={bottom:"calc("+e+"% - "+p+"px)",top:"auto"},{bottom:l+"%",top:i+"%"}):(a={top:"calc("+e+"% - "+p+"px)",bottom:"auto"},{top:l+"%",bottom:i+"%"}):P.is.reversed()?(a={right:"calc("+e+"% - "+p+"px)",left:"auto"},{right:l+"%",left:i+"%"}):(a={left:"calc("+e+"% - "+p+"px)",right:"auto"},{left:l+"%",right:i+"%"});t.css(a),d.css(o),P.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=P.get.trackStartMargin(),i=P.get.trackEndMargin(),o=P.is.vertical()?P.is.reversed()?"bottom":"top":P.is.reversed()?"right":"left",a=P.is.reversed()&&!P.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+i+") * "+e)+a+n+")")}},goto:{max:function(){P.set.value(P.get.max())},min:function(){P.set.value(P.get.min())}},read:{metadata:function(){var e={thumbVal:D.data(i.thumbVal),secondThumbVal:D.data(i.secondThumbVal)};e.thumbVal&&(P.is.range()&&e.secondThumbVal?(P.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),P.set.rangeValue(e.thumbVal,e.secondThumbVal)):(P.debug("Current value set from metadata",e.thumbVal),P.set.value(e.thumbVal)))},settings:function(){!1!==b.start&&(P.is.range()?(P.debug("Start position set from settings",b.start,b.end),P.set.rangeValue(b.start,b.end)):(P.debug("Start position set from settings",b.start),P.set.value(b.start)))}},setting:function(e,t){if(P.debug("Changing setting",e,t),B.isPlainObject(e))B.extend(!0,b,e);else{if(void 0===t)return b[e];B.isPlainObject(b[e])?B.extend(!0,b[e],t):b[e]=t}},internal:function(e,t){if(B.isPlainObject(e))B.extend(!0,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!b.silent&&b.debug&&(b.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,b.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),P.verbose.apply(console,arguments)))},error:function(){b.silent||(P.error=Function.prototype.bind.call(console.error,console,b.name+":"),P.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=Date.now())-(L||t),L=t,V.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var e=b.name+":",n=0;L=!1,clearTimeout(P.performance.timer),B.each(V,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",j&&(e+=" '"+j+"'"),0<V.length&&(console.groupCollapsed(e),console.table?console.table(V):B.each(V,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),V=[]}},invoke:function(i,e,t){var o,a,n,r,s=E;return e=e||z,t=t||A,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,B.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(B.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!B.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:P.error(x.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(R)?R.push(n):void 0!==R?R=[R,n]:void 0!==n&&(R=n),a}};q?(void 0===E&&P.initialize(),P.invoke(N)):(void 0!==E&&E.invoke("destroy"),P.initialize())}),void 0!==R?R:this},B.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document),function(S,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,S.fn.rating=function(p){var h,v=S(this),b=v.selector||"",y=Date.now(),x=[],C=p,w="string"==typeof C,k=[].slice.call(arguments,1);return v.each(function(){var e,o=S.isPlainObject(p)?S.extend(!0,{},S.fn.rating.settings,p):S.extend({},S.fn.rating.settings),t=o.namespace,a=o.className,l=o.error,n=o.metadata,i=o.selector,r=o.cssVars,s="."+t,c="module-"+t,d=this,u=S(this).data(c),f=S(this),m=f.find(i.icon),g={initialize:function(){g.verbose("Initializing rating module",o),0===m.length&&g.setup.layout(),o.interactive&&!g.is.disabled()?g.enable():g.disable(),g.set.initialLoad(),g.set.rating(g.get.initialRating()),g.remove.initialLoad(),g.instantiate()},instantiate:function(){g.verbose("Instantiating module",o),u=g,f.data(c,g)},destroy:function(){g.verbose("Destroying previous instance",u),g.remove.events(),f.removeData(c)},refresh:function(){m=f.find(i.icon)},setup:{layout:function(){var e=g.get.maxRating(),t=g.get.icon(),e=S.fn.rating.settings.templates.icon(e,t);g.debug("Generating icon html dynamically"),f.html(e),g.refresh()}},event:{mouseenter:function(){var e=S(this);e.nextAll().removeClass(a.selected),f.addClass(a.selected),e.addClass(a.selected).prevAll().addClass(a.selected)},mouseleave:function(){f.removeClass(a.selected),m.removeClass(a.selected)},click:function(){var e=S(this),t=g.get.rating(),e=m.index(e)+1;("auto"===o.clearable?1===m.length:o.clearable)&&t===e?g.clearRating():g.set.rating(e)}},clearRating:function(){g.debug("Clearing current rating"),g.set.rating(0)},bind:{events:function(){g.verbose("Binding events"),f.on("mouseenter"+s,i.icon,g.event.mouseenter).on("mouseleave"+s,i.icon,g.event.mouseleave).on("click"+s,i.icon,g.event.click)}},remove:{events:function(){g.verbose("Removing events"),f.off(s)},initialLoad:function(){e=!1}},enable:function(){g.debug("Setting rating to interactive mode"),g.bind.events(),f.removeClass(a.disabled)},disable:function(){g.debug("Setting rating to read-only mode"),g.remove.events(),f.addClass(a.disabled)},is:{initialLoad:function(){return e},disabled:function(){return f.hasClass(a.disabled)}},get:{icon:function(){var e=f.data(n.icon);return e&&f.removeData(n.icon),e||o.icon},initialRating:function(){return void 0!==f.data(n.rating)?(f.removeData(n.rating),f.data(n.rating)):o.initialRating},maxRating:function(){return void 0!==f.data(n.maxRating)?(f.removeData(n.maxRating),f.data(n.maxRating)):o.maxRating},rating:function(){var e=m.filter("."+a.active).length;return g.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var t=Math.floor(0<=e-1?e-1:0),t=m.eq(t),n=e<=1?t:t.next(),i=e%1*100;f.removeClass(a.selected),m.removeClass(a.selected).removeClass(a.active).removeClass(a.partiallyActive),0<e&&(g.verbose("Setting current rating to",e),t.prevAll().addBack().addClass(a.active),t.next()&&e%1!=0&&(n.addClass(a.partiallyActive).addClass(a.active),n.css(r.filledCustomPropName,i+"%"),"transparent"===n.css("backgroundColor")&&n.removeClass(a.partiallyActive).removeClass(a.active))),g.is.initialLoad()||o.onRate.call(d,e)},initialLoad:function(){e=!0}},setting:function(e,t){if(g.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,o,e);else{if(void 0===t)return o[e];S.isPlainObject(o[e])?S.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,o.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),g.verbose.apply(console,arguments)))},error:function(){o.silent||(g.error=Function.prototype.bind.call(console.error,console,o.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=Date.now())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=o.name+":",n=0;y=!1,clearTimeout(g.performance.timer),S.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),1<v.length&&(e+=" ("+v.length+")"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):S.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=u;return e=e||k,t=t||d,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!S.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:g.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};w?(void 0===u&&g.initialize(),g.invoke(C)):(void 0!==u&&u.invoke("destroy"),g.initialize())}),void 0!==h?h:this},S.fn.rating.settings={name:"Rating",namespace:"rating",icon:"star",silent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined"},metadata:{rating:"rating",maxRating:"maxRating",icon:"icon"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading",partiallyActive:"partial"},cssVars:{filledCustomPropName:"--full"},selector:{icon:".icon"},templates:{deQuote:function(e,t){return String(e).replace(/"/g,t?"&quot;":"")},icon:function(e,t){for(var n=1,i="",o=S.fn.rating.settings.templates.deQuote;n<=e;)i+='<i class="'+o(t)+' icon"></i>',n++;return i}}}}(jQuery,window,document),function(O,P,M){"use strict";function R(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.search=function(x){var C,w=O(this),k=w.selector||"",S=Date.now(),T=[],D=x,A="string"==typeof D,E=[].slice.call(arguments,1);return w.each(function(){var u=O.isPlainObject(x)?O.extend(!0,{},O.fn.search.settings,x):O.extend({},O.fn.search.settings),f=u.className,l=u.metadata,i=u.regExp,a=u.fields,m=u.selector,g=u.error,e=u.namespace,o="."+e,t=e+"-module",p=O(this),h=p.find(m.prompt),n=p.find(m.searchButton),r=p.find(m.results),s=p.find(m.result),c=(p.find(m.category),this),d=p.data(t),v=!1,b=!1,y={initialize:function(){y.verbose("Initializing module"),y.get.settings(),y.determine.searchFields(),y.bind.events(),y.set.type(),y.create.results(),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),d=y,p.data(t,y)},destroy:function(){y.verbose("Destroying instance"),p.off(o).removeData(t)},refresh:function(){y.debug("Refreshing selector cache"),h=p.find(m.prompt),n=p.find(m.searchButton),p.find(m.category),r=p.find(m.results),s=p.find(m.result)},refreshResults:function(){r=p.find(m.results),s=p.find(m.result)},bind:{events:function(){y.verbose("Binding events to search"),u.automatic&&(p.on(y.get.inputEvent()+o,m.prompt,y.event.input),h.attr("autocomplete",y.is.chrome()?"fomantic-search":"off")),p.on("focus"+o,m.prompt,y.event.focus).on("blur"+o,m.prompt,y.event.blur).on("keydown"+o,m.prompt,y.handleKeyboard).on("click"+o,m.searchButton,y.query).on("mousedown"+o,m.results,y.event.result.mousedown).on("mouseup"+o,m.results,y.event.result.mouseup).on("click"+o,m.result,y.event.result.click)}},determine:{searchFields:function(){x&&void 0!==x.searchFields&&(u.searchFields=x.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(y.timer),y.timer=setTimeout(function(){y.is.focused()&&y.query()},u.searchDelay)):y.query()},focus:function(){y.set.focus(),u.searchOnFocus&&y.has.minimumCharacters()&&y.query(function(){y.can.show()&&y.showResults()})},blur:function(e){function t(){y.cancel.query(),y.remove.focus(),y.timer=setTimeout(y.hideResults,u.hideDelay)}var n=M.activeElement===this;n||(b=!1,y.resultsClicked?(y.debug("Determining if user action caused search to close"),p.one("click.close"+o,m.results,function(e){y.is.inMessage(e)||v?h.trigger("focus"):(v=!1,y.is.animating()||y.is.hidden()||t())})):(y.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){y.resultsClicked=!0},mouseup:function(){y.resultsClicked=!1},click:function(e){y.debug("Search result selected");var t=O(this),n=t.find(m.title).eq(0),i=t.is("a[href]")?t:t.find("a[href]").eq(0),o=i.attr("href")||!1,a=i.attr("target")||!1,n=0<n.length&&n.text(),r=y.get.results(),t=t.data(l.result)||y.get.result(n,r),s=y.get.value();if(R(u.onSelect)&&!1===u.onSelect.call(c,t,r))return y.debug("Custom onSelect callback cancelled default select action"),void(v=!0);y.hideResults(),n&&y.get.value()===s&&y.set.value(n),o&&(e.preventDefault(),y.verbose("Opening search link found in result",i),"_blank"===a||e.ctrlKey?P.open(o):P.location.href=o)}}},ensureVisible:function(e){var t,n,i;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),n=r.scrollTop(),i=r.height(),t<0?r.scrollTop(n+t):i<e&&r.scrollTop(n+(e-i)))},handleKeyboard:function(e){var t,n=p.find(m.result),i=p.find(m.category),o=n.filter("."+f.active),a=n.index(o),r=n.length,o=0<o.length,s=e.which,l=13,c=38,d=40;if(s===27&&(y.is.visible()?y.hideResults():(y.verbose("Escape key pressed, blurring search field"),h.trigger("blur")),e.stopPropagation(),b=!0),y.is.visible())if(s===l){if(y.verbose("Enter key pressed, selecting active result"),0<n.filter("."+f.active).length)return y.event.result.click.call(n.filter("."+f.active),e),e.preventDefault(),!1}else s===c&&o?(y.verbose("Up key pressed, changing active result"),t=a-1<0?a:a-1,i.removeClass(f.active),n.removeClass(f.active).eq(t).addClass(f.active).closest(i).addClass(f.active),y.ensureVisible(n.eq(t)),e.preventDefault()):s===d&&(y.verbose("Down key pressed, changing active result"),t=r<=a+1?a:a+1,i.removeClass(f.active),n.removeClass(f.active).eq(t).addClass(f.active).closest(i).addClass(f.active),y.ensureVisible(n.eq(t)),e.preventDefault());else s===l&&(y.verbose("Enter key pressed, executing query"),y.query(),y.set.buttonPressed(),h.one("keyup",y.remove.buttonFocus))},setup:{api:function(i,o){var e={debug:u.debug,on:!1,cache:u.cache,action:"search",urlData:{query:i}};O.extend(!0,e,u.apiSettings,{onSuccess:function(e,t,n){y.parse.response.call(c,e,i),o(),u.apiSettings&&"function"==typeof u.apiSettings.onSuccess&&u.apiSettings.onSuccess.call(this,e,t,n)},onFailure:function(e,t,n){y.displayMessage(g.serverError),o(),u.apiSettings&&"function"==typeof u.apiSettings.onFailure&&u.apiSettings.onFailure.call(this,e,t,n)},onAbort:function(e,t,n){u.apiSettings&&"function"==typeof u.apiSettings.onAbort&&u.apiSettings.onAbort.call(this,e,t,n)},onError:function(e,t,n){y.error(),u.apiSettings&&"function"==typeof u.apiSettings.onError&&u.apiSettings.onError.call(this,e,t,n)}}),y.verbose("Setting up API request",e),p.api(e)}},can:{useAPI:function(){return void 0!==O.fn.api},show:function(){return y.is.focused()&&!y.is.visible()&&!y.is.empty()},transition:function(){return u.transition&&void 0!==O.fn.transition}},is:{animating:function(){return r.hasClass(f.animating)},chrome:function(){return!!P.chrome&&!P.StyleMedia},hidden:function(){return r.hasClass(f.hidden)},inMessage:function(e){var t;if(e.target)return t=O(e.target),O.contains(M.documentElement,e.target)&&0<t.closest(m.message).length},empty:function(){return""===r.html()},visible:function(){return 0<r.filter(":visible").length},focused:function(){return 0<h.filter(":focus").length}},get:{settings:function(){O.isPlainObject(x)&&x.searchFullText&&(u.fullTextSearch=x.searchFullText,y.error(u.error.oldSearchSyntax,c)),u.ignoreDiacritics&&!String.prototype.normalize&&(u.ignoreDiacritics=!1,y.error(g.noNormalize,c))},inputEvent:function(){var e=h[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return h.val()},results:function(){return p.data(l.results)},result:function(n,e){var i=!1;return n=void 0!==n?n:y.get.value(),e=void 0!==e?e:y.get.results(),"category"===u.type?(y.debug("Finding result that matches",n),O.each(e,function(e,t){if(Array.isArray(t.results)&&(i=y.search.object(n,t.results)[0]))return!1})):(y.debug("Finding result in results object",n),i=y.search.object(n,e)[0]),i||!1}},select:{firstResult:function(){y.verbose("Selecting first result"),s.first().addClass(f.active)}},set:{focus:function(){p.addClass(f.focus)},loading:function(){p.addClass(f.loading)},value:function(e){y.verbose("Setting search input value",e),h.val(e)},type:function(e){e=e||u.type,f[e]&&p.addClass(f[e])},buttonPressed:function(){n.addClass(f.pressed)}},remove:{loading:function(){p.removeClass(f.loading)},focus:function(){p.removeClass(f.focus)},buttonPressed:function(){n.removeClass(f.pressed)},diacritics:function(e){return u.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},query:function(e){e=R(e)?e:function(){};var t=y.get.value(),n=y.read.cache(t);e=e||function(){},y.has.minimumCharacters()?(n?(y.debug("Reading result from cache",t),y.save.results(n.results),y.addResults(n.html),y.inject.id(n.results),e()):(y.debug("Querying for",t),O.isPlainObject(u.source)||Array.isArray(u.source)?(y.search.local(t),e()):y.can.useAPI()?y.search.remote(t,e):(y.error(g.source),e())),u.onSearchQuery.call(c,t)):y.hideResults()},search:{local:function(e){var t,n=y.search.object(e,u.source);y.set.loading(),y.save.results(n),y.debug("Returned full local search results",n),0<u.maxResults&&(y.debug("Using specified max results",n),n=n.slice(0,u.maxResults)),"category"===u.type&&(n=y.create.categoryResults(n)),t=y.generateResults({results:n}),y.remove.loading(),y.addResults(t),y.inject.id(n),y.write.cache(e,{html:t,results:n})},remote:function(e,t){t=R(t)?t:function(){},p.api("is loading")&&p.api("abort"),y.setup.api(e,t),p.api("query")},object:function(o,e,t){o=y.remove.diacritics(String(o));function a(e,t){var n=-1===O.inArray(t,r),i=-1===O.inArray(t,l),o=-1===O.inArray(t,s);n&&i&&o&&e.push(t)}var r=[],s=[],l=[],n=o.replace(i.escape,"\\$&"),c=new RegExp(i.beginsWith+n,"i");if(e=e||u.source,t=void 0!==t?t:u.searchFields,Array.isArray(t)||(t=[t]),void 0===e||!1===e)return y.error(g.source),[];var d=t.length-1;return O.each(e,function(e,n){var i=[];O.each(t,function(e,t){if("string"==typeof n[t]||"number"==typeof n[t]){t="string"==typeof n[t]?y.remove.diacritics(n[t]):n[t].toString();if("all"===u.fullTextSearch){if(i.push(t),e<d)return!0;t=i.join(" ")}"all"!==u.fullTextSearch&&-1!==t.search(c)?a(r,n):"exact"===u.fullTextSearch&&y.exactSearch(o,t)||"some"===u.fullTextSearch&&y.wordSearch(o,t)||"all"===u.fullTextSearch&&y.wordSearch(o,t,!0)?a(s,n):!0===u.fullTextSearch&&y.fuzzySearch(o,t)&&a(l,n)}})}),O.merge(s,l),O.merge(r,s),r}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},wordSearch:function(e,t,n){for(var i=e.split(/\s+/),o=i.length,a=!1,r=0;r<o&&!(!(a=y.exactSearch(i[r],t))&&n||a&&!n);r++);return a},fuzzySearch:function(e,t){var n=t.length,i=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n<i)return!1;if(i===n)return e===t;for(var o=0,a=0;o<i;o++){for(var r=!1,s=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===s){r=!0;break}if(!r)return!1}return!0},parse:{response:function(e,t){Array.isArray(e)&&((n={})[a.results]=e,e=n);var n=y.generateResults(e);y.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[a.results]&&(y.addResults(n),y.inject.id(e[a.results]),y.write.cache(t,{html:n,results:e[a.results]}),y.save.results(e[a.results]))}},cancel:{query:function(){y.can.useAPI()&&p.api("abort")}},has:{minimumCharacters:function(){return y.get.value().length>=u.minCharacters},results:function(){return 0!==r.length&&""!==r.html()}},clear:{cache:function(e){var t=p.data(l.cache);e?t&&t[e]&&(y.debug("Removing value from cache",e),delete t[e],p.data(l.cache,t)):(y.debug("Clearing cache",e),p.removeData(l.cache))}},read:{cache:function(e){var t=p.data(l.cache);return!!u.cache&&(y.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(e){var n={};return O.each(e,function(e,t){t.category&&(void 0===n[t.category]?(y.verbose("Creating new category of results",t.category),n[t.category]={name:t.category,results:[t]}):n[t.category].results.push(t))}),n},id:function(e,t){var n,e=e+1;return void 0!==t?(t=String.fromCharCode(97+t),y.verbose("Creating category result id",n=t+e)):y.verbose("Creating result id",n=e),n},results:function(){0===r.length&&(r=O("<div />").addClass(f.results).appendTo(p))}},inject:{result:function(e,t,n){y.verbose("Injecting result into results");n=(void 0!==n?r.children().eq(n).children(m.results).first():r).children(m.result).eq(t);y.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(e){y.debug("Injecting unique ids into results");var n=0,i=0;return"category"===u.type?O.each(e,function(e,t){0<t.results.length&&(i=0,O.each(t.results,function(e,t){void 0===t.id&&(t.id=y.create.id(i,n)),y.inject.result(t,i,n),i++}),n++)}):O.each(e,function(e,t){void 0===t.id&&(t.id=y.create.id(i)),y.inject.result(t,i),i++}),e}},save:{results:function(e){y.verbose("Saving current search results to metadata",e),p.data(l.results,e)}},write:{cache:function(e,t){var n=void 0!==p.data(l.cache)?p.data(l.cache):{};u.cache&&(y.verbose("Writing generated html to cache",e,t),n[e]=t,p.data(l.cache,n))}},addResults:function(e){if(R(u.onResultsAdd)&&!1===u.onResultsAdd.call(r,e))return y.debug("onResultsAdd callback cancelled default action"),!1;e?(r.html(e),y.refreshResults(),u.selectFirstResult&&y.select.firstResult(),y.showResults()):y.hideResults(function(){r.empty()})},showResults:function(e){e=R(e)?e:function(){},b||!y.is.visible()&&y.has.results()&&(y.can.transition()?(y.debug("Showing results with css animations"),r.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.duration,onShow:function(){var e=p.find(m.result).eq(0);y.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(y.debug("Showing results with javascript"),r.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(r))},hideResults:function(e){e=R(e)?e:function(){},y.is.visible()&&(y.can.transition()?(y.debug("Hiding results with css animations"),r.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.duration,onComplete:function(){e()},queue:!0})):(y.debug("Hiding results with javascript"),r.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(r))},generateResults:function(e){y.debug("Generating html from response",e);var t=u.templates[u.type],n=O.isPlainObject(e[a.results])&&!O.isEmptyObject(e[a.results]),i=Array.isArray(e[a.results])&&0<e[a.results].length,o="";return n||i?(0<u.maxResults&&(n?"standard"===u.type&&y.error(g.maxResults):e[a.results]=e[a.results].slice(0,u.maxResults)),R(t)?o=t(e,a,u.preserveHTML):y.error(g.noTemplate,!1)):u.showNoResults&&(o=y.displayMessage(g.noResults,"empty",g.noResultsHeader)),u.onResults.call(c,e),o},displayMessage:function(e,t,n){return y.debug("Displaying message",e,t=t||"standard",n),y.addResults(u.templates.message(e,t,n)),u.templates.message(e,t,n)},setting:function(e,t){if(O.isPlainObject(e))O.extend(!0,u,e);else{if(void 0===t)return u[e];u[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,y,e);else{if(void 0===t)return y[e];y[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,u.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),y.verbose.apply(console,arguments)))},error:function(){u.silent||(y.error=Function.prototype.bind.call(console.error,console,u.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=Date.now())-(S||t),S=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=u.name+":",n=0;S=!1,clearTimeout(y.performance.timer),O.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),1<w.length&&(e+=" ("+w.length+")"),0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):O.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(i,e,t){var o,a,n,r=d;return e=e||E,t=t||c,"string"==typeof i&&void 0!==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(void 0!==r[n])return a=r[n],!1;{if(!O.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:y.error(g.method,i),!1;r=r[t]}}})),R(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(C)?C.push(n):void 0!==C?C=[C,n]:void 0!==n&&(C=n),a}};A?(void 0===d&&y.initialize(),y.invoke(D)):(void 0!==d&&d.invoke("destroy"),y.initialize())}),void 0!==C?C:this},O.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",category:"category",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Fomantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",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.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[$()*+./?[\\\]^{|}-]/g,beginsWith:"(?:\\s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e},message:function(e,t,n){var i="";return void 0!==e&&void 0!==t&&(i+='<div class="message '+t+'">',n&&(i+='<div class="header">'+n+"</div>"),i=i+' <div class="description">'+e+"</div></div>"),i},category:function(e,n,i){var o="",a=O.fn.search.settings.templates.escape;return void 0!==e[n.categoryResults]&&(O.each(e[n.categoryResults],function(e,t){void 0!==t[n.results]&&0<t.results.length&&(o+='<div class="category">',void 0!==t[n.categoryName]&&(o+='<div class="name">'+a(t[n.categoryName],i)+"</div>"),o+='<div class="results">',O.each(t.results,function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[n.image]&&(o+='<div class="image"> <img src="'+t[n.image].replace(/"/g,"")+'"></div>'),o+='<div class="content">',void 0!==t[n.price]&&(o+='<div class="price">'+a(t[n.price],i)+"</div>"),void 0!==t[n.title]&&(o+='<div class="title">'+a(t[n.title],i)+"</div>"),void 0!==t[n.description]&&(o+='<div class="description">'+a(t[n.description],i)+"</div>"),o+="</div></a>"}),o+="</div></div>")}),e[n.action]&&(o+=!1===n.actionURL?'<div class="action">'+a(e[n.action][n.actionText],i)+"</div>":'<a href="'+e[n.action][n.actionURL].replace(/"/g,"")+'" class="action">'+a(e[n.action][n.actionText],i)+"</a>"),o)},standard:function(e,n,i){var o="",a=O.fn.search.settings.templates.escape;return void 0!==e[n.results]&&(O.each(e[n.results],function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[n.image]&&(o+='<div class="image"> <img src="'+t[n.image].replace(/"/g,"")+'"></div>'),o+='<div class="content">',void 0!==t[n.price]&&(o+='<div class="price">'+a(t[n.price],i)+"</div>"),void 0!==t[n.title]&&(o+='<div class="title">'+a(t[n.title],i)+"</div>"),void 0!==t[n.description]&&(o+='<div class="description">'+a(t[n.description],i)+"</div>"),o+="</div></a>"}),e[n.action]&&(o+=!1===n.actionURL?'<div class="action">'+a(e[n.action][n.actionText],i)+"</div>":'<a href="'+e[n.action][n.actionURL].replace(/"/g,"")+'" class="action">'+a(e[n.action][n.actionText],i)+"</a>"),o)}}},O.extend(O.easing,{easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)}})}(jQuery,window,document),function(T,e,D){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,T.fn.shape=function(v){var b,y=T(this),x=Date.now(),C=[],w=v,k="string"==typeof w,S=[].slice.call(arguments,1);return y.each(function(){var n,i,t=y.selector||"",a=T.isPlainObject(v)?T.extend(!0,{},T.fn.shape.settings,v):T.extend({},T.fn.shape.settings),e=a.namespace,r=a.selector,l=a.error,s=a.className,o="."+e,c="module-"+e,d=T(this),u=d.find(">"+r.sides),f=u.find(">"+r.side),m=!1,g=this,p=d.data(c),h={initialize:function(){h.verbose("Initializing module for",g),h.set.defaultSide(),h.instantiate()},instantiate:function(){h.verbose("Storing instance of module",h),p=h,d.data(c,p)},destroy:function(){h.verbose("Destroying previous module for",g),d.removeData(c).off(o)},refresh:function(){h.verbose("Refreshing selector cache for",g),d=T(g),u=T(this).find(r.sides),f=T(this).find(r.side)},repaint:function(){h.verbose("Forcing repaint event");(u[0]||D.createElement("div")).offsetWidth},animate:function(e,t){h.verbose("Animating box with properties",e),t=t||function(e){h.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),h.reset(),h.set.active()},a.onBeforeChange.call(i[0]),h.verbose("Starting CSS animation"),d.addClass(s.animating),u.css(e).one("transitionend",t),h.set.duration(a.duration),requestAnimationFrame(function(){d.addClass(s.animating),n.addClass(s.hidden)})},queue:function(e){h.debug("Queueing animation of",e),u.one("transitionend",function(){h.debug("Executing queued animation"),setTimeout(function(){d.shape(e)},0)})},reset:function(){h.verbose("Animating states reset"),d.removeClass(s.animating).attr("style","").removeAttr("style"),u.attr("style","").removeAttr("style"),f.attr("style","").removeAttr("style").removeClass(s.hidden),i.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){return f.filter("."+s.active)[0]===i[0]},animating:function(){return d.hasClass(s.animating)},hidden:function(){return 0<d.closest(":hidden").length}},set:{defaultSide:function(){n=f.filter("."+a.className.active),i=0<n.next(r.side).length?n.next(r.side):f.first(),m=!1,h.verbose("Active side set to",n),h.verbose("Next side set to",i)},duration:function(e){e=e||a.duration,h.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||u.add(f).css({"transition-duration":e})},currentStageSize:function(){var e=f.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);d.css({width:t,height:e})},stageSize:function(){var e=d.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),n=t.filter("."+a.className.active),t=m?t.eq(m):0<n.next(r.side).length?n.next(r.side):t.first(),i="next"===a.width?t.outerWidth(!0):"initial"===a.width?d.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?d.height():a.height;n.removeClass(s.active),t.addClass(s.active),e.insertAfter(d),e.remove(),"auto"!==a.width&&(d.css("width",i+a.jitter),h.verbose("Specifying width during animation",i)),"auto"!==a.height&&(d.css("height",o+a.jitter),h.verbose("Specifying height during animation",o))},nextSide:function(e){m=e,i=f.filter(e),m=f.index(i),0===i.length&&(h.set.defaultSide(),h.error(l.side)),h.verbose("Next side manually set to",i)},active:function(){h.verbose("Setting new side to active",i),f.removeClass(s.active),i.addClass(s.active),a.onChange.call(i[0]),h.set.defaultSide()}},flip:{to:function(e,t){var n;h.is.hidden()?h.debug("Module not visible",i):!h.is.complete()||h.is.animating()||a.allowRepeats?(n=h.get.transform[e](),h.is.animating()?h.queue("flip "+e):(h.debug("Flipping "+e,i),h.set.stageSize(),h.stage[t](),h.animate(n))):h.debug("Side already visible",i)},up:function(){h.flip.to("up","above")},down:function(){h.flip.to("down","below")},left:function(){h.flip.to("left","left")},right:function(){h.flip.to("right","right")},over:function(){h.flip.to("over","behind")},back:function(){h.flip.to("back","behind")}},get:{transform:{up:function(){var e=n.outerHeight(!0)/2;return{transform:"translateY("+(i.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"}},down:function(){var e=n.outerHeight(!0)/2;return{transform:"translateY(-"+e+"px) translateZ(-"+e+"px) rotateX(90deg)"}},left:function(){var e=n.outerWidth(!0)/2;return{transform:"translateX("+(i.outerWidth(!0)-e)+"px) translateZ(-"+e+"px) rotateY(90deg)"}},right:function(){var e=n.outerWidth(!0)/2;return{transform:"translateX(-"+e+"px) translateZ(-"+e+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(n.outerWidth(!0)-i.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(n.outerWidth(!0)-i.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},nextSide:function(){return 0<n.next(r.side).length?n.next(r.side):f.first()}},stage:{above:function(){var e={origin:(n.outerHeight(!0)-i.outerHeight(!0))/2,depth:{active:i.outerHeight(!0)/2,next:n.outerHeight(!0)/2}};h.verbose("Setting the initial animation position as above",i,e),n.css({transform:"rotateX(0deg)"}),i.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px) translateY(-"+e.depth.active+"px)"})},below:function(){var e={origin:(n.outerHeight(!0)-i.outerHeight(!0))/2,depth:{active:i.outerHeight(!0)/2,next:n.outerHeight(!0)/2}};h.verbose("Setting the initial animation position as below",i,e),n.css({transform:"rotateX(0deg)"}),i.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px) translateY("+e.depth.active+"px)"})},left:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};h.verbose("Setting the initial animation position as left",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px) translateX(-"+t.depth.active+"px)"})},right:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};h.verbose("Setting the initial animation position as right",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px) translateX("+t.depth.active+"px)"})},behind:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};h.verbose("Setting the initial animation position as behind",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(h.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,a,e);else{if(void 0===t)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,h,e);else{if(void 0===t)return h[e];h[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,a.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),h.verbose.apply(console,arguments)))},error:function(){a.silent||(h.error=Function.prototype.bind.call(console.error,console,a.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=a.name+":",n=0;x=!1,clearTimeout(h.performance.timer),T.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",t&&(e+=" '"+t+"'"),1<y.length&&(e+=" ("+y.length+")"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):T.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r,s=p;return e=e||S,t=t||g,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!T.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:h.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(b)?b.push(n):void 0!==b?b=[b,n]:void 0!==n&&(b=n),a}};k?(void 0===p&&h.initialize(),0<(e=d.find("input")).length?(e.trigger("blur"),setTimeout(function(){h.invoke(w)},150)):h.invoke(w)):(void 0!==p&&p.invoke("destroy"),h.initialize())}),void 0!==b?b:this},T.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",onBeforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(L,V,N){"use strict";function q(e){return"function"==typeof e&&"number"!=typeof e.nodeType}V=void 0!==V&&V.Math===Math?V:globalThis,L.fn.sidebar=function(k){var S,e=L(this),T=L(V),D=L(N),A=L("body"),E=L("html"),O=L("head"),P=e.selector||"",M=Date.now(),R=[],F=k,I="string"==typeof F,j=[].slice.call(arguments,1);return e.each(function(){var o,a,e,r,s=L.isPlainObject(k)?L.extend(!0,{},L.fn.sidebar.settings,k):L.extend({},L.fn.sidebar.settings),t=s.selector,l=s.className,n=s.namespace,i=s.regExp,c=s.error,d="."+n,u="module-"+n,f=L(this),m=[V,N].indexOf(s.context)<0?D.find(s.context):A,g=m[0]===A[0],p=f.children(t.sidebar),h=(m.children(t.fixed),m.children(t.pusher)),v=this,b=f.data(u),y="",x="",C=!1,w={initialize:function(){w.debug("Initializing sidebar",k),w.create.id(),s.delaySetup?requestAnimationFrame(w.setup.layout):w.setup.layout(),requestAnimationFrame(function(){w.setup.cache()}),w.instantiate()},instantiate:function(){w.verbose("Storing instance of module",w),b=w,f.data(u,w)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),a="."+e,w.verbose("Creating unique id for element",e)}},destroy:function(){w.verbose("Destroying previous module for",f),f.off(d).removeData(u),w.is.ios()&&w.remove.ios(),m.off(a),T.off(a),D.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<h.find(e.target).length||h.is(e.target),e=m.is(e.target),t&&(w.verbose("User clicked on dimmed page"),w.hide()),e&&(w.verbose("User clicked on dimmable context (scaled out page)"),w.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===L(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){w.verbose("Adding clickaway events to context",m),m.on("click"+a,w.event.clickaway).on("touchend"+a,w.event.clickaway)},scrollLock:function(){s.scrollLock&&(w.debug("Disabling page scroll"),(C=w.has.scrollbar())&&(w.save.bodyMargin(),w.set.bodyMargin()),m.addClass(l.locked)),w.verbose("Adding events to contain sidebar scroll"),D.on("touchmove"+a,w.event.touch),f.on("scroll"+d,w.event.containScroll)}},unbind:{clickaway:function(){w.verbose("Removing clickaway events from context",m),m.off(a)},scrollLock:function(){w.verbose("Removing scroll lock from page"),C&&w.restore.bodyMargin(),m.removeClass(l.locked),D.off(a),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=w.cache.width||f.outerWidth(),t=w.cache.height||f.outerHeight(),n=w.is.rtl(),i=w.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(w.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(w.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),w.is.ie()&&("left"===i||"right"===i?(w.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { 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 { transform: translate3d(0, 0, 0); }"),o=L(n+="</style>").appendTo(O),w.debug("Adding sizing css to head",o)}},refresh:function(){w.verbose("Refreshing selector cache"),m=[V,N].indexOf(s.context)<0?D.find(s.context):A,w.refreshSidebars(),h=m.children(t.pusher),m.children(t.fixed),w.clear.cache()},refreshSidebars:function(){w.verbose("Refreshing other sidebars"),p=m.children(t.sidebar)},repaint:function(){w.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){w.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===m.children(t.pusher).length&&(w.debug("Adding wrapper element for sidebar"),w.error(c.pusher),h=L('<div class="pusher" />'),m.children().not(t.omitted).not(p).wrapAll(h),w.refresh()),0!==f.nextAll(t.pusher).length&&f.nextAll(t.pusher)[0]===h[0]||(w.debug("Moved sidebar to correct parent element"),w.error(c.movedSidebar,v),f.detach().prependTo(m),w.refresh()),w.clear.cache(),w.set.pushable(),w.set.direction()}},attachEvents:function(e,t){var n=L(e);t=q(w[t])?w[t]:w.toggle,0<n.length?(w.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):w.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===w.cache.leftBodyScrollbar&&(w.cache.leftBodyScrollbar=w.is.rtl()&&(w.is.iframe&&!w.is.firefox()||w.is.safari()||w.is.edge()||w.is.ie())),w.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=m.css((g?"margin-":"padding-")+(w.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),t=g?V.innerWidth-N.documentElement.clientWidth:m[0].offsetWidth-m[0].clientWidth;x=e+t}},show:function(e){if(e=q(e)?e:function(){},w.is.hidden())if(!1===s.onShow.call(v))w.verbose("Show callback returned false cancelling show");else{if(s.overlay&&(w.error(c.overlay),s.transition="overlay"),w.refresh(),w.othersActive())if(w.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!==s.transition)return void w.hideOthers(w.show);w.hideOthers()}else s.transition="overlay";w.set.dimmerStyles(),w.pushPage(function(){e.call(v),s.onVisible.call(v)}),s.onChange.call(v)}else w.debug("Sidebar is already visible")},hide:function(e){e=q(e)?e:function(){},(w.is.visible()||w.is.animating())&&!1!==s.onHide.call(v)&&(w.debug("Hiding sidebar",e),w.refreshSidebars(),w.pullPage(function(){e.call(v),s.onHidden.call(v)}),s.onChange.call(v))},othersAnimating:function(){return 0<p.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<p.not(f).filter("."+l.visible).length},othersActive:function(){return w.othersVisible()||w.othersAnimating()},hideOthers:function(e){var t=p.not(f).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i===n&&e()})},toggle:function(){w.verbose("Determining toggled direction"),w.is.hidden()?w.show():w.hide()},pushPage:function(t){var e,n,i=w.get.transition(),o="overlay"===i||w.othersActive()?f:h;t=q(t)?t:function(){},s.returnScroll&&(r=(g?T:m).scrollTop()),"scale down"===s.transition&&w.scrollToTop(),w.bind.scrollLock(),w.set.transition(i),w.repaint(),i=function(){w.bind.clickaway(),w.add.inlineCSS(),w.set.animating(),w.set.visible()},e=function(){w.set.dimmed()},n=function(e){e.target===o[0]&&(o.off("transitionend"+a,n),w.remove.animating(),t.call(v))},o.off("transitionend"+a),o.on("transitionend"+a,n),requestAnimationFrame(i),s.dimPage&&!w.othersVisible()&&requestAnimationFrame(e)},pullPage:function(t){var e,n,i=w.get.transition(),o="overlay"===i||w.othersActive()?f:h;t=q(t)?t:function(){},w.verbose("Removing context push state",w.get.direction()),w.unbind.clickaway(),w.unbind.scrollLock(),e=function(){w.set.transition(i),w.set.animating(),s.dimPage&&!w.othersVisible()&&w.set.closing(),w.remove.visible()},n=function(e){e.target===o[0]&&(o.off("transitionend"+a,n),w.remove.animating(),w.remove.closing(),w.remove.transition(),w.remove.inlineCSS(),"scale down"!==i&&!s.returnScroll||w.scrollBack(),s.dimPage&&!w.othersVisible()&&h.removeClass(l.dimmed),t.call(v))},o.off("transitionend"+a),o.on("transitionend"+a,n),requestAnimationFrame(e)},scrollToTop:function(){w.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(g?T:m)[0].scrollTo(0,0)},scrollBack:function(){w.verbose("Scrolling back to original page position"),(g?T:m)[0].scrollTo(0,r)},clear:{cache:function(){w.verbose("Clearing cached dimensions"),w.cache={}}},set:{bodyMargin:function(){var n=w.can.leftBodyScrollbar()?"left":"right";m.css((g?"margin-":"padding-")+n,x+"px"),m.find(t.bodyFixed.replace("right",n)).each(function(){var e=L(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+x+"px)")})},dimmerStyles:function(){s.blurring?h.addClass(l.blurring):h.removeClass(l.blurring)},ios:function(){E.addClass(l.ios)},pushed:function(){m.addClass(l.pushed)},pushable:function(){m.addClass(l.pushable)},dimmed:function(){h.addClass(l.dimmed)},active:function(){f.addClass(l.active)},animating:function(){f.addClass(l.animating)},closing:function(){h.addClass(l.closing)},transition:function(e){e=e||w.get.transition(),f.addClass(e)},direction:function(e){e=e||w.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){w.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){E.removeClass(l.ios)},pushed:function(){m.removeClass(l.pushed)},pushable:function(){m.removeClass(l.pushable)},active:function(){f.removeClass(l.active)},animating:function(){f.removeClass(l.animating)},closing:function(){h.removeClass(l.closing)},transition:function(e){e=e||w.get.transition(),f.removeClass(e)},direction:function(e){e=e||w.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=w.can.leftBodyScrollbar()?"left":"right";m.css((g?"margin-":"padding-")+n,y),m.find(t.bodyFixed.replace("right",n)).each(function(){var e=L(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},get:{direction:function(){return f.hasClass(l.top)?l.top:f.hasClass(l.right)?l.right:f.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=w.get.direction(),e=w.is.mobile()?"auto"===s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"===s.transition?s.defaultTransition.computer[e]:s.transition;return w.verbose("Determined transition",e),e}},has:{scrollbar:function(){return g||"hidden"!==m.css("overflow-y")}},is:{safari:function(){return void 0===w.cache.isSafari&&(w.cache.isSafari=/constructor/i.test(V.HTMLElement)||!!V.ApplePaySession),w.cache.isSafari},edge:function(){return void 0===w.cache.isEdge&&(w.cache.isEdge=!!V.setImmediate&&!w.is.ie()),w.cache.isEdge},firefox:function(){return void 0===w.cache.isFirefox&&(w.cache.isFirefox=!!V.InstallTrigger),w.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===w.cache.isIE&&(e=!V.ActiveXObject&&"ActiveXObject"in V,t="ActiveXObject"in V,w.cache.isIE=e||t),w.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(i.ios),n=e.match(i.mobileChrome);return!(!t||n)&&(w.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(i.mobile)?(w.verbose("Browser was found to be mobile",e),!0):(w.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!w.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return w.is.visible()},closed:function(){return w.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return m.hasClass(l.animating)},rtl:function(){return void 0===w.cache.isRTL&&(w.cache.isRTL="rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===A.attr("dir")||"rtl"===A.css("direction")||"rtl"===m.attr("dir")||"rtl"===m.css("direction")),w.cache.isRTL}},setting:function(e,t){if(w.debug("Changing setting",e,t),L.isPlainObject(e))L.extend(!0,s,e);else{if(void 0===t)return s[e];L.isPlainObject(s[e])?L.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(L.isPlainObject(e))L.extend(!0,w,e);else{if(void 0===t)return w[e];w[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,s.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),w.verbose.apply(console,arguments)))},error:function(){s.silent||(w.error=Function.prototype.bind.call(console.error,console,s.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=Date.now())-(M||t),M=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=s.name+":",n=0;M=!1,clearTimeout(w.performance.timer),L.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",P&&(e+=" '"+P+"'"),0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):L.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,a,n,r=b;return e=e||j,t=t||v,"string"==typeof i&&void 0!==r&&(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(void 0!==r[n])return a=r[n],!1;{if(!L.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:w.error(c.method,i),!1;r=r[t]}}})),q(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(S)?S.push(n):void 0!==S?S=[S,n]:void 0!==n&&(S=n),a}};I?(void 0===b&&w.initialize(),w.invoke(F)):(void 0!==b&&w.invoke("destroy"),w.initialize())}),void 0!==S?S:this},L.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,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",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(T,D,A){"use strict";D=void 0!==D&&D.Math===Math?D:globalThis,T.fn.sticky=function(h){var v,e=T(this),b=T(A),y=e.selector||"",x=Date.now(),C=[],w=h,k="string"==typeof w,S=[].slice.call(arguments,1);return e.each(function(){var t,i,e,n,s=T.isPlainObject(h)?T.extend(!0,{},T.fn.sticky.settings,h):T.extend({},T.fn.sticky.settings),o=s.className,a=s.namespace,l=s.error,r="."+a,c="module-"+a,d=T(this),u=T(D),f=[D,A].indexOf(s.scrollContext)<0?b.find(s.scrollContext):T(s.scrollContext),m=d.data(c),g=this,p={initialize:function(){p.determineContainer(),p.determineContext(),p.verbose("Initializing sticky",s,t),p.save.positions(),p.checkErrors(),p.bind.events(),s.observeChanges&&p.observeChanges(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,d.data(c,p)},destroy:function(){p.verbose("Destroying previous instance"),p.reset(),e&&e.disconnect(),n&&n.disconnect(),u.off("load"+r,p.event.load).off("resize"+r,p.event.resize),f.off("scrollchange"+r,p.event.scrollchange),d.removeData(c)},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(p.event.documentChanged),n=new MutationObserver(p.event.changed),e.observe(A,{childList:!0,subtree:!0}),n.observe(g,{childList:!0,subtree:!0}),n.observe(i[0],{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",n))},determineContainer:function(){t=s.container?[D,A].indexOf(s.container)<0?b.find(s.container):T(s.container):d.offsetParent()},determineContext:function(){0===(i=s.context?[D,A].indexOf(s.context)<0?b.find(s.context):T(s.context):t).length&&p.error(l.invalidContext,s.context,d)},checkErrors:function(){p.is.hidden()&&p.error(l.visible,d),p.cache.element.height>p.cache.context.height&&(p.reset(),p.error(l.elementSize,d))},bind:{events:function(){u.on("load"+r,p.event.load).on("resize"+r,p.event.resize),f.off("scroll"+r).on("scroll"+r,p.event.scroll).on("scrollchange"+r,p.event.scrollchange)}},event:{changed:function(e){clearTimeout(p.timer),p.timer=setTimeout(function(){p.verbose("DOM tree modified, updating sticky menu",e),p.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===g||0<T(e).find(g).length)&&(p.debug("Element removed from DOM, tearing down events"),p.destroy())})})},load:function(){p.verbose("Page contents finished loading"),requestAnimationFrame(p.refresh)},resize:function(){p.verbose("Window resized"),requestAnimationFrame(p.refresh)},scroll:function(){requestAnimationFrame(function(){f.triggerHandler("scrollchange"+r,f.scrollTop())})},scrollchange:function(e,t){p.stick(t),s.onScroll.call(g)}},refresh:function(e){p.reset(),s.context||p.determineContext(),e&&p.determineContainer(),p.save.positions(),p.stick(),s.onReposition.call(g)},supports:{sticky:function(){var e=T("<div/>");return e.addClass(o.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){p.lastScroll=e},elementScroll:function(e){p.elementScroll=e},positions:function(){var e={height:f.height()},t={margin:{top:parseInt(d.css("margin-top"),10),bottom:parseInt(d.css("margin-bottom"),10)},offset:d.offset(),width:d.outerWidth(),height:d.outerHeight()},n={offset:i.offset(),height:i.outerHeight()};p.is.standardScroll()||(p.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=f.scrollTop(),e.left=f.scrollLeft(),t.offset.top+=e.top,n.offset.top+=e.top,t.offset.left+=e.left,n.offset.left+=e.left),p.cache={fits:t.height+s.offset<=e.height,sameHeight:t.height===n.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:n.offset.top,height:n.height,bottom:n.offset.top+n.height}},p.set.containerSize(),p.stick(),p.debug("Caching element positions",p.cache)}},get:{direction:function(e){var t="down";return e=e||f.scrollTop(),t=p.lastScroll&&p.lastScroll>e?"up":t},scrollChange:function(e){return e=e||f.scrollTop(),p.lastScroll?e-p.lastScroll:0},currentElementScroll:function(){return p.elementScroll||(p.is.top()?Math.abs(parseInt(d.css("top"),10))||0:Math.abs(parseInt(d.css("bottom"),10))||0)},elementScroll:function(e){e=e||f.scrollTop();var t=p.cache.element,n=p.cache.scrollContext,e=p.get.scrollChange(e),t=t.height-n.height+s.offset,n=p.get.currentElementScroll(),e=n+e;return n=p.cache.fits||e<0?0:t<e?t:e}},remove:{lastScroll:function(){delete p.lastScroll},elementScroll:function(){delete p.elementScroll},minimumSize:function(){t.css("min-height","")},offset:function(){d.css("margin-top","")}},set:{offset:function(){p.verbose("Setting offset on element",s.offset),d.css("margin-top",s.offset)},containerSize:function(){var e=t[0].tagName;"HTML"===e||"body"===e?p.determineContainer():((e=Math.max(p.cache.context.height,p.cache.element.height))-t.outerHeight()>s.jitter?(p.debug("Context is taller than container. Specifying exact height for container",p.cache.context.height),t.css({height:e})):t.css({height:""}),Math.abs(t.outerHeight()-p.cache.context.height)>s.jitter&&(p.debug("Context has padding, specifying exact height for container",p.cache.context.height),t.css({height:p.cache.context.height})))},minimumSize:function(){var e=p.cache.element;t.css("min-height",e.height)},scroll:function(e){p.debug("Setting scroll on element",e),p.elementScroll!==e&&(p.is.top()&&d.css("bottom","").css("top",-e+"px"),p.is.bottom()&&d.css("top","").css("bottom",e+"px"))},size:function(){0!==p.cache.element.height&&0!==p.cache.element.width&&(g.style.setProperty("width",p.cache.element.width+"px","important"),g.style.setProperty("height",p.cache.element.height+"px","important"))}},is:{standardScroll:function(){return f[0]===D},top:function(){return d.hasClass(o.top)},bottom:function(){return d.hasClass(o.bottom)},initialPosition:function(){return!p.is.fixed()&&!p.is.bound()},hidden:function(){return!d.is(":visible")},bound:function(){return d.hasClass(o.bound)},fixed:function(){return d.hasClass(o.fixed)}},stick:function(e){var e=e||f.scrollTop(),t=p.cache,n=t.fits,i=t.sameHeight,o=t.element,a=t.scrollContext,t=t.context,r=p.is.bottom()&&s.pushing?s.bottomOffset:s.offset,e={top:e+r,bottom:e+r+a.height},r=n?0:p.get.elementScroll(e.top),a=!n;0===o.height||i||(p.is.initialPosition()?e.top>=t.bottom?(p.debug("Initial element position is bottom of container"),p.bindBottom()):e.top>o.top&&(o.height+e.top-r>=t.bottom&&o.height<t.height?(p.debug("Initial element position is bottom of container"),p.bindBottom()):(p.debug("Initial element position is fixed"),p.fixTop())):p.is.fixed()?p.is.top()?e.top<=o.top?(p.debug("Fixed element reached top of container"),p.setInitialPosition()):o.height+e.top-r>=t.bottom?(p.debug("Fixed element reached bottom of container"),p.bindBottom()):a&&(p.set.scroll(r),p.save.lastScroll(e.top),p.save.elementScroll(r)):p.is.bottom()&&(e.bottom-o.height<=o.top?(p.debug("Bottom fixed rail has reached top of container"),p.setInitialPosition()):e.bottom>=t.bottom?(p.debug("Bottom fixed rail has reached bottom of container"),p.bindBottom()):a&&(p.set.scroll(r),p.save.lastScroll(e.top),p.save.elementScroll(r))):p.is.bottom()&&(e.top<=o.top?(p.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),p.setInitialPosition()):s.pushing?p.is.bound()&&e.bottom<=t.bottom&&(p.debug("Fixing bottom attached element to bottom of browser."),p.fixBottom()):p.is.bound()&&e.top<=t.bottom-o.height&&(p.debug("Fixing bottom attached element to top of browser."),p.fixTop())))},bindTop:function(){p.debug("Binding element to top of parent container"),p.remove.offset(),s.setSize&&p.set.size(),d.css({left:"",top:"",marginBottom:""}).removeClass(o.fixed).removeClass(o.bottom).addClass(o.bound).addClass(o.top),s.onTop.call(g),s.onUnstick.call(g)},bindBottom:function(){p.debug("Binding element to bottom of parent container"),p.remove.offset(),s.setSize&&p.set.size(),d.css({left:"",top:""}).removeClass(o.fixed).removeClass(o.top).addClass(o.bound).addClass(o.bottom),s.onBottom.call(g),s.onUnstick.call(g)},setInitialPosition:function(){p.debug("Returning to initial position"),p.unfix(),p.unbind()},fixTop:function(){p.debug("Fixing element to top of page"),s.setSize&&p.set.size(),p.set.minimumSize(),p.set.offset(),d.css({left:p.cache.element.left,bottom:"",marginBottom:""}).removeClass(o.bound).removeClass(o.bottom).addClass(o.fixed).addClass(o.top),s.onStick.call(g)},fixBottom:function(){p.debug("Sticking element to bottom of page"),s.setSize&&p.set.size(),p.set.minimumSize(),p.set.offset(),d.css({left:p.cache.element.left,bottom:"",marginBottom:""}).removeClass(o.bound).removeClass(o.top).addClass(o.fixed).addClass(o.bottom),s.onStick.call(g)},unbind:function(){p.is.bound()&&(p.debug("Removing container bound position on element"),p.remove.offset(),d.removeClass(o.bound).removeClass(o.top).removeClass(o.bottom))},unfix:function(){p.is.fixed()&&(p.debug("Removing fixed position on element"),p.remove.minimumSize(),p.remove.offset(),d.removeClass(o.fixed).removeClass(o.top).removeClass(o.bottom),s.onUnstick.call(g))},reset:function(){p.debug("Resetting elements position"),p.unbind(),p.unfix(),p.resetCSS(),p.remove.offset(),p.remove.lastScroll()},resetCSS:function(){d.css({width:"",height:""}),t.css({height:""})},setting:function(e,t){if(T.isPlainObject(e))T.extend(!0,s,e);else{if(void 0===t)return s[e];s[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,s.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),p.verbose.apply(console,arguments)))},error:function(){s.silent||(p.error=Function.prototype.bind.call(console.error,console,s.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=Date.now())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,0)},display:function(){var e=s.name+":",n=0;x=!1,clearTimeout(p.performance.timer),T.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",y&&(e+=" '"+y+"'"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):T.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r,s=m;return e=e||S,t=t||g,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!T.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:p.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(v)?v.push(n):void 0!==v?v=[v,n]:void 0!==n&&(v=n),a}};k?(void 0===m&&p.initialize(),p.invoke(w)):(void 0!==m&&m.invoke("destroy"),p.initialize())}),void 0!==v?v:this},T.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:D,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document),function(M,R,F){"use strict";function I(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,M.fn.tab=function(l){var c,d=I(this)?M(R):M(this),u=M(F),f=d.selector||"",T=Date.now(),D=[],A=l,E="string"==typeof A,O=[].slice.call(arguments,1),P=!1;return d.each(function(){var m,o,g,p,h,v=M.isPlainObject(l)?M.extend(!0,{},M.fn.tab.settings,l):M.extend({},M.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,x=v.error,n=v.regExp,i="."+v.namespace,e="module-"+v.namespace,C=M(this),a={},w=!0,r=0,k=this,s=C.data(e),S={initialize:function(){S.debug("Initializing tab menu item",C),S.determineTabs(),S.debug("Determining tabs",v.context,o),v.auto&&S.set.auto(),S.bind.events(),v.history&&!P&&(S.initializeHistory(),P=!0);var e,t=S.determine.activeTab();v.autoTabActivation&&void 0===s&&null===t&&(t=!0===v.autoTabActivation?S.get.initialPath():v.autoTabActivation,S.debug("No active tab detected, setting tab active",t),S.changeTab(t)),null!==t&&v.history&&(e=M.address.autoUpdate(),M.address.autoUpdate(!1),M.address.value(t),M.address.autoUpdate(e)),S.instantiate()},instantiate:function(){S.verbose("Storing instance of module",S),s=S,C.data(e,S)},destroy:function(){S.debug("Destroying tabs",C),C.removeData(e).off(i)},bind:{events:function(){var e;null!==(e=k)&&e===e.window||(S.debug("Attaching tab activation events to element",C),C.on("click"+i,S.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<C.closest(t.ui).length?(e=C.closest(t.ui),S.verbose("Using closest UI element as parent",e)):e=C,m=e.parent(),S.verbose("Determined parent element for creating context",m)):v.context?(m=[R,F].indexOf(v.context)<0?u.find(v.context):M(v.context),S.verbose("Using selector for tab context",v.context,m)):m=M("body"),v.childrenOnly?(o=m.children(t.tabs),S.debug("Searching tab context children for tabs",m,o)):(o=m.find(t.tabs),S.debug("Searching tab context for tabs",m,o))},initializeHistory:function(){if(S.debug("Initializing page state"),void 0===M.address)return S.error(x.state),!1;if("state"===v.historyType){if(S.debug("Using HTML5 to manage state"),!1===v.path)return S.error(x.path),!1;M.address.history(!0).state(v.path),M(R).trigger("popstate")}M.address.bind("change",S.event.history.change)},event:{click:function(e){var t=M(this).data(y.tab);void 0!==t?(v.history?(S.verbose("Updating page state",e),M.address.value(t)):(S.verbose("Changing tab",e),S.changeTab(t)),e.preventDefault()):S.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||S.get.initialPath(),n=v.templates.determineTitle(t)||!1;S.performance.display(),S.debug("History change event",t,e),h=e,void 0!==t&&S.changeTab(t),n&&M.address.title(n)}}},refresh:function(){g&&(S.debug("Refreshing tab",g),S.changeTab(g))},cache:{read:function(e){return void 0!==e&&a[e]},add:function(e,t){e=e||g,S.debug("Adding cached content for",e),a[e]=t},remove:function(e){e=e||g,S.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}";S.verbose("Setting up automatic tab retrieval from server",e),M.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=S.get.tabElement(e);t.hasClass(b.loading)||(S.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){M.address.value(e)}},changeTab:function(c){var d=R.history&&R.history.pushState&&v.ignoreFirstLoad&&w,u=v.auto||M.isPlainObject(v.apiSettings),f=u&&!d?S.utilities.pathToArray(c):S.get.defaultPathArray(c);c=S.utilities.arrayToPath(f),M.each(f,function(e,t){var n,i,o=f.slice(0,e+1),a=S.utilities.arrayToPath(o),r=S.is.tab(a),s=e+1===f.length,l=S.get.tabElement(a);return S.verbose("Looking for tab",t),r?(S.verbose("Tab was found",t),g=a,p=S.utilities.filterArray(f,o),s?i=!0:(r=f.slice(0,e+2),t=S.utilities.arrayToPath(r),(i=!S.is.tab(t))&&S.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(k,a)?(S.debug("onBeforeChange returned false, cancelling tab change",l),!1):i&&u?(d?(S.debug("Ignoring remote content on first tab load",a),w=!1,S.cache.add(c,l.html()),S.activate.all(a),v.onFirstLoad.call(l[0],a,p,h),v.onLoad.call(l[0],a,p,h)):(S.activate.navigation(a),S.fetch.content(a,c)),!1):(S.debug("Opened local tab",a),S.activate.all(a),S.cache.read(a)||(S.cache.add(a,!0),S.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,p,h)),void v.onLoad.call(l[0],a,p,h))):-1!==c.search("/")||""===c?(S.error(x.missingTab,C,m,a),!1):(c=S.escape.string(c),a=(n=M("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=S.get.tabElement(a),n&&0<n.length&&a?(S.debug("Anchor link used, opening parent tab",l,n),!1===v.onBeforeChange.call(k,a)?S.debug("onBeforeChange returned false, cancelling tab change",l):(l.hasClass(b.active)||setTimeout(function(){S.scrollTo(n)},0),S.activate.all(a),S.cache.read(a)||(S.cache.add(a,!0),S.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,p,h)),v.onLoad.call(l[0],a,p,h)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(S.debug("Forcing scroll to an in-page link in a hidden tab",t,e),u.scrollTop(t))},update:{content:function(e,t,n){var i=S.get.tabElement(e),o=i[0];n=void 0!==n?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(M(t).clone(!0)):n?(S.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(S.debug("Updating HTML",e,t),o.innerHTML=t)}},fetch:{content:function(t,n){var e,i=S.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"===v.cacheType&&S.cache.add(n,e),S.update.content(t,e),t==g?(S.debug("Content loaded",t),S.activate.tab(t)):S.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,p,h),v.onLoad.call(i[0],t,p,h),v.loadOnce?S.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");S.cache.add(n,e)},0):S.cache.add(n,i.html())},urlData:{tab:n}},a=i.api("get request")||!1,a=a&&"pending"===a.state();n=n||t,e=S.cache.read(n),v.cache&&e?(S.activate.tab(t),S.debug("Adding cached content",n),v.loadOnce||("once"===v.evaluateScripts?S.update.content(t,e,!1):S.update.content(t,e)),v.onLoad.call(i[0],t,p,h)):a?(S.set.loading(t),S.debug("Content is already loading",n)):void 0!==M.api?(e=M.extend(!0,{},v.apiSettings,o),S.debug("Retrieving remote content",n,e),S.set.loading(t),i.api(e)):S.error(x.api)}},activate:{all:function(e){S.activate.tab(e),S.activate.navigation(e)},tab:function(e){var t=S.get.tabElement(e),n="siblings"===v.deactivate?t.siblings(o):o.not(t),i=t.hasClass(b.active);S.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=S.get.navElement(e),n="siblings"===v.deactivate?t.siblings(d):d.not(t),i=t.hasClass(b.active);S.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){S.deactivate.navigation(),S.deactivate.tabs()},navigation:function(){d.removeClass(b.active)},tabs:function(){o.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return void 0!==e&&0<S.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||o.eq(0).data(y.tab)},path:function(){return M.address.value()},defaultPathArray:function(e){return S.utilities.pathToArray(S.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+S.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(S.debug("Found default tab",t),r<v.maxDepth)return r++,S.get.defaultPath(t);S.error(x.recursion)}else S.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||g,d.filter("[data-"+y.tab+'="'+S.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||g,t=S.utilities.pathToArray(e),t=S.utilities.last(t),e=o.filter("[data-"+y.tab+'="'+S.escape.string(e)+'"]'),t=o.filter("[data-"+y.tab+'="'+S.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return g}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){M(t).hasClass(b.active)&&(t=M(this).data(y.tab),d.filter("[data-"+y.tab+'="'+S.escape.string(t)+'"]').hasClass(b.active)&&(n=t))}),n}},utilities:{filterArray:function(e,t){return M.grep(e,function(e){return-1===M.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?g:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(S.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,v,e);else{if(void 0===t)return v[e];M.isPlainObject(v[e])?M.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,S,e);else{if(void 0===t)return S[e];S[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,v.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),S.verbose.apply(console,arguments)))},error:function(){v.silent||(S.error=Function.prototype.bind.call(console.error,console,v.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,500)},display:function(){var e=v.name+":",n=0;T=!1,clearTimeout(S.performance.timer),M.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):M.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=s;return e=e||O,t=t||k,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,M.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!M.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:S.error(x.method,i),!1;r=r[t]}}})),I(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(c)?c.push(n):void 0!==c?c=[c,n]:void 0!==n&&(c=n),a}};E?(void 0===s&&S.initialize(),S.invoke(A)):(void 0!==s&&s.invoke("destroy"),S.initialize())}),void 0!==c?c:this},M.tab=function(){M(R).tab.apply(this,arguments)},M.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){},onBeforeChange:function(e){},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",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(P,M,R){"use strict";function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}M=void 0!==M&&M.Math===Math?M:globalThis,P.fn.toast=function(w){var k,e=P(this),S=e.selector||"",T=Date.now(),D=[],A=w,E="string"==typeof A,O=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,r,s,l,e,c=P.isPlainObject(w)?P.extend(!0,{},P.fn.toast.settings,w):P.extend({},P.fn.toast.settings),d=c.className,u=c.selector,f=c.error,t=c.namespace,m=c.fields,g="."+t,p=t+"-module",h=P(this),v=c.context?[M,R].indexOf(c.context)<0?P(R).find(c.context):P(c.context):P("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),y=this,x=b?h.data(p):void 0,C={initialize:function(){C.verbose("Initializing element"),C.create.id(),C.has.container()||C.create.container(),(b||""!==c.message||""!==c.title||""!==C.get.iconClass()||c.showImage||C.has.configActions())&&("string"==typeof c.showProgress&&-1!==[d.top,d.bottom].indexOf(c.showProgress)||(c.showProgress=!1),C.create.toast(),c.closeOnClick&&(c.closeIcon||0<P(i).find(u.input).length||C.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(d.unclickable),C.bind.events()),C.instantiate(),n&&C.show()},instantiate:function(){C.verbose("Storing instance of toast"),x=C,h.data(p,x)},destroy:function(){n&&(C.debug("Removing toast",n),C.unbind.events(),n.remove(),s=i=n=void 0,c.onRemove.call(n,y),l=r=o=void 0),h.removeData(p)},show:function(e){!1===c.onShow.call(n,y)?C.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},C.debug("Showing toast"),C.animate.show(e))},close:function(e){!1===c.onHide.call(n,y)?C.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},C.debug("Closing toast"),C.remove.visible(),C.unbind.events(),C.animate.close(e))},create:{container:function(){C.verbose("Creating container"),v.append(P("<div/>",{class:c.position+" "+d.container+" "+(c.horizontal?d.horizontal:"")+" "+(c.context&&"body"!==c.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),C.verbose("Creating unique id for element",e)},toast:function(){n=P("<div/>",{class:d.box});var e,t=C.get.iconClass();b?(i=c.cloneModule?h.clone().removeAttr("id"):h,l=i.find("> i"+C.helpers.toClass(d.close)),c.closeIcon=0<l.length,""!==t&&i.find(u.icon).attr("class",t+" "+d.icon),c.showImage&&i.find(u.image).attr("src",c.showImage),""!==c.title&&i.find(u.title).html(C.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(u.message).html(C.helpers.escape(c.message,c.preserveHTML))):(C.verbose("Creating toast"),i=P("<div/>",{role:"alert"}),e=P("<div/>",{class:d.content}),""!==t&&i.append(P("<i/>",{class:t+" "+d.icon})),c.showImage&&i.append(P("<img>",{class:d.image+" "+c.classImage,src:c.showImage})),""!==c.title&&(t="_"+C.get.id()+"title",i.attr("aria-labelledby",t),e.append(P("<div/>",{class:d.title,id:t,html:C.helpers.escape(c.title,c.preserveHTML)}))),t="_"+C.get.id()+"desc",i.attr("aria-describedby",t),e.append(P("<div/>",{class:d.message,id:t,html:C.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+d.toast).append(e),i.css("opacity",String(c.opacity)),c.closeIcon&&((l=P("<i/>",{class:d.close+" "+("string"==typeof c.closeIcon?c.closeIcon:""),role:"button",tabindex:0,"aria-label":c.text.close})).hasClass(d.left)?i.prepend(l):i.append(l))),i.hasClass(d.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),a=i.find(".actions"),C.has.configActions()&&(0===a.length&&(a=P("<div/>",{class:d.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical)&&(a.removeClass(d.vertical),C.error(f.verticalCard))),c.actions.forEach(function(e){var t=e[m.icon]?"<i "+(e[m.text]?'aria-hidden="true"':"")+' class="'+C.helpers.deQuote(e[m.icon])+' icon"></i>':"",n=C.helpers.escape(e[m.text]||"",c.preserveHTML),i=C.helpers.deQuote(e[m.class]||""),o=e[m.click]&&F(e[m.click])?e[m.click]:function(){};a.append(P("<button/>",{html:t+n,"aria-label":(e[m.text]||e[m.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+i,on:{click:function(){var e=P(this);e.is(u.approve)||e.is(u.deny)||!1===o.call(y,h)||C.close()}}}))})),a&&a.hasClass(d.vertical)&&i.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||i.addClass(d.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(d.attached)&&(a.addClass(d.buttons),a.detach(),i.addClass(d.attached),a.hasClass(d.vertical)?(i.wrap(P("<div/>",{class:d.vertical+" "+d.attached+" "+(c.compact?d.compact:"")})),a.hasClass(d.left)?i.addClass(d.left).parent().addClass(d.left).prepend(a):i.parent().append(a)):a.hasClass(d.top)?(n.prepend(a),i.addClass(d.bottom)):(n.append(a),i.addClass(d.top))),h!==i&&(y=(h=i)[0]),0<c.displayTime&&(t=d.progressing+" "+(c.pauseOnHover?d.pausable:""),c.showProgress&&(o=P("<div/>",{class:d.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(d.inverted)?o.addClass(d.inverted):o.removeClass(d.inverted)),r=P("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),o.addClass(c.showProgress).append(r),o.hasClass(d.top)?n.prepend(o):n.append(o),r.css("animation-duration",c.displayTime/1e3+"s")),(s=P("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(d.compact),i.addClass(d.compact),o&&o.addClass(d.compact)),c.newestOnTop?n.prependTo(C.get.container()):n.appendTo(C.get.container())}},bind:{events:function(){C.debug("Binding events to toast"),c.closeIcon&&l.on("click"+g,C.event.close),i.on("click"+g,C.event.click),s&&s.on("animationend"+g,C.event.close),n.on("click"+g,u.approve,C.event.approve).on("click"+g,u.deny,C.event.deny)}},unbind:{events:function(){C.debug("Unbinding events to toast"),c.closeIcon&&l.off("click"+g),i.off("click"+g),s&&s.off("animationend"+g),n.off("click"+g)}},animate:{show:function(e){e=F(e)?e:function(){},c.transition&&C.can.useElement("transition")&&(C.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,silent:c.silent,duration:c.transition.showDuration,onComplete:function(){e.call(n,y),c.onVisible.call(n,y)}}))},close:function(e){e=F(e)?e:function(){},c.transition&&void 0!==P.fn.transition?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,silent:c.silent,interval:50,onBeforeHide:function(e){e=F(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,y),c.onHidden.call(n,y),C.destroy()}}):C.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 C.verbose("Determining if there is already a container"),0<C.get.containers().length},toast:function(){return!!C.get.toast()},toasts:function(){return 0<C.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{id:function(){return e},containers:function(){return v.children(C.helpers.toClass(c.position)+u.container+(c.horizontal?C.helpers.toClass(d.horizontal):":not("+C.helpers.toClass(d.horizontal)+")")+(c.context&&"body"!==c.context?C.helpers.toClass(d.absolute):":not("+C.helpers.toClass(d.absolute)+")"))},container:function(){return C.get.containers()[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return P(C.get.container()).find(u.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(d.visible)}},remove:{visible:function(){i.removeClass(d.visible)}},event:{close:function(){C.close()},click:function(e){0===P(e.target).closest(u.clickable).length&&(!1!==c.onClick.call(n,y)&&c.closeOnClick?C.close():C.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===c.onApprove.call(y,h)?C.verbose("Approve callback returned false cancelling close"):C.close()},deny:function(){!1===c.onDeny.call(y,h)?C.verbose("Deny callback returned false cancelling close"):C.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),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={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return void 0!==P.fn[e]||(C.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(C.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,c,e);else{if(void 0===t)return c[e];P.isPlainObject(c[e])?P.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,c.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),C.verbose.apply(console,arguments)))},error:function(){c.silent||(C.error=Function.prototype.bind.call(console.error,console,c.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=Date.now())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=c.name+":",n=0;T=!1,clearTimeout(C.performance.timer),P.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):P.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=x;return e=e||O,t=t||y,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,P.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(P.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!P.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:C.error(f.method,i),!1;r=r[t]}}})),F(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(k)?k.push(n):void 0!==k?k=[k,n]:void 0!==n&&(k=n),a}};E?(void 0===x&&C.initialize(),C.invoke(A)):(void 0!==x&&x.invoke("destroy"),C.initialize(),k=h)}),void 0!==k?k:this},P.toast=P.fn.toast,P.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",absolute:"absolute",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"},text:{close:"Close"},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',clickable:"a, details, .ui.accordion",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(){}},P.extend(P.easing,{easeOutBounce:function(e){var t=7.5625;return e<1/2.75?t*e*e:e<2/2.75?t*(e-=1.5/2.75)*e+.75:e<2.5/2.75?t*(e-=2.25/2.75)*e+.9375:t*(e-=2.625/2.75)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document),function(x,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,x.fn.transition=function(){var g,a=x(this),r=a.selector||"",s=Date.now(),p=[],h=arguments,v=h[0],b=[].slice.call(arguments,1),y="string"==typeof v;return a.each(function(n){var l,c,t,d,i,e,o,u=x(this),f=this,m={initialize:function(){l=m.get.settings.apply(f,h),d=l.className,t=l.error,i=l.metadata,o="."+l.namespace,e="module-"+l.namespace,c=u.data(e)||m,!1===(y=y&&m.invoke(v))&&(m.verbose("Converted arguments into settings object",l),l.interval?m.delay(l.interval):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),c=m,u.data(e,c)},destroy:function(){m.verbose("Destroying previous module for",f),u.removeData(e)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){m.verbose("Repainting element");f.offsetWidth},delay:function(e){var t=(t=m.get.animationDirection())||(m.can.transition()?m.get.direction():"static");e=void 0!==e?e:l.interval,t="auto"===l.reverse&&t===d.outward||!0===l.reverse?(a.length-n)*e:n*e,m.debug("Delaying animation by",t),setTimeout(m.animate,t)},animate:function(e){if(l=e||l,m.debug("Preparing animation",l.animation),m.is.animating()){if(l.queue)return!l.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",l.animation):m.queue(l.animation),!1;if(!l.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;m.debug("New animation started, completing previous early",l.animation),c.complete()}m.can.animate()?m.set.animating(l.animation):m.error(t.noAnimation,l.animation,f)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(e){m.debug("Queueing animation of",e),m.queuing=!0,u.one("animationend.queue"+o,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,l)})},complete:function(e){e&&e.target===f&&e.stopPropagation(),m.debug("Animation complete",l.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is inward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),l.onComplete.call(f)))},force:{visible:function(){var e=u.attr("style"),e=m.get.userStyle(e),t=m.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)?(m.remove.transition(),!1):(m.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),e=void 0===e||""===e;"none"===u.css("display")||m.is.hidden()?e&&u.removeAttr("style"):(m.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!==d.inward&&t!==d.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){m.remove.completeCallback(),e=e||l.animation;e=m.get.animationClass(e);m.save.animation(e),m.force.visible()&&(m.remove.hidden(),m.remove.direction(),m.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(m.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||m.get.direction())===d.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){m.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){m.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(e){e=e||m.get.animationClass(),m.debug("Starting tween",e),u.addClass(e).one("animationend.complete"+o,m.complete),l.useFailSafe&&m.add.failSafe(),m.set.duration(l.duration),l.onStart.call(f)}},save:{animation:function(e){m.cache||(m.cache={}),m.cache.animation=e},displayType:function(e){"none"!==e&&u.data(i.displayType,e)},transitionExists:function(e,t){x.fn.transition.exists[e]=t,m.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=m.get.currentAnimation();e&&(u.removeClass(e),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var e=m.get.duration();m.timer=setTimeout(function(){u.triggerHandler("animationend")},e+l.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.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=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return d.animating+" "+d.transition+" "+t+e},currentAnimation:function(){return!(!m.cache||void 0===m.cache.animation)&&m.cache.animation},currentDirection:function(){return m.is.inward()?d.inward:d.outward},direction:function(){return m.is.hidden()||!m.is.visible()?d.inward:d.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),x.each(e,function(e,t){t===d.inward?n=d.inward:t===d.outward&&(n=d.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=void 0===e||e)&&void 0===u.data(i.displayType)&&(""===(e=u.css("display"))||"none"===e?m.can.transition(!0):m.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]}},can:{transition:function(e){var t,n,i,o,a=l.animation,r=m.get.transitionExists(a),s=m.get.displayType(!1);if(void 0===r||e){if(m.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=x("<"+t+" />").addClass(e).insertAfter(u)).addClass(a).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),t.detach().insertAfter(u),i=t.addClass(d.inward).css("animationName"),s||(t.detach().insertAfter(u),s=t.attr("class",e).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),m.verbose("Determining final display state",s),m.save.displayType(s)),t.remove(),n!==i)m.debug("Direction exists for animation",a),o=!0;else{if("none"===n||!n)return void m.debug("No animation defined in css",a);m.debug("Static animation found",a,s),o=!1}m.save.transitionExists(a,o)}return void 0!==r?r:o},animate:function(){return void 0!==m.can.transition()}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.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!0}},hide:function(){if(!1===l.onHide.call(f))return m.verbose("Hide callback returned false cancelling hide"),!1;m.verbose("Hiding element"),m.is.animating()&&m.reset(),f.blur(),m.remove.display(),m.remove.visible(),l.onBeforeHide.call(f,m.hideNow)},hideNow:function(){m.set.hidden(),m.force.hidden(),l.onHidden.call(f),l.onComplete.call(f)},show:function(e){m.force.visible()&&!1!==l.onShow.call(f)&&(m.verbose("Showing element",e),m.remove.hidden(),l.onBeforeShow.call(f,m.showNow))},showNow:function(){m.set.visible(),l.onVisible.call(f),l.onComplete.call(f)},toggle:function(){m.is.visible()?m.hide():m.show()},stop:function(){m.debug("Stopping current animation"),u.triggerHandler("animationend")},stopAll:function(){m.debug("Stopping all animation"),m.remove.queueCallback(),u.triggerHandler("animationend")},clear:{queue:function(){m.debug("Clearing animation queue"),m.remove.queueCallback()}},enable:function(){m.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){m.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(e,t){if(m.debug("Changing setting",e,t),x.isPlainObject(e))x.extend(!0,l,e);else{if(void 0===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,m,e);else{if(void 0===t)return m[e];m[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,l.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),m.verbose.apply(console,arguments)))},error:function(){l.silent||(m.error=Function.prototype.bind.call(console.error,console,l.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=Date.now())-(s||t),s=t,p.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=l.name+":",n=0;s=!1,clearTimeout(m.performance.timer),x.each(p,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",r&&(e+=" '"+r+"'"),1<a.length&&(e+=" ("+a.length+")"),0<p.length&&(console.groupCollapsed(e),console.table?console.table(p):x.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,s=c;return e=e||b,t=t||f,"string"==typeof i&&void 0!==s&&(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(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!x.isPlainObject(s[t])||e===o)return void 0!==s[t]&&(a=s[t]),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(g)?g.push(n):void 0!==g?g=[g,n]:void 0!==n&&(g=n),void 0!==a&&a}};m.initialize()}),void 0!==g?g: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(){},onBeforeShow:function(e){e.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(e){e.call(this)},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 suppress this warning in production."}}}(jQuery,window,document),function(O,P,M){"use strict";function R(e){return null!==e&&e===e.window}function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.api=function(C){var w,e=F(this)?O(P):O(this),k=e.selector||"",S=Date.now(),T=[],D=C,A="string"==typeof D,E=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,r,o,f=O.isPlainObject(C)?O.extend(!0,{},O.fn.api.settings,C):O.extend({},O.fn.api.settings),t=f.namespace,s=f.metadata,l=f.selector,c=f.error,d=f.className,u="."+t,m="module-"+t,g=O(this),p=g.closest(l.form),h=f.stateContext?[P,M].indexOf(f.stateContext)<0?O(M).find(f.stateContext):O(f.stateContext):g,v=this,b=h[0],y=g.data(m),x={initialize:function(){A||(o=f.data,x.bind.events()),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),y=x,g.data(m,y)},destroy:function(){x.verbose("Destroying previous module for",v),g.removeData(m).off(u)},bind:{events:function(){var e=x.get.event();e?(x.verbose("Attaching API events to element",e),g.on(e+u,x.event.trigger)):"now"===f.on&&(x.debug("Querying API endpoint immediately"),x.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==P.Storage)return t=sessionStorage.getItem(e+x.get.normalizedData()),x.debug("Using cached response",e,f.data,t),x.decode.json(t);x.error(c.noStorage)}},write:{cachedResponse:function(e,t){void 0===P.Storage?x.error(c.noStorage):(O.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+x.get.normalizedData(),t),x.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(x.is.disabled())x.debug("Element is disabled API request aborted");else{if(x.is.loading()){if(!f.interruptRequests)return void x.debug("Cancelling request, previous request is still pending");x.debug("Interrupting previous request"),x.abort()}if(f.defaultData&&O.extend(!0,f.urlData,x.get.defaultData()),f.serializeForm&&(f.data=x.add.formData(o||f.data)),!1===(i=x.get.settings()))return x.cancelled=!0,void x.error(c.beforeSend);if(x.cancelled=!1,(n=x.get.templatedURL())||x.is.mocked()){if((n=x.add.urlData(n))||x.is.mocked()){if(i.url=f.base+n,a=O.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+n,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),x.debug("Querying URL",a.url),x.verbose("Using AJAX settings",a),"local"===f.cache&&x.read.cachedResponse(n))return x.debug("Response returned from local cache"),x.request=x.create.request(),void x.request.resolveWith(b,[x.read.cachedResponse(n)]);f.throttle?f.throttleFirstRequest||x.timer?(x.debug("Throttling request",f.throttle),clearTimeout(x.timer),x.timer=setTimeout(function(){x.timer&&delete x.timer,x.debug("Sending throttled request",e,a.method),x.send.request()},f.throttle)):(x.debug("Sending request",e,a.method),x.send.request(),x.timer=setTimeout(function(){},f.throttle)):(x.debug("Sending request",e,a.method),x.send.request())}}else x.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!x.is.form()}},is:{disabled:function(){return 0<g.filter(l.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||h.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!x.request&&"pending"===x.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(x.verbose("XHR request determined to be aborted"),!0):(x.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return x.is.expectingJSON()&&F(f.successTest)?(x.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(x.debug("Response passed success test",e),!0):(x.debug("Response failed success test",e),!1)):(x.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return x.cancelled||!1},successful:function(){return x.request&&"resolved"===x.request.state()},failure:function(){return x.request&&"rejected"===x.request.state()},complete:function(){return x.request&&("resolved"===x.request.state()||"rejected"===x.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(x.debug("Looking for required URL variables",e),O.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),i=O.isPlainObject(a)&&void 0!==a[n]?a[n]:void 0!==g.data(n)?g.data(n):void 0!==h.data(n)?h.data(n):a[n];if(void 0===i)return x.error(c.requiredParameter,n,o),o=!1;x.verbose("Found required variable",n,i),i=f.encodeParameters?x.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t&&(x.debug("Looking for optional URL variables",e),O.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),i=O.isPlainObject(a)&&void 0!==a[n]?a[n]:void 0!==g.data(n)?g.data(n):void 0!==h.data(n)?h.data(n):a[n];o=void 0!==i?(x.verbose("Optional variable Found",n,i),o.replace(t,i)):(x.verbose("Optional variable not found",n),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(n){var e,i,l,c,d,u={},t="formdata"===f.serializeForm;return n=n||o||f.data,e=O.isPlainObject(n),t?(u=new FormData(p[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(i=p.serializeArray(),l={},c={},d=function(e,t,n){return e[t]=n,e},O.each(O('input[type="file"]',p),function(e,n){O.each(O(n)[0].files,function(e,t){i.push({name:n.name,value:t})})}),O.each(i,function(e,t){if(f.regExp.validate.test(t.name)){var n="checkbox"===O('[name="'+t.name+'"]',p).attr("type"),i=parseFloat(t.value),o=n&&"on"===t.value||"true"===t.value||(String(i)===t.value?i:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],r=t.name.replace(/\[]$/,"");r in l?Array.isArray(c[r])?c[r].push(o):c[r]=[c[r],o]:(l[r]=0,c[r]=o),-1===r.indexOf("[]")&&(o=c[r]);for(;0<a.length;){var s=a.pop();""!==s||Array.isArray(o)?f.regExp.fixed.test(s)?o=d([],s,o):f.regExp.named.test(s)&&(o=d({},s,o)):o=d([],l[r]++,o)}u=O.extend(!0,u,o)}})),n=e?(x.debug("Extending existing data with form data",n,u),t?(O.each(Object.keys(n),function(e,t){u.append(t,n[t])}),u):O.extend(!0,{},n,u)):(x.debug("Adding form data",u),u)}},send:{request:function(){x.set.loading(),x.request=x.create.request(),x.is.mocked()?x.mockedXHR=x.create.mockedXHR():x.xhr=x.create.xhr(),f.onRequest.call(b,x.request,x.xhr)}},event:{trigger:function(e){x.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=Date.now()-r,o=f.loadingDuration-o,a=!!F(f.onResponse)&&(x.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(i,O.extend(!0,{},e)):f.onResponse.call(i,e)),o=0<o?o:0;a&&(x.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&x.debug("Response completed early delaying state change by",o),setTimeout(function(){x.is.validResponse(e)?x.request.resolveWith(i,[e,n]):x.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=Date.now()-r,o=f.loadingDuration-o;0<(o=0<o?o:0)&&x.debug("Response completed early delaying state change by",o),setTimeout(function(){x.is.abortedRequest(e)?x.request.rejectWith(i,[e,"aborted",n]):x.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){x.debug("Successful API Response",e),"local"===f.cache&&n&&(x.write.cachedResponse(n,e),x.debug("Saving server response locally",x.cache)),f.onSuccess.call(b,e,g,t)},complete:function(e,t){var n,i;x.was.successful()?(i=e,n=t):i=x.get.responseFromXHR(n=e),x.remove.loading(),f.onComplete.call(b,i,g,n)},fail:function(e,t,n){var i=x.get.responseFromXHR(e),o=x.get.errorFromRequest(i,t,n);if("aborted"===t)return x.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),f.onAbort.call(b,t,g,e),!0;"invalid"===t?x.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"===t&&void 0!==e&&(x.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&void 0!==n&&""!==n&&x.error(c.statusMessage+n,a.url),f.onError.call(b,o,g,e)),f.errorDuration&&"aborted"!==t&&(x.debug("Adding error state"),x.set.error(),x.should.removeError()&&setTimeout(x.remove.error,f.errorDuration)),x.debug("API Request failed",o,e),f.onFailure.call(b,i,g,e)}}},create:{request:function(){return O.Deferred().always(x.event.request.complete).done(x.event.request.done).fail(x.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,n=O.Deferred().always(x.event.xhr.complete).done(x.event.xhr.done).fail(x.event.xhr.fail);return e?(e=F(e)?(x.debug("Using specified synchronous callback",e),e.call(b,i)):(x.debug("Using settings specified response",e),e),n.resolveWith(b,[e,!1,{responseText:e}])):F(t)&&(e=function(e){x.debug("Async callback returned response",e),e?n.resolveWith(b,[e,!1,{responseText:e}]):n.rejectWith(b,[{responseText:e},!1,!1])},x.debug("Using specified async response callback",t),t.call(b,i,e)),n},xhr:function(){var e=O.ajax(a).always(x.event.xhr.always).done(x.event.xhr.done).fail(x.event.xhr.fail);return x.verbose("Created server request",e,a),e}},set:{error:function(){x.verbose("Adding error state to element",h),h.addClass(d.error)},loading:function(){x.verbose("Adding loading state to element",h),h.addClass(d.loading),r=Date.now()}},remove:{error:function(){x.verbose("Removing error state from element",h),h.removeClass(d.error)},loading:function(){x.verbose("Removing loading state from element",h),h.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!O.isPlainObject(e)&&(x.is.expectingJSON()?x.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return O.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==f.error[t]?f.error[t]:n},request:function(){return x.request||!1},xhr:function(){return x.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(void 0!==e.success&&(x.debug("Legacy success callback detected",e),x.error(c.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(x.debug("Legacy failure callback detected",e),x.error(c.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(x.debug("Legacy complete callback detected",e),x.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&x.error(c.noReturnedValue),!1===e?e:void 0!==e?O.extend(!0,{},e):O.extend(!0,{},f)},urlEncodedValue:function(e){var t=P.decodeURIComponent(e),n=P.encodeURIComponent(e);return t!==e?(x.debug("URL value is already encoded, avoiding double encoding",e),e):(x.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return R(v)||(x.is.input()?e.value=g.val():x.is.form()||(e.text=g.text())),e},event:function(){return R(v)||"now"===f.on?(x.debug("API called without element, no events attached"),!1):"auto"===f.on?g.is("input")?void 0!==v.oninput?"input":void 0!==v.onpropertychange?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||g.data(s.action)||!1,n=f.url||g.data(s.url)||!1)return x.debug("Using specified url",n),n;if(e){if(x.debug("Looking up url for action",e,f.api),void 0===f.api[e]&&!x.is.mocked())return void x.error(c.missingAction,f.action,f.api);n=f.api[e]}else x.is.form()&&(n=g.attr("action")||h.attr("action")||!1,x.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=x.get.xhr();e&&"resolved"!==e.state()&&(x.debug("Cancelling API request"),e.abort())},reset:function(){x.remove.error(),x.remove.loading()},setting:function(e,t){if(x.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,f,e);else{if(void 0===t)return f[e];O.isPlainObject(f[e])?O.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,f.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),x.verbose.apply(console,arguments)))},error:function(){f.silent||(x.error=Function.prototype.bind.call(console.error,console,f.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=Date.now())-(S||t),S=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=f.name+":",n=0;S=!1,clearTimeout(x.performance.timer),O.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):O.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||E,t=t||v,"string"==typeof i&&void 0!==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(void 0!==r[n])return a=r[n],!1;{if(!O.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:x.error(c.method,i),!1;r=r[t]}}})),F(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(w)?w.push(n):void 0!==w?w=[w,n]:void 0!==n&&(w=n),a}};A?(void 0===y&&x.initialize(),x.invoke(D)):(void 0!==y&&y.invoke("destroy"),x.initialize())}),void 0!==w?w:this},O.api=O.fn.api,O.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:!0,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",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:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(w,k,S){"use strict";k=void 0!==k&&k.Math===Math?k:globalThis,w.fn.state=function(m){var g,p=w(this),h=p.selector||"",v=Date.now(),b=[],y=m,x="string"==typeof y,C=[].slice.call(arguments,1);return p.each(function(){var o=w.isPlainObject(m)?w.extend(!0,{},w.fn.state.settings,m):w.extend({},w.fn.state.settings),l=o.error,n=o.metadata,t=o.className,e=o.namespace,i=o.states,a=o.text,r="."+e,s=e+"-module",c=w(this),d=this,u=c.data(s),f={initialize:function(){f.verbose("Initializing module"),o.automatic&&f.add.defaults(),o.context&&""!==h?([k,S].indexOf(o.context)<0?w(S).find(o.context):w(o.context)).on(h,"mouseenter"+r,f.change.text).on(h,"mouseleave"+r,f.reset.text).on(h,"click"+r,f.toggle.state):c.on("mouseenter"+r,f.change.text).on("mouseleave"+r,f.reset.text).on("click"+r,f.toggle.state),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),u=f,c.data(s,f)},destroy:function(){f.verbose("Destroying previous module",u),c.off(r).removeData(s)},refresh:function(){f.verbose("Refreshing selector cache"),c=w(d)},add:{defaults:function(){var n=m&&w.isPlainObject(m.states)?m.states:{};w.each(o.defaults,function(e,t){void 0!==f.is[e]&&f.is[e]()&&(f.verbose("Adding default states",e,d),w.extend(o.states,t,n))})}},is:{active:function(){return c.hasClass(t.active)},loading:function(){return c.hasClass(t.loading)},inactive:function(){return!c.hasClass(t.active)},state:function(e){return void 0!==t[e]&&c.hasClass(t[e])},enabled:function(){return!c.is(o.filter.active)},disabled:function(){return c.is(o.filter.active)},textEnabled:function(){return!c.is(o.filter.text)},button:function(){return c.is(".button:not(a, .submit)")},input:function(){return c.is("input")},progress:function(){return c.is(".ui.progress")}},allow:function(e){f.debug("Now allowing state",e),i[e]=!0},disallow:function(e){f.debug("No longer allowing",e),i[e]=!1},allows:function(e){return i[e]||!1},enable:function(){c.removeClass(t.disabled)},disable:function(){c.addClass(t.disabled)},setState:function(e){f.allows(e)&&c.addClass(t[e])},removeState:function(e){f.allows(e)&&c.removeClass(t[e])},toggle:{state:function(){var e;if(f.allows("active")&&f.is.enabled()){if(f.refresh(),void 0!==w.fn.api)if(e=c.api("get request"),c.api("was cancelled"))f.debug("API Request cancelled by beforesend"),o.activateTest=function(){return!1},o.deactivateTest=function(){return!1};else if(e)return void f.listenTo(e);f.change.state()}}},listenTo:function(e){f.debug("API request detected, waiting for state signal",e),e&&(a.loading&&f.update.text(a.loading),w.when(e).then(function(){"resolved"===e.state()?(f.debug("API request succeeded"),o.activateTest=function(){return!0},o.deactivateTest=function(){return!0}):(f.debug("API request failed"),o.activateTest=function(){return!1},o.deactivateTest=function(){return!1}),f.change.state()}))},change:{state:function(){f.debug("Determining state change direction"),f.is.inactive()?f.activate():f.deactivate(),o.sync&&f.sync(),o.onChange.call(d)},text:function(){f.is.textEnabled()&&(f.is.disabled()?(f.verbose("Changing text to disabled text",a.hover),f.update.text(a.disabled)):f.is.active()?a.hover?(f.verbose("Changing text to hover text",a.hover),f.update.text(a.hover)):a.deactivate&&(f.verbose("Changing text to deactivating text",a.deactivate),f.update.text(a.deactivate)):a.hover?(f.verbose("Changing text to hover text",a.hover),f.update.text(a.hover)):a.activate&&(f.verbose("Changing text to activating text",a.activate),f.update.text(a.activate)))}},activate:function(){o.activateTest.call(d)&&(f.debug("Setting state to active"),c.addClass(t.active),f.update.text(a.active),o.onActivate.call(d))},deactivate:function(){o.deactivateTest.call(d)&&(f.debug("Setting state to inactive"),c.removeClass(t.active),f.update.text(a.inactive),o.onDeactivate.call(d))},sync:function(){f.verbose("Syncing other buttons to current state"),f.is.active()?p.not(c).state("activate"):p.not(c).state("deactivate")},get:{text:function(){return o.selector.text?c.find(o.selector.text).text():c.html()},textFor:function(e){return a[e]||!1}},flash:{text:function(e,t,n){var i=f.get.text();f.debug("Flashing text message",e,t),e=e||o.text.flash,t=t||o.flashDuration,n=n||function(){},f.update.text(e),setTimeout(function(){f.update.text(i),n.call(d)},t)}},reset:{text:function(){var e=a.active||c.data(n.storedText),t=a.inactive||c.data(n.storedText);f.is.textEnabled()&&(f.is.active()&&e?(f.verbose("Resetting active text",e),f.update.text(e)):t&&(f.verbose("Resetting inactive text",e),f.update.text(t)))}},update:{text:function(e){var t=f.get.text();e&&e!==t?(f.debug("Updating text",e),o.selector.text?c.data(n.storedText,e).find(o.selector.text).text(e):c.data(n.storedText,e).html(e)):f.debug("Text is already set, ignoring update",e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,o,e);else{if(void 0===t)return o[e];w.isPlainObject(o[e])?w.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,o.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),f.verbose.apply(console,arguments)))},error:function(){o.silent||(f.error=Function.prototype.bind.call(console.error,console,o.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=Date.now())-(v||t),v=t,b.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=o.name+":",n=0;v=!1,clearTimeout(f.performance.timer),w.each(b,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",h&&(e+=" '"+h+"'"),0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):w.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(i,e,t){var o,a,n,r,s=u;return e=e||C,t=t||d,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,w.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(w.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!w.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:f.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(g)?g.push(n):void 0!==g?g=[g,n]:void 0!==n&&(g=n),a}};x?(void 0===u&&f.initialize(),f.invoke(y)):(void 0!==u&&u.invoke("destroy"),f.initialize())}),void 0!==g?g:this},w.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(jQuery,window,document),function(A,E,O){"use strict";function P(e){return"function"==typeof e&&"number"!=typeof e.nodeType}E=void 0!==E&&E.Math===Math?E:globalThis,A.fn.visibility=function(v){var b,e=A(this),y=e.selector||"",x=Date.now(),C=[],w=v,k="string"==typeof w,S=[].slice.call(arguments,1),T=e.length,D=0;return e.each(function(){var e,t,n,o=A.isPlainObject(v)?A.extend(!0,{},A.fn.visibility.settings,v):A.extend({},A.fn.visibility.settings),i=o.className,a=o.namespace,s=o.error,r=o.metadata,l="."+a,c="module-"+a,d=A(E),u=A(this),f=[E,O].indexOf(o.context)<0?A(O).find(o.context):A(o.context),m=u.data(c),g=this,p=!1,h={initialize:function(){h.debug("Initializing",o),h.setup.cache(),h.should.trackChanges()&&("image"===o.type&&h.setup.image(),"fixed"===o.type&&h.setup.fixed(),o.observeChanges&&h.observeChanges(),h.bind.events()),h.save.position(),h.is.visible()||h.error(s.visible,u),o.initialCheck&&h.checkVisibility(),h.instantiate()},instantiate:function(){h.debug("Storing instance",h),u.data(c,h),m=h},destroy:function(){h.verbose("Destroying previous module"),n&&n.disconnect(),t&&t.disconnect(),d.off("load"+l,h.event.load).off("resize"+l,h.event.resize),f.off("scroll"+l,h.event.scroll).off("scrollchange"+l,h.event.scrollchange),"fixed"===o.type&&(h.resetFixed(),h.remove.placeholder()),u.off(l).removeData(c)},observeChanges:function(){"MutationObserver"in E&&(t=new MutationObserver(h.event.contextChanged),n=new MutationObserver(h.event.changed),t.observe(O,{childList:!0,subtree:!0}),n.observe(g,{childList:!0,subtree:!0}),h.debug("Setting up mutation observer",n))},bind:{events:function(){h.verbose("Binding visibility events to scroll and resize"),o.refreshOnLoad&&d.on("load"+l,h.event.load),d.on("resize"+l,h.event.resize),f.off("scroll"+l).on("scroll"+l,h.event.scroll).on("scrollchange"+l,h.event.scrollchange)}},event:{changed:function(e){h.verbose("DOM tree modified, updating visibility calculations"),h.timer=setTimeout(function(){h.verbose("DOM tree modified, updating sticky menu"),h.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===g||0<A(e).find(g).length)&&(h.debug("Element removed from DOM, tearing down events"),h.destroy())})})},resize:function(){h.debug("Window resized"),o.refreshOnResize&&requestAnimationFrame(h.refresh)},load:function(){h.debug("Page finished loading"),requestAnimationFrame(h.refresh)},scroll:function(){o.throttle?(clearTimeout(h.timer),h.timer=setTimeout(function(){f.triggerHandler("scrollchange"+l,[f.scrollTop()])},o.throttle)):requestAnimationFrame(function(){f.triggerHandler("scrollchange"+l,[f.scrollTop()])})},scrollchange:function(e,t){h.checkVisibility(t)}},precache:function(e,t){for(var n=(e=Array.isArray(e)?e:[e]).length,i=0,o=[],a=O.createElement("img"),r=function(){++i>=e.length&&P(t)&&t()};n--;)(a=O.createElement("img")).addEventListener("load",r),a.addEventListener("error",r),a.src=e[n],o.push(a)},enableCallbacks:function(){h.debug("Allowing callbacks to occur"),p=!1},disableCallbacks:function(){h.debug("Disabling all callbacks temporarily"),p=!0},should:{trackChanges:function(){return k?(h.debug("One time query, no need to bind events"),!1):(h.debug("Callbacks being attached"),!0)}},setup:{cache:function(){h.cache={occurred:{},screen:{},element:{}}},image:function(){var e=u.data(r.src);e&&(h.verbose("Lazy loading image",e),o.once=!0,o.observeChanges=!1,o.onOnScreen=function(){h.debug("Image on screen",g),h.precache(e,function(){h.set.image(e,function(){++D===T&&o.onAllLoaded.call(this),o.onLoad.call(this)})})})},fixed:function(){h.debug("Setting up fixed"),o.once=!1,o.observeChanges=!1,o.initialCheck=!0,o.refreshOnLoad=!0,v.transition||(o.transition=!1),h.create.placeholder(),h.debug("Added placeholder",e),o.onTopPassed=function(){h.debug("Element passed, adding fixed position",u),h.show.placeholder(),h.set.fixed(),o.transition&&void 0!==A.fn.transition&&u.transition(o.transition,o.duration)},o.onTopPassedReverse=function(){h.debug("Element returned to position, removing fixed",u),h.hide.placeholder(),h.remove.fixed()}}},create:{placeholder:function(){h.verbose("Creating fixed position placeholder"),e=u.clone(!1).css("display","none").addClass(i.placeholder).insertAfter(u)}},show:{placeholder:function(){h.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){h.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){h.verbose("Setting element to fixed position"),u.addClass(i.fixed).css({position:"fixed",top:o.offset+"px",left:"auto",zIndex:o.zIndex}),o.onFixed.call(g)},image:function(e,t){u.attr("src",e),o.transition?void 0!==A.fn.transition?u.hasClass(i.visible)?h.debug("Transition already occurred on this image, skipping animation"):u.transition(o.transition,o.duration,t):u.fadeIn(o.duration,t):u.show()}},is:{onScreen:function(){return h.get.elementCalculations().onScreen},offScreen:function(){return h.get.elementCalculations().offScreen},visible:function(){return!(!h.cache||!h.cache.element)&&!(0===h.cache.element.width&&0===h.cache.element.offset.top)},verticallyScrollableContext:function(){var e=f[0]!==E&&f.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=f[0]!==E&&f.css("overflow-x");return"auto"===e||"scroll"===e}},refresh:function(){h.debug("Refreshing constants (width/height)"),"fixed"===o.type&&h.resetFixed(),h.reset(),h.save.position(),o.checkOnRefresh&&h.checkVisibility(),o.onRefresh.call(g)},resetFixed:function(){h.remove.fixed(),h.remove.occurred()},reset:function(){h.verbose("Resetting all cached values"),A.isPlainObject(h.cache)&&(h.cache.screen={},h.cache.element={})},checkVisibility:function(e){h.verbose("Checking visibility of element",h.cache.element),!p&&h.is.visible()&&(h.save.scroll(e),h.save.calculations(),h.passed(),h.passingReverse(),h.topVisibleReverse(),h.bottomVisibleReverse(),h.topPassedReverse(),h.bottomPassedReverse(),h.onScreen(),h.offScreen(),h.passing(),h.topVisible(),h.bottomVisible(),h.topPassed(),h.bottomPassed(),o.onUpdate&&o.onUpdate.call(g,h.get.elementCalculations()))},passed:function(e,t){var n=h.get.elementCalculations();if(e&&t)o.onPassed[e]=t;else{if(void 0!==e)return h.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&A.each(o.onPassed,function(e,t){n.bottomVisible||n.pixelsPassed>h.get.pixelsPassed(e)?h.execute(t,e):o.once||h.remove.occurred(t)})}},onScreen:function(e){var t=h.get.elementCalculations(),n=e||o.onOnScreen;if(e&&(h.debug("Adding callback for onScreen",e),o.onOnScreen=e),t.onScreen?h.execute(n,"onScreen"):o.once||h.remove.occurred("onScreen"),void 0!==e)return t.onOnScreen},offScreen:function(e){var t=h.get.elementCalculations(),n=e||o.onOffScreen;if(e&&(h.debug("Adding callback for offScreen",e),o.onOffScreen=e),t.offScreen?h.execute(n,"offScreen"):o.once||h.remove.occurred("offScreen"),void 0!==e)return t.onOffScreen},passing:function(e){var t=h.get.elementCalculations(),n=e||o.onPassing;if(e&&(h.debug("Adding callback for passing",e),o.onPassing=e),t.passing?h.execute(n,"passing"):o.once||h.remove.occurred("passing"),void 0!==e)return t.passing},topVisible:function(e){var t=h.get.elementCalculations(),n=e||o.onTopVisible,i="topVisible";if(e&&(h.debug("Adding callback for top visible",e),o.onTopVisible=e),t.topVisible?h.execute(n,i):o.once||h.remove.occurred(i),void 0===e)return t.topVisible},bottomVisible:function(e){var t=h.get.elementCalculations(),n=e||o.onBottomVisible,i="bottomVisible";if(e&&(h.debug("Adding callback for bottom visible",e),o.onBottomVisible=e),t.bottomVisible?h.execute(n,i):o.once||h.remove.occurred(i),void 0===e)return t.bottomVisible},topPassed:function(e){var t=h.get.elementCalculations(),n=e||o.onTopPassed;if(e&&(h.debug("Adding callback for top passed",e),o.onTopPassed=e),t.topPassed?h.execute(n,"topPassed"):o.once||h.remove.occurred("topPassed"),void 0===e)return t.topPassed},bottomPassed:function(e){var t=h.get.elementCalculations(),n=e||o.onBottomPassed,i="bottomPassed";if(e&&(h.debug("Adding callback for bottom passed",e),o.onBottomPassed=e),t.bottomPassed?h.execute(n,i):o.once||h.remove.occurred(i),void 0===e)return t.bottomPassed},passingReverse:function(e){var t=h.get.elementCalculations(),n=e||o.onPassingReverse,i="passingReverse";if(e&&(h.debug("Adding callback for passing reverse",e),o.onPassingReverse=e),t.passing?o.once||h.remove.occurred(i):h.get.occurred("passing")&&h.execute(n,i),void 0!==e)return!t.passing},topVisibleReverse:function(e){var t=h.get.elementCalculations(),n=e||o.onTopVisibleReverse,i="topVisibleReverse";if(e&&(h.debug("Adding callback for top visible reverse",e),o.onTopVisibleReverse=e),t.topVisible?o.once||h.remove.occurred(i):h.get.occurred("topVisible")&&h.execute(n,i),void 0===e)return!t.topVisible},bottomVisibleReverse:function(e){var t=h.get.elementCalculations(),n=e||o.onBottomVisibleReverse,i="bottomVisibleReverse";if(e&&(h.debug("Adding callback for bottom visible reverse",e),o.onBottomVisibleReverse=e),t.bottomVisible?o.once||h.remove.occurred(i):h.get.occurred("bottomVisible")&&h.execute(n,i),void 0===e)return!t.bottomVisible},topPassedReverse:function(e){var t=h.get.elementCalculations(),n=e||o.onTopPassedReverse,i="topPassedReverse";if(e&&(h.debug("Adding callback for top passed reverse",e),o.onTopPassedReverse=e),t.topPassed?o.once||h.remove.occurred(i):h.get.occurred("topPassed")&&h.execute(n,i),void 0===e)return!t.onTopPassed},bottomPassedReverse:function(e){var t=h.get.elementCalculations(),n=e||o.onBottomPassedReverse,i="bottomPassedReverse";if(e&&(h.debug("Adding callback for bottom passed reverse",e),o.onBottomPassedReverse=e),t.bottomPassed?o.once||h.remove.occurred(i):h.get.occurred("bottomPassed")&&h.execute(n,i),void 0===e)return!t.bottomPassed},execute:function(e,t){var n=h.get.elementCalculations(),i=h.get.screenCalculations();(e=e||!1)&&(o.continuous?(h.debug("Callback being called continuously",t,n),e.call(g,n,i)):h.get.occurred(t)||(h.debug("Conditions met",t,n),e.call(g,n,i))),h.save.occurred(t)},remove:{fixed:function(){h.debug("Removing fixed position"),u.removeClass(i.fixed).css({position:"",top:"",left:"",zIndex:""}),o.onUnfixed.call(g)},placeholder:function(){h.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var t;e?void 0!==(t=h.cache.occurred)[e]&&!0===t[e]&&(h.debug("Callback can now be called again",e),h.cache.occurred[e]=!1):h.cache.occurred={}}},save:{calculations:function(){h.verbose("Saving all calculations necessary to determine positioning"),h.save.direction(),h.save.screenCalculations(),h.save.elementCalculations()},occurred:function(e){!e||void 0!==h.cache.occurred[e]&&!0===h.cache.occurred[e]||(h.verbose("Saving callback occurred",e),h.cache.occurred[e]=!0)},scroll:function(e){e=e+o.offset||f.scrollTop()+o.offset,h.cache.scroll=e},direction:function(){var e=h.get.scroll(),t=h.get.lastScroll(),e=t<e&&t?"down":e<t&&t?"up":"static";return h.cache.direction=e,h.cache.direction},elementPosition:function(){var e=h.cache.element,t=h.get.screenSize();return h.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=u.offset(),e.width=u.outerWidth(),e.height=u.outerHeight(),h.is.verticallyScrollableContext()&&(e.offset.top+=f.scrollTop()-f.offset().top),h.is.horizontallyScrollableContext()&&(e.offset.left+=f.scrollLeft()-f.offset().left),h.cache.element=e},elementCalculations:function(){var e=h.get.screenCalculations(),t=h.get.elementPosition();return o.includeMargin?(t.margin={},t.margin.top=parseInt(u.css("margin-top"),10),t.margin.bottom=parseInt(u.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topPassed=e.top>=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),h.cache.element=t,h.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=h.get.scroll();return h.save.direction(),h.cache.screen.top=e,h.cache.screen.bottom=e+h.cache.screen.height,h.cache.screen},screenSize:function(){h.verbose("Saving window position"),h.cache.screen={height:f.height()}},position:function(){h.save.screenSize(),h.save.elementPosition()}},get:{pixelsPassed:function(e){var t=h.get.elementCalculations();return-1<e.search("%")?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==h.cache.occurred&&h.cache.occurred[e]||!1},direction:function(){return void 0===h.cache.direction&&h.save.direction(),h.cache.direction},elementPosition:function(){return void 0===h.cache.element&&h.save.elementPosition(),h.cache.element},elementCalculations:function(){return void 0===h.cache.element&&h.save.elementCalculations(),h.cache.element},screenCalculations:function(){return void 0===h.cache.screen&&h.save.screenCalculations(),h.cache.screen},screenSize:function(){return void 0===h.cache.screen&&h.save.screenSize(),h.cache.screen},scroll:function(){return void 0===h.cache.scroll&&h.save.scroll(),h.cache.scroll},lastScroll:function(){return void 0===h.cache.screen?(h.debug("First scroll event, no last scroll could be found"),!1):h.cache.screen.top}},setting:function(e,t){if(A.isPlainObject(e))A.extend(!0,o,e);else{if(void 0===t)return o[e];o[e]=t}},internal:function(e,t){if(A.isPlainObject(e))A.extend(!0,h,e);else{if(void 0===t)return h[e];h[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,o.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),h.verbose.apply(console,arguments)))},error:function(){o.silent||(h.error=Function.prototype.bind.call(console.error,console,o.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=Date.now())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=o.name+":",n=0;x=!1,clearTimeout(h.performance.timer),A.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",y&&(e+=" '"+y+"'"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):A.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r=m;return e=e||S,t=t||g,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,A.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(A.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!A.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:h.error(s.method,i),!1;r=r[t]}}})),P(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(b)?b.push(n):void 0!==b?b=[b,n]:void 0!==n&&(b=n),a}};k?(void 0===m&&h.initialize(),m.save.scroll(),m.save.calculations(),h.invoke(w)):(void 0!==m&&m.invoke("destroy"),h.initialize())}),void 0!==b?b:this},A.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:E,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(jQuery,window,document);