/*
* # Fomantic UI - 2.8.8
* https://github.com/fomantic/Fomantic-UI
* http://fomantic-ui.com/
*
* Copyright 2022 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),o=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),a=r.namespace,c=r.error,u="module-"+a,d=g(v),f=this,m=d.data(u),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),m=p,d.data(u,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),console!==b&&console.log!==b||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(p.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,o,e,a){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n=!p.moduleExists(t)||(g.fn[t].settings.namespace||!1);p.moduleExists(t)&&(p.verbose("Changing default setting",i,o,t),g.fn[t].settings[i]=o,a&&n&&0<(n=g(":data(module-"+n+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i,o)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n;p.moduleExists(t)&&(p.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),o&&a&&0<(n=g(":data(module-"+a+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||r.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||r.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?m.cache.console===b?p.error(c.console):(p.debug("Restoring console function"),h.console=m.cache.console):(p.debug("Disabling console function"),m.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,p,e);else{if(t===b)return p[e];p[e]=t}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(p.performance.timer),g.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0").addClass(X.popup)[e](t)),ee.addClass(X.calendar),te&&ee.addClass(X.inverted),e=function(){return ne.refreshTooltips(),K.onVisible.apply(ee,arguments)},t=K.onHidden,l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),K.onVisible.apply(ee,arguments)},t=function(){return ne.blur(),K.onHidden.apply(ee,arguments)}),n=ne.setting("on"),n=oe.extend({},K.popupOptions,{popup:ee,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(K.startMode)),K.onShow.apply(ee,arguments)},onVisible:e,onHide:K.onHide,onHidden:t}),ne.popup(n)))},inline:function(){c.length&&!K.inline||(K.inline=!0,ee=oe("
").addClass(X.calendar).appendTo(r),l.length||ee.attr("tabindex","0"))},input:function(){K.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;K.initialDate?e=n.date(K.initialDate,K):r.data(Z.date)!==ae?e=n.date(r.data(Z.date),K):l.length&&(e=n.date(l.val(),K)),ne.set.date(e,K.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=S.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,q,n=ne.get.mode(),i=new Date,j=ne.get.date(),o=ne.get.focusDate(),a=ne.helper.dateInRange(o||j||K.initialDate||i),r=(o||ne.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,N="time"===K.type,H=Math.max(K.multiMonth,1),V=l?ne.get.monthOffset():0,d=a.getMinutes(),f=a.getHours(),m=a.getDate(),z=a.getMonth()+V,p=a.getFullYear(),g=l?K.showWeekNumbers?8:7:c?4:_.column,U=l||c?6:_.row,h=l?H:1,W=(v=ee).hasClass("left")?"right center":"left center";for(v.empty(),1").addClass(X.grid).appendTo(v)),t=0;t").addClass(X.column).appendTo(q));var v,b=z+t,B=(new Date(p,b,1).getDay()-K.firstDayOfWeek%7+7)%7,y=(!K.constantHeight&&l&&(y=new Date(p,b+1,0).getDate()+B,U=Math.ceil(y/7)),r?10:s?1:0),w=l?1:0,x=c||u?1:0,C=c||u?m:1,k=new Date(p-y,b-w,C-x,f),w=new Date(p+y,b+w,C+x,f),C=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,b,0):new Date(p,b,m,-1),x=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,b+1,1):new Date(p,b,m+1),T=n,T=(l&&K.showWeekNumbers&&(T+=" andweek"),oe("").addClass(X.table).addClass(T).addClass(ie[g]+" column").appendTo(v)),D=(te&&T.addClass(X.inverted),g);if(!N){var Y=oe("").appendTo(T),S=oe("
").appendTo(Y),A=oe(" | ").attr("colspan",""+g).appendTo(S),E=r||s?new Date(p,0,1):l?new Date(p,b,1):new Date(p,b,m,f,d),F=oe("").addClass(X.link).appendTo(A),E=(F.text(J.header(E,n,K)),s?K.disableYear?"day":"year":l?K.disableMonth?"year":"month":"day");if(F.data(Z.mode,E),0===t&&((F=oe("").addClass(X.prev).appendTo(A)).data(Z.focusDate,k),F.toggleClass(X.disabledCell,!ne.helper.isDateInRange(C,n)),oe("").addClass(X.prevIcon).appendTo(F)),t===h-1&&((E=oe("").addClass(X.next).appendTo(A)).data(Z.focusDate,w),E.toggleClass(X.disabledCell,!ne.helper.isDateInRange(x,n)),oe("").addClass(X.nextIcon).appendTo(E)),l)for(S=oe("
").appendTo(Y),K.showWeekNumbers&&((A=oe(" | ").appendTo(S)).text(K.text.weekNo),A.addClass(X.weekCell),D--),O=0;O").appendTo(S)).text(J.dayColumnHeader((O+K.firstDayOfWeek)%7,K))}for(var $=oe("").appendTo(T),O=r?10*Math.ceil(p/10)-9:l?1-B:0,Q=0;Q").appendTo($),l&&K.showWeekNumbers&&((A=oe(" | ").appendTo(S)).text(ne.get.weekOfYear(p,b,O+1-K.firstDayOfWeek)),A.addClass(X.weekCell)),e=0;e").addClass(X.cell).appendTo(S)).text(R),A.data(Z.date,P),l&&P.getMonth()!==(b+12)%12),I=!K.selectAdjacentDays&&R||!ne.helper.isDateInRange(P,n)||K.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),L=(I?null!==(L=ne.helper.findDayAsObject(P,n,K.disabledDates))&&L[Z.message]&&(A.attr("data-tooltip",L[Z.message]),A.attr("data-position",L[Z.position]||W),(L[Z.inverted]||te&&L[Z.inverted]===ae)&&A.attr("data-inverted",""),L[Z.variation]&&A.attr("data-variation",L[Z.variation])):null!==(M=ne.helper.findDayAsObject(P,n,K.eventDates))&&(A.addClass(M[Z.class]||K.eventClass),M[Z.message]&&(A.attr("data-tooltip",M[Z.message]),A.attr("data-position",M[Z.position]||W),(M[Z.inverted]||te&&M[Z.inverted]===ae)&&A.attr("data-inverted",""),M[Z.variation]&&A.attr("data-variation",M[Z.variation]))),ne.helper.dateEqual(P,j,n)),G=ne.helper.dateEqual(P,i,n),R=(A.toggleClass(X.adjacentCell,R&&!M),A.toggleClass(X.disabledCell,I),A.toggleClass(X.activeCell,L&&!(R&&I)),c||u||A.toggleClass(X.todayCell,!R&&G),{mode:n,adjacent:R,disabled:I,active:L,today:G});J.cell(A,P,R),ne.helper.dateEqual(P,o,n)&&ne.set.focusDate(P,!1,!1)}K.today&&(k=oe("
").appendTo($),(C=oe(" | ").attr("colspan",""+g).addClass(X.today).appendTo(k)).text(J.today(K)),C.data(Z.date,i)),ne.update.focus(!1,T),K.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,o=oe(this),a=o.data(Z.date);a&&(e=o.hasClass(X.disabledCell),t=o.hasClass(X.activeCell),n=o.hasClass(X.adjacentCell),i=ne.helper.dateEqual(a,s,r),a=!!u&&(!!l&&ne.helper.isDateInRange(a,r,l,u)||!!c&&ne.helper.isDateInRange(a,r,u,c)),o.toggleClass(X.focusCell,i&&(!d||m)&&(!n||K.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(o)||o.toggleClass(X.rangeCell,a&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=oe(D).width();ee.find("td[data-position]").each(function(){var e=oe(this),t=D.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),ee.on("mousedown"+o,ne.event.mousedown),ee.on("touchstart"+o,ne.event.mousedown),ee.on("mouseup"+o,ne.event.mouseup),ee.on("touchend"+o,ne.event.mouseup),ee.on("mouseover"+o,ne.event.mouseover),l.length?(l.on("input"+o,ne.event.inputChange),l.on("focus"+o,ne.event.inputFocus),l.on("blur"+o,ne.event.inputBlur),l.on("keydown"+o,ne.event.keydown)):ee.on("keydown"+o,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(o),l.length&&l.off(o)}},event:{mouseover:function(e){var t=oe(e.target).data(Z.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=oe(e.target).data(Z.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t,n,i,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(Z.date)||t.data(Z.focusDate)||t.data(Z.mode)?t:e).data(Z.date),n=e.data(Z.focusDate),i=e.data(Z.mode),t&&!1!==K.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(X.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,o,a,r,s,l=e.which;27!==l&&9!==l||ne.popup("hide"),ne.popup("is visible")&&(37===l||38===l||39===l||40===l?(o="day"===(r=ne.get.mode())?7:"hour"===r?4:"minute"===r?_.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===r?K.minTimeGap:1,a=(t=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===r?o:0),s=t.getMonth()+("month"===r?o:0),n=t.getDate()+("day"===r?o:0),i=t.getHours()+("hour"===r?o:0),o=t.getMinutes()+("minute"===r?o:0),a=new Date(a,s,n,i,o),"time"===K.type&&(a=ne.helper.mergeDateTime(t,a)),ne.helper.isDateInRange(a,r)&&ne.set.focusDate(a)):13===l&&(r=ne.get.mode(),(s=ne.get.focusDate())&&!K.isDisabled(s,r)&&!ne.helper.isDisabled(s,r)&&ne.helper.isEnabled(s,r)&&ne.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=n.date(e,K);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(X.active)},inputBlur:function(){var e;ee.removeClass(X.active),K.formatInput&&(e=ne.get.date(),e=J.datetime(e,K),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(X.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},date:function(){return ne.helper.sanitiseDate(r.data(Z.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(Z.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(K.startCalendar);return(e?e.get.date():r.data(Z.startDate))||null},endDate:function(){var e=ne.get.calendarModule(K.endCalendar);return(e?e.get.date():r.data(Z.endDate))||null},minDate:function(){return r.data(Z.minDate)||null},maxDate:function(){return r.data(Z.maxDate)||null},monthOffset:function(){return r.data(Z.monthOffset)||0},mode:function(){var e=r.data(Z.mode)||K.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===K.type?"hour":"month"===K.type?"month":"year"===K.type?"year":"day"},type:function(){return r.data(Z.type)||K.type},validModes:function(){var e=[];return"time"!==K.type&&(K.disableYear&&"year"!==K.type||e.push("year"),(K.disableMonth||"year"===K.type)&&"month"!==K.type||e.push("month"),0<=K.type.indexOf("date")&&e.push("day")),0<=K.type.indexOf("time")&&(e.push("hour"),K.disableMinute||e.push("minute")),e},isTouch:function(){try{return S.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:oe(e).first()).data(a):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i=ne.get.mode(),o=J.datetime(e,K);if(n&&!1===K.onBeforeChange.call(u,e,o,i))return!1;if(ne.set.focusDate(e),K.isDisabled(e,i))return!1;var a=ne.get.endDate();a&&e&&a=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,K.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max(K.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(Z.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||K.disableMinute&&"hour"===n||"date"===K.type&&"day"===n||"month"===K.type&&"month"===n||"year"===K.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,K.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(K.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?K.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(ae)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i)&&("day"===i&&-1!==K.disabledDaysOfWeek.indexOf(n.getDay())||K.disabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[Z.year]?"number"==typeof e[Z.year]?n.getFullYear()==e[Z.year]:Array.isArray(e[Z.year])?-1=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(f<0)for(n=0;n adjusting invoked element"),g=g.closest(p.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=g.children(p.label),h=g.children(p.input),v=h[0]},hide:{input:function(){y.verbose("Modifying z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in S&&((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=D(e);t=D.isFunction(y[t])?y[t]:y.toggle,0").insertAfter(h),y.debug("Creating label",a))}},has:{label:function(){return 0 .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=k("").addClass("ui dimmer");return e.displayLoader&&(t=k("").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(te,ne,ie,oe){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(W){var B,Y=te(this),$=te(ie),Q=Y.selector||"",G="ontouchstart"in ie.documentElement,K=G?"touchstart":"click",X=(new Date).getTime(),J=[],Z=W,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Y.each(function(q){var d,e,t,n,i,o,a,r,s,f=te.isPlainObject(W)?te.extend(!0,{},te.fn.dropdown.settings,W):te.extend({},te.fn.dropdown.settings),m=f.className,p=f.message,l=f.fields,g=f.keys,h=f.metadata,j=f.namespace,c=f.regExp,v=f.selector,u=f.error,N=f.templates,b="."+j,y="module-"+j,w=te(this),x=te(f.context),C=w.find(v.text),k=w.find(v.search),T=w.find(v.sizer),D=w.find(v.input),H=w.find(v.icon),V=w.find(v.clearIcon),S=0").html(i).attr("data-"+h.value,t).attr("data-"+h.text,t).addClass(m.addition).addClass(m.item),f.hideAdditions&&i.addClass(m.hidden),n=n===oe?i:n.add(i),L.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=L.get.userValues();t&&(L.debug("Adding user labels",t),te.each(t,function(e,t){L.verbose("Adding custom user value"),L.add.label(t,t)}))},menu:function(){A=te("").addClass(m.menu).appendTo(w)},sizer:function(){T=te("").addClass(m.sizer).insertAfter(k)}},search:function(e){e=e!==oe?e:L.get.query(),L.verbose("Searching for query",e),!1===f.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",f.onSearch):L.has.minCharacters(e)&&!1!==f.onSearch.call(P,e)?L.filter(e):L.hide(null,!0)},select:{firstUnfiltered:function(){L.verbose("Selecting first non-filtered element"),L.remove.selectedItem(),E.not(v.unselectable).not(v.addition+v.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(v.item).not(v.unselectable).eq(0),e=e.prevAll(v.item).not(v.unselectable).eq(0);0").addClass("remove icon").insertBefore(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),k=te("").addClass(m.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off").insertBefore(C)),L.is.multiple()&&L.is.searchSelection()&&!L.has.sizer()&&L.create.sizer(),f.allowTab&&L.set.tabbable()},select:function(){var e=L.get.selectValues();L.debug("Dropdown initialized on a select",e),0<(D=w.is("select")?w:D).parent(v.dropdown).length?(L.debug("UI dropdown already exists. Creating dropdown menu only"),w=D.closest(v.dropdown),L.has.menu()||L.create.menu(),A=w.children(v.menu),L.setup.menu(e)):(L.debug("Creating entire dropdown from select"),w=te("").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(N.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(L.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&L.set.multiple(),D.prop("disabled")&&(L.debug("Disabling dropdown"),w.addClass(m.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(w)),L.refresh()},menu:function(e){A.html(N.menu(e,l,f.preserveHTML,f.className)),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},reference:function(){L.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(v.dropdown),I=w.data(y),P=w.get(0),L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,q),t=Y.slice(q+1);Y=e.add(w).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshSelectors:function(){L.verbose("Refreshing selector cache"),C=w.find(v.text),k=w.find(v.search),D=w.find(v.input),H=w.find(v.icon),S=0"),te.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),t=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('")}),L.observe.select())}},event:{change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){f.showOnFocus&&!O&&L.is.hidden()&&!t&&(R=!0,L.show())},blur:function(e){t=ie.activeElement===this,O||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection()?n=!0:O=!0},mouseup:function(){L.is.searchSelection()?n=!1:O=!1},click:function(e){te(e.target).is(w)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){O=!0,L.is.multiple()&&L.remove.activeLabel(),R||L.is.active()||!(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(R=!0,L.search())},blur:function(e){t=ie.activeElement===this,!L.is.searchSelection()||n||z||t||(f.forceSelection?L.forceSelection():f.allowAdditions||L.remove.searchTerm(),L.hide()),n=!1}},clearIcon:{click:function(e){L.clear(),L.is.searchSelection()&&L.remove.searchTerm(),L.hide(),e.stopPropagation()}},icon:{click:function(e){M=!0,L.has.search()?L.is.active()?L.blurSearch():f.showOnFocus?L.focusSearch():L.toggle():L.toggle(),e.stopPropagation()}},text:{focus:function(e){O=!0,L.focusSearch()}},input:function(e){(L.is.multiple()||L.is.searchSelection())&&L.set.filtered(),clearTimeout(L.timer),L.timer=setTimeout(L.search,f.delay.search)},label:{click:function(e){var t=te(this),n=w.find(v.label),i=n.filter("."+m.active),o=t.nextAll("."+m.active),a=t.prevAll("."+m.active),o=(0 modified, recreating menu"),L.is.selectMutation(e)&&(L.disconnect.selectObserver(),L.refresh(),L.setup.select(),L.set.selected(),L.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?te(e.addedNodes[0]):te(!1),e=e.removedNodes?te(e.removedNodes[0]):te(!1),t=t.add(e),e=t.is(v.addition)||0=f.maxSelections?(L.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(m.filtered),L.add.message(p.maxSelections)),!0):(L.verbose("No longer at maximum selection count"),L.remove.message(),L.remove.filteredItem(),L.is.searchSelection()&&L.filterItems(),!1))},disabled:function(){k.attr("tabindex",L.is.disabled()?-1:0)}},restore:{defaults:function(e){L.clear(e),L.restore.defaultText(),L.restore.defaultValue()},defaultText:function(){var e=L.get.defaultText();e===L.get.placeholderText?(L.debug("Restoring default placeholder text",e),L.set.placeholderText(e)):(L.debug("Restoring default text",e),L.set.text(e))},placeholderText:function(){L.set.placeholderText()},defaultValue:function(){var e=L.get.defaultValue();e!==oe&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(L.error(u.labels),f.useLabels=!0),L.debug("Restoring selected values"),L.create.userLabels()),L.check.maxSelections()},selected:function(){L.restore.values(),L.is.multiple()?(L.debug("Restoring previously selected values and labels"),L.restore.labels()):L.debug("Restoring previously selected values")},values:function(){L.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&L.get.remoteValues()?L.restore.remoteValues():L.set.selected();var e=L.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),L.remove.initialLoad()},remoteValues:function(){var e=L.get.remoteValues();L.debug("Recreating selected from session data",e),e&&(L.is.single()?te.each(e,function(e,t){L.set.text(t)}):te.each(e,function(e,t){L.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;L.error(u.noStorage)}},save:{defaults:function(){L.save.defaultText(),L.save.placeholderText(),L.save.defaultValue()},defaultValue:function(){var e=L.get.value();L.verbose("Saving default value as",e),w.data(h.defaultValue,e)},defaultText:function(){var e=L.get.text();L.verbose("Saving default text as",e),w.data(h.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&C.hasClass(m.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),w.data(h.placeholderText,e))},remoteData:function(e,t){ne.Storage===oe?L.error(u.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e))}},clear:function(e){L.is.multiple()&&f.useLabels?L.remove.labels(w.find(v.label),e):(L.remove.activeItem(),L.remove.selectedItem(),L.remove.filteredItem()),L.set.placeholderText(),L.clearValue(e)},clearValue:function(e){L.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||L.get.selectedItem(),n=t.closest(v.menu),i=n.outerHeight(),o=n.scrollTop(),a=E.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=E.not(v.unselectable),i="up"==e?a.index(t)-i:a.index(t)+i,i=("up"==e?0<=i:i").addClass(m.label).attr("data-"+h.value,a).html(N.label(a,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,a,t),L.has.label(e)?L.debug("User selection already exists, skipping",a):(f.label.variation&&i.addClass(f.label.variation),!0===n?(L.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(o).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(L.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(v.message),e=f.templates.message(L.add.variables(e));0").html(e).addClass(m.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0").prop("value",t).addClass(m.addition).html(e).appendTo(D),L.verbose("Adding user addition as an