").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 .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
'),{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(H(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(q,j,N,H){"use strict";q.isFunction=q.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.popup=function(T){var D,e=q(this),S=q(N),A=q(j),E=q("body"),F=e.selector||"",O="ontouchstart"in N.documentElement?"touchstart":"click",M=(new Date).getTime(),P=[],R=T,I="string"==typeof R,L=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,u=q.isPlainObject(T)?q.extend(!0,{},q.fn.popup.settings,T):q.extend({},q.fn.popup.settings),i=u.selector,d=u.className,f=u.error,m=u.metadata,o=u.namespace,a="."+u.namespace,r="module-"+o,p=q(this),l=q(u.context),g=q(u.scrollContext),h=q(u.boundary),v=u.target?q(u.target):p,b=0,y=!1,w=!1,x=this,C=p.data(r),k={initialize:function(){k.debug("Initializing",p),k.createID(),k.bind.events(),!k.exists()&&u.preserve&&k.create(),u.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),C=k,p.data(r,C)},observeChanges:function(){"MutationObserver"in j&&((e=new MutationObserver(k.event.documentChanged)).observe(N,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){u.popup?c=q(u.popup).eq(0):u.inline&&(c=v.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=k.get.offsetParent(),c.removeClass(d.loading),u.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=u.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&&!u.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),p.removeData(r)},event:{start:function(e){var t=q.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(k.hideTimer),w&&!u.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=q.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){w=!0,u.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==x||0").addClass(d.popup).data(m.activator,p).html(e),u.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(p)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),u.hoverable&&k.bind.popup(),u.onCreate.call(c,x)):u.popup?(q(u.popup).data(m.activator,p),k.verbose("Used popup specified in settings"),k.refresh(),u.hoverable&&k.bind.popup()):0!==v.next(i.popup).length?(k.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(i.popup).data(m.activator,p),k.refresh(),u.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",x)},createID:function(){n=(Math.random().toString(16)+"000000000").substr(2,8),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",u.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===u.onShow.call(c,x)?k.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),u.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===u.onHide.call(c,x)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){q(i.popup).filter("."+d.popupVisible).each(function(){q(this).data(m.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?k.has.popup():1<=c.closest(l).length)},removePopup:function(){k.has.popup()&&!u.popup&&(k.debug("Removing popup",c),c.remove(),c=H,u.onRemove.call(c,x))},save:{conditions:function(){k.cache={title:p.attr("title")},k.cache.title&&p.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(p.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.isFunction(e)?e:function(){},u.transition&&q.fn.transition!==H&&p.transition("is supported")?(k.set.visible(),c.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,duration:u.transition.showDuration||u.duration,onComplete:function(){k.bind.close(),e.call(c,x),u.onVisible.call(c,x)}})):k.error(f.noTransition)},hide:function(e){e=q.isFunction(e)?e:function(){},k.debug("Hiding pop-up"),u.transition&&q.fn.transition!==H&&p.transition("is supported")?c.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,onComplete:function(){k.reset(),e.call(c,x),u.onHidden.call(c,x)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return p.removeData(m.html),p.data(m.html)||u.html},title:function(){return p.removeData(m.title),p.data(m.title)||u.title},content:function(){return p.removeData(m.content),p.data(m.content)||u.content||p.attr("title")},variation:function(){return p.removeData(m.variation),p.data(m.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]==j,i=v.offset(),o=u.inline||u.popup&&u.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.get(0)!==s.get(0)&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),u.setFluidWidth&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(j.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?k.is.rtl()?parseInt(j.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(j.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"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.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=(e!==H?e:v)[0].parentNode,n=q(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=q(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0",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",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={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=q.fn.popup.settings.templates.escape;return typeof e!==H&&(typeof e.title!==H&&e.title&&(e.title=n(e.title),t+='