/* * # 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"))},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").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"}),n+=""},prompt:function(e){if(1===e.length)return e[0];var n='
    ';return R.each(e,function(e,t){n+="
  • "+t+"
  • "}),n+="
"}},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=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",{id:ie.popupId}).addClass(G.popup).appendTo(v.find($.context))):(e=0<(t=s.parent()).closest(i.append).length?"appendTo":"prependTo",ae("
").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").addClass(G.calendar).appendTo(a),0===r.length&&te.attr("tabindex","0"))},input:function(){$.touchReadonly&&0").addClass(G.grid).appendTo(b)),t=0;t").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("").addClass(G.table).addClass(T).addClass(oe[p]+" column").appendTo(b)),W=(ne&&T.addClass(G.inverted),p);if(!N){var Y=ae("").appendTo(T),D=ae("").appendTo(Y),A=ae("").appendTo(Y),$.showWeekNumbers&&((A=ae("").appendTo(T),P=r?10*Math.ceil(g/10)-9:l?1-B:0,K=0;K").appendTo(Q),l&&$.showWeekNumbers&&((A=ae("").appendTo(Q),(k=ae("
").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("").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("").addClass(G.prev).appendTo(A)).data(_.focusDate,S),O.toggleClass(G.disabledCell,!ie.helper.isDateInRange(k,n)),ae("").addClass(G.prevIcon).appendTo(O)),t===h-1&&((E=ae("").addClass(G.next).appendTo(A)).data(_.focusDate,C),E.toggleClass(G.disabledCell,!ie.helper.isDateInRange(w,n)),ae("").addClass(G.nextIcon).appendTo(E)),l)for(D=ae("
").appendTo(D)).text($.text.weekNo),A.addClass(G.weekCell),W--),P=0;P").appendTo(D)).text(J.dayColumnHeader((P+$.firstDayOfWeek)%7,$))}for(var Q=ae("
").appendTo(D)).text(ie.get.weekOfYear(g,y,P+1-$.firstDayOfWeek)),A.addClass(G.weekCell)),e=0;e").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("
").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=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=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 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 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 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").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(_,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").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=_("
").addClass(p.menu).appendTo(x)},sizer:function(){S=_("").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").addClass("remove icon").insertBefore(w)),j.is.search()&&!j.has.search()&&(j.verbose("Adding search input"),e=x.prev("label"),k=_("").addClass(p.search).prop("autocomplete",j.is.chrome()?"fomantic-search":"off"),0").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"),_.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),i=m.templates.escape(t[l.name]||"",m.preserveHTML);T.append('")}),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 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=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").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").html(e).addClass(p.message).appendTo(A)},optionValue:function(e){var t=j.escape.value(e);0").prop("value",t).addClass(p.addition).text(e).appendTo(T),j.verbose("Adding user addition as an