/* * # Fomantic UI - 2.9.0-beta.275+3f2aae7 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2022 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(te,ne,ie,ae){"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(B){var K,W=te(this),Q=te(ie),$=W.selector||"",Y="ontouchstart"in ie.documentElement,X=Y?"touchstart":"click",G=(new Date).getTime(),J=[],Z=B,_="string"==typeof Z,ee=[].slice.call(arguments,1);return W.each(function(z){var v,e,t,n,i,a,s,o,r,m=te.isPlainObject(B)?te.extend(!0,{},te.fn.dropdown.settings,B):te.extend({},te.fn.dropdown.settings),h=m.className,f=m.message,l=m.fields,g=m.keys,p=m.metadata,F=m.namespace,c=m.regExp,b=m.selector,u=m.error,P=m.templates,d="."+F,w="module-"+F,C=te(this),y=te(m.context),x=C.find(b.text),S=C.find(b.search),A=C.find(b.sizer),T=C.find(b.input),N=C.find(b.icon),H=C.find(b.clearIcon),L=0").html(i).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(h.addition).addClass(h.item),m.hideAdditions&&i.addClass(h.hidden),n=n===ae?i:n.add(i),M.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=M.get.userValues();t&&(M.debug("Adding user labels",t),te.each(t,function(e,t){M.verbose("Adding custom user value"),M.add.label(t,t)}))},menu:function(){I=te("
").addClass(h.menu).appendTo(C)},sizer:function(){A=te("").addClass(h.sizer).insertAfter(S)}},search:function(e){e=e!==ae?e:M.get.query(),M.verbose("Searching for query",e),!1===m.fireOnInit&&M.is.initialLoad()?M.verbose("Skipping callback on initial load",m.onSearch):M.has.minCharacters(e)&&!1!==m.onSearch.call(R,e)?M.filter(e):M.hide(null,!0)},select:{firstUnfiltered:function(){M.verbose("Selecting first non-filtered element"),M.remove.selectedItem(),D.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(h.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(x)),M.is.search()&&!M.has.search()&&(M.verbose("Adding search input"),S=te("").addClass(h.search).prop("autocomplete",M.is.chrome()?"fomantic-search":"off").insertBefore(x)),M.is.multiple()&&M.is.searchSelection()&&!M.has.sizer()&&M.create.sizer(),m.allowTab&&M.set.tabbable()},select:function(){var e=M.get.selectValues();M.debug("Dropdown initialized on a select",e),0<(T=C.is("select")?C:T).parent(b.dropdown).length?(M.debug("UI dropdown already exists. Creating dropdown menu only"),C=T.closest(b.dropdown),M.has.menu()||M.create.menu(),I=C.children(b.menu),M.setup.menu(e)):(M.debug("Creating entire dropdown from select"),C=te("
").attr("class",T.attr("class")).addClass(h.selection).addClass(h.dropdown).html(P.dropdown(e,l,m.preserveHTML,m.className)).insertBefore(T),T.hasClass(h.multiple)&&!1===T.prop("multiple")&&(M.error(u.missingMultiple),T.prop("multiple",!0)),T.is("[multiple]")&&M.set.multiple(),T.prop("disabled")&&(M.debug("Disabling dropdown"),C.addClass(h.disabled)),T.is("[required]")&&(m.forceSelection=!0),T.removeAttr("required").removeAttr("class").detach().prependTo(C)),M.refresh()},menu:function(e){I.html(P.menu(e,l,m.preserveHTML,m.className)),D=I.find(b.item),k=m.hideDividers?D.parent().children(b.divider):te()},reference:function(){M.debug("Dropdown behavior was called on select, replacing with closest dropdown"),C=C.parent(b.dropdown),V=C.data(w),R=C.get(0),M.refresh(),M.setup.returnedObject()},returnedObject:function(){var e=W.slice(0,z),t=W.slice(z+1);W=e.add(C).add(t)}},refresh:function(){M.refreshSelectors(),M.refreshData()},refreshItems:function(){D=I.find(b.item),k=m.hideDividers?D.parent().children(b.divider):te()},refreshSelectors:function(){M.verbose("Refreshing selector cache"),x=C.find(b.text),S=C.find(b.search),T=C.find(b.input),N=C.find(b.icon),L=0"),te.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),t=m.templates.escape(t[l.name]||"",m.preserveHTML);T.append('")}),M.observe.select())}},event:{paste:function(e){(e.originalEvent.clipboardData||ne.clipboardData).getData("text").split(m.delimiter).forEach(function(e){M.set.selected(M.escape.htmlEntities(e.trim()),null,!0,!0)}),e.preventDefault()},change:function(){U||(M.debug("Input changed, updating selection"),M.set.selected())},focus:function(){m.showOnFocus&&!O&&M.is.hidden()&&!t&&(E=!0,M.show())},blur:function(e){t=ie.activeElement===this,O||t||(M.remove.activeLabel(),M.hide())},mousedown:function(){M.is.searchSelection()?n=!0:O=!0},mouseup:function(){M.is.searchSelection()?n=!1:O=!1},click:function(e){te(e.target).is(C)&&(M.is.focusedOnSearch()?M.show():M.focusSearch())},search:{focus:function(e){O=!0,M.is.multiple()&&M.remove.activeLabel(),E||M.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(E=!0,M.search())},blur:function(e){t=ie.activeElement===this,!M.is.searchSelection()||n||j||t||(m.forceSelection?M.forceSelection():m.allowAdditions||M.remove.searchTerm(),M.hide()),n=!1}},clearIcon:{click:function(e){M.clear(),M.is.searchSelection()&&M.remove.searchTerm(),M.hide(),e.stopPropagation()}},icon:{click:function(e){q=!0,M.has.search()?M.is.active()?M.blurSearch():m.showOnFocus?M.focusSearch():M.toggle():M.toggle(),e.stopPropagation()}},text:{focus:function(e){O=!0,M.focusSearch()}},input:function(e){(M.is.multiple()||M.is.searchSelection())&&M.set.filtered(),clearTimeout(M.timer),M.timer=setTimeout(M.search,m.delay.search)},label:{click:function(e){var t=te(this),n=C.find(b.label),i=n.filter("."+h.active),a=t.nextAll("."+h.active),s=t.prevAll("."+h.active),a=(0 modified, recreating menu"),M.disconnect.selectObserver(),M.refresh(),M.setup.select(),M.set.selected(),M.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(b.addition)||0=m.maxSelections?(M.debug("Maximum selection count reached"),m.useLabels&&(D.addClass(h.filtered),M.add.message(f.maxSelections)),!0):(M.verbose("No longer at maximum selection count"),M.remove.message(),M.remove.filteredItem(),M.is.searchSelection()&&M.filterItems(),!1))},disabled:function(){S.attr("tabindex",M.is.disabled()?-1:0)}},restore:{defaults:function(e){M.clear(e),M.restore.defaultText(),M.restore.defaultValue()},defaultText:function(){var e=M.get.defaultText();e===M.get.placeholderText?(M.debug("Restoring default placeholder text",e),M.set.placeholderText(e)):(M.debug("Restoring default text",e),M.set.text(e))},placeholderText:function(){M.set.placeholderText()},defaultValue:function(){var e=M.get.defaultValue();e!==ae&&(M.debug("Restoring default value",e),""!==e?(M.set.value(e),M.set.selected()):(M.remove.activeItem(),M.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(M.error(u.labels),m.useLabels=!0),M.debug("Restoring selected values"),M.create.userLabels()),M.check.maxSelections()},selected:function(){M.restore.values(),M.is.multiple()?(M.debug("Restoring previously selected values and labels"),M.restore.labels()):M.debug("Restoring previously selected values")},values:function(){M.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&M.get.remoteValues()?M.restore.remoteValues():M.set.selected();var e=M.get.value();!e||""===e||Array.isArray(e)&&0===e.length?T.addClass(h.noselection):T.removeClass(h.noselection),M.remove.initialLoad()},remoteValues:function(){var e=M.get.remoteValues();M.debug("Recreating selected from session data",e),e&&(M.is.single()?te.each(e,function(e,t){M.set.text(t)}):te.each(e,function(e,t){M.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==ae)return(e=sessionStorage.getItem(e+i))!==ae&&e;M.error(u.noStorage)}},save:{defaults:function(){M.save.defaultText(),M.save.placeholderText(),M.save.defaultValue()},defaultValue:function(){var e=M.get.value();M.verbose("Saving default value as",e),C.data(p.defaultValue,e)},defaultText:function(){var e=M.get.text();M.verbose("Saving default text as",e),C.data(p.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&x.hasClass(h.placeholder)&&(e=M.get.text(),M.verbose("Saving placeholder text as",e),C.data(p.placeholderText,e))},remoteData:function(e,t){ne.Storage===ae?M.error(u.noStorage):(M.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){M.is.multiple()&&m.useLabels?M.remove.labels(C.find(b.label),e):(M.remove.activeItem(),M.remove.selectedItem(),M.remove.filteredItem()),M.set.placeholderText(),M.clearValue(e)},clearValue:function(e){M.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||M.get.selectedItem(),n=t.closest(b.menu),i=n.outerHeight(),a=n.scrollTop(),s=D.eq(0).outerHeight(),i=Math.floor(i/s),a=(n.prop("scrollHeight"),"up"==e?a-s*i:a+s*i),s=D.not(b.unselectable),i="up"==e?s.index(t)-i:s.index(t)+i,i=("up"==e?0<=i:i").addClass(h.label).attr("data-"+p.value,s).html(P.label(s,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,s,t),M.has.label(e)?M.debug("User selection already exists, skipping",s):(m.label.variation&&i.addClass(m.label.variation),!0===n?(M.debug("Animating in label",i),i.addClass(h.hidden).insertBefore(a).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,duration:m.label.duration})):(M.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=I.children(b.message),e=m.templates.message(M.add.variables(e));0").html(e).addClass(h.message).appendTo(I)},optionValue:function(e){var t=M.escape.value(e);0").prop("value",t).addClass(h.addition).html(e).appendTo(T),M.verbose("Adding user addition as an