/*
* # Fomantic UI - 2.9.0
* https://github.com/fomantic/Fomantic-UI
* http://fomantic-ui.com/
*
* Copyright 2022 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(M,F,O,P){"use strict";M.isWindow=M.isWindow||function(e){return null!=e&&e===e.window},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.api=M.fn.api=function(w){var C,e=M.isFunction(this)?M(F):M(this),k=e.selector||"",T=(new Date).getTime(),D=[],S=w,A="string"==typeof S,E=[].slice.call(arguments,1);return e.each(function(){var o,i,n,e,r,a,f=M.isPlainObject(w)?M.extend(!0,{},M.fn.api.settings,w):M.extend({},M.fn.api.settings),t=f.namespace,s=f.metadata,l=f.selector,c=f.error,u=f.className,d="."+t,m="module-"+t,p=M(this),g=p.closest(l.form),h=f.stateContext?[F,O].indexOf(f.stateContext)<0?M(O).find(f.stateContext):M(f.stateContext):p,v=this,b=h[0],y=p.data(m),x={initialize:function(){A||(a=f.data,x.bind.events()),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),y=x,p.data(m,y)},destroy:function(){x.verbose("Destroying previous module for",v),p.removeData(m).off(d)},bind:{events:function(){var e=x.get.event();e?(x.verbose("Attaching API events to element",e),p.on(e+d,x.event.trigger)):"now"==f.on&&(x.debug("Querying API endpoint immediately"),x.query())}},decode:{json:function(e){if(e!==P&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==P)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){t&&""===t?x.debug("Response empty, not caching",t):F.Storage===P?x.error(c.noStorage):(M.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()}f.defaultData&&M.extend(!0,f.urlData,x.get.defaultData()),f.serializeForm&&(f.data=x.add.formData(a||f.data)),!1===(i=x.get.settings())?(x.cancelled=!0,x.error(c.beforeSend)):(x.cancelled=!1,(n=x.get.templatedURL())||x.is.mocked()?((n=x.add.urlData(n))||x.is.mocked())&&(i.url=f.base+n,o=M.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",o.url),x.verbose("Using AJAX settings",o),"local"===f.cache&&x.read.cachedResponse(n)?(x.debug("Response returned from local cache"),x.request=x.create.request(),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,o.method),x.send.request()},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request(),x.timer=setTimeout(function(){},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request())):x.error(c.missingURL))}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!x.is.form()}},is:{disabled:function(){return 0
").addClass(G.popup)[e](t)),ee.addClass(G.calendar),te&&ee.addClass(G.inverted),e=function(){return ne.refreshTooltips(),X.onVisible.apply(ee,arguments)},l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),X.onVisible.apply(ee,arguments)}),t=ne.setting("on"),t=ae.extend({},X.popupOptions,{popup:ee,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(X.startMode)),X.onShow.apply(ee,arguments)},onVisible:e,onHide:X.onHide,onHidden:function(){return ne.blur(),X.onHidden.apply(ee,arguments)}}),ne.popup(t)))},inline:function(){c.length&&!X.inline||(X.inline=!0,ee=ae("").addClass(G.calendar).appendTo(r),l.length)||ee.attr("tabindex","0")},input:function(){X.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;X.initialDate?e=i.date(X.initialDate,X):r.data(_.date)!==oe?e=i.date(r.data(_.date),X):l.length&&(e=i.date(l.val(),X)),ne.set.date(e,X.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=S.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,V,n=ne.get.mode(),i=new Date,q=ne.get.date(),a=ne.get.focusDate(),o=ne.helper.dateInRange(a||q||X.initialDate||i),r=(a||ne.set.focusDate(a=o,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,j="time"===X.type,N=Math.max(X.multiMonth,1),H=l?ne.get.monthOffset():0,d=o.getMinutes(),f=o.getHours(),m=o.getDate(),z=o.getMonth()+H,p=o.getFullYear(),g=l?X.showWeekNumbers?8:7:c?4:Z.column,U=l||c?6:Z.row,h=l?N:1,v=(b=ee).hasClass("left")?"right center":"left center";for(b.empty(),1").addClass(G.grid).appendTo(b)),t=0;t").addClass(G.column).appendTo(V));var b,y=z+t,Y=(new Date(p,y,1).getDay()-X.firstDayOfWeek%7+7)%7,x=(!X.constantHeight&&l&&(x=new Date(p,y+1,0).getDate()+Y,U=Math.ceil(x/7)),r?10:s?1:0),w=l?1:0,C=c||u?1:0,k=c||u?m:1,T=new Date(p-x,y-w,k-C,f),w=new Date(p+x,y+w,k+C,f),k=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,y,0):new Date(p,y,m,-1),C=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,y+1,1):new Date(p,y,m+1),D=n,D=(l&&X.showWeekNumbers&&(D+=" andweek"),ae("").addClass(G.table).addClass(D).addClass(ie[g]+" column").appendTo(b)),W=(te&&D.addClass(G.inverted),g);if(!j){var B=ae("").appendTo(D),S=ae("
").appendTo(B),A=ae(" | ").attr("colspan",""+g).appendTo(S),E=r||s?new Date(p,0,1):l?new Date(p,y,1):new Date(p,y,m,f,d),M=ae("").addClass(G.link).appendTo(A),E=(M.text(ne.helper.dateFormat(J[n+"Header"],E)),s?X.disableYear?"day":"year":l?X.disableMonth?"year":"month":"day");if(M.data(_.mode,E),0===t&&((M=ae("").addClass(G.prev).appendTo(A)).data(_.focusDate,T),M.toggleClass(G.disabledCell,!ne.helper.isDateInRange(k,n)),ae("").addClass(G.prevIcon).appendTo(M)),t===h-1&&((E=ae("").addClass(G.next).appendTo(A)).data(_.focusDate,w),E.toggleClass(G.disabledCell,!ne.helper.isDateInRange(C,n)),ae("").addClass(G.nextIcon).appendTo(E)),l)for(S=ae("
").appendTo(B),X.showWeekNumbers&&((A=ae(" | ").appendTo(S)).text(X.text.weekNo),A.addClass(G.weekCell),W--),F=0;F").appendTo(S)).text(J.dayColumnHeader((F+X.firstDayOfWeek)%7,X))}for(var $=ae("").appendTo(D),F=r?10*Math.ceil(p/10)-9:l?1-Y:0,K=0;K").appendTo($),l&&X.showWeekNumbers&&((A=ae(" | ").appendTo(S)).text(ne.get.weekOfYear(p,y,F+1-X.firstDayOfWeek)),A.addClass(G.weekCell)),e=0;e").addClass(G.cell).appendTo(S)).text(I),A.data(_.date,P),l&&P.getMonth()!==(y+12)%12),R=!X.selectAdjacentDays&&I||!ne.helper.isDateInRange(P,n)||X.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),L=(R?(null!==(L=ne.helper.findDayAsObject(P,n,X.disabledDates))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation])&&A.attr("data-variation",L[_.variation]),"hour"===n&&null!==(L=ne.helper.findHourAsObject(P,n,X.disabledHours))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation])&&A.attr("data-variation",L[_.variation])):null!==(O=ne.helper.findDayAsObject(P,n,X.eventDates))&&(A.addClass(O[_.class]||X.eventClass),O[_.message])&&(A.attr("data-tooltip",O[_.message]),A.attr("data-position",O[_.position]||v),(O[_.inverted]||te&&O[_.inverted]===oe)&&A.attr("data-inverted",""),O[_.variation])&&A.attr("data-variation",O[_.variation]),ne.helper.dateEqual(P,q,n)),Q=ne.helper.dateEqual(P,i,n),I=(A.toggleClass(G.adjacentCell,I&&!O),A.toggleClass(G.disabledCell,R),A.toggleClass(G.activeCell,L&&!(I&&R)),c||u||A.toggleClass(G.todayCell,!I&&Q),{mode:n,adjacent:I,disabled:R,active:L,today:Q});J.cell(A,P,I),ne.helper.dateEqual(P,a,n)&&ne.set.focusDate(P,!1,!1)}X.today&&(T=ae("
").appendTo($),(k=ae(" | ").attr("colspan",""+g).addClass(G.today).appendTo(T)).text(J.today(X)),k.data(_.date,i)),ne.update.focus(!1,D),X.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,a=ae(this),o=a.data(_.date);o&&(e=a.hasClass(G.disabledCell),t=a.hasClass(G.activeCell),n=a.hasClass(G.adjacentCell),i=ne.helper.dateEqual(o,s,r),o=!!u&&(!!l&&ne.helper.isDateInRange(o,r,l,u)||!!c&&ne.helper.isDateInRange(o,r,u,c)),a.toggleClass(G.focusCell,i&&(!d||m)&&(!n||X.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(a)||a.toggleClass(G.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=ae(D).width();ee.find("td[data-position]").each(function(){var e=ae(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"+a,ne.event.mousedown),ee.on("touchstart"+a,ne.event.mousedown),ee.on("mouseup"+a,ne.event.mouseup),ee.on("touchend"+a,ne.event.mouseup),ee.on("mouseover"+a,ne.event.mouseover),(l.length?(l.on("input"+a,ne.event.inputChange),l.on("focus"+a,ne.event.inputFocus),l.on("blur"+a,ne.event.inputBlur),l):ee).on("keydown"+a,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(a),l.length&&l.off(a)}},event:{mouseover:function(e){var t=ae(e.target).data(_.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=ae(e.target).data(_.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=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!==X.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(G.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,a,o,r,s,l=e.which;9===l&&ne.popup("hide"),ne.popup("is visible")&&(t=ne.get.mode(),37===l||38===l||39===l||40===l?(o="day"===t?7:"hour"===t?4:"minute"===t?Z.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===t?X.minTimeGap:1,r=(n=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===t?o:0),s=n.getMonth()+("month"===t?o:0),i=n.getDate()+("day"===t?o:0),a=n.getHours()+("hour"===t?o:0),o=n.getMinutes()+("minute"===t?o:0),r=new Date(r,s,i,a,o),"time"===X.type&&(r=ne.helper.mergeDateTime(n,r)),ne.helper.isDateInRange(r,t)&&ne.set.focusDate(r)):13===l?((s=ne.get.focusDate())&&!X.isDisabled(s,t)&&!ne.helper.isDisabled(s,t)&&ne.helper.isEnabled(s,t)&&!1!==X.onSelect.call(u,s,ne.get.mode())&&ne.selectDate(s),e.preventDefault(),e.stopPropagation()):27===l&&(ne.popup("hide"),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=i.date(e,X);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(G.active)},inputBlur:function(){var e;ee.removeClass(G.active),X.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(J[X.type],e),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(G.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},formattedDate:function(e,t){return ne.helper.dateFormat(e||J[X.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(r.data(_.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(_.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(X.startCalendar);return(e?e.get.date():r.data(_.startDate))||null},endDate:function(){var e=ne.get.calendarModule(X.endCalendar);return(e?e.get.date():r.data(_.endDate))||null},minDate:function(){return r.data(_.minDate)||null},maxDate:function(){return r.data(_.maxDate)||null},monthOffset:function(){return r.data(_.monthOffset)||X.monthOffset||0},mode:function(){var e=r.data(_.mode)||X.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=ae.inArray(e,t)?e:"time"===X.type?"hour":"month"===X.type?"month":"year"===X.type?"year":"day"},type:function(){return r.data(_.type)||X.type},validModes:function(){var e=[];return"time"!==X.type&&(X.disableYear&&"year"!==X.type||e.push("year"),(X.disableMonth||"year"===X.type)&&"month"!==X.type||e.push("month"),0<=X.type.indexOf("date"))&&e.push("day"),0<=X.type.indexOf("time")&&(e.push("hour"),X.disableMinute||e.push("minute")),e},isTouch:function(){try{return S.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof ae?e:ae(S).find(e).first()).data(o):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,a=ne.get.mode(),o=ne.helper.dateFormat(J[X.type],e);return!(n&&!1===X.onBeforeChange.call(u,e,o,a)||(ne.set.focusDate(e),X.isDisabled(e,a)))&&((i=ne.get.endDate())&&e&&i=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,X.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(_.maxDate,e))},monthOffset:function(e,t){var n=Math.max(X.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(_.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(_.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||X.disableMinute&&"hour"===n||"date"===X.type&&"day"===n||"month"===X.type&&"month"===n||"year"===X.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,X.closable)&&(ne.popup("hide"),t=ne.get.calendarModule(X.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()):(t="year"===n?X.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(oe)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{dateFormat:function(e,t){var n,i,a,o,r,s,l,c,u,d;return t instanceof Date?"function"==typeof e?e.call(ne,t,X):(n=t.getDate(),i=t.getMonth(),a=t.getFullYear(),o=t.getDay(),r=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(a,i,n+1-X.firstDayOfWeek),c=r%12||12,u=(r<12?X.text.am:X.text.pm).toLowerCase(),d={D:n,DD:("0"+n).slice(-2),M:i+1,MM:("0"+(i+1)).slice(-2),MMM:X.text.monthsShort[i],MMMM:X.text.months[i],Y:a,YY:String(a).slice(2),YYYY:a,d:o,dd:X.text.dayNamesShort[o].slice(0,2),ddd:X.text.dayNamesShort[o],dddd:X.text.dayNames[o],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:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3=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(){o=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",o))}},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(Z,ee,te,ne){"use strict";Z.isFunction=Z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ee=void 0!==ee&&ee.Math==Math?ee:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Z.fn.dropdown=function(Y){var W,B=Z(this),$=Z(te),K=B.selector||"",Q=(new Date).getTime(),X=[],G=Y,J="string"==typeof G,_=[].slice.call(arguments,1);return B.each(function(V){var f,e,t,n,i,a,o,r,s,m=Z.isPlainObject(Y)?Z.extend(!0,{},Z.fn.dropdown.settings,Y):Z.extend({},Z.fn.dropdown.settings),p=m.className,g=m.message,l=m.fields,h=m.keys,v=m.metadata,q=m.namespace,c=m.regExp,b=m.selector,u=m.error,j=m.templates,d="."+q,y="module-"+q,x=Z(this),w=[ee,te].indexOf(m.context)<0?$.find(m.context):Z(m.context),C=x.find(b.text),k=x.find(b.search),T=x.find(b.sizer),D=x.find(b.input),N=x.find(b.icon),H=x.find(b.clearIcon),S=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=n===ne?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),Z.each(t,function(e,t){L.verbose("Adding custom user value"),L.add.label(t,t)}))},menu:function(){A=Z("").addClass(p.menu).appendTo(x)},sizer:function(){T=Z("").addClass(p.sizer).insertAfter(k)}},search:function(e){e=e!==ne?e:L.get.query(),L.verbose("Searching for query",e),!1===m.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",m.onSearch):L.has.minCharacters(e)&&!1!==m.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(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(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),e=x.prev("label"),k=Z("").addClass(p.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off"),e.length&&(e.attr("id")||e.attr("id","_"+L.get.id()+"_formLabel"),k.attr("aria-labelledby",e.attr("id"))),k.insertBefore(C)),L.is.multiple()&&L.is.searchSelection()&&!L.has.sizer()&&L.create.sizer(),m.allowTab&&L.set.tabbable()},select:function(){var e=L.get.selectValues();L.debug("Dropdown initialized on a select",e),0<(D=x.is("select")?x:D).parent(b.dropdown).length?(L.debug("UI dropdown already exists. Creating dropdown menu only"),x=D.closest(b.dropdown),L.has.menu()||L.create.menu(),A=x.children(b.menu),L.setup.menu(e)):(L.debug("Creating entire dropdown from select"),x=Z("").attr("class",D.attr("class")).addClass(p.selection).addClass(p.dropdown).html(j.dropdown(e,l,m.preserveHTML,m.className)).insertBefore(D),D.hasClass(p.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"),x.addClass(p.disabled)),D.is("[required]")&&(m.forceSelection=!0),D.removeAttr("required").removeAttr("class").detach().prependTo(x)),L.refresh()},menu:function(e){A.html(j.menu(e,l,m.preserveHTML,m.className)),E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z()},reference:function(){L.debug("Dropdown behavior was called on select, replacing with closest dropdown"),x=x.parent(b.dropdown),R=x.data(y),P=x[0],L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=B.slice(0,V),t=B.slice(V+1);B=e.add(x).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z()},refreshSelectors:function(){L.verbose("Refreshing selector cache"),C=x.find(b.text),k=x.find(b.search),D=x.find(b.input),N=x.find(b.icon),S=0"),Z.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),i=m.templates.escape(t[l.name]||"",m.preserveHTML);D.append('")}),L.observe.select())}},event:{paste:function(e){(e.originalEvent.clipboardData||ee.clipboardData).getData("text").split(m.delimiter).forEach(function(e){L.set.selected(L.escape.htmlEntities(e.trim()),null,!0,!0)}),e.preventDefault()},change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){m.showOnFocus&&!F&&L.is.hidden()&&!t&&(I=!0,L.show())},blur:function(e){t=te.activeElement===this,F||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection(!0)?n=!0:F=!0},mouseup:function(){L.is.searchSelection(!0)?n=!1:F=!1},click:function(e){Z(e.target).is(x)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){F=!0,L.is.multiple()&&L.remove.activeLabel(),I||L.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(I=!0,L.search())},blur:function(e){t=te.activeElement===this,!L.is.searchSelection(!0)||n||z||t||(m.forceSelection?L.forceSelection():m.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){O=!0,L.has.search()?L.is.active()?L.blurSearch():m.showOnFocus?L.focusSearch():L.toggle():L.toggle(),e.stopPropagation()}},text:{focus:function(e){F=!0,L.focusSearch()}},input:function(e){(L.is.multiple()||L.is.searchSelection())&&L.set.filtered(),clearTimeout(L.timer),L.timer=setTimeout(L.search,m.delay.search)},label:{click:function(e){var t=Z(this),n=x.find(b.label),i=n.filter("."+p.active),a=t.nextAll("."+p.active),o=t.prevAll("."+p.active),a=(0 modified, recreating menu"),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?Z(e.addedNodes[0]):Z(!1),e=e.removedNodes?Z(e.removedNodes[0]):Z(!1),t=t.add(e),e=t.is(b.addition)||0=m.maxSelections?(L.debug("Maximum selection count reached"),m.useLabels&&(E.addClass(p.filtered),L.add.message(g.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!==ne&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(L.error(u.labels),m.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(),m.apiSettings&&m.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(p.noselection):D.removeClass(p.noselection),L.remove.initialLoad()},remoteValues:function(){var e=L.get.remoteValues();L.debug("Recreating selected from session data",e),e&&(L.is.single()?Z.each(e,function(e,t){L.set.text(t)}):Z.each(e,function(e,t){L.add.label(e,t)}))}},read:{remoteData:function(e){if(ee.Storage!==ne)return(e=sessionStorage.getItem(e+i))!==ne&&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),x.data(v.defaultValue,e)},defaultText:function(){var e=L.get.text();L.verbose("Saving default text as",e),x.data(v.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&C.hasClass(p.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),x.data(v.placeholderText,e))},remoteData:function(e,t){ee.Storage===ne?L.error(u.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){L.is.multiple()&&m.useLabels?L.remove.labels(x.find(b.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(b.menu),i=n.outerHeight(),a=n.scrollTop(),o=E.eq(0).outerHeight(),i=Math.floor(i/o),a="up"==e?a-o*i:a+o*i,o=E.not(b.unselectable),i="up"==e?o.index(t)-i:o.index(t)+i,i=("up"==e?0<=i:i").addClass(p.label).attr("data-"+v.value,o).html(j.label(o,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,o,t),L.has.label(e)?L.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n?(L.debug("Animating in label",i),i.addClass(p.hidden).insertBefore(a).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.label.duration})):(L.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=A.children(b.message),e=m.templates.message(L.add.variables(e));0").html(e).addClass(p.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0").prop("value",t).addClass(p.addition).text(e).appendTo(D),L.verbose("Adding user addition as an