11 lines
No EOL
278 KiB
JavaScript
11 lines
No EOL
278 KiB
JavaScript
/*
|
|
* # 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(M,O,P){"use strict";function I(e){return null!==e&&e===e.window}function R(e){return"function"==typeof e&&"number"!=typeof e.nodeType}O=void 0!==O&&O.Math===Math?O:globalThis,M.fn.api=function(w){var C,e=R(this)?M(O):M(this),k=e.selector||"",T=Date.now(),D=[],S=w,A="string"==typeof S,E=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,r,o,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,d=f.className,u="."+t,p="module-"+t,m=M(this),g=m.closest(l.form),h=f.stateContext?[O,P].indexOf(f.stateContext)<0?M(P).find(f.stateContext):M(f.stateContext):m,v=this,b=h[0],y=m.data(p),x={initialize:function(){A||(o=f.data,x.bind.events()),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),y=x,m.data(p,y)},destroy:function(){x.verbose("Destroying previous module for",v),m.removeData(p).off(u)},bind:{events:function(){var e=x.get.event();e?(x.verbose("Attaching API events to element",e),m.on(e+u,x.event.trigger)):"now"===f.on&&(x.debug("Querying API endpoint immediately"),x.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==O.Storage)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){void 0===O.Storage?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(o||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,a=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",a.url),x.verbose("Using AJAX settings",a),"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,a.method),x.send.request()},f.throttle)):(x.debug("Sending request",e,a.method),x.send.request(),x.timer=setTimeout(function(){},f.throttle)):(x.debug("Sending request",e,a.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<m.filter(l.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return m.is("form")||h.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return m.is("input")},loading:function(){return!!x.request&&"pending"===x.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(x.verbose("XHR request determined to be aborted"),!0):(x.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return x.is.expectingJSON()&&R(f.successTest)?(x.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(x.debug("Response passed success test",e),!0):(x.debug("Response failed success test",e),!1)):(x.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return x.cancelled||!1},successful:function(){return x.request&&"resolved"===x.request.state()},failure:function(){return x.request&&"rejected"===x.request.state()},complete:function(){return x.request&&("resolved"===x.request.state()||"rejected"===x.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(x.debug("Looking for required URL variables",e),M.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),i=M.isPlainObject(a)&&void 0!==a[n]?a[n]:void 0!==m.data(n)?m.data(n):void 0!==h.data(n)?h.data(n):a[n];if(void 0===i)return x.error(c.requiredParameter,n,o),o=!1;x.verbose("Found required variable",n,i),i=f.encodeParameters?x.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t)&&(x.debug("Looking for optional URL variables",e),M.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),i=M.isPlainObject(a)&&void 0!==a[n]?a[n]:void 0!==m.data(n)?m.data(n):void 0!==h.data(n)?h.data(n):a[n];o=void 0!==i?(x.verbose("Optional variable Found",n,i),o.replace(t,i)):(x.verbose("Optional variable not found",n),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))})),o},formData:function(n){var e,i,l,c,d,u={},t="formdata"===f.serializeForm;return n=n||o||f.data,e=M.isPlainObject(n),t?(u=new FormData(g[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(i=g.serializeArray(),l={},c={},d=function(e,t,n){return e[t]=n,e},M.each(M('input[type="file"]',g),function(e,n){M.each(M(n)[0].files,function(e,t){i.push({name:n.name,value:t})})}),M.each(i,function(e,t){if(f.regExp.validate.test(t.name)){var n="checkbox"===M('[name="'+t.name+'"]',g).attr("type"),i=parseFloat(t.value),o=n&&"on"===t.value||"true"===t.value||(String(i)===t.value?i:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],r=t.name.replace(/\[]$/,"");r in l?Array.isArray(c[r])?c[r].push(o):c[r]=[c[r],o]:(l[r]=0,c[r]=o),-1===r.indexOf("[]")&&(o=c[r]);for(;0<a.length;){var s=a.pop();""!==s||Array.isArray(o)?f.regExp.fixed.test(s)?o=d([],s,o):f.regExp.named.test(s)&&(o=d({},s,o)):o=d([],l[r]++,o)}u=M.extend(!0,u,o)}})),n=e?(x.debug("Extending existing data with form data",n,u),t?(M.each(Object.keys(n),function(e,t){u.append(t,n[t])}),u):M.extend(!0,{},n,u)):(x.debug("Adding form data",u),u)}},send:{request:function(){x.set.loading(),x.request=x.create.request(),x.is.mocked()?x.mockedXHR=x.create.mockedXHR():x.xhr=x.create.xhr(),f.onRequest.call(b,x.request,x.xhr)}},event:{trigger:function(e){x.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=Date.now()-r,o=f.loadingDuration-o,a=!!R(f.onResponse)&&(x.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(i,M.extend(!0,{},e)):f.onResponse.call(i,e)),o=0<o?o:0;a&&(x.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&x.debug("Response completed early delaying state change by",o),setTimeout(function(){x.is.validResponse(e)?x.request.resolveWith(i,[e,n]):x.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=Date.now()-r,o=f.loadingDuration-o;0<(o=0<o?o:0)&&x.debug("Response completed early delaying state change by",o),setTimeout(function(){x.is.abortedRequest(e)?x.request.rejectWith(i,[e,"aborted",n]):x.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){x.debug("Successful API Response",e),"local"===f.cache&&n&&(x.write.cachedResponse(n,e),x.debug("Saving server response locally",x.cache)),f.onSuccess.call(b,e,m,t)},complete:function(e,t){var n,i;x.was.successful()?(i=e,n=t):i=x.get.responseFromXHR(n=e),x.remove.loading(),f.onComplete.call(b,i,m,n)},fail:function(e,t,n){var i=x.get.responseFromXHR(e),o=x.get.errorFromRequest(i,t,n);if("aborted"===t)return x.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),f.onAbort.call(b,t,m,e),!0;"invalid"===t?x.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"===t&&void 0!==e&&(x.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&void 0!==n&&""!==n&&x.error(c.statusMessage+n,a.url),f.onError.call(b,o,m,e)),f.errorDuration&&"aborted"!==t&&(x.debug("Adding error state"),x.set.error(),x.should.removeError())&&setTimeout(x.remove.error,f.errorDuration),x.debug("API Request failed",o,e),f.onFailure.call(b,i,m,e)}}},create:{request:function(){return M.Deferred().always(x.event.request.complete).done(x.event.request.done).fail(x.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,n=M.Deferred().always(x.event.xhr.complete).done(x.event.xhr.done).fail(x.event.xhr.fail);return e?(e=R(e)?(x.debug("Using specified synchronous callback",e),e.call(b,i)):(x.debug("Using settings specified response",e),e),n.resolveWith(b,[e,!1,{responseText:e}])):R(t)&&(e=function(e){x.debug("Async callback returned response",e),e?n.resolveWith(b,[e,!1,{responseText:e}]):n.rejectWith(b,[{responseText:e},!1,!1])},x.debug("Using specified async response callback",t),t.call(b,i,e)),n},xhr:function(){var e=M.ajax(a).always(x.event.xhr.always).done(x.event.xhr.done).fail(x.event.xhr.fail);return x.verbose("Created server request",e,a),e}},set:{error:function(){x.verbose("Adding error state to element",h),h.addClass(d.error)},loading:function(){x.verbose("Adding loading state to element",h),h.addClass(d.loading),r=Date.now()}},remove:{error:function(){x.verbose("Removing error state from element",h),h.removeClass(d.error)},loading:function(){x.verbose("Removing loading state from element",h),h.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!M.isPlainObject(e)&&(x.is.expectingJSON()?x.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return M.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==f.error[t]?f.error[t]:n},request:function(){return x.request||!1},xhr:function(){return x.xhr||!1},settings:function(){var e=f.beforeSend.call(m,f);return e&&(void 0!==e.success&&(x.debug("Legacy success callback detected",e),x.error(c.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(x.debug("Legacy failure callback detected",e),x.error(c.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete)&&(x.debug("Legacy complete callback detected",e),x.error(c.legacyParameters,e.complete),e.onComplete=e.complete),void 0===e&&x.error(c.noReturnedValue),!1===e?e:void 0!==e?M.extend(!0,{},e):M.extend(!0,{},f)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),n=O.encodeURIComponent(e);return t!==e?(x.debug("URL value is already encoded, avoiding double encoding",e),e):(x.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return I(v)||(x.is.input()?e.value=m.val():x.is.form()||(e.text=m.text())),e},event:function(){return I(v)||"now"===f.on?(x.debug("API called without element, no events attached"),!1):"auto"===f.on?m.is("input")?void 0!==v.oninput?"input":void 0!==v.onpropertychange?"propertychange":"keyup":m.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||m.data(s.action)||!1,n=f.url||m.data(s.url)||!1)x.debug("Using specified url",n);else if(e){if(x.debug("Looking up url for action",e,f.api),void 0===f.api[e]&&!x.is.mocked())return void x.error(c.missingAction,f.action,f.api);n=f.api[e]}else x.is.form()&&(n=m.attr("action")||h.attr("action")||!1,x.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=x.get.xhr();e&&"resolved"!==e.state()&&(x.debug("Cancelling API request"),e.abort())},reset:function(){x.remove.error(),x.remove.loading()},setting:function(e,t){if(x.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,f,e);else{if(void 0===t)return f[e];M.isPlainObject(f[e])?M.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,f.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),x.verbose.apply(console,arguments)))},error:function(){f.silent||(x.error=Function.prototype.bind.call(console.error,console,f.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=Date.now())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=f.name+":",n=0;T=!1,clearTimeout(x.performance.timer),M.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):M.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||E,t=t||v,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,M.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!M.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:x.error(c.method,i),!1;r=r[t]}}})),R(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(C)?C.push(n):void 0!==C?C=[C,n]:void 0!==n&&(C=n),a}};A?(void 0===y&&x.initialize(),x.invoke(S)):(void 0!==y&&y.invoke("destroy"),x.initialize())}),void 0!==C?C:this},M.api=M.fn.api,M.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(ae,D,S){"use strict";D=void 0!==D&&D.Math===Math?D:globalThis,ae.fn.calendar=function(g){var h,e=ae(this),v=ae(S),b=e.selector||"",y=Date.now(),x=[],w=g,C="string"==typeof w,k=[].slice.call(arguments,1),T={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},oe=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var u,e,X=ae.isPlainObject(g)?ae.extend(!0,{},ae.fn.calendar.settings,g):ae.extend({},ae.fn.calendar.settings),G=X.className,n=X.namespace,i=X.selector,J=X.formatter,_=X.parser,Z=X.metadata,ee=T[X.minTimeGap],l=X.error,t="."+n,o="module-"+n,a=ae(this),r=a.find(i.input),s=a.find(i.activator),c=this,d=a.data(o),te=d&&d.popupId?v.find("#"+d.popupId):a.find(i.popup),f=!1,ne=a.hasClass(G.inverted),p=!1,m=!1,ie={initialize:function(){ie.debug("Initializing calendar for",c,a),u=ie.get.isTouch(),ie.setup.config(),ie.setup.popup(),ie.setup.inline(),ie.setup.input(),ie.setup.date(),ie.create.calendar(),ie.bind.events(),ie.observeChanges(),ie.instantiate()},instantiate:function(){ie.verbose("Storing instance of calendar"),d=ie,a.data(o,d)},destroy:function(){ie.verbose("Destroying previous calendar for",c),a.removeData(o),ie.unbind.events(),ie.disconnect.classObserver()},setup:{config:function(){null!==ie.get.minDate()&&ie.set.minDate(a.data(Z.minDate)),null!==ie.get.maxDate()&&ie.set.maxDate(a.data(Z.maxDate)),ie.setting("type",ie.get.type()),ie.setting("on",X.on||"click")},popup:function(){var e,t;X.inline||0===s.length&&0===(s=a.children().first()).length||(void 0===ae.fn.popup?ie.error(l.popup):((te=0===te.length?X.context?(ie.popupId=n+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),ae("<div/>",{id:ie.popupId}).addClass(G.popup).appendTo(v.find(X.context))):(e=0<(t=s.parent()).closest(i.append).length?"appendTo":"prependTo",ae("<div/>").addClass(G.popup)[e](t)):te).addClass(G.calendar),ne&&te.addClass(G.inverted),e=function(){return ie.refreshTooltips(),X.onVisible.apply(te,arguments)},0===r.length&&(te.attr("tabindex","0"),e=function(){return ie.refreshTooltips(),ie.focus(),X.onVisible.apply(te,arguments)}),t=ie.setting("on"),t=ae.extend({},X.popupOptions,{popup:te,movePopup:!X.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ie.set.focusDate(ie.get.date()),ie.set.mode(ie.get.validatedMode(X.startMode)),X.onShow.apply(te,arguments)},onVisible:e,onHide:X.onHide,onHidden:function(){return ie.blur(),X.onHidden.apply(te,arguments)}}),ie.popup(t)))},inline:function(){0<s.length&&!X.inline||(X.inline=!0,te=ae("<div/>").addClass(G.calendar).appendTo(a),0===r.length&&te.attr("tabindex","0"))},input:function(){X.touchReadonly&&0<r.length&&u&&r.prop("readonly",!0),ie.check.disabled()},date:function(){var e;X.initialDate?e=_.date(X.initialDate,X):void 0!==a.data(Z.date)?e=_.date(a.data(Z.date),X):0<r.length&&(e=_.date(r.val(),X)),ie.set.date(e,X.formatInput,!1),ie.set.mode(ie.get.mode(),!1)}},trigger:{change:function(){var e,t=r[0];t&&(e=S.createEvent("HTMLEvents"),ie.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,V,n=ie.get.mode(),i=new Date,q=ie.get.date(),o=ie.get.focusDate(),a=ie.helper.dateInRange(o||q||_.date(X.initialDate,X)||i),r=(o||ie.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,d="minute"===n,N="time"===X.type,j=Math.max(X.multiMonth,1),H=l?ie.get.monthOffset():0,u=a.getMinutes(),f=a.getHours(),p=a.getDate(),z=a.getMonth()+H,m=a.getFullYear(),g=l?X.showWeekNumbers?8:7:c?4:ee.column,U=l||c?6:ee.row,h=l?j:1,v=(b=te).hasClass("left")?"right center":"left center";for(b.empty(),1<h&&(V=ae("<div/>").addClass(G.grid).appendTo(b)),t=0;t<h;t++){1<h&&(b=ae("<div/>").addClass(G.column).appendTo(V));var b,y=z+t,Y=(new Date(m,y,1).getDay()-X.firstDayOfWeek%7+7)%7,x=(!X.constantHeight&&l&&(x=new Date(m,y+1,0).getDate()+Y,U=Math.ceil(x/7)),r?10:s?1:0),w=l?1:0,C=c||d?1:0,k=c||d?p:1,T=new Date(m-x,y-w,k-C,f),w=new Date(m+x,y+w,k+C,f),k=r?new Date(10*Math.ceil(m/10)-9,0,0):s?new Date(m,0,0):l?new Date(m,y,0):new Date(m,y,p,-1),C=r?new Date(10*Math.ceil(m/10)+1,0,1):s?new Date(m+1,0,1):l?new Date(m,y+1,1):new Date(m,y,p+1),D=n,D=(l&&X.showWeekNumbers&&(D+=" andweek"),ae("<table/>").addClass(G.table).addClass(D).addClass(oe[g]+" column").appendTo(b)),B=(ne&&D.addClass(G.inverted),g);if(!N){var W=ae("<thead/>").appendTo(D),S=ae("<tr/>").appendTo(W),A=ae("<th/>").attr("colspan",""+g).appendTo(S),E=r||s?new Date(m,0,1):l?new Date(m,y,1):new Date(m,y,p,f,u),M=ae("<span/>").addClass(G.link).appendTo(A),E=(M.text(ie.helper.dateFormat(J[n+"Header"],E)),s?X.disableYear?"day":"year":l?X.disableMonth?"year":"month":"day");if(M.data(Z.mode,E),0===t&&((M=ae("<span/>").addClass(G.prev).appendTo(A)).data(Z.focusDate,T),M.toggleClass(G.disabledCell,!ie.helper.isDateInRange(k,n)),ae("<i/>").addClass(G.prevIcon).appendTo(M)),t===h-1&&((E=ae("<span/>").addClass(G.next).appendTo(A)).data(Z.focusDate,w),E.toggleClass(G.disabledCell,!ie.helper.isDateInRange(C,n)),ae("<i/>").addClass(G.nextIcon).appendTo(E)),l)for(S=ae("<tr/>").appendTo(W),X.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(X.text.weekNo),A.addClass(G.weekCell),B--),O=0;O<B;O++)(A=ae("<th/>").appendTo(S)).text(J.dayColumnHeader((O+X.firstDayOfWeek)%7,X))}for(var $=ae("<tbody/>").appendTo(D),O=r?10*Math.ceil(m/10)-9:l?1-Y:0,K=0;K<U;K++)for(S=ae("<tr/>").appendTo($),l&&X.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(ie.get.weekOfYear(m,y,O+1-X.firstDayOfWeek)),A.addClass(G.weekCell)),e=0;e<B;e++,O++){var P,I=r?new Date(O,y,1,f,u):s?new Date(m,O,1,f,u):l?new Date(m,y,O,f,u):c?new Date(m,y,p,O):new Date(m,y,p,f,O*X.minTimeGap),R=r?O:s?X.text.monthsShort[O]:l?I.getDate():ie.helper.dateFormat(J.cellTime,I),R=((A=ae("<td/>").addClass(G.cell).appendTo(S)).text(R),A.data(Z.date,I),l&&I.getMonth()!==(y+12)%12),F=!X.selectAdjacentDays&&R||!ie.helper.isDateInRange(I,n)||X.isDisabled(I,n)||ie.helper.isDisabled(I,n)||!ie.helper.isEnabled(I,n),L=(F?(null!==(L=ie.helper.findDayAsObject(I,n,X.disabledDates))&&L[Z.message]&&(A.attr("data-tooltip",L[Z.message]),A.attr("data-position",L[Z.position]||v),(L[Z.inverted]||ne&&void 0===L[Z.inverted])&&A.attr("data-inverted",""),L[Z.variation])&&A.attr("data-variation",L[Z.variation]),"hour"===n&&null!==(L=ie.helper.findHourAsObject(I,n,X.disabledHours))&&L[Z.message]&&(A.attr("data-tooltip",L[Z.message]),A.attr("data-position",L[Z.position]||v),(L[Z.inverted]||ne&&void 0===L[Z.inverted])&&A.attr("data-inverted",""),L[Z.variation])&&A.attr("data-variation",L[Z.variation])):null!==(P=ie.helper.findDayAsObject(I,n,X.eventDates))&&(A.addClass(P[Z.class]||X.eventClass),P[Z.message])&&(A.attr("data-tooltip",P[Z.message]),A.attr("data-position",P[Z.position]||v),(P[Z.inverted]||ne&&void 0===P[Z.inverted])&&A.attr("data-inverted",""),P[Z.variation])&&A.attr("data-variation",P[Z.variation]),ie.helper.dateEqual(I,q,n)),Q=ie.helper.dateEqual(I,i,n),R=(A.toggleClass(G.adjacentCell,R&&!P),A.toggleClass(G.disabledCell,F),A.toggleClass(G.activeCell,L&&!(R&&F)),c||d||A.toggleClass(G.todayCell,!R&&Q),{mode:n,adjacent:R,disabled:F,active:L,today:Q});J.cell(A,I,R),ie.helper.dateEqual(I,o,n)&&ie.set.focusDate(I,!1,!1)}X.today&&(T=ae("<tr/>").appendTo($),(k=ae("<td/>").attr("colspan",""+g).addClass(G.today).appendTo(T)).text(J.today(X)),k.data(Z.date,i)),ie.update.focus(!1,D),X.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(Z.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||X.selectAdjacentDays&&n)&&!e),ie.helper.isTodayButton(o)||o.toggleClass(G.rangeCell,a&&!t&&!e))})}},refresh:function(){ie.create.calendar()},refreshTooltips:function(){var i=ae(D).width();te.find("td[data-position]").each(function(){var e=ae(this),t=D.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<r.length?(r.on("input"+t,ie.event.inputChange),r.on("focus"+t,ie.event.inputFocus),r.on("blur"+t,ie.event.inputBlur),r):te).on("keydown"+t,ie.event.keydown)}},unbind:{events:function(){ie.debug("Unbinding events"),te.off(t),0<r.length&&r.off(t)}},event:{mouseover:function(e){var t=ae(e.target).data(Z.date),e=1===e.buttons;t&&ie.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<r.length&&e.preventDefault(),f=0<=e.type.indexOf("touch");e=ae(e.target).data(Z.date);e&&ie.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ie.focus(),e.preventDefault(),e.stopPropagation(),f=!1;var t,n,i,e=ae(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!==X.onSelect.call(c,t,ie.get.mode())?(e=e.hasClass(G.today),ie.selectDate(t,e)):n?ie.set.focusDate(n):i&&ie.set.mode(i))},keydown:function(e){var t=e.which;if(9===t&&ie.popup("hide"),ie.popup("is visible")){var n=ie.get.mode();switch(t){case 37:case 38:case 39:case 40:var i="day"===n?7:"hour"===n?4:"minute"===n?ee.column:3,i=37===t?-1:38===t?-i:39===t?1:i,o=(i*="minute"===n?X.minTimeGap:1,ie.get.focusDate()||ie.get.date()||new Date),a=o.getFullYear()+("year"===n?i:0),r=o.getMonth()+("month"===n?i:0),s=o.getDate()+("day"===n?i:0),l=o.getHours()+("hour"===n?i:0),i=o.getMinutes()+("minute"===n?i:0),a=new Date(a,r,s,l,i);"time"===X.type&&(a=ie.helper.mergeDateTime(o,a)),ie.helper.isDateInRange(a,n)&&ie.set.focusDate(a);break;case 13:r=ie.get.focusDate();r&&!X.isDisabled(r,n)&&!ie.helper.isDisabled(r,n)&&ie.helper.isEnabled(r,n)&&!1!==X.onSelect.call(c,r,ie.get.mode())&&ie.selectDate(r),e.preventDefault(),e.stopPropagation();break;case 27:ie.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ie.popup("show"))},inputChange:function(){var e=r.val(),e=_.date(e,X);ie.set.date(e,!1)},inputFocus:function(){te.addClass(G.active)},inputBlur:function(){var e;te.removeClass(G.active),X.formatInput&&(e=ie.get.date(),e=ie.helper.dateFormat(J[X.type],e),r.val(e)),m&&(ie.trigger.change(),m=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ie.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ie.event.class.mutation),ie.debug("Setting up mutation observer",e),ie.observe.class())},disconnect:{classObserver:function(){0<r.length&&e&&e.disconnect()}},observe:{class:function(){0<r.length&&e&&e.observe(a[0],{attributes:!0})}},is:{disabled:function(){return a.hasClass(G.disabled)}},check:{disabled:function(){r.attr("tabindex",ie.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){e=Date.UTC(e,t,n+3)/864e5,t=Math.floor(e/7),n=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(n,0,7)/6048e5)+1},formattedDate:function(e,t){return ie.helper.dateFormat(e||J[X.type],t||ie.get.date())},date:function(){return ie.helper.sanitiseDate(a.data(Z.date))||null},inputDate:function(){return r.val()},focusDate:function(){return a.data(Z.focusDate)||null},startDate:function(){var e=ie.get.calendarModule(X.startCalendar);return(e?e.get.date():a.data(Z.startDate))||null},endDate:function(){var e=ie.get.calendarModule(X.endCalendar);return(e?e.get.date():a.data(Z.endDate))||null},minDate:function(){return a.data(Z.minDate)||null},maxDate:function(){return a.data(Z.maxDate)||null},monthOffset:function(){return a.data(Z.monthOffset)||X.monthOffset||0},mode:function(){var e=a.data(Z.mode)||X.startMode;return ie.get.validatedMode(e)},validatedMode:function(e){var t=ie.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 a.data(Z.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:v.find(e).first()).data(o):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ie.helper.sanitiseDate(e),e=ie.helper.dateInRange(e);var i,o=ie.get.mode(),a=ie.helper.dateFormat(J[X.type],e);return!(n&&!1===X.onBeforeChange.call(c,e,a,o)||(ie.set.focusDate(e),X.isDisabled(e,o)))&&((i=ie.get.endDate())&&e&&i<e&&ie.set.endDate(),ie.set.dataKeyValue(Z.date,e),t&&0<r.length&&r.val(a),void(n&&X.onChange.call(c,e,a,o)))},startDate:function(e,t){e=ie.helper.sanitiseDate(e);var n=ie.get.calendarModule(X.startCalendar);n&&n.set.date(e),ie.set.dataKeyValue(Z.startDate,e,t)},endDate:function(e,t){e=ie.helper.sanitiseDate(e);var n=ie.get.calendarModule(X.endCalendar);n&&n.set.date(e),ie.set.dataKeyValue(Z.endDate,e,t)},focusDate:function(e,t,n,i){e=ie.helper.sanitiseDate(e),e=ie.helper.dateInRange(e);var o="day"===ie.get.mode(),a=ie.get.focusDate(),o=(o&&e&&a&&(o=12*(e.getFullYear()-a.getFullYear())+e.getMonth()-a.getMonth())&&(a=ie.get.monthOffset()-o,ie.set.monthOffset(a,!1)),ie.set.dataKeyValue(Z.focusDate,e,!!e&&t));n=!1!==n&&o&&!1===t||p!=i,p=i,n&&ie.update.focus(i)},minDate:function(e){e=ie.helper.sanitiseDate(e),null!==X.maxDate&&X.maxDate<=e?ie.verbose("Unable to set minDate variable bigger that maxDate variable",e,X.maxDate):(ie.setting("minDate",e),ie.set.dataKeyValue(Z.minDate,e))},maxDate:function(e){e=ie.helper.sanitiseDate(e),null!==X.minDate&&X.minDate>=e?ie.verbose("Unable to set maxDate variable lower that minDate variable",e,X.minDate):(ie.setting("maxDate",e),ie.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max(X.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ie.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ie.set.dataKeyValue(Z.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||X.disableMinute&&"hour"===n||"date"===X.type&&"day"===n||"month"===X.type&&"month"===n||"year"===X.type&&"year"===n?!1!==ie.set.date(e)&&(m=!0,X.closable)&&(ie.popup("hide"),t=ie.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",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<r.length?r:te).trigger("focus")},blur:function(){(0<r.length?r:te).trigger("blur")},helper:{dateFormat:function(e,t){var n,i,o,a,r,s,l,c,d,u;return t instanceof Date?"function"==typeof e?e.call(ie,t,X):(n=t.getDate(),i=t.getMonth(),o=t.getFullYear(),a=t.getDay(),r=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ie.get.weekOfYear(o,i,n+1-X.firstDayOfWeek),c=r%12||12,d=(r<12?X.text.am:X.text.pm).toLowerCase(),u={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:o,YY:String(o).slice(2),YYYY:o,d:a,dd:X.text.dayNamesShort[a].slice(0,2),ddd:X.text.dayNamesShort[a],dddd:X.text.dayNames[a],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:d,A:d.toUpperCase(),S:["th","st","nd","rd"][3<n%10||n%100-n%10==10?0:n%10],w:l,ww:("0"+l).slice(-2)},e.replace(X.regExp.token,function(e){return e in u?u[e]:e.slice(1,-1)})):""},isDisabled:function(i,o){return("day"===o||"month"===o||"year"===o||"hour"===o)&&("day"===o&&-1!==X.disabledDaysOfWeek.indexOf(i.getDay())||X.disabledDates.some(function(e){var t,n=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?n=ie.helper.dateEqual(i,e,o):null!==e&&"object"==typeof e&&(e[Z.year]?"number"==typeof e[Z.year]?n=i.getFullYear()===e[Z.year]:Array.isArray(e[Z.year])&&(n=-1<e[Z.year].indexOf(i.getFullYear())):e[Z.month]?"number"==typeof e[Z.month]?n=i.getMonth()===e[Z.month]:Array.isArray(e[Z.month])?n=-1<e[Z.month].indexOf(i.getMonth()):e[Z.month]instanceof Date&&(t=ie.helper.sanitiseDate(e[Z.month]),n=i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()):e[Z.date]&&"day"===o&&(e[Z.date]instanceof Date?n=ie.helper.dateEqual(i,ie.helper.sanitiseDate(e[Z.date]),o):Array.isArray(e[Z.date])&&(n=e[Z.date].some(function(e){return ie.helper.dateEqual(i,e,o)})))),n})||"hour"===o&&X.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?t=ie.helper.dateEqual(i,e,o):"number"==typeof e?t=i.getHours()===e:null!==e&&"object"==typeof e&&(e[Z.date]&&(e[Z.date]instanceof Date?t=ie.helper.dateEqual(i,ie.helper.sanitiseDate(e[Z.date])):Array.isArray(e[Z.date])&&(t=e[Z.date].some(function(e){return ie.helper.dateEqual(i,e,o)}))),e[Z.days]&&("number"==typeof e[Z.days]?t=i.getDay()===e[Z.days]:Array.isArray(e[Z.days])&&(t=-1<e[Z.days].indexOf(i.getDay()))),e[Z.hours])&&("number"==typeof e[Z.hours]?t=t&&i.getHours()===e[Z.hours]:Array.isArray(e[Z.hours])&&(t=t&&-1<e[Z.hours].indexOf(i.getHours()))),t}))},isEnabled:function(n,i){return"day"!==i||0===X.enabledDates.length||X.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ie.helper.sanitiseDate(e):e)instanceof Date?t=ie.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e&&e[Z.date]&&(t=ie.helper.dateEqual(n,ie.helper.sanitiseDate(e[Z.date]),i)),t})},findDayAsObject:function(t,n,e){if("day"===n||"month"===n||"year"===n)for(var i,o=0;o<e.length;o++){if((i="string"==typeof(i=e[o])?ie.helper.sanitiseDate(i):i)instanceof Date&&ie.helper.dateEqual(t,i,n))return(a={})[Z.date]=i,a;if(null!==i&&"object"==typeof i)if(i[Z.year]){if("number"==typeof i[Z.year]&&t.getFullYear()===i[Z.year])return i;if(Array.isArray(i[Z.year])&&-1<i[Z.year].indexOf(t.getFullYear()))return i}else if(i[Z.month]){if("number"==typeof i[Z.month]&&t.getMonth()===i[Z.month])return i;if(Array.isArray(i[Z.month])){if(-1<i[Z.month].indexOf(t.getMonth()))return i}else if(i[Z.month]instanceof Date){var a=ie.helper.sanitiseDate(i[Z.month]);if(t.getMonth()===a.getMonth()&&t.getFullYear()===a.getFullYear())return i}}else if(i[Z.date]&&"day"===n){if(i[Z.date]instanceof Date&&ie.helper.dateEqual(t,ie.helper.sanitiseDate(i[Z.date]),n))return i;if(Array.isArray(i[Z.date])&&i[Z.date].some(function(e){return ie.helper.dateEqual(t,e,n)}))return i}}return null},findHourAsObject:function(t,n,e){if("hour"===n)for(var i,o=function(e,t){return t[Z.hours]&&("number"==typeof t[Z.hours]&&e.getHours()===t[Z.hours]||Array.isArray(t[Z.hours])&&-1<t[Z.hours].indexOf(e.getHours()))?t:void 0},a=0;a<e.length;a++){if("number"==typeof(i=e[a])&&t.getHours()===i)return null;if(null!==i&&"object"==typeof i)if(i[Z.days]&&o(t,i)){if("number"==typeof i[Z.days]&&t.getDay()===i[Z.days])return i;if(Array.isArray(i[Z.days])&&-1<i[Z.days].indexOf(t.getDay()))return i}else if(i[Z.date]&&o(t,i)){if(i[Z.date]instanceof Date&&ie.helper.dateEqual(t,ie.helper.sanitiseDate(i[Z.date])))return i;if(Array.isArray(i[Z.date])&&i[Z.date].some(function(e){return ie.helper.dateEqual(t,e,n)}))return i}else if(o(t,i))return i}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:_.date(""+e,X))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===X.type,o="year"===(n=n||"day"),a=o||"month"===n,r="minute"===n,n=r||"hour"===n;return e=new Date(i?2e3:e.getFullYear(),i||o?0:e.getMonth(),i||a?1:e.getDate(),n?e.getHours():0,r?X.minTimeGap*Math.floor(e.getMinutes()/X.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||o?0:t.getMonth(),i||a?1:t.getDate(),n?t.getHours():0,r?X.minTimeGap*Math.floor(t.getMinutes()/X.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ie.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var o;return n||i||(n=(o=ie.get.startDate())&&X.minDate?new Date(Math.max(o,X.minDate)):o||X.minDate,i=X.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),X.minTimeGap*Math.ceil(n.getMinutes()/X.minTimeGap)),!(!e||n&&0<ie.helper.dateDiff(e,n,t)||i&&0<ie.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ie.get.startDate())&&X.minDate?new Date(Math.max(i,X.minDate)):i||X.minDate,n=X.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),X.minTimeGap*Math.ceil(t.getMinutes()/X.minTimeGap));var i="time"===X.type;return e&&(t&&0<ie.helper.dateDiff(e,t,"minute")?i?ie.helper.mergeDateTime(e,t):t:n&&0<ie.helper.dateDiff(n,e,"minute")?i?ie.helper.mergeDateTime(e,n):n:e)},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t},isTodayButton:function(e){return e.text()===X.text.today}},setting:function(e,t){if(ie.debug("Changing setting",e,t),ae.isPlainObject(e))ae.extend(!0,X,e);else{if(void 0===t)return X[e];ae.isPlainObject(X[e])?ae.extend(!0,X[e],t):X[e]=t}},internal:function(e,t){if(ae.isPlainObject(e))ae.extend(!0,ie,e);else{if(void 0===t)return ie[e];ie[e]=t}},debug:function(){!X.silent&&X.debug&&(X.performance?ie.performance.log(arguments):(ie.debug=Function.prototype.bind.call(console.info,console,X.name+":"),ie.debug.apply(console,arguments)))},verbose:function(){!X.silent&&X.verbose&&X.debug&&(X.performance?ie.performance.log(arguments):(ie.verbose=Function.prototype.bind.call(console.info,console,X.name+":"),ie.verbose.apply(console,arguments)))},error:function(){X.silent||(ie.error=Function.prototype.bind.call(console.error,console,X.name+":"),ie.error.apply(console,arguments))},performance:{log:function(e){var t,n;X.performance&&(n=(t=Date.now())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(ie.performance.timer),ie.performance.timer=setTimeout(ie.performance.display,500)},display:function(){var e=X.name+":",n=0;y=!1,clearTimeout(ie.performance.timer),ae.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):ae.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=d;return e=e||k,t=t||c,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,ae.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ae.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!ae.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:ie.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};C?(void 0===d&&ie.initialize(),ie.invoke(w)):(void 0!==d&&d.invoke("destroy"),ie.initialize())}),void 0!==h?h:this},ae.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!1,type:"datetime",firstDayOfWeek:0,constantHeight:!0,today:!1,closable:!0,monthFirst:!0,touchReadonly:!0,inline:!1,on:null,initialDate:null,startMode:!1,minDate:null,maxDate:null,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,n){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim().replace(/([./:-])\s+/g,"$1").replace(/\s+([./:-])/g,"$1").replace(/\s+/g," ")).length)return null;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var n,i,o,a=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(a.getDate()))return a;e=e.toLowerCase();var r,s,l,c,d=-1,u=-1,f=-1,p=-1,m=-1,a="time"===t.type,g=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!g)for(r=0<=ae.inArray(t.text.am.toLowerCase(),h)||!(0<=ae.inArray(t.text.pm.toLowerCase(),h))&&void 0,n=0;n<v.length;n++)if(0<=(l=v[n]).indexOf(":")){if(u<0||d<0)for(c=l.split(":"),o=0;o<Math.min(2,c.length);o++)i=parseInt(c[o],10),isNaN(i)&&(i=0),0===o?u=i%24:d=i%60;v.splice(n,1)}if(!a){for(n=0;n<h.length;n++)if(!((s=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].slice(0,s.length).toLowerCase()===s){p=i+1;break}if(0<=p)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(p<0)for(n=0;n<v.length;n++)if(o=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[o],10),!isNaN(i)&&1<=i&&i<=12){p=i,v.splice(o,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&1<=i&&i<=31){f=i,v.splice(n,1);break}if(m<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n],10),!isNaN(i)){i<=99&&(i+=t.currentCentury),m=i,v.splice(n,1);break}}if(!g){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(d<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n],10),!isNaN(i)&&0<=i&&i<=59){d=i,v.splice(n,1);break}}if(d<0&&u<0&&f<0&&p<0&&m<0)return null;d<0&&(d=0),u<0&&(u=0),f<0&&(f=1),p<0&&(p=1),m<0&&(m=(new Date).getFullYear()),void 0!==r&&(r?12===u&&(u=0):u<12&&(u+=12));e=new Date(m,p-1,f,u,d);return e.getMonth()===p-1&&e.getFullYear()===m||(e=new Date(m,p,0,u,d)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,n){return!0},onChange:function(e,t,n){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},onSelect:function(e,t){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input",append:".inline.field,.inline.fields"},regExp:{dateWords:/[^A-Za-z\u00C0-\u024F]+/g,dateNumbers:/[^\d:]+/g,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[ASYa]|"[^"]*"|'[^']*'/g},error:{popup:"UI Popup, a required component is not included in this page",method:"The method you called is not defined."},className:{calendar:"calendar",active:"active",popup:"ui popup",grid:"ui equal width grid",column:"column",table:"ui celled center aligned unstackable table",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document),function(D,S,A){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}S=void 0!==S&&S.Math===Math?S:globalThis,D.fn.checkbox=function(d){var u,e=D(this),f=e.selector||"",x=Date.now(),w=[],C=d,k="string"==typeof C,T=[].slice.call(arguments,1);return e.each(function(){var e,p=D.extend(!0,{},D.fn.checkbox.settings,d),t=p.className,n=p.namespace,m=p.selector,s=p.error,i="."+n,o="module-"+n,g=D(this),a=D(this).children(m.label),h=D(this).children(m.input),v=h[0],r=!1,b=!1,l=g.data(o),c=this,y={initialize:function(){y.verbose("Initializing checkbox",p),y.create.label(),y.bind.events(),y.set.tabbable(),y.hide.input(),y.observeChanges(),y.instantiate(),y.setup()},instantiate:function(){y.verbose("Storing instance of module",y),l=y,g.data(o,y)},destroy:function(){y.verbose("Destroying module"),y.unbind.events(),y.show.input(),g.removeData(o)},fix:{reference:function(){g.is(m.input)&&(y.debug("Behavior called on <input> adjusting invoked element"),g=g.closest(m.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(m.label),h=g.children(m.input),v=h[0]},hide:{input:function(){y.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying <input> 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=E(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):y.error(s.notFound)},preventDefaultOnInputTarget:function(){void 0!==event&&null!==event&&D(event.target).is(m.input)&&(y.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){y.should.ignoreCallbacks()||p.onChange.call(v)},click:function(e){var t=D(e.target);t.is(m.input)?y.verbose("Using default check action on initialized checkbox"):t.is(m.link)?y.debug("Clicking link inside checkbox, skipping toggle"):(y.toggle(),h.trigger("focus"),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,o=27,a=37,r=38,s=39,l=40,c=y.get.radios(),d=c.index(g),u=c.length,f=!1;if(t===a||t===r?f=(0===d?u:d)-1:t!==s&&t!==l||(f=d===u-1?0:d+1),!y.should.ignoreCallbacks()&&!1!==f){if(!1===p.beforeUnchecked.apply(v))return y.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===p.beforeChecked.apply(D(c[f]).children(m.input)[0]))return y.verbose("Next option should not allow check, cancelling key navigation"),!1}b=!1,t===o?(y.verbose("Escape key pressed blurring field"),h.trigger("blur"),b=!0,e.stopPropagation()):!e.ctrlKey&&y.can.change()&&(t===i||t===n&&p.enableEnterKey?(y.verbose("Enter/space key pressed, toggling checkbox"),y.toggle(),b=!0):g.is(".toggle, .slider")&&!y.is.radio()&&(t===a&&y.is.checked()?(y.uncheck(),b=!0):t===s&&y.is.unchecked()&&(y.check(),b=!0)))},keyup:function(e){b&&e.preventDefault()}},check:function(){y.should.allowCheck()&&(y.debug("Checking checkbox",h),y.set.checked(),y.should.ignoreCallbacks()||(p.onChecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},uncheck:function(){y.should.allowUncheck()&&(y.debug("Unchecking checkbox"),y.set.unchecked(),y.should.ignoreCallbacks()||(p.onUnchecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},indeterminate:function(){y.should.allowIndeterminate()?y.debug("Checkbox is already indeterminate"):(y.debug("Making checkbox indeterminate"),y.set.indeterminate(),y.should.ignoreCallbacks()||(p.onIndeterminate.call(v),y.trigger.change()))},determinate:function(){y.should.allowDeterminate()?y.debug("Checkbox is already determinate"):(y.debug("Making checkbox determinate"),y.set.determinate(),y.should.ignoreCallbacks()||(p.onDeterminate.call(v),y.trigger.change()))},enable:function(){y.is.enabled()?y.debug("Checkbox is already enabled"):(y.debug("Enabling checkbox"),y.set.enabled(),y.should.ignoreCallbacks()||(p.onEnable.call(v),p.onEnabled.call(v)))},disable:function(){y.is.disabled()?y.debug("Checkbox is already disabled"):(y.debug("Disabling checkbox"),y.set.disabled(),y.should.ignoreCallbacks()||(p.onDisable.call(v),p.onDisabled.call(v)))},get:{radios:function(){var e=y.get.name();return D('input[name="'+e+'"]').closest(m.checkbox)},otherRadios:function(){return y.get.radios().not(g)},name:function(){return h.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return h.hasClass(t.radio)||"radio"===h.attr("type")},indeterminate:function(){return void 0!==h.prop("indeterminate")&&h.prop("indeterminate")},checked:function(){return void 0!==h.prop("checked")&&h.prop("checked")},disabled:function(){return void 0!==h.prop("disabled")&&h.prop("disabled")},enabled:function(){return!y.is.disabled()},determinate:function(){return!y.is.indeterminate()},unchecked:function(){return!y.is.checked()}},should:{allowCheck:function(){return y.is.determinate()&&y.is.checked()&&!y.is.initialLoad()?(y.debug("Should not allow check, checkbox is already checked"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeChecked.apply(v)&&(y.debug("Should not allow check, beforeChecked cancelled"),1))},allowUncheck:function(){return y.is.determinate()&&y.is.unchecked()&&!y.is.initialLoad()?(y.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeUnchecked.apply(v)&&(y.debug("Should not allow uncheck, beforeUnchecked cancelled"),1))},allowIndeterminate:function(){return y.is.indeterminate()&&!y.is.initialLoad()?(y.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeIndeterminate.apply(v)&&(y.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),1))},allowDeterminate:function(){return y.is.determinate()&&!y.is.initialLoad()?(y.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeDeterminate.apply(v)&&(y.debug("Should not allow determinate, beforeDeterminate cancelled"),1))},ignoreCallbacks:function(){return r&&!p.fireOnInit}},can:{change:function(){return!(g.hasClass(t.disabled)||g.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof p.uncheckable?p.uncheckable:!y.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){y.verbose("Setting class to checked"),g.removeClass(t.indeterminate).addClass(t.checked),y.is.radio()&&y.uncheckOthers(),!y.is.indeterminate()&&y.is.checked()?y.debug("Input is already checked, skipping input property change"):(y.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){y.verbose("Removing checked class"),g.removeClass(t.indeterminate).removeClass(t.checked),!y.is.indeterminate()&&y.is.unchecked()?y.debug("Input is already unchecked"):(y.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){y.verbose("Setting class to indeterminate"),g.addClass(t.indeterminate),y.is.indeterminate()?y.debug("Input is already indeterminate, skipping input property change"):(y.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){y.verbose("Removing indeterminate class"),g.removeClass(t.indeterminate),y.is.determinate()?y.debug("Input is already determinate, skipping input property change"):(y.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){y.verbose("Setting class to disabled"),g.addClass(t.disabled),y.is.disabled()?y.debug("Input is already disabled, skipping input property change"):(y.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){y.verbose("Removing disabled class"),g.removeClass(t.disabled),y.is.enabled()?y.debug("Input is already enabled, skipping input property change"):(y.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){y.verbose("Adding tabindex to checkbox"),void 0===h.attr("tabindex")&&h.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e,t=h[0];t&&(e=A.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(m.label).length?(h.prev(m.label).detach().insertAfter(h),y.debug("Moving existing label",a)):y.has.label()||(a=D("<label>").insertAfter(h),y.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){y.verbose("Attaching checkbox events"),g.on("click"+i,y.event.click).on("change"+i,y.event.change).on("keydown"+i,m.input,y.event.keydown).on("keyup"+i,m.input,y.event.keyup)}},unbind:{events:function(){y.debug("Removing events"),g.off(i)}},uncheckOthers:function(){var e=y.get.otherRadios();y.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){y.can.change()?y.is.indeterminate()||y.is.unchecked()?(y.debug("Currently unchecked"),y.check()):y.is.checked()&&y.can.uncheck()&&(y.debug("Currently checked"),y.uncheck()):y.is.radio()||y.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(y.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,p,e);else{if(void 0===t)return p[e];D.isPlainObject(p[e])?D.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,y,e);else{if(void 0===t)return y[e];y[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,p.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),y.verbose.apply(console,arguments)))},error:function(){p.silent||(y.error=Function.prototype.bind.call(console.error,console,p.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=Date.now())-(x||t),x=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=p.name+":",n=0;x=!1,clearTimeout(y.performance.timer),D.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):D.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||T,t=t||c,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,D.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(D.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!D.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:y.error(s.method,i),!1;r=r[t]}}})),E(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(u)?u.push(n):void 0!==u?u=[u,n]:void 0!==n&&(u=n),a}};k?(void 0===l&&y.initialize(),y.invoke(C)):(void 0!==l&&l.invoke("destroy"),y.initialize())}),void 0!==u?u:this},D.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!1,performance:!0,uncheckable:"auto",fireOnInit:!1,enableEnterKey:!0,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(k,e,T){"use strict";function D(e){return"function"==typeof e&&"number"!=typeof e.nodeType}void 0!==e&&e.Math===Math||globalThis,k.fn.dimmer=function(g){var h,v=k(this),b=Date.now(),y=[],x=g,w="string"==typeof x,C=[].slice.call(arguments,1);return v.each(function(){var o,t,a=k.isPlainObject(g)?k.extend(!0,{},k.fn.dimmer.settings,g):k.extend({},k.fn.dimmer.settings),n=a.selector,e=a.namespace,i=a.className,s=a.error,r="."+e,l="module-"+e,c=v.selector||"",d="ontouchstart"in T.documentElement?"touchstart":"click",u=k(this),f=this,p=u.data(l),m={preinitialize:function(){o=m.is.dimmer()?(t=u.parent(),u):(t=u,m.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):m.create())},initialize:function(){m.debug("Initializing dimmer",a),m.bind.events(),m.set.dimmable(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),p=m,u.data(l,p)},destroy:function(){m.verbose("Destroying previous module",o),m.unbind.events(),m.remove.variation(),t.off(r)},bind:{events:function(){"hover"===a.on?t.on("mouseenter"+r,m.show).on("mouseleave"+r,m.hide):"click"===a.on&&t.on(d+r,m.toggle),m.is.page()&&(m.debug("Setting as a page dimmer",t),m.set.pageDimmer()),m.is.closable()&&(m.verbose("Adding dimmer close event",o),t.on(d+r,n.dimmer,m.event.click))}},unbind:{events:function(){u.removeData(l),t.off(r)}},event:{click:function(e){m.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!k(e.target).is(n.content)||(m.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);m.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=k(a.template.dimmer(a));return a.dimmerName&&(m.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=D(e)?e:function(){},m.is.dimmed()&&!m.is.animating()||!m.is.enabled()?m.debug("Dimmer is already shown or disabled"):!1===a.onShow.call(f)?m.verbose("Show callback returned false cancelling dimmer show"):(m.debug("Showing dimmer",o,a),m.set.variation(),m.animate.show(e),a.onChange.call(f))},hide:function(e){e=D(e)?e:function(){},m.is.dimmed()||m.is.animating()?!1===a.onHide.call(f)?m.verbose("Hide callback returned false cancelling dimmer hide"):(m.debug("Hiding dimmer",o),m.animate.hide(e),a.onChange.call(f)):m.debug("Dimmer is not visible")},toggle:function(){m.verbose("Toggling dimmer visibility",o),m.is.dimmed()?m.is.closable()&&m.hide():m.show()},animate:{show:function(e){e=D(e)?e:function(){},a.useCSS&&void 0!==k.fn.transition?((a.useFlex?(m.debug("Using flex dimmer"),m.remove):(m.debug("Using legacy non-flex dimmer"),m.set)).legacy(),"auto"!==a.opacity&&m.set.opacity(),o.transition({debug:a.debug,verbose:a.verbose,silent:a.silent,displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:m.get.duration(),useFailSafe:!0,onStart:function(){m.set.dimmed()},onComplete:function(){m.set.active(),a.onVisible.call(o),e()}})):(m.verbose("Showing dimmer animation with javascript"),m.set.dimmed(),"auto"===a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(m.get.duration(),a.opacity,function(){o.removeAttr("style"),m.set.active(),a.onVisible.call(o),e()}))},hide:function(e){e=D(e)?e:function(){},a.useCSS&&void 0!==k.fn.transition?(m.verbose("Hiding dimmer with css"),o.transition({debug:a.debug,verbose:a.verbose,silent:a.silent,displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:m.get.duration(),useFailSafe:!0,onComplete:function(){m.remove.dimmed(),m.remove.variation(),m.remove.active(),a.onHidden.call(o),e()}})):(m.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(m.get.duration(),function(){m.remove.dimmed(),m.remove.active(),o.removeAttr("style"),a.onHidden.call(o),e()}))}},get:{dimmer:function(){return o},duration:function(){return m.is.active()?a.transition.hideDuration||a.duration.hide||a.duration:a.transition.showDuration||a.duration.show||a.duration}},has:{dimmer:function(){return a.dimmerName?0<u.find(n.dimmer).filter("."+a.dimmerName).length:0<u.find(n.dimmer).length}},is:{active:function(){return o.hasClass(i.active)},animating:function(){return o.is(":animated")||o.hasClass(i.animating)},closable:function(){return"auto"===a.closable?"hover"!==a.on:a.closable},dimmer:function(){return u.hasClass(i.dimmer)},dimmable:function(){return u.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!m.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return o.hasClass(i.pageDimmer)}},can:{show:function(){return!o.hasClass(i.disabled)}},set:{opacity:function(e){var t=o.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===a.opacity?0:a.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",m.debug("Setting opacity to",e),o.css("background-color",t)},legacy:function(){o.addClass(i.legacy)},active:function(){o.addClass(i.active)},dimmable:function(){t.addClass(i.dimmable)},dimmed:function(){t.addClass(i.dimmed)},pageDimmer:function(){o.addClass(i.pageDimmer)},disabled:function(){o.addClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.addClass(e)}},remove:{active:function(){o.removeClass(i.active)},legacy:function(){o.removeClass(i.legacy)},dimmed:function(){t.removeClass(i.dimmed)},disabled:function(){o.removeClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.removeClass(e)}},setting:function(e,t){if(m.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(void 0===t)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,m,e);else{if(void 0===t)return m[e];m[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,a.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),m.verbose.apply(console,arguments)))},error:function(){a.silent||(m.error=Function.prototype.bind.call(console.error,console,a.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(m.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=p;return e=e||C,t=t||f,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,k.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!k.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:m.error(s.method,i),!1;r=r[t]}}})),D(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),a}};m.preinitialize(),w?(void 0===p&&m.initialize(),m.invoke(x)):(void 0!==p&&p.invoke("destroy"),m.initialize())}),void 0!==h?h:this},k.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",onChange:function(){},onShow:function(){},onHide:function(){},onVisible:function(){},onHidden:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=k("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=k("<div/>").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){"use strict";function ne(e){return"function"==typeof e&&"number"!=typeof e.nodeType}ee=void 0!==ee&&ee.Math===Math?ee:globalThis,Z.fn.dropdown=function(Y){var B,W=Z(this),$=Z(te),K=W.selector||"",Q=Date.now(),X=[],G=Y,J="string"==typeof G,_=[].slice.call(arguments,1);return W.each(function(V){var f,e,t,n,i,o,a,r,s,p=Z.isPlainObject(Y)?Z.extend(!0,{},Z.fn.dropdown.settings,Y):Z.extend({},Z.fn.dropdown.settings),g=p.className,m=p.message,l=p.fields,h=p.keys,v=p.metadata,q=p.namespace,c=p.regExp,b=p.selector,d=p.error,N=p.templates,u="."+q,y="module-"+q,x=Z(this),w=[ee,te].indexOf(p.context)<0?$.find(p.context):Z(p.context),C=x.find(b.text),k=x.find(b.search),T=x.find(b.sizer),D=x.find(b.input),j=x.find(b.icon),H=x.find(b.clearIcon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),M=p.hideDividers?E.parent().children(b.divider):Z(),O=!1,z=!1,U=!1,P=!1,I=this,R=!1,F=x.data(y),L={initialize:function(){L.debug("Initializing dropdown",p),L.is.alreadySetup()?L.setup.reference():(p.ignoreDiacritics&&!String.prototype.normalize&&(p.ignoreDiacritics=!1,L.error(d.noNormalize,I)),L.create.id(),L.setup.layout(),p.values&&(L.set.initialLoad(),L.change.values(p.values),L.remove.initialLoad()),L.refreshData(),L.save.defaults(),L.restore.selected(),L.bind.events(),L.observeChanges(),L.instantiate())},instantiate:function(){L.verbose("Storing instance of dropdown",L),F=L,x.data(y,L)},destroy:function(){L.verbose("Destroying previous dropdown",x),L.remove.tabbable(),L.remove.active(),A.transition("stop all"),A.removeClass(g.visible).addClass(g.hidden),x.off(u).removeData(y),A.off(u),$.off(i),L.disconnect.menuObserver(),L.disconnect.selectObserver(),L.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ee&&(a=new MutationObserver(L.event.select.mutation),r=new MutationObserver(L.event.menu.mutation),s=new MutationObserver(L.event.class.mutation),L.debug("Setting up mutation observer",a,r,s),L.observe.select(),L.observe.menu(),L.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){a&&a.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){L.has.input()&&a&&a.observe(x[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){L.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){L.has.search()&&s&&s.observe(x[0],{attributes:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),i="."+o,L.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i;return!!(e=e||L.get.userValues())&&(e=Array.isArray(e)?e:[e],Z.each(e,function(e,t){!1===L.get.item(t)&&(i=p.templates.addition(L.add.variables(m.addResult,t)),i=Z("<div />").html(i).attr("data-"+v.value,t).attr("data-"+v.text,t).addClass(g.addition).addClass(g.item),p.hideAdditions&&i.addClass(g.hidden),n=void 0===n?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("<div />").addClass(g.menu).appendTo(x)},sizer:function(){T=Z("<span />").addClass(g.sizer).insertAfter(k)}},search:function(e){e=void 0!==e?e:L.get.query(),L.verbose("Searching for query",e),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",p.onSearch):L.has.minCharacters(e)&&!1!==p.onSearch.call(I,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(g.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<t.length?(L.verbose("Moving selection to",t),t):(L.verbose("Moving selection to",e),e)).addClass(g.selected)}},setup:{api:function(){var e={debug:p.debug,urlData:{value:L.get.value(),query:L.get.query()},on:!1};L.verbose("First request, initializing API"),x.api(e)},layout:function(){var e;x.is("select")&&(L.setup.select(),L.setup.returnedObject()),L.has.menu()||L.create.menu(),L.is.clearable()&&!L.has.clearItem()&&(L.verbose("Adding clear icon"),H=Z("<i />").addClass("remove icon").insertBefore(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),e=x.prev("label"),k=Z("<input />").addClass(g.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off"),0<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(),p.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("<div />").attr("class",D.attr("class")).addClass(g.selection).addClass(g.dropdown).html(N.dropdown(e,l,p.preserveHTML,p.className)).insertBefore(D),D.hasClass(g.multiple)&&!1===D.prop("multiple")&&(L.error(d.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&L.set.multiple(),D.prop("disabled")&&(L.debug("Disabling dropdown"),x.addClass(g.disabled)),D.is("[required]")&&(p.forceSelection=!0),p.allowTab||D.removeAttr("tabindex"),D.prop("required",!1).removeAttr("class").detach().prependTo(x)),L.refresh()},menu:function(e){A.html(N.menu(e,l,p.preserveHTML,p.className)),E=A.find(b.item),M=p.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),F=x.data(y),I=x[0],L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=W.slice(0,V),t=W.slice(V+1);W=e.add(x).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(b.item),M=p.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),j=x.find(b.icon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),M=p.hideDividers?E.parent().children(b.divider):Z()},refreshData:function(){L.verbose("Refreshing cached metadata"),E.removeData(v.text).removeData(v.value)},clearData:function(){L.verbose("Clearing metadata"),E.removeData(v.text).removeData(v.value),x.removeData(v.defaultText).removeData(v.defaultValue).removeData(v.placeholderText)},clearItems:function(){A.empty(),L.refreshItems()},toggle:function(){L.verbose("Toggling menu visibility"),L.is.active()?L.hide():L.show()},show:function(e,t){if(e=ne(e)?e:function(){},(R||P)&&L.is.remote()&&L.is.noApiCache()&&L.clearItems(),!L.can.show()&&L.is.remote()&&(L.debug("No API results retrieved, searching before show"),L.queryRemote(L.get.query(),L.show,[e,t])),L.can.show()&&!L.is.active()){if(L.debug("Showing dropdown"),!L.has.message()||L.has.maxSelections()||L.has.allResultsFiltered()||L.remove.message(),L.is.allFiltered())return!0;!1!==p.onShow.call(I)&&(L.remove.empty(),L.animate.show(function(){L.bind.intent(),L.has.search()&&!t&&L.focusSearch(),L.set.visible(),e.call(I)}))}},hide:function(e,t){var n;e=ne(e)?e:function(){},L.is.active()&&!L.is.animatingOutward()?(L.debug("Hiding dropdown"),!1!==p.onHide.call(I)&&(L.animate.hide(function(){L.remove.visible(),L.is.focusedOnSearch()&&!0!==t&&k.trigger("blur"),e.call(I)}),0<(n=x.find(b.menu)).length)&&(L.verbose("Hiding sub-menu",n),n.each(function(){L.animate.hide(!1,Z(this))}))):L.unbind.intent(),R=P=!1},hideOthers:function(){L.verbose("Finding other dropdowns to hide"),W.not(x).has(b.menu+"."+g.visible).dropdown("hide")},hideMenu:function(){L.verbose("Hiding menu instantaneously"),L.remove.active(),L.remove.visible(),A.transition("destroy").transition("hide")},hideSubMenus:function(){var e=A.children(b.item).find(b.menu);L.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){L.bind.keyboardEvents(),L.bind.inputEvents(),L.bind.mouseEvents()},keyboardEvents:function(){L.verbose("Binding keyboard events"),x.on("keydown"+u,L.event.keydown),L.has.search()&&x.on(L.get.inputEvent()+u,b.search,L.event.input),L.is.multiple()&&$.on("keydown"+i,L.event.document.keydown)},inputEvents:function(){L.verbose("Binding input change events"),x.on("change"+u,b.input,L.event.change),L.is.multiple()&&L.is.searchSelection()&&x.on("paste"+u,b.search,L.event.paste)},mouseEvents:function(){L.verbose("Binding mouse events"),L.is.multiple()&&x.on("click"+u,b.label,L.event.label.click).on("click"+u,b.remove,L.event.remove.click),L.is.searchSelection()?(x.on("mousedown"+u,L.event.mousedown).on("mouseup"+u,L.event.mouseup).on("mousedown"+u,b.menu,L.event.menu.mousedown).on("mouseup"+u,b.menu,L.event.menu.mouseup).on("click"+u,b.icon,L.event.icon.click).on("click"+u,b.clearIcon,L.event.clearIcon.click).on("focus"+u,b.search,L.event.search.focus).on("click"+u,b.search,L.event.search.focus).on("blur"+u,b.search,L.event.search.blur).on("click"+u,b.text,L.event.text.focus),L.is.multiple()&&x.on("click"+u,L.event.click).on("click"+u,L.event.search.focus)):("click"===p.on?x.on("click"+u,b.icon,L.event.icon.click).on("click"+u,L.event.test.toggle):"hover"===p.on?x.on("mouseenter"+u,L.delay.show).on("mouseleave"+u,L.delay.hide).on("touchstart"+u,L.event.test.toggle).on("touchstart"+u,b.icon,L.event.icon.click):x.on(p.on+u,L.toggle),x.on("mousedown"+u,L.event.mousedown).on("mouseup"+u,L.event.mouseup).on("focus"+u,L.event.focus).on("click"+u,b.clearIcon,L.event.clearIcon.click),L.has.menuSearch()?x.on("blur"+u,b.search,L.event.search.blur):x.on("blur"+u,L.event.blur)),A.on("mouseenter"+u,b.item,L.event.item.mouseenter).on("touchstart"+u,b.item,L.event.item.mouseenter).on("mouseleave"+u,b.item,L.event.item.mouseleave).on("click"+u,b.item,L.event.item.click)},intent:function(){L.verbose("Binding hide intent event to document"),$.on("click"+i,L.event.test.hide)}},unbind:{intent:function(){L.verbose("Removing hide intent event from document"),$.off("click"+i)}},filter:function(e){function t(){L.is.multiple()&&L.filterActive(),(e||!e&&0===L.get.activeItem().length)&&L.select.firstUnfiltered(),L.has.allResultsFiltered()?p.onNoResults.call(I,n)?p.allowAdditions?p.hideAdditions&&(L.verbose("User addition with no menu, setting empty style"),L.set.empty(),L.hideMenu()):(L.verbose("All items filtered, showing message",n),L.add.message(m.noResults)):(L.verbose("All items filtered, hiding dropdown",n),L.set.empty(),L.hideMenu()):(L.remove.empty(),L.remove.message()),p.allowAdditions&&L.add.userSuggestion(L.escape.htmlEntities(e)),L.is.searchSelection()&&L.can.show()&&L.is.focusedOnSearch()&&!L.is.empty()&&L.show()}var n=void 0!==e?e:L.get.query();p.useLabels&&L.has.maxSelections()||(p.apiSettings?L.can.useAPI()?L.queryRemote(n,function(){p.filterRemoteData&&L.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(p.delimiter):[]),L.is.multiple()&&Z.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(g.filtered)}),L.focusSearch(!0),t()}):L.error(d.noAPI):(L.filterItems(n),t()))},queryRemote:function(e,a,r){Array.isArray(r)||(r=[r]);var e={errorDuration:!1,cache:"local",throttle:p.throttle,urlData:{query:e}},t={onError:function(e,t,n){L.add.message(m.serverError),R=P=!1,a.apply(null,r),"function"==typeof p.apiSettings.onError&&p.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){L.add.message(m.serverError),R=P=!1,a.apply(null,r),"function"==typeof p.apiSettings.onFailure&&p.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){var i=e[l.remoteValues],o=(Array.isArray(i)||(i=[]),L.remove.message(),{});o[l.values]=i,L.setup.menu(o),0!==i.length||p.allowAdditions?""!==(o=L.is.multiple()?L.get.values():L.get.value())&&(L.verbose("Value(s) present after click icon, select value(s) in items"),L.set.selected(o,null,!0,!0)):L.add.message(m.noResults),R=P=!1,a.apply(null,r),"function"==typeof p.apiSettings.onSuccess&&p.apiSettings.onSuccess.call(this,e,t,n)}};x.api("get request")||L.setup.api(),e=Z.extend(!0,{},e,p.apiSettings,t),x.api("setting",e).api("query")},filterItems:function(e){var n=L.remove.diacritics(void 0!==e?e:L.get.query()),i=null,e=L.escape.string(n),t=(p.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);L.has.query()&&(i=[],L.verbose("Searching for matching values",n),E.each(function(){var e,t=Z(this);return!t.hasClass(g.unfilterable)&&("both"!==p.match&&"text"!==p.match||!(-1!==(e=L.remove.diacritics(String(L.get.choiceText(t,!1)))).search(o)||"exact"===p.fullTextSearch&&L.exactSearch(n,e)||!0===p.fullTextSearch&&L.fuzzySearch(n,e)))&&("both"!==p.match&&"value"!==p.match||!(-1!==(t=L.remove.diacritics(String(L.get.choiceValue(t,e)))).search(o)||"exact"===p.fullTextSearch&&L.exactSearch(n,t)||!0===p.fullTextSearch&&L.fuzzySearch(n,t)))?void 0:(i.push(this),!0)})),L.debug("Showing only matched items",n),L.remove.filteredItem(),i&&E.not(i).addClass(g.filtered),L.has.query()?!0===p.hideDividers?M.addClass(g.hidden):"empty"===p.hideDividers&&M.removeClass(g.hidden).filter(function(){var e=Z(this).nextUntil(b.item);return 0===(0<e.length?e:Z(this)).nextUntil(b.divider).filter(b.item+":not(."+g.filtered+")").length}).addClass(g.hidden):M.removeClass(g.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=p.ignoreSearchCase?e.toLowerCase():e,t=p.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;for(var o=0,a=0;o<i;o++){for(var r=!1,s=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===s){r=!0;break}if(!r)return!1}return!0},exactSearch:function(e,t){return e=p.ignoreSearchCase?e.toLowerCase():e,-1<(t=p.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){p.useLabels&&E.filter("."+g.active).addClass(g.filtered)},focusSearch:function(e){L.has.search()&&!L.is.focusedOnSearch()&&(e?(x.off("focus"+u,b.search),k.trigger("focus"),x.on("focus"+u,b.search,L.event.search.focus)):k.trigger("focus"))},blurSearch:function(){L.has.search()&&k.trigger("blur")},forceSelection:function(){var e=E.not(g.filtered).filter("."+g.selected).eq(0),t=E.not(g.filtered).filter("."+g.active).eq(0),e=0<e.length?e:t,t=0<e.length;p.allowAdditions||t&&!L.is.multiple()?(L.debug("Forcing partial selection to selected item",e),L.event.item.click.call(e,{},!0)):L.remove.searchTerm()},change:{values:function(e){p.allowAdditions||L.clear(),L.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,L.setup.menu(t),Z.each(e,function(e,t){if(!0===t.selected&&(L.debug("Setting initial selection to",t[l.value]),L.set.selected(t[l.value]),!L.is.multiple()))return!1}),L.has.selectInput()&&(L.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),Z.each(e,function(e,t){var n=p.templates.deQuote(t[l.value]),i=p.templates.escape(t[l.name]||"",p.preserveHTML);D.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),L.observe.select())}},event:{paste:function(e){var t,n,i,o,a,r=(e.originalEvent.clipboardData||ee.clipboardData).getData("text").split(p.delimiter),s=[];r.forEach(function(e){!1===L.set.selected(L.escape.htmlEntities(e.trim()),null,!0,!0)&&s.push(e)}),e.preventDefault(),0<s.length&&(t=(r=k[0]).selectionStart,n=r.selectionEnd,i=r.value,a=t+(o=s.join(p.delimiter)).length,k.val(i.slice(0,t)+o+i.slice(n)),r.selectionStart=a,r.selectionEnd=a,L.event.input(e))},change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){p.showOnFocus&&!O&&L.is.hidden()&&!t&&(R=!0,L.show())},blur:function(e){t=te.activeElement===this,O||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection(!0)?n=!0:O=!0},mouseup:function(){L.is.searchSelection(!0)?n=!1:O=!1},click:function(e){Z(e.target).is(x)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){O=!0,L.is.multiple()&&L.remove.activeLabel(),R||L.is.active()||!(p.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(R=!0,L.search())},blur:function(e){t=te.activeElement===this,!L.is.searchSelection(!0)||n||z||t||(p.forceSelection?L.forceSelection():p.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){P=!0,L.has.search()?L.is.active()?L.blurSearch():p.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,p.delay.search)},label:{click:function(e){var t=Z(this),n=x.find(b.label),i=n.filter("."+g.active),o=t.nextAll("."+g.active),a=t.prevAll("."+g.active),o=(0<o.length?t.nextUntil(o):t.prevUntil(a)).add(i).add(t);e.shiftKey?(i.removeClass(g.active),o.addClass(g.active)):e.ctrlKey?t.toggleClass(g.active):(i.removeClass(g.active),t.addClass(g.active)),p.onLabelSelect.apply(this,n.filter("."+g.active)),e.stopPropagation()}},remove:{click:function(e){var t=Z(this).parent();t.hasClass(g.active)?L.remove.activeLabels():L.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=L.is.multiple()?L.show:L.toggle;L.is.bubbledLabelClick(e)||L.is.bubbledIconClick(e)||(L.is.multiple()&&(!L.is.multiple()||L.is.active())||(R=!0),L.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){L.determine.eventInModule(e,L.hide)&&I.id&&Z(e.target).attr("for")===I.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&L.check.disabled()})}},select:{mutation:function(e){L.is.selectMutation(e)&&(L.debug("<select> 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<t.closest(b.addition).length,t=t.is(b.message)||0<t.closest(b.message).length;e||t?(L.debug("Updating item selector cache"),L.refreshItems()):(L.debug("Menu modified, updating selector cache"),L.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=Z(e.target),n=Z(this),i=n.children(b.menu),o=n.siblings(b.item).children(b.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Showing sub-menu",i),Z.each(o,function(){L.animate.hide(!1,Z(this))}),L.animate.show(!1,i)},p.delay.show),e.preventDefault())},mouseleave:function(e){var t=Z(this).find(b.menu);0<t.length&&(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Hiding sub-menu",t),t.each(function(){L.animate.hide(!1,Z(this))})},p.delay.hide))},click:function(e,t){var n=Z(this),e=Z(e&&e.target||""),i=n.find(b.menu),o=L.get.choiceText(n),a=L.get.choiceValue(n,o),r=0<i.length,i=0<i.find(e).length;"input"!==te.activeElement.tagName.toLowerCase()&&Z(te.activeElement).trigger("blur"),i||r&&!p.allowCategorySelection||(L.is.searchSelection()&&(p.allowAdditions&&L.remove.userAddition(),L.remove.filteredItem(),!L.is.visible()&&0<e.length&&L.show(),L.remove.searchTerm(),L.is.focusedOnSearch()||!0===t||L.focusSearch(!0)),p.useLabels||(L.remove.filteredItem(),L.set.scrollPosition(n)),L.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t=e.which;if(L.is.inObject(t,h)){var n=x.find(b.label),i=n.filter("."+g.active),o=(i.data(v.value),n.index(i)),a=n.length,r=0<i.length,s=1<i.length,l=0===o,c=o+1===a,d=L.is.searchSelection(),u=L.is.focusedOnSearch(),f=L.is.focused(),p=u&&0===L.get.caretPosition(!1),m=p&&0!==L.get.caretPosition(!0);if(!d||r||u)switch(t){case h.leftArrow:!f&&!p||r?r&&(e.shiftKey?L.verbose("Adding previous label to selection"):(L.verbose("Selecting previous label"),n.removeClass(g.active)),l&&!s?i.addClass(g.active):i.prev(b.siblingLabel).addClass(g.active).end(),e.preventDefault()):(L.verbose("Selecting previous label"),n.last().addClass(g.active));break;case h.rightArrow:f&&!r&&n.first().addClass(g.active),r&&(e.shiftKey?L.verbose("Adding next label to selection"):(L.verbose("Selecting next label"),n.removeClass(g.active)),c?d?u?n.removeClass(g.active):L.focusSearch():(s?i.next(b.siblingLabel):i).addClass(g.active):i.next(b.siblingLabel).addClass(g.active),e.preventDefault());break;case h.deleteKey:case h.backspace:r?(L.verbose("Removing active labels"),c&&d&&!u&&L.focusSearch(),i.last().next(b.siblingLabel).addClass(g.active),L.remove.activeLabels(i),L.is.visible()||L.show(),e.preventDefault()):!p||m||r||t!==h.backspace||(L.verbose("Removing last label on input backspace"),i=n.last().addClass(g.active),L.remove.activeLabels(i),L.is.visible())||L.show();break;default:i.removeClass(g.active)}}}},keydown:function(e){var t=e.which;if(L.is.inObject(t,h)||e.key===p.delimiter){var n,i=E.not(b.unselectable).filter("."+g.selected).eq(0),o=A.children("."+g.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+g.filtered+")").addBack():A.children(":not(."+g.filtered+")"),a=i.children(b.menu),r=i.closest(b.menu),s=r.hasClass(g.visible)||r.hasClass(g.animating)||0<r.parent(b.menu).length,l=0<a.length,c=0<i.length,d=0<i.not(b.unselectable).length,u=e.key===p.delimiter&&L.is.multiple();if(p.allowAdditions&&(t===h.enter||u)&&(d&&p.hideAdditions&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e)),L.is.searchSelection()&&L.remove.searchTerm(),L.is.multiple())&&e.preventDefault(),L.is.visible()){if(t!==h.enter&&!u||(t===h.enter&&c&&l&&!p.allowCategorySelection?(L.verbose("Pressed enter on unselectable category, opening sub menu"),t=h.rightArrow):d&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection())&&(L.remove.searchTerm(),L.is.multiple())&&k.trigger("focus"),e.preventDefault()),c&&(t===h.leftArrow&&r[0]!==A[0]&&(L.verbose("Left key pressed, closing sub-menu"),L.animate.hide(!1,r),i.removeClass(g.selected),r.closest(b.item).addClass(g.selected),e.preventDefault()),t===h.rightArrow)&&l&&(L.verbose("Right key pressed, opening sub-menu"),L.animate.show(!1,a),i.removeClass(g.selected),a.find(b.item).eq(0).addClass(g.selected),e.preventDefault()),t===h.upArrow){if(n=(c&&s?i.prevAll(b.item+":not("+b.unselectable+")"):E).eq(0),o.index(n)<0)return L.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();L.verbose("Up key pressed, changing active item"),i.removeClass(g.selected),n.addClass(g.selected),L.set.scrollPosition(n),p.selectOnKeydown&&L.is.single()&&!n.hasClass(g.actionable)&&L.set.selectedItem(n),e.preventDefault()}if(t===h.downArrow){if(0===(n=(c&&s?i.nextAll(b.item+":not("+b.unselectable+")"):E).eq(0)).length)return L.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();L.verbose("Down key pressed, changing active item"),E.removeClass(g.selected),n.addClass(g.selected),L.set.scrollPosition(n),p.selectOnKeydown&&L.is.single()&&!n.hasClass(g.actionable)&&L.set.selectedItem(n),e.preventDefault()}t===h.pageUp&&(L.scrollPage("up"),e.preventDefault()),t===h.pageDown&&(L.scrollPage("down"),e.preventDefault()),t===h.escape&&(L.verbose("Escape key pressed, closing dropdown"),L.hide(),e.stopPropagation())}else t!==h.enter&&!u||e.preventDefault(),t!==h.downArrow||L.is.visible()||(L.verbose("Down key pressed, showing dropdown"),L.show(),e.preventDefault())}else L.has.search()||L.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=D[0];t&&(e=te.createEvent("HTMLEvents"),L.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){f=!0,L.verbose("Determining action",p.action),ne(L.action[p.action])?(L.verbose("Triggering preset action",p.action,e,t),L.action[p.action].call(I,e,t,this)):ne(p.action)?(L.verbose("Triggering user action",p.action,e,t),p.action.call(I,e,t,this)):L.error(d.action,p.action),f=!1},eventInModule:function(e,t){var e=Z(e.target),n=0<e.closest(te.documentElement).length,e=0<e.closest(x).length;return t=ne(t)?t:function(){},n&&!e?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=Z(e.target),i=n.closest(b.siblingLabel),e=te.body.contains(e.target),i=0===x.find(i).length||!(L.is.multiple()&&p.useLabels),n=0===n.closest(A).length;return t=ne(t)?t:function(){},e&&i&&n?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,L.can.activate(Z(n))&&(L.set.selected(t,Z(n)),L.is.multiple()||!p.collapseOnActionable&&Z(n).hasClass(g.actionable)||L.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,L.can.activate(Z(n))&&(L.set.value(t,e,Z(n)),L.is.multiple()||!p.collapseOnActionable&&Z(n).hasClass(g.actionable)||L.hideAndClear())},combo:function(e,t,n){L.set.selected(t=void 0!==t?t:e,Z(n)),L.hideAndClear()},hide:function(e,t,n){L.set.value(t,e,Z(n)),L.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return x.data(v.defaultText)},defaultValue:function(){return x.data(v.defaultValue)},placeholderText:function(){return"auto"!==p.placeholder&&"string"==typeof p.placeholder?p.placeholder:x.data(v.placeholderText)||""},text:function(){return p.preserveHTML?C.html():C.text()},query:function(){return String(k.val()).trim()},searchWidth:function(e){return e=void 0!==e?e:k.val(),T.text(e),Math.ceil(T.width()+(L.is.edge()?3:1))},selectionCount:function(){var e=L.get.values();return L.is.multiple()?Array.isArray(e)?e.length:0:""!==L.get.value()?1:0},transition:function(e){return"auto"===p.transition?L.is.upward(e)?"slide up":"slide down":p.transition},userValues:function(){var e=L.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],Z.grep(e,function(e){return!1===L.get.item(e)}))},uniqueArray:function(n){return Z.grep(n,function(e,t){return Z.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=k[0];return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:te.selection?(i.focus(),n=(t=te.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<D.length?D.val():x.data(v.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(e){var t=L.get.value();return""===t?"":!L.has.selectInput()&&L.is.multiple()?"string"==typeof t?(e?t:L.escape.htmlEntities(t)).split(p.delimiter):"":t},remoteValues:function(){var e=L.get.values(),i=!1;return e&&Z.each(e="string"==typeof e?[e]:e,function(e,t){var n=L.read.remoteData(t);L.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=void 0!==t?t:p.preserveHTML,e)return 0<e.find(b.menu).length&&(L.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),void 0!==e.data(v.text)?e.data(v.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||L.get.choiceText(e),!!e&&(void 0!==e.data(v.value)?String(e.data(v.value)):"string"==typeof t?String(p.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=k[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return x.find("option").each(function(){var e=Z(this),t=e.html(),n=e.attr("disabled"),i=void 0!==e.attr("value")?e.attr("value"):t,o=void 0!==e.data(v.text)?e.data(v.text):t,e=e.parent("optgroup");"auto"===p.placeholder&&""===i?a.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:p.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:o,disabled:n}))}),p.placeholder&&"auto"!==p.placeholder&&(L.debug("Setting placeholder value to",p.placeholder),a.placeholder=p.placeholder),p.sortSelect?(!0===p.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===p.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):ne(p.sortSelect)&&s.sort(p.sortSelect),a[l.values]=s,L.debug("Retrieved and sorted values from select",a)):(a[l.values]=s,L.debug("Retrieved values from select",a)),a},activeItem:function(){return E.filter("."+g.active)},selectedItem:function(){var e=E.not(b.unselectable).filter("."+g.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=L.get.item(e),e=L.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,o,a=!1;return n=void 0!==n?n:void 0!==L.get.values()?L.get.values():L.get.text(),e=(o=L.is.multiple()&&Array.isArray(n))?0<n.length:null!=n,i=""===n||!1===n||!0===n||i||!1,e&&E.each(function(){var e=Z(this),t=L.get.choiceText(e),t=L.get.choiceValue(e,t);if(null!=t)if(o)-1!==Z.inArray(L.escape.htmlEntities(String(t)),n.map(String))&&(a=a?a.add(e):e);else if(i){if(L.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return a=e,!0}else if(p.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),L.escape.htmlEntities(String(t))===L.escape.htmlEntities(String(n)))return L.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return x.hasClass("column")?"flex":p.displayType}},check:{maxSelections:function(e){return!p.maxSelections||((e=void 0!==e?e:L.get.selectionCount())>=p.maxSelections?(L.debug("Maximum selection count reached"),p.useLabels&&(E.addClass(g.filtered),L.add.message(m.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();void 0!==e&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){p.allowAdditions&&(p.useLabels||(L.error(d.labels),p.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(),p.apiSettings&&p.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(g.noselection):D.removeClass(g.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(void 0!==ee.Storage)return void 0!==(e=sessionStorage.getItem(e+i))&&e;L.error(d.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!==p.placeholder&&C.hasClass(g.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),x.data(v.placeholderText,e))},remoteData:function(e,t){void 0===ee.Storage?L.error(d.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){L.is.multiple()&&p.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(),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<a.length)?a.eq(i):"up"===e?a.first():a.last();0<i.length&&(L.debug("Scrolling page",e,i),t.removeClass(g.selected),i.addClass(g.selected),p.selectOnKeydown&&L.is.single()&&!i.hasClass(g.actionable)&&L.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=L.is.multiple(),t=L.is.searchSelection(),n=e&&t,t=t?L.get.query():"",i="string"==typeof t&&0<t.length,o=L.get.searchWidth(),t=""!==t;e&&i&&(L.verbose("Adjusting input width",o,p.glyphWidth),k.css("width",o+"px")),i||n&&t?(L.verbose("Hiding placeholder text"),C.addClass(g.filtered)):e&&(!n||t)||(L.verbose("Showing placeholder text"),C.removeClass(g.filtered))},empty:function(){x.addClass(g.empty)},loading:function(){x.addClass(g.loading)},placeholderText:function(e){e=e||L.get.placeholderText(),L.debug("Setting placeholder text",e),L.set.text(e),C.addClass(g.placeholder)},tabbable:function(){L.is.searchSelection()?(L.debug("Added tabindex to searchable dropdown"),k.val(""),L.check.disabled(),A.attr("tabindex",-1)):(L.debug("Added tabindex to dropdown"),void 0===x.attr("tabindex")&&(x.attr("tabindex",D.attr("tabindex")||0),A.attr("tabindex",-1))),D.removeAttr("tabindex")},initialLoad:function(){L.verbose("Setting initial load"),e=!0},activeItem:function(e){p.allowAdditions&&0<e.filter(b.addition).length?e.addClass(g.filtered):e.addClass(g.active)},partialSearch:function(e){var t=L.get.query().length;k.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||L.get.selectedItem()).closest(b.menu),a=e&&0<e.length;t=void 0!==t&&t,0===L.get.activeItem().length&&(t=!1),e&&0<o.length&&a&&(e.position().top,o.addClass(g.loading),e=(a=o.scrollTop())-o.offset().top+e.offset().top,t||(i=a+o.height()<e+5,n=e-5<a),L.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(g.loading))},text:function(e,t){"combo"===p.action?(L.debug("Changing combo button text",e,S),p.preserveHTML?S.html(e):S.text(e)):"activate"===p.action&&(e===L.get.placeholderText()&&!t||C.removeClass(g.placeholder),L.debug("Changing text",e,C),C.removeClass(g.filtered),p.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=L.get.choiceValue(e),n=L.get.choiceText(e,!1),i=L.get.choiceText(e);L.debug("Setting user selection to item",e),L.remove.activeItem(),L.set.partialSearch(n),L.set.activeItem(e),L.set.selected(t,e),L.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+g.selected),i=0<n.length&&L.has.firstLetter(n,e),o=!1;(o=i&&(t=n.nextAll(E).eq(0),L.has.firstLetter(t,e))?t:o)||E.each(function(){if(L.has.firstLetter(Z(this),e))return o=Z(this),!1}),o&&(L.verbose("Scrolling to next value with letter",e),L.set.scrollPosition(o),n.removeClass(g.selected),o.addClass(g.selected),p.selectOnKeydown)&&L.is.single()&&!t.hasClass(g.actionable)&&L.set.selectedItem(o)},direction:function(e){"auto"===p.direction?(e?L.is.upward(e)&&L.remove.upward(e):L.remove.upward(),(L.can.openDownward(e)?L.remove:L.set).upward(e),L.is.leftward(e)||L.can.openRightward(e)||L.set.leftward(e)):"upward"===p.direction&&L.set.upward(e)},upward:function(e){(e||x).addClass(g.upward)},leftward:function(e){(e||A).addClass(g.leftward)},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0),void 0===e||""===e||Array.isArray(e)&&0===e.length?D.addClass(g.noselection):D.removeClass(g.noselection);var o=L.escape.value(e),a=0<D.length,r=L.get.values(),s=void 0!==e?String(e):e;if(a){if(!p.allowReselection&&s==r&&(L.verbose("Skipping value update already same value",e,r),!L.is.initialLoad()))return;L.is.single()&&L.has.selectInput()&&L.can.extendSelect()&&(L.debug("Adding user option",e),L.add.optionValue(e)),L.debug("Updating input value",o,r),U=!0,D.val(o),!1===p.fireOnInit&&L.is.initialLoad()?L.debug("Input native change event ignored on initial load"):!0!==i&&L.trigger.change(),U=!1}else L.verbose("Storing value in metadata",o,D),o!==r&&x.data(v.value,s);!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",p.onChange):!0!==i&&p.onChange.call(I,e,t,n)},active:function(){x.addClass(g.active)},multiple:function(){x.addClass(g.multiple)},visible:function(){x.addClass(g.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),L.debug("Setting selected to exact values"),L.clear(),L.set.selected(e,t,n)},selected:function(e,l,c,d){"boolean"==typeof l&&(d=c,c=l,l=void 0);var u=L.is.multiple();if(!(l=p.allowAdditions?l||L.get.itemWithAdditions(e):l||L.get.item(e)))return!1;L.debug("Setting selected menu item to",l),L.is.multiple()&&L.remove.searchWidth(),L.is.single()?(L.remove.activeItem(),L.remove.selectedItem()):p.useLabels&&L.remove.selectedItem(),l.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t),i=e.hasClass(g.filtered),o=e.hasClass(g.active),a=e.hasClass(g.actionable),r=e.hasClass(g.addition),s=u&&l&&1===l.length;a?(u&&o&&!r||!p.apiSettings||!p.saveRemoteData||L.save.remoteData(t,n),p.onActionable.call(I,n,t,e)):u?!o||r?(p.apiSettings&&p.saveRemoteData&&L.save.remoteData(t,n),p.useLabels?(L.add.value(n,t,e,c),L.add.label(n,t,s),L.set.activeItem(e),L.filterActive(),L.select.nextAvailable(l)):(L.add.value(n,t,e,c),L.set.text(L.add.variables(m.count)),L.set.activeItem(e))):i||!p.useLabels&&!f||(L.debug("Selected active value, removing label"),L.remove.selected(n)):(p.apiSettings&&p.saveRemoteData&&L.save.remoteData(t,n),d||e.hasClass(g.actionable)||L.set.text(t,!0),L.set.value(n,t,e,c),e.addClass(g.active).addClass(g.selected))}),d||L.remove.searchTerm(),L.is.allFiltered()&&(L.set.empty(),L.hideMenu())}},add:{label:function(e,t,n){var i,o=L.is.searchSelection()?k:C,a=L.escape.value(e);p.ignoreCase&&(a=a.toLowerCase()),i=Z("<a />").addClass(g.label).attr("data-"+v.value,a).html(N.label(a,t,p.preserveHTML,p.className)),i=p.onLabelCreate.call(i,a,t),L.has.label(e)?L.debug("User selection already exists, skipping",a):(p.label.variation&&i.addClass(p.label.variation),!0===n&&p.label.transition?(L.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(o).transition({animation:p.label.transition,debug:p.debug,verbose:p.verbose,silent:p.silent,duration:p.label.duration})):(L.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(b.message),e=p.templates.message(L.add.variables(e));0<t.length?t.html(e):Z("<div/>").html(e).addClass(g.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0<D.find('option[value="'+L.escape.string(t)+'"]').length||(L.disconnect.selectObserver(),L.is.single()&&(L.verbose("Removing previous user addition"),D.find("option."+g.addition).remove()),Z("<option/>").prop("value",t).addClass(g.addition).text(e).appendTo(D),L.verbose("Adding user addition as an <option>",e),L.observe.select())},userSuggestion:function(e){var t=A.children(b.addition),n=L.get.item(e),n=n&&0<n.not(b.addition).length,i=0<t.length;p.useLabels&&L.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(v.value,e).data(v.text,e).attr("data-"+v.value,e).attr("data-"+v.text,e).removeClass(g.filtered),p.hideAdditions||(n=p.templates.addition(L.add.variables(m.addResult,e)),t.html(n)),L.verbose("Replacing user suggestion with new value",t)):((t=L.create.userChoice(e)).prependTo(A),L.verbose("Adding item choice to menu corresponding with user choice addition",t)),p.hideAdditions&&!L.is.allFiltered()||t.addClass(g.selected).siblings().removeClass(g.selected),L.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),o=-1!==e.search("{term}");return L.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",L.get.selectionCount())),i&&(e=e.replace("{maxCount}",p.maxSelections)),o&&(n=t||L.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0);var o,a=L.get.values(!0);L.has.value(e)?L.debug("Value already selected"):""===e?L.debug("Cannot select blank values from multiselect"):(o=Array.isArray(a)?(o=n&&n.hasClass(g.actionable)?a:a.concat([e]),L.get.uniqueArray(o)):[e],L.has.selectInput()?L.can.extendSelect()&&(L.debug("Adding value to select",e,o,D),L.add.optionValue(e)):(o=o.join(p.delimiter),L.debug("Setting hidden input to delimited value",o,D)),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping onadd callback on initial load",p.onAdd):p.onAdd.call(I,e,t,n),L.set.value(o,t,n,i),L.check.maxSelections())}},remove:{active:function(){x.removeClass(g.active)},activeLabel:function(){x.find(b.label).removeClass(g.active)},empty:function(){x.removeClass(g.empty)},loading:function(){x.removeClass(g.loading)},initialLoad:function(){e=!1},upward:function(e){(e||x).removeClass(g.upward)},leftward:function(e){(e||A).removeClass(g.leftward)},visible:function(){x.removeClass(g.visible)},activeItem:function(){E.removeClass(g.active)},filteredItem:function(){p.useLabels&&L.has.maxSelections()||((p.useLabels&&L.is.multiple()?E.not("."+g.active):E).removeClass(g.filtered),p.hideDividers&&M.removeClass(g.hidden),L.remove.empty())},optionValue:function(e){var e=L.escape.value(e),t=D.find('option[value="'+L.escape.string(e)+'"]');0<t.length&&t.hasClass(g.addition)&&(L.disconnect.selectObserver(),t.remove(),L.verbose("Removing user addition as an <option>",e),L.observe.select())},message:function(){A.children(b.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){L.verbose("Cleared search term"),k.val(""),L.set.filtered()},userAddition:function(){E.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=p.allowAdditions?t||L.get.itemWithAdditions(e):t||L.get.item(e)))return!1;t.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t);L.is.multiple()?p.useLabels?(L.remove.value(n,t,e,i),L.remove.label(n)):(L.remove.value(n,t,e,i),0===L.get.selectionCount()?L.set.placeholderText():L.set.text(L.add.variables(m.count))):L.remove.value(n,t,e,i),e.removeClass(g.filtered).removeClass(g.active),p.useLabels&&e.removeClass(g.selected)})},selectedItem:function(){E.removeClass(g.selected)},value:function(e,t,n,i){var o,a=L.get.values(!0);L.has.selectInput()?(L.verbose("Input is <select> removing selected option",e),o=L.remove.arrayValue(e,a),L.remove.optionValue(e)):(L.verbose("Removing from delimited values",e),o=(o=L.remove.arrayValue(e,a)).join(p.delimiter)),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",p.onRemove):p.onRemove.call(I,e,t,n),L.set.value(o,t,n,i),L.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=Z.grep(e,function(e){return t!=e}),L.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=L.escape.value(e),e=x.find(b.label).filter("[data-"+v.value+'="'+L.escape.string(p.ignoreCase?e.toLowerCase():e)+'"]');L.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||x.find(b.label).filter("."+g.active),L.verbose("Removing active label selections",e),L.remove.labels(e)},labels:function(e,o){e=e||x.find(b.label),L.verbose("Removing labels",e),e.each(function(){var e=Z(this),t=e.data(v.value),n=void 0!==t?String(t):t,i=L.is.userValue(n);!1===p.onLabelRemove.call(e,t)?L.debug("Label remove callback cancelled removal"):(L.remove.message(),i?(L.remove.value(n,n,L.get.item(n),o),L.remove.label(n)):L.remove.selected(n,!1,o))})},tabbable:function(){(L.is.searchSelection()?(L.debug("Searchable dropdown initialized"),k):(L.debug("Simple selection dropdown initialized"),x)).removeAttr("tabindex"),A.removeAttr("tabindex")},diacritics:function(e){return p.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},has:{menuSearch:function(){return L.has.search()&&0<k.closest(A).length},clearItem:function(){return 0<H.length},search:function(){return 0<k.length},sizer:function(){return 0<T.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return p.minCharacters&&!P?(e=void 0!==e?String(e):String(L.get.query())).length>=p.minCharacters:!(P=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=L.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(b.menu).length},message:function(){return 0<A.children(b.message).length},label:function(e){var e=L.escape.value(e),t=x.find(b.label);return p.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+v.value+'="'+L.escape.string(e)+'"]').length},maxSelections:function(){return p.maxSelections&&L.get.selectionCount()>=p.maxSelections},allResultsFiltered:function(){var e=E.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(b.addition).length},query:function(){return""!==L.get.query()},value:function(e){return p.ignoreCase?L.has.valueIgnoringCase(e):L.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=L.get.values(!0);return!!(Array.isArray(t)?t&&-1!==Z.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=L.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),Z.each(e,function(e,t){if(String(n).toLowerCase()===String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return x.hasClass(g.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return Z(e.target).is("select, input")&&0<x.closest("label").length},bubbledIconClick:function(e){return 0<Z(e.target).closest(j).length},edge:function(){return!!ee.chrome&&!!ee.StyleMedia},empty:function(){return x.hasClass(g.empty)},chrome:function(){return!!ee.chrome&&!ee.StyleMedia},alreadySetup:function(){return x.is("select")&&void 0!==x.parent(b.dropdown).data(y)&&0===x.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):A.transition&&A.transition("is animating")},leftward:function(e){return(e||A).hasClass(g.leftward)},clearable:function(){return x.hasClass(g.clearable)||p.clearable},disabled:function(){return x.hasClass(g.disabled)},focused:function(){return te.activeElement===x[0]},focusedOnSearch:function(){return te.activeElement===k[0]},allFiltered:function(){return(L.is.multiple()||L.has.search())&&!(!p.hideAdditions&&L.has.userSuggestion())&&!L.has.message()&&L.has.allResultsFiltered()},hidden:function(e){return!L.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return Z.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return x.hasClass(g.multiple)},remote:function(){return p.apiSettings&&L.can.useAPI()},noApiCache:function(){return p.apiSettings&&!p.apiSettings.cache},single:function(){return!L.is.multiple()},selectMutation:function(e){var n=!1;return Z.each(e,function(e,t){if(Z(t.target).is("select, option, optgroup")||Z(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return x.hasClass(g.search)},searchSelection:function(e){return L.has.search()&&1===(e?k.parents(b.dropdown):k.parent(b.dropdown)).length},selection:function(){return x.hasClass(g.selection)},userValue:function(e){return-1!==Z.inArray(e,L.get.userValues())},upward:function(e){return(e||x).hasClass(g.upward)},visible:function(e){return(e||A).hasClass(g.visible)},verticallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-X");return"auto"===e||"scroll"===e}},can:{activate:function(e){return p.useLabels||!L.has.maxSelections()||L.has.maxSelections()&&e.hasClass(g.active)},openDownward:function(e){var t,e=e||A;return e.addClass(g.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollTop:w.scrollTop(),height:w.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},L.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),L.has.subMenu(e)&&(t.menu.height+=e.find(b.menu).first().outerHeight()),t=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(L.verbose("Dropdown can fit in context downward",t),!0):t.above?(L.verbose("Dropdown cannot fit below, opening upward",t),!1):(L.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(g.loading),t},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(g.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollLeft:w.scrollLeft(),width:w.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},L.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(L.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(g.loading),n},extendSelect:function(){return p.allowAdditions||p.apiSettings},show:function(){return!L.is.disabled()&&(L.has.items()||L.has.message())},useAPI:function(){return void 0!==Z.fn.api},useElement:function(e){return void 0!==Z.fn[e]||(L.error(d.noElement.replace("{element}",e)),!1)}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){L.hideSubMenus(),L.hideOthers(),L.set.active()};e=ne(e)?e:function(){},L.verbose("Doing menu show animation",n),L.set.direction(t),t=p.transition.showMethod||L.get.transition(t),L.is.selection()&&L.set.scrollPosition(L.get.selectedItem(),!0),(L.is.hidden(n)||L.is.animating(n))&&("none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("show"),e.call(I)):L.can.useElement("transition")&&n.transition({animation:t+" in",debug:p.debug,verbose:p.verbose,silent:p.silent,duration:p.transition.showDuration||p.duration,queue:!0,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(I)}}))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){L.unbind.intent(),L.remove.active()},t=p.transition.hideMethod||L.get.transition(t);e=ne(e)?e:function(){},(L.is.visible(n)||L.is.animating(n))&&(L.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("hide"),e.call(I)):void 0!==Z.fn.transition?n.transition({animation:t+" out",duration:p.transition.hideDuration||p.duration,debug:p.debug,verbose:p.verbose,silent:p.silent,queue:!1,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(I)}}):L.error(d.transition))}},hideAndClear:function(){L.remove.searchTerm(),L.has.maxSelections()||(L.has.search()?L.hide(function(){L.remove.filteredItem()}):L.hide())},delay:{show:function(){L.verbose("Delaying show event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.show,p.delay.show)},hide:function(){L.verbose("Delaying hide event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.hide,p.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(c.quote),o=[];return i||!n?e:(L.debug("Encoding quote values for use in select",e),t?(Z.each(e,function(e,t){o.push(t.replace(c.quote,"""))}),o):e.replace(c.quote,"""))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(L.debug("Changing setting",e,t),Z.isPlainObject(e))Z.extend(!0,p,e);else{if(void 0===t)return p[e];Z.isPlainObject(p[e])?Z.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(Z.isPlainObject(e))Z.extend(!0,L,e);else{if(void 0===t)return L[e];L[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?L.performance.log(arguments):(L.debug=Function.prototype.bind.call(console.info,console,p.name+":"),L.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?L.performance.log(arguments):(L.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),L.verbose.apply(console,arguments)))},error:function(){p.silent||(L.error=Function.prototype.bind.call(console.error,console,p.name+":"),L.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=Date.now())-(Q||t),Q=t,X.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:I,"Execution Time":n})),clearTimeout(L.performance.timer),L.performance.timer=setTimeout(L.performance.display,500)},display:function(){var e=p.name+":",n=0;Q=!1,clearTimeout(L.performance.timer),Z.each(X,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),0<X.length&&(console.groupCollapsed(e),console.table?console.table(X):Z.each(X,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),X=[]}},invoke:function(i,e,t){var o,a,n,r=F;return e=e||_,t=t||I,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,Z.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Z.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!Z.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:L.error(d.method,i),!1;r=r[t]}}})),ne(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(B)?B.push(n):void 0!==B?B=[B,n]:void 0!==n&&(B=n),a}};J?(void 0===F&&L.initialize(),L.invoke(G)):(void 0!==F&&F.invoke("destroy"),L.initialize())}),void 0!==B?B:W},Z.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:ee,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:"exact",ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!1,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!1,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,collapseOnActionable:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onActionable:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return Z(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noElement:"This module requires ui {element}",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider",actionable:"actionable"},keys:{backspace:8,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable",actionable:"actionable"}},Z.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/["&'<>`]/.test(e))?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var o=e.placeholder||!1,a="",r=Z.fn.dropdown.settings.templates.escape,s=Z.fn.dropdown.settings.templates.deQuote;return(a+='<i class="dropdown icon"></i>')+(o?'<div class="default text">'+r(o,n)+"</div>":'<div class="text"></div>')+('<div class="'+s(i.menu)+'">')+Z.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,c,d,u){var e=e[c.values]||[],f="",p=Z.fn.dropdown.settings.templates.escape,m=Z.fn.dropdown.settings.templates.deQuote;return Z.each(e,function(e,t){var n,i,o,a,r,s=t[c.type]||"item",l=-1!==s.indexOf("menu");"item"===s||l?(n=t[c.text]?' data-text="'+m(t[c.text],!0)+'"':"",a=t[c.actionable]?u.actionable+" ":"",r=t[c.disabled]?u.disabled+" ":"",i=t[c.descriptionVertical]?u.descriptionVertical+" ":"",o=""!==p(t[c.description]||"",d),f+='<div class="'+m(a+r+i+(t[c.class]||u.item))+'" data-value="'+m(t[c.value],!0)+'"'+n+">",l&&(f+='<i class="'+(-1!==s.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[c.image]&&(f+='<img class="'+m(t[c.imageClass]||u.image)+'" src="'+m(t[c.image])+'">'),t[c.icon]&&(f+='<i class="'+m(t[c.icon]+" "+(t[c.iconClass]||u.icon))+'"></i>'),o&&(f=(f+='<span class="'+m(u.description)+'">'+p(t[c.description]||"",d)+"</span>")+(l?"":'<span class="'+m(u.text)+'">')),l&&(f+='<span class="'+m(u.text)+'">'),f+=p(t[c.name]||"",d),l?f=(f=(f+="</span>")+'<div class="'+m(s)+'">')+Z.fn.dropdown.settings.templates.menu(t,c,d,u)+"</div>":o&&(f+="</span>"),f+="</div>"):"header"===s&&(a=p(t[c.name]||"",d),r=m(t[c.icon]||u.groupIcon),""===a&&""===r||(f+='<div class="'+m(t[c.class]||u.header)+'">',""!==r&&(f+='<i class="'+m(r+" "+(t[c.iconClass]||u.icon))+'"></i>'),f=f+a+"</div>"),t[c.divider])&&(f+='<div class="'+m(u.divider)+'"></div>')}),f},label:function(e,t,n,i){var o=Z.fn.dropdown.settings.templates.escape,a=Z.fn.dropdown.settings.templates.deQuote;return o(t,n)+'<i class="'+a(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(I,R,F){"use strict";function L(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,I.fn.form=function(k){var T,D=I(this),S=D.selector||"",A=Date.now(),E=[],M=k,O="string"==typeof M,P=[].slice.call(arguments,1);return D.each(function(){var o,u,e,t,f,l,p,m,g,n,c,i,a,s,d,r=I(this),h=this,v=[],b=!1,y=!1,x=!1,w=["clean","clean"],C={initialize:function(){C.get.settings(),O?(void 0===d&&C.instantiate(),C.invoke(M)):(void 0!==d&&(d.invoke("destroy"),C.refresh()),C.verbose("Initializing form validation",r,f),C.bindEvents(),C.set.defaults(),f.autoCheckRequired&&C.set.autoCheck(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),d=C,r.data(a,C)},destroy:function(){C.verbose("Destroying previous module",d),C.removeEvents(),r.removeData(a)},refresh:function(){C.verbose("Refreshing selector cache"),o=r.find(m.field),u=r.find(m.group),e=r.find(m.message),r.find(m.prompt),t=r.find(m.submit),r.find(m.clear),r.find(m.reset)},refreshEvents:function(){C.removeEvents(),C.bindEvents()},submit:function(){C.verbose("Submitting form",r),y=!0,r.trigger("submit")},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+s,function(e){C[t](),e.preventDefault()})},bindEvents:function(){C.verbose("Attaching form events"),r.on("submit"+s,C.validate.form).on("blur"+s,m.field,C.event.field.blur).on("click"+s,m.submit,C.submit).on("click"+s,m.reset,C.reset).on("click"+s,m.clear,C.clear),f.keyboardShortcuts&&r.on("keydown"+s,m.field,C.event.field.keydown),o.each(function(e,t){var t=I(t),n=t.prop("type"),n=C.get.changeEvent(n,t);t.on(n+s,C.event.field.change)}),f.preventLeaving&&I(R).on("beforeunload"+s,C.event.beforeUnload),o.on("change click keyup keydown blur",function(e){C.determine.isDirty()}),r.on("dirty"+s,function(e){f.onDirty.call()}),r.on("clean"+s,function(e){f.onClean.call()})},clear:function(){o.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(u),o=i.find(m.prompt),a=t.closest(m.uiCalendar),r=t.data(p.defaultValue)||"",s=t.is(m.checkbox),l=n.is(m.uiDropdown)&&C.can.useElement("dropdown"),c=0<a.length&&C.can.useElement("calendar");i.hasClass(g.error)&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),o.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?a.calendar("clear"):(C.verbose("Resetting field value",t,r),t.val(""))}),C.remove.states()},reset:function(){o.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(u),o=t.closest(m.uiCalendar),a=i.find(m.prompt),r=t.data(p.defaultValue),s=t.is(m.checkbox),l=n.is(m.uiDropdown)&&C.can.useElement("dropdown"),c=0<o.length&&C.can.useElement("calendar"),d=i.hasClass(g.error);void 0!==r&&(d&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),a.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(C.verbose("Resetting checkbox value",t,r),t.prop("checked",r)):c?o.calendar("set date",r):(C.verbose("Resetting field value",t,r),t.val(r)))}),C.remove.states()},determine:{isValid:function(){var n=!0;return I.each(l,function(e,t){C.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;o.each(function(e,t){var t=I(t),n=0<t.filter(m.checkbox).length?C.is.checkboxDirty(t):C.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i=i||n}),i?C.set.dirty():C.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(f.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(m.checkbox)?!e.is(":checked"):C.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(C.verbose("Checking if field is valid",e),C.validate.field(l[e],e,!!n)):(C.verbose("Checking if form is valid"),I.each(l,function(e,t){C.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return x},clean:function(){return!x},fieldDirty:function(e){var t=e.data(p.defaultValue),e=(null==t?t="":Array.isArray(t)&&(t=t.toString()),e.val()),n=(null==e?e="":Array.isArray(e)&&(e=e.toString()),/^(true|false)$/i);return n.test(t)&&n.test(e)?!new RegExp("^"+t+"$","i").test(e):e!==t},checkboxDirty:function(e){return e.data(p.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===w[0]},justClean:function(){return"clean"===w[0]}},removeEvents:function(){r.off(s),o.off(s),t.off(s)},event:{field:{keydown:function(e){var t=I(this),n=e.which,i=t.is(m.input),o=t.is(m.checkbox),a=0<t.closest(m.uiDropdown).length,r=13;n===27&&(C.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!==r||!i||a||o||(b||(t.one("keyup"+s,C.event.field.keyup),C.submit(),C.debug("Enter pressed on input submitting form"),e.preventDefault()),b=!0)},keyup:function(){b=!1},blur:function(e){var t=I(this),n=t.closest(u),i=C.get.validation(t);i&&("blur"===f.on||n.hasClass(g.error)&&f.revalidate)&&(C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0))},change:function(e){var t=I(this),n=t.closest(u),i=C.get.validation(t);i&&("change"===f.on||n.hasClass(g.error)&&f.revalidate)&&(clearTimeout(C.timer),C.timer=setTimeout(function(){C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(C.is.dirty()&&!y)return(e=e||R.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!C.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return C.is.bracketedRule(e)?e.type.replace(e.type.match(f.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"===e||"radio"===e||"hidden"===e||t.is("select")?"change":C.get.inputEvent()},inputEvent:function(){return void 0!==F.createElement("input").oninput?"input":void 0!==F.createElement("input").onpropertychange?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return I.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},I.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=C.get.ruleName(e),o=C.get.ancillaryValue(e),a=C.get.field(t.identifier),r=a.val(),r=L(e.prompt)?e.prompt(r):e.prompt||f.prompt[i]||f.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return o&&0<=["integer","decimal","number","size"].indexOf(i)&&0<=o.indexOf("..")&&(n=o.split("..",2),e.prompt||"size"===i||(r+=(""===n[0]?f.prompt.maxValue.replace(/{ruleValue}/g,"{max}"):""===n[1]?f.prompt.minValue.replace(/{ruleValue}/g,"{min}"):f.prompt.range).replace(/{name}/g," "+f.text.and)),r=(r=r.replace(/{min}/g,n[0])).replace(/{max}/g,n[1])),o&&0<=["match","different"].indexOf(i)&&(r=r.replace(/{ruleValue}/g,C.get.fieldLabel(o,!0))),s&&(r=r.replace(/{value}/g,a.val())),r=(r=(r=l?r.replace(/{name}/g,C.get.fieldLabel(a)):r).replace(/{identifier}/g,t.identifier)).replace(/{ruleValue}/g,o),e.prompt||C.verbose("Using default validation prompt for type",r,i),r},settings:function(){I.isPlainObject(k)?(k.fields&&(k.fields=C.get.fieldsFromShorthand(k.fields)),f=I.extend(!0,{},I.fn.form.settings,k),l=I.extend(!0,{},I.fn.form.settings.defaults,f.fields),C.verbose("Extending settings",l,f)):(f=I.extend(!0,{},I.fn.form.settings),l=I.extend(!0,{},I.fn.form.settings.defaults),C.verbose("Using default form validation",l,f)),i=f.namespace,p=f.metadata,m=f.selector,g=f.className,n=f.regExp,c=f.error,a="module-"+i,s="."+i,((d=r.data(a))||C).refresh()},field:function(e,t){var n;return C.verbose("Finding field with identifier",e),e=C.escape.string(e),0<(n=o.filter("#"+e)).length||0<(n=o.filter('[name="'+e+'"]')).length||0<(n=o.filter('[name="'+e+'[]"]')).length||0<(n=o.filter("[data-"+p.validate+'="'+e+'"]')).length?n:(C.error(c.noField.replace("{identifier}",e)),t?I():I("<input/>"))},fields:function(e,n){var i=I();return I.each(e,function(e,t){i=i.add(C.get.field(t,n))}),i},fieldLabel:function(e,t){var n="string"==typeof e?C.get.field(e):e,i=n.closest(m.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&&(I.each(l,function(e,n){a=n.identifier||e,I.each(C.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=C.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<e.length?C.get.fields(e,t):o,u={};return e.each(function(e,t){var t=I(t),n=t.closest(m.uiCalendar),i=t.prop("name"),o=t.val(),a=t.is(m.checkbox),r=t.is(m.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&C.can.useElement("calendar"),t=!!a&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),u[i]||(u[i]=[]),a?t?u[i].push(o||!0):u[i].push(!1):u[i].push(o);else if(r)void 0!==u[i]&&!1!==u[i]||(u[i]=!!t&&(o||!0));else if(a)u[i]=!!t&&(o||!0);else if(l){var c=n.calendar("get date");if(null!==c)switch(f.dateHandling){case"date":u[i]=c;break;case"input":u[i]=n.calendar("get input date");break;case"formatter":var d=n.calendar("setting","type");switch(d){case"date":u[i]=f.formatter.date(c);break;case"datetime":u[i]=f.formatter.datetime(c);break;case"time":u[i]=f.formatter.time(c);break;case"month":u[i]=f.formatter.month(c);break;case"year":u[i]=f.formatter.year(c);break;default:C.debug("Wrong calendar mode",n,d),u[i]=""}}else u[i]=""}else u[i]=o}),u},dirtyFields:function(){return o.filter(function(e,t){return I(t).data(p.isDirty)})}},has:{field:function(e){return C.verbose("Checking for existence of a field with identifier",e),0<C.get.field(e,!0).length}},can:{useElement:function(e){return void 0!==I.fn[e]||(C.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},checkErrors:function(e,t){return e&&0!==e.length?!t&&"string"==typeof e?[e]:e:(t||C.error(f.error.noErrorMessage),!1)},add:{rule:function(e,t){C.add.field(e,t)},field:function(n,e){void 0!==l[n]&&void 0!==l[n].rules||(l[n]={rules:[]});var i={rules:[]};C.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],I.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,I.each(i.rules,function(e,t){0===I.grep(l[n].rules,function(e){return e.type===t.type}).length&&l[n].rules.push(t)}),C.debug("Adding rules",i.rules,l),C.refreshEvents()},fields:function(e){l=I.extend(!0,{},l,C.get.fieldsFromShorthand(e)),C.refreshEvents()},prompt:function(e,t,n){var i,o,a;!1!==(t=C.checkErrors(t))&&(a=0<(o=(i=C.get.field(e).closest(u)).children(m.prompt)).length,C.verbose("Adding field error state",e),n||i.addClass(g.error),f.inline)&&(a||(o=I("<div/>").addClass(g.label)).appendTo(i),o.html(f.templates.prompt(t)),a?C.verbose("Inline errors are disabled, no inline error added",e):f.transition&&C.can.useElement("transition")?(C.verbose("Displaying error with css transition",f.transition),o.transition(f.transition+" in",f.duration)):(C.verbose("Displaying error with fallback javascript animation"),o.fadeIn(f.duration)))},errors:function(t){var i,o;!1!==(t=C.checkErrors(t))&&(C.debug("Adding form error messages",t),C.set.error(),i=[],I.isPlainObject(t)?I.each(Object.keys(t),function(e,n){!1!==C.checkErrors(t[n],!0)&&(f.inline?C.add.prompt(n,t[n]):!1!==(o=C.checkErrors(t[n]))&&I.each(o,function(e,t){i.push(f.prompt.addErrors.replace(/{name}/g,C.get.fieldLabel(n)).replace(/{error}/g,t))}))}):i=t,0<i.length)&&e.html(f.templates.error(i))}},remove:{errors:function(){C.debug("Removing form error messages"),e.empty()},states:function(){r.removeClass(g.error).removeClass(g.success),f.inline||C.remove.errors(),C.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];void 0!==l[n]&&Array.isArray(l[n].rules)&&(void 0===e?(C.debug("Removed all rules"),C.has.field(n)?l[n].rules=[]:delete l[n]):I.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(C.debug("Removed rule",t.type),l[n].rules.splice(e,1))}))},field:function(e){e=Array.isArray(e)?e:[e];I.each(e,function(e,t){C.remove.rule(t)}),C.refreshEvents()},rules:function(e,n){Array.isArray(e)?I.each(e,function(e,t){C.remove.rule(t,n)}):C.remove.rule(e,n)},fields:function(e){C.remove.field(e)},prompt:function(e){var t=C.get.field(e).closest(u),n=t.children(m.prompt);t.removeClass(g.error),f.inline&&n.is(":visible")&&(C.verbose("Removing prompt for field",e),f.transition&&C.can.useElement("transition")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){r.removeClass(g.error).addClass(g.success)},defaults:function(){o.each(function(e,t){var t=I(t),n=t.parent(),i=0<t.filter(m.checkbox).length,o=(n.is(m.uiDropdown)||t.is(m.uiDropdown))&&C.can.useElement("dropdown"),a=t.closest(m.uiCalendar),r=0<a.length&&C.can.useElement("calendar"),i=i?t.is(":checked"):t.val();o?(n.is(m.uiDropdown)?n:t).dropdown("save defaults"):r&&a.calendar("refresh"),t.data(p.defaultValue,i),t.data(p.isDirty,!1)})},error:function(){r.removeClass(g.success).addClass(g.error)},value:function(e,t){var n={};return n[e]=t,C.set.values.call(h,n)},values:function(e){I.isEmptyObject(e)||I.each(e,function(e,t){var n,i=C.get.field(e),o=i.parent(),e=i.closest(m.uiCalendar),a=Array.isArray(t),r=o.is(m.uiCheckbox)&&C.can.useElement("checkbox"),s=o.is(m.uiDropdown)&&C.can.useElement("dropdown"),l=i.is(m.radio)&&r,c=0<e.length&&C.can.useElement("calendar");0<i.length&&(a&&r?(C.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),I.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(C.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(m.uiCheckbox).checkbox("check")):r?(C.verbose("Setting checkbox value",t,o),!0===t||1===t||"on"===t?o.checkbox("check"):o.checkbox("uncheck"),"string"==typeof t&&i.val(t)):s?(C.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(C.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){C.verbose("Setting state dirty"),x=!0,w[0]=w[1],w[1]="dirty",C.is.justClean()&&r.trigger("dirty")},clean:function(){C.verbose("Setting state clean"),x=!1,w[0]=w[1],w[1]="clean",C.is.justDirty()&&r.trigger("clean")},asClean:function(){C.set.defaults(),C.set.clean()},asDirty:function(){C.set.defaults(),C.set.dirty()},autoCheck:function(){C.debug("Enabling auto check on required fields"),l&&I.each(l,function(e){C.has.field(e)||(C.verbose("Field not found, removing from validation",e),C.remove.field(e))}),o.each(function(e,t){var t=I(t),n=t.closest(u),i=0<t.filter(m.checkbox).length,o=t.prop("required")||n.hasClass(g.required)||n.parent().hasClass(g.required),n=t.is(":disabled")||n.hasClass(g.disabled)||n.parent().hasClass(g.disabled),a=C.get.validation(t),r=!!a&&0!==I.grep(a.rules,function(e){return"empty"===e.type}),a=a.identifier||t.attr("id")||t.attr("name")||t.data(p.validate);!o||n||r||void 0===a||(i?(C.verbose("Adding 'checked' rule on field",a),C.add.rule(a,"checked")):(C.verbose("Adding 'empty' rule on field",a),C.add.rule(a,"empty")))})},optional:function(n,i){i=!1!==i,I.each(l,function(e,t){n!==e&&n!==t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=C.get.values();if(b)return!1;if(v=[],C.determine.isValid()){if(C.debug("Form has no validation errors, submitting"),C.set.success(),f.inline||C.remove.errors(),!0!==t)return f.onSuccess.call(h,e,i)}else if(C.debug("Form has errors"),y=!1,C.set.error(),f.inline||C.add.errors(v),e&&void 0!==r.data("moduleApi")&&e.stopImmediatePropagation(),f.errorFocus&&!0!==t&&(e=!0,"string"==typeof f.errorFocus?(e=(n=I(F).find(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=u.filter("."+g.error).first().find(m.field),n.trigger("focus"),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(h,v,i)},field:function(i,e,o){if(o=void 0===o||o,"string"==typeof i&&(C.verbose("Validating field",i),i=l[e=i]),i){var a=i.identifier||e,t=C.get.field(a),n=!!i.depends&&C.get.field(i.depends),r=!0,s=[];if(i.identifier||(C.debug("Using field name as identifier",a),i.identifier=a),0===t.filter(":not(:disabled)").length?C.debug("Field is disabled. Skipping",a):i.optional&&C.is.blank(t)?C.debug("Field is optional and blank. Skipping",a):i.depends&&C.is.empty(n)?C.debug("Field depends on another value that is not present or empty. Skipping",n):void 0!==i.rules&&(o&&t.closest(u).removeClass(g.error),I.each(i.rules,function(e,t){var n;C.has.field(a)&&0<(n=C.validate.rule(i,t,!0)||[]).length&&(C.debug("Field is invalid",a,t.type),s.push(C.get.prompt(t,i)),r=!1,o)&&I(n).closest(u).addClass(g.error)})),!r)return o&&(v=v.concat(s),C.add.prompt(a,s,!0),f.onInvalid.call(t,s)),!1;o&&(C.remove.prompt(a,s),f.onValid.call(t))}else C.debug("Unable to find field validation. Skipping",e);return!0},rule:function(e,n,t){function i(e){var t=void 0===(t=(l?I(e).filter(":checked"):I(e)).val())||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,C)}var e=C.get.field(e.identifier),o=C.get.ancillaryValue(n),a=C.get.ruleName(n),r=f.rules[a],s=[],l=e.is(m.checkbox);if(L(r))return l?i(e)||(s=e):I.each(e,function(e,t){i(t)||s.push(t)}),t?s:0===s.length;C.error(c.noRule,a)}},setting:function(e,t){if(I.isPlainObject(e))I.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,f.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),C.verbose.apply(console,arguments)))},error:function(){f.silent||(C.error=Function.prototype.bind.call(console.error,console,f.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=Date.now())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:h,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(C.performance.timer),I.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),1<D.length&&(e+=" ("+D.length+")"),0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):I.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var o,a,n,r=d;return e=e||P,t=t||h,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,I.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!I.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:C.error(c.method,i),!1;r=r[t]}}})),L(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(T)?T.push(n):void 0!==T?T=[T,n]:void 0!==n&&(T=n),a}};C.initialize()}),void 0!==T?T:this},I.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!0,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[A-Za-z][\w.:-]*$/g,bracket:/\[(.*)]/i,decimal:/^\d+\.?\d*$/,email:/^[\w!#$%&'*+./=?^`{|}~-]+@[\da-z]([\da-z-]*[\da-z])?(\.[\da-z]([\da-z-]*[\da-z])?)*$/i,escape:/[$()*+,./:=?@[\\\]^{|}-]/g,flags:/^\/(.*)\/(.*)?/,integer:/^-?\d+$/,number:/^-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s.]+\.\S{2,}|www\.\S+\.\S{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",size:"{name} must have a length between {min} and {max} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices",addErrors:"{name}: {error}"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',group:".field",input:'input:not([type="file"])',message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",noField:"Field identifier {identifier} not found",noElement:"This module requires ui {element}",noErrorMessage:"No error message provided"},templates:{error:function(e){var n='<ul class="list">';return I.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>"},prompt:function(e){var n;return 1===e.length?e[0]:(n='<ul class="ui list">',I.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>")}},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<I(this).filter(":checked").length},email:function(e){return I.fn.form.settings.regExp.email.test(e)},url:function(e){return I.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){var n,i;return t instanceof RegExp?e.match(t):((n=t.match(I.fn.form.settings.regExp.flags))&&(t=2<=n.length?n[1]:t,i=3<=n.length?n[2]:""),e.match(new RegExp(t,i)))},minValue:function(e,t){return I.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return I.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return I.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n,i){var o,a;return(n="string"==typeof n?I.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=I.fn.form.settings.regExp.integer),t&&-1===["",".."].indexOf(t)&&(-1===t.indexOf("..")?n.test(t)&&(a=o=+t):(t=t.split("..",2),n.test(t[0])&&(o=+t[0]),n.test(t[1])&&(a=+t[1]))),i&&(e=e.length),n.test(e)&&(void 0===o||o<=e)&&(void 0===a||e<=a)},decimal:function(e,t){return I.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return I.fn.form.settings.rules.range(e,t,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return I.fn.form.settings.rules.range(e,t+"..","integer",!0)},exactLength:function(e,t){return I.fn.form.settings.rules.range(e,t+".."+t,"integer",!0)},maxLength:function(e,t){return I.fn.form.settings.rules.range(e,".."+t,"integer",!0)},size:function(e,t){return I.fn.form.settings.rules.range(e,t,"integer",!0)},match:function(e,t,n){n=n.get.value(t,!0);return void 0!==n&&e.toString()===n.toString()},different:function(e,t,n){n=n.get.value(t,!0);return void 0!==n&&e.toString()!==n.toString()},creditCard:function(n,e){var i,o={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9]\d|[2-8]\d{2}|9[01]\d|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8]\d)/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s-]/g,""),e&&(I.each(e,function(e,t){(i=o[t])&&0<(i={length:-1!==I.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&i.pattern&&(a=!0)}),!a))return!1;if((e={number:-1!==I.inArray(n.length,o.unionPay.length),pattern:-1!==n.search(o.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,r=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],l=0;t--;)l+=s[r][parseInt(n.charAt(t),10)],r^=1;return l%10==0&&0<l}},minCount:function(e,t){return 0===(t=Number(t))||(1===t?""!==e:e.split(",").length>=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(B,W,$){"use strict";function K(e){return"function"==typeof e&&"number"!=typeof e.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,B.fn.modal=function(R){var F,e=B(this),L=B(W),V=B($),q=B("body"),N=e.selector||"",j=Date.now(),H=[],z=R,U="string"==typeof z,Y=[].slice.call(arguments,1);return e.each(function(){var n,o,a,e,i,t,r,s,l,c,d,u=B.isPlainObject(R)?B.extend(!0,{},B.fn.modal.settings,R):B.extend({},B.fn.modal.settings),f=u.selector,p=u.className,m=u.namespace,g=u.fields,h=u.error,v="."+m,b="module-"+m,y=B(this),x=[W,$].indexOf(u.context)<0?V.find(u.context):q,w=x[0]===q[0],C=y.find(f.closeIcon),k=y.hasClass("modal"),T=this,D=k?y.data(b):void 0,S=!1,A="",E="",M=!1,O=!1,P=!1,I={initialize:function(){var a;I.create.id(),k||(I.create.modal(),K(u.onHidden))||(u.onHidden=function(){I.destroy(),y.remove()}),y.addClass(u.class),""!==u.title&&y.find(f.title).html(I.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(I.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),I.has.configActions()&&(0===(a=y.find(f.actions).addClass(u.classActions)).length?a=B("<div/>",{class:p.actions+" "+(u.classActions||"")}).appendTo(y):a.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+I.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=I.helpers.escape(e[g.text]||"",u.preserveHTML),i=I.helpers.deQuote(e[g.class]||""),o=e[g.click]&&K(e[g.click])?e[g.click]:function(){};a.append(B("<button/>",{html:t+n,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:p.button+" "+i,on:{click:function(){var e=B(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(T,y)||I.hide()}}}))})),I.cache={},I.verbose("Initializing dimmer",x),I.create.dimmer(),u.allowMultiple&&I.create.innerDimmer(),u.centered||y.addClass("top aligned"),I.refreshModals(),I.bind.events(),I.observeChanges(),I.instantiate(),u.autoShow&&I.show()},instantiate:function(){I.verbose("Storing instance of modal"),D=I,y.data(b,D)},create:{modal:function(){var e;y=B("<div/>",{class:p.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(C=B("<i/>",{class:p.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(C)),""!==u.title&&(e="_"+I.get.id()+"title",y.attr("aria-labelledby",e),B("<div/>",{class:p.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+I.get.id()+"desc",y.attr("aria-describedby",e),B("<div/>",{class:p.content,id:e}).appendTo(y)),I.has.configActions()&&B("<div/>",{class:p.actions}).appendTo(y),x.append(y),T=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=B.extend(!0,e,u.dimmerSettings);void 0===B.fn.dimmer?I.error(h.dimmer):(I.debug("Creating dimmer"),i=x.dimmer(e),M=I.is.scrolling(),u.detachable?(I.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):I.set.undetached(),t=i.dimmer("get dimmer"))},id:function(){c=(Math.random().toString(16)+"000000000").slice(2,10),l="."+c,I.verbose("Creating unique id for element",c)},innerDimmer:function(){0===y.find(f.dimmer).length&&B("<div/>",{class:p.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),I.verbose("Destroying previous modal"),y.removeData(b).off(v),L.off(l),t.off(l),C.off(l),n&&n.off(l),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in W&&((d=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!1;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<B(e.target).find(":input").addBack(":input").length)&&(i=!0):(n=!0,t=B(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=B(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(i=!0)),!i}),n&&u.observeChanges&&(I.debug("DOM tree modified, refreshing"),I.refresh()),i&&I.refreshInputs()})).observe(T,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),I.debug("Setting up mutation observer",d))},refresh:function(){I.remove.scrolling(),I.cacheSizes(),I.can.useFlex()||I.set.modalOffset(),I.set.screenHeight(),I.set.type()},refreshModals:function(){a=y.siblings(f.modal),o=a.add(y)},refreshInputs:function(){n&&n.off("keydown"+l),0===(n=y.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===B(this).closest(".disabled").length})).length?(n=y).attr("tabindex",-1):y.removeAttr("tabindex"),n.first().on("keydown"+l,I.event.inputKeyDown.first),n.last().on("keydown"+l,I.event.inputKeyDown.last),u.autofocus&&0===n.filter(":focus").length&&I.set.autofocus()},attachEvents:function(e,t){var n=B(e);t=K(I[t])?I[t]:I.toggle,0<n.length?(I.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):I.error(h.notFound,e)},bind:{events:function(){I.verbose("Attaching events"),y.on("click"+v,f.close,I.event.close).on("click"+v,f.approve,I.event.approve).on("click"+v,f.deny,I.event.deny),C.on("keyup"+l,I.event.closeKeyUp),L.on("resize"+l,I.event.resize).on("focus"+l,I.event.focus)},scrollLock:function(){i[0].addEventListener("touchmove",I.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i[0].removeEventListener("touchmove",I.event.preventScroll,{passive:!1})}},get:{id:function(){return c},element:function(){return y},settings:function(){return u}},event:{approve:function(){S||!1===u.onApprove.call(T,B(this))?I.verbose("Approve callback returned false cancelling hide"):(S=!0,I.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===u.onDeny.call(T,B(this))?I.verbose("Deny callback returned false cancelling hide"):(S=!0,I.hide(function(){S=!1}))},close:function(){I.hide()},closeKeyUp:function(e){e=e.which;e!==u.keys.enter&&e!==u.keys.space||!y.hasClass(p.front)||I.hide()},inputKeyDown:{first:function(e){e.which===u.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==u.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},mousedown:function(e){var t=B(e.target),n=I.is.rtl();(r=0<t.closest(f.modal).length)&&I.verbose("Mouse down event registered inside the modal"),(s=I.is.scrolling()&&(!n&&L.outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&I.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(r)I.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)I.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<B(e.target).closest(f.modal).length,e=B.contains($.documentElement,e.target);if(!t&&e&&I.is.active()&&y.hasClass(p.front)){if(I.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!I.hideAll())return}else if(!I.hide())return;I.remove.clickaway()}}else I.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(I.timer),I.timer=setTimeout(e,t)},keyboard:function(e){e.which===u.keys.escape&&(u.closable?(I.debug("Escape key pressed hiding modal"),y.hasClass(p.front)&&I.hide()):I.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(I.is.animating()||I.is.active())&&requestAnimationFrame(I.refresh)},focus:function(){i.dimmer("is active")&&I.is.active()&&u.autofocus&&requestAnimationFrame(I.set.autofocus)}},toggle:function(){I.is.active()||I.is.animating()?I.hide():I.show()},show:function(e){e=K(e)?e:function(){},I.refreshModals(),I.set.dimmerSettings(),I.set.dimmerStyles(),I.showModal(e)},hide:function(e){return e=K(e)?e:function(){},I.refreshModals(),I.hideModal(e)},showModal:function(e){e=K(e)?e:function(){},I.is.animating()||!I.is.active()?!1===u.onShow.call(T)?I.verbose("Show callback returned false cancelling show"):(O=I.has.scrollbar(),I.showDimmer(),I.cacheSizes(),O&&I.set.bodyMargin(),I.can.useFlex()?I.remove.legacy():(I.set.legacy(),I.set.modalOffset(),I.debug("Using non-flex legacy modal positioning.")),I.set.screenHeight(),I.set.type(),I.set.clickaway(),!u.allowMultiple&&I.others.active()?I.hideOthers(I.showModal):(S=!1,u.allowMultiple&&(I.others.active()&&a.filter("."+p.active).find(f.dimmer).addClass("active"),u.detachable)&&y.detach().appendTo(t),u.transition&&void 0!==B.fn.transition?(I.debug("Showing modal with css animations"),I.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(T),u.keyboardShortcuts&&I.add.keyboardShortcuts(),I.save.focus(),I.set.active(),I.refreshInputs(),requestAnimationFrame(I.set.observeAttributes),e()}})):I.error(h.noTransition))):I.debug("Modal is already visible")},hideModal:function(e,t,n){var i=a.filter("."+p.active).last();if(e=K(e)?e:function(){},!1===u.onHide.call(T,B(this)))return I.verbose("Hide callback returned false cancelling hide"),S=!1;(I.is.animating()||I.is.active())&&(I.debug("Hiding modal"),u.transition&&void 0!==B.fn.transition?(I.remove.active(),I.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){I.others.active()||I.others.animating()||t||I.hideDimmer(),u.keyboardShortcuts&&!I.others.active()&&I.remove.keyboardShortcuts()},onComplete:function(){I.unbind.scrollLock(),I.remove.active(),u.allowMultiple&&(i.addClass(p.front),y.removeClass(p.front),(n?o:i).find(f.dimmer).removeClass("active")),K(u.onHidden)&&u.onHidden.call(T),I.remove.dimmerStyles(),I.restore.focus(),e()}})):I.error(h.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(O&&(w||t.css("top",i.scrollTop()),I.save.bodyMargin()),I.debug("Showing dimmer"),i.dimmer("show")):I.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(I.unbind.scrollLock(),i.dimmer("hide",function(){O&&I.restore.bodyMargin(),I.remove.clickaway(),I.remove.screenHeight()})):I.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+p.active+", ."+p.animating);if(n=K(n)?n:function(){},0<e.length)return I.debug("Hiding all visible modals"),i=!0,B(e.get().reverse()).each(function(e,t){i=i&&B(t).modal("hide modal",n,!1,!0)}),i&&I.hideDimmer(),i},hideOthers:function(e){var t=a.filter("."+p.active+", ."+p.animating);e=K(e)?e:function(){},0<t.length&&(I.debug("Hiding other modals",a),t.modal("hide modal",e,!0))},others:{active:function(){return 0<a.filter("."+p.active).length},animating:function(){return 0<a.filter("."+p.animating).length}},add:{keyboardShortcuts:function(){I.verbose("Adding keyboard shortcuts"),V.on("keydown"+v,I.event.keyboard)}},save:{focus:function(){0<B($.activeElement).closest(y).length||(e=B($.activeElement).trigger("blur"))},bodyMargin:function(){A=x.css((w?"margin-":"padding-")+(I.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(A.replace(/[^\d.]/g,""),10),t=w?W.innerWidth-$.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;E=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=I.can.leftBodyScrollbar()?"left":"right";x.css((w?"margin-":"padding-")+n,A),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(p.active)},legacy:function(){y.removeClass(p.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+l),t.off("mousedown"+l),t.off("mouseup"+l)},dimmerStyles:function(){t.removeClass(p.inverted),i.removeClass(p.blurring)},bodyStyle:function(){""===x.attr("style")&&(I.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){I.debug("Removing page height"),x.css("height",""),I.remove.bodyStyle()},keyboardShortcuts:function(){I.verbose("Removing keyboard shortcuts"),V.off("keydown"+v)},scrolling:function(){M||i.removeClass(p.scrolling),y.removeClass(p.scrolling)}},cacheSizes:function(){y.addClass(p.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();void 0!==I.cache.pageHeight&&0===n||(B.extend(I.cache,{pageHeight:V.outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:(w?L:i).height()}),I.cache.topOffset=-I.cache.height/2),y.removeClass(p.loading),I.debug("Caching modal and container sizes",I.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/["&'<>`]/.test(e))?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return void 0===I.cache.leftBodyScrollbar&&(I.cache.leftBodyScrollbar=I.is.rtl()&&(I.is.iframe&&!I.is.firefox()||I.is.safari()||I.is.edge()||I.is.ie())),I.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!I.is.ie():(u.useFlex&&I.is.ie()?I.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&I.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=I.cache.contextHeight,t=I.cache.contextHeight/2,n=I.cache.topOffset,i=I.cache.scrollHeight,o=I.cache.height,a=u.padding;return o<i?t+n+i+a<e:o+2*a<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length},scrollbar:function(){return w||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(p.active)},ie:function(){var e,t;return void 0===I.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,I.cache.isIE=e||t),I.cache.isIE},animating:function(){return y.transition("is animating")},scrolling:function(){return i.hasClass(p.scrolling)},modernBrowser:function(){return!(W.ActiveXObject||"ActiveXObject"in W)},rtl:function(){return void 0===I.cache.isRTL&&(I.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===q.attr("dir")||"rtl"===q.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),I.cache.isRTL},safari:function(){return void 0===I.cache.isSafari&&(I.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),I.cache.isSafari},edge:function(){return void 0===I.cache.isEdge&&(I.cache.isEdge=!!W.setImmediate&&!I.is.ie()),I.cache.isEdge},firefox:function(){return void 0===I.cache.isFirefox&&(I.cache.isFirefox=!!W.InstallTrigger),I.cache.isFirefox},iframe:function(){return!(self===top)}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},bodyMargin:function(){var n=I.can.leftBodyScrollbar()?"left":"right";(u.detachable||I.can.fit())&&x.css((w?"margin-":"padding-")+n,E+"px"),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+l,I.event.mousedown),t.on("mousedown"+l,I.event.mousedown),t.on("mouseup"+l,I.event.mouseup)},dimmerSettings:function(){var e;void 0===B.fn.dimmer?I.error(h.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:I.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=B.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(p.inverted):t.removeClass(p.inverted),u.blurring?i.addClass(p.blurring):i.removeClass(p.blurring)},modalOffset:function(){var e;u.detachable?y.css({marginTop:!y.hasClass("aligned")&&I.can.fit()?-I.cache.height/2:u.padding/2,marginLeft:-I.cache.width/2}):(e=I.can.fit(),y.css({top:!y.hasClass("aligned")&&e?V.scrollTop()+(I.cache.contextHeight-I.cache.height)/2:!e||y.hasClass("top")?V.scrollTop()+u.padding:V.scrollTop()+(I.cache.contextHeight-I.cache.height-u.padding),marginLeft:-I.cache.width/2})),I.verbose("Setting modal offset for legacy mode")},screenHeight:function(){I.can.fit()?x.css("height",""):y.hasClass("bottom")||(I.debug("Modal is taller than page content, resizing page height"),x.css("height",I.cache.height+2*u.padding+"px"))},active:function(){y.addClass(p.active+" "+p.front),a.filter("."+p.active).removeClass(p.front)},scrolling:function(){i.addClass(p.scrolling),y.addClass(p.scrolling),I.unbind.scrollLock()},legacy:function(){y.addClass(p.legacy)},type:function(){I.can.fit()?(I.verbose("Modal fits on screen"),I.others.active()||I.others.animating()||(I.remove.scrolling(),I.bind.scrollLock())):y.hasClass("bottom")?I.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(I.verbose("Modal cannot fit on screen setting to scrolling"),I.set.scrolling())},undetached:function(){i.addClass(p.undetached)}},setting:function(e,t){if(I.debug("Changing setting",e,t),B.isPlainObject(e))B.extend(!0,u,e);else{if(void 0===t)return u[e];B.isPlainObject(u[e])?B.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(B.isPlainObject(e))B.extend(!0,I,e);else{if(void 0===t)return I[e];I[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?I.performance.log(arguments):(I.debug=Function.prototype.bind.call(console.info,console,u.name+":"),I.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?I.performance.log(arguments):(I.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),I.verbose.apply(console,arguments)))},error:function(){u.silent||(I.error=Function.prototype.bind.call(console.error,console,u.name+":"),I.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=Date.now())-(j||t),j=t,H.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(I.performance.timer),I.performance.timer=setTimeout(I.performance.display,500)},display:function(){var e=u.name+":",n=0;j=!1,clearTimeout(I.performance.timer),B.each(H,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),0<H.length&&(console.groupCollapsed(e),console.table?console.table(H):B.each(H,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),H=[]}},invoke:function(i,e,t){var o,a,n,r=D;return e=e||Y,t=t||T,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,B.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(B.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!B.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:I.error(h.method,i),!1;r=r[t]}}})),K(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(F)?F.push(n):void 0!==F?F=[F,n]:void 0!==n&&(F=n),a}};U?(void 0===D&&(K(u.templates[z])&&(u.autoShow=!0,u.className.modal=u.className.template,u=B.extend(!0,{},u,u.templates[z].apply(I,Y)),p=u.className,u.namespace,g=u.fields,h=u.error),I.initialize()),K(u.templates[z])||I.invoke(z)):(void 0!==D&&D.invoke("destroy"),I.initialize(),F=y)}),void 0!==F?F:this},B.modal=B.fn.modal,B.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},B.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return B.isPlainObject(e[0])?B.extend({handler:function(){},content:"",title:""},e[0]):(K(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];o.handler(B(e).val())}function t(){o.handler(null)}var n=this,i=this.get.settings(),o=i.templates.getArguments(arguments);return 0===B(B.parseHTML(o.content)).filter(".ui.input").length&&(o.content+='<p><div class="'+this.helpers.deQuote(i.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(o.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(o.defaultValue||"")+'"></div></p>'),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document),function(V,q,N){"use strict";function j(e){return"function"==typeof e&&"number"!=typeof e.nodeType}q=void 0!==q&&q.Math===Math?q:globalThis,V.fn.popup=function(T){var D,e=V(this),S=V(N),A=V(q),E=V("body"),M=e.selector||"",O="ontouchstart"in N.documentElement?"touchstart":"click",P=Date.now(),I=[],R=T,F="string"==typeof R,L=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,d=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),i=d.selector,u=d.className,f=d.error,p=d.metadata,o=d.namespace,a="."+d.namespace,r="module-"+o,m=V(this),l=[q,N].indexOf(d.context)<0?S.find(d.context):V(d.context),g=[q,N].indexOf(d.scrollContext)<0?S.find(d.scrollContext):V(d.scrollContext),h=[q,N].indexOf(d.boundary)<0?S.find(d.boundary):V(d.boundary),v=d.target?[q,N].indexOf(d.target)<0?S.find(d.target):V(d.target):m,b=0,y=!1,x=!1,w=this,C=m.data(r),k={initialize:function(){k.debug("Initializing",m),k.createID(),k.bind.events(),!k.exists()&&d.preserve&&k.create(),d.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),C=k,m.data(r,C)},observeChanges:function(){"MutationObserver"in q&&((e=new MutationObserver(k.event.documentChanged)).observe(N,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){d.popup?c=S.find(d.popup).eq(0):d.inline&&(c=v.nextAll(i.popup).eq(0),d.popup=c),d.popup?(k.set.invisible(),s=k.get.offsetParent(),k.remove.invisible(),d.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=d.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&&!d.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),m.removeData(r)},event:{start:function(e){var t=V.isPlainObject(d.delay)?d.delay.show:d.delay;clearTimeout(k.hideTimer),x&&!d.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=V.isPlainObject(d.delay)?d.delay.hide:d.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){x=!0,d.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===w||0<V(e).find(w).length)&&(k.debug("Element removed from DOM, tearing down events"),k.destroy())})})},hideGracefully:function(e){var t=V(e.target),n=V.contains(N.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(k.debug("Click occurred outside popup hiding popup"),k.hide()):k.debug("Click was inside popup, keeping popup open")}},create:function(){var e=k.get.html(),t=k.get.title(),n=k.get.content();e||n||t?(k.debug("Creating pop-up html"),e=e||d.templates.popup({title:t,content:n}),c=V("<div/>").addClass(u.popup).data(p.activator,m).html(e),d.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(m)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),d.hoverable&&k.bind.popup(),d.onCreate.call(c,w)):d.popup?(S.find(d.popup).data(p.activator,m),k.verbose("Used popup specified in settings"),k.refresh(),d.hoverable&&k.bind.popup()):0<v.next(i.popup).length?(k.verbose("Pre-existing popup found"),d.inline=!0,d.popup=v.next(i.popup).data(p.activator,m),k.refresh(),d.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",w)},createID:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),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",d.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===d.onShow.call(c,w)?k.debug("onShow callback returned false, cancelling popup animation"):(d.preserve||d.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),d.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===d.onHide.call(c,w)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){S.find(i.popup).filter("."+u.popupVisible).each(function(){V(this).data(p.activator).popup("hide")})},exists:function(){return!!c&&(d.inline||d.popup?k.has.popup():0<c.closest(l).length)},removePopup:function(){k.has.popup()&&!d.popup&&(k.debug("Removing popup",c),c.remove(),c=void 0,d.onRemove.call(c,w))},save:{conditions:function(){k.cache={title:m.attr("title")},k.cache.title&&m.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(m.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=j(e)?e:function(){},d.transition&&k.can.useElement("transition")&&(k.set.visible(),c.transition({animation:(d.transition.showMethod||d.transition)+" in",queue:!1,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.transition.showDuration||d.duration,onComplete:function(){k.bind.close(),e.call(c,w),d.onVisible.call(c,w)}}))},hide:function(e){e=j(e)?e:function(){},k.debug("Hiding pop-up"),d.transition&&void 0!==V.fn.transition?c.transition({animation:(d.transition.hideMethod||d.transition)+" out",queue:!1,duration:d.transition.hideDuration||d.duration,debug:d.debug,verbose:d.verbose,silent:d.silent,onComplete:function(){k.reset(),e.call(c,w),d.onHidden.call(c,w)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return m.removeData(p.html),m.data(p.html)||d.html},title:function(){return m.removeData(p.title),m.data(p.title)||d.title},content:function(){return m.removeData(p.content),m.data(p.content)||d.content||m.attr("title")},variation:function(){return m.removeData(p.variation),m.data(p.variation)||d.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]===q,i=v.offset(),o=d.inline||d.popup&&d.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[0]!==s[0]&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),d.setFluidWidth&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=d.inline?parseInt(q.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=d.inline?k.is.rtl()?parseInt(q.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(q.getComputedStyle(t).getPropertyValue("margin-left"),10):0,r.boundary={top:(o=r.screen).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"===d.on?"mouseenter":"focus"===d.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"===d.on?"mouseleave":"focus"===d.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=(void 0!==e?e:v)[0].parentNode,n=V(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=V(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0<n.length?n:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],t=t[1],i="top"===n||"bottom"===n,o=!1,a=!1,r=!1;return y||(k.verbose("All available positions available"),y=k.get.positions()),k.debug("Recording last position tried",e),y[e]=!0,"opposite"===d.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),o=!0===y[r],k.debug("Trying opposite strategy",r)),"adjacent"===d.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),a=!0===y[r],k.debug("Trying adjacent strategy",r)),(a||o)&&(k.debug("Using backup position",r),r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),r}},set:{position:function(e,t){if(0!==v.length&&0!==c.length){var n,i,o,a,r,s,l;if(t=t||k.get.calculations(),e=e||m.data(p.position)||d.position,n=m.data(p.offset)||d.offset,i=d.distanceAway,o=t.target,a=t.popup,r=t.parent,k.should.centerArrow(t)&&(k.verbose("Adjusting offset to center arrow on small target element"),"top left"!==e&&"bottom left"!==e||(n=(n+=o.width/2)-d.arrowPixelsFromEdge),"top right"!==e&&"bottom right"!==e||(n=(n-=o.width/2)+d.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!k.is.svg(o.element))return k.debug("Popup target is hidden, no action taken"),!1;switch(d.inline&&(k.debug("Adding margin to calculation",o.margin),"left center"===e||"right center"===e?(n+=o.margin.top,i+=-o.margin.left):"top left"===e||"top center"===e||"top right"===e?(n+=o.margin.left,i-=o.margin.top):(n+=o.margin.left,i+=o.margin.top)),k.debug("Determining popup position from calculations",e,t),k.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"===e?"right":"left"}),k.debug("RTL: Popup position updated",e)),e=b===d.maxSearchDepth&&"string"==typeof d.lastResort?d.lastResort:e){case"top left":s={top:"auto",bottom:r.height-o.top+i,left:o.left+n,right:"auto"};break;case"top center":s={bottom:r.height-o.top+i,left:o.left+o.width/2-a.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-o.top+i,right:r.width-o.left-o.width-n,top:"auto",left:"auto"};break;case"left center":s={top:o.top+o.height/2-a.height/2+n,right:r.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:o.top+o.height/2-a.height/2+n,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:o.top+o.height+i,left:o.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:o.top+o.height+i,right:r.width-o.left-o.width-n,left:"auto",bottom:"auto"}}if(void 0===s&&k.error(f.invalidPosition,e),k.debug("Calculated popup positioning values",s),c.css(s).removeClass(u.position).addClass(e),k.set.invisible(),l=k.get.popupOffset(),l=k.get.distanceFromBoundary(l,t),!d.forcePosition&&k.is.offstage(l,e)){if(k.debug("Position is outside viewport",e),b<d.maxSearchDepth)return b++,e=k.get.nextPosition(e),k.debug("Trying new position",e),!!c&&k.set.position(e,t);if(!d.lastResort)return k.debug("Popup could not find a position to display",c),k.error(f.cannotPlace,w),k.remove.attempts(),k.remove.invisible(),k.reset(),d.onUnplaceable.call(c,w),!1;k.debug("No position found, showing with last position")}return k.debug("Position is on stage",e),k.remove.attempts(),k.remove.invisible(),d.setFluidWidth&&k.is.fluid()&&k.set.fluidWidth(t),!0}k.error(f.notFound)},fluidWidth:function(e){e=e||k.get.calculations(),k.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},loading:function(){c.addClass(u.loading)},invisible:function(){c.addClass(u.invisible)},variation:function(e){(e=e||k.get.variation())&&k.has.popup()&&(k.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){m.addClass(u.visible)}},remove:{loading:function(){c.removeClass(u.loading)},invisible:function(){c.removeClass(u.invisible)},variation:function(e){(e=e||k.get.variation())&&(k.verbose("Removing variation",e),c.removeClass(e))},visible:function(){m.removeClass(u.visible)},attempts:function(){k.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){k.debug("Binding popup events to module"),"click"===d.on&&m.on(O+a,k.toggle),"hover"===d.on&&m.on("touchstart"+a,k.event.touchstart),k.get.startEvent()&&m.on(k.get.startEvent()+a,k.event.start).on(k.get.endEvent()+a,k.event.end),d.target&&k.debug("Target set to element",v),A.on("resize"+t,k.event.resize)},popup:function(){k.verbose("Allowing hover events on popup to prevent closing"),c&&k.has.popup()&&c.on("mouseenter"+a,k.event.start).on("mouseleave"+a,k.event.end)},close:function(){(!0===d.hideOnScroll||"auto"===d.hideOnScroll&&"click"!==d.on)&&k.bind.closeOnScroll(),k.is.closable()?k.bind.clickaway():"hover"===d.on&&x&&k.bind.touchClose()},closeOnScroll:function(){k.verbose("Binding scroll close event to document"),g.one(k.get.scrollEvent()+t,k.event.hideGracefully)},touchClose:function(){k.verbose("Binding popup touchclose event to document"),S.on("touchstart"+t,function(e){k.verbose("Touched away from popup"),k.event.hideGracefully.call(w,e)})},clickaway:function(){k.verbose("Binding popup close event to document"),S.on(O+t,function(e){k.verbose("Clicked away from popup"),k.event.hideGracefully.call(w,e)})}},unbind:{events:function(){A.off(t),m.off(a)},close:function(){S.off(t),g.off(t)}},can:{useElement:function(e){return void 0!==V.fn[e]||(k.error(f.noElement.replace("{element}",e)),!1)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!k.is.basic()&&e.target.width<=2*d.arrowPixelsFromEdge}},is:{closable:function(){return"auto"===d.closable?"hover"!==d.on:d.closable},offstage:function(e,n){var i=[];return V.each(e,function(e,t){t<-d.jitter&&(k.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return k.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return m.hasClass(u.basic)},active:function(){return m.hasClass(u.active)},animating:function(){return void 0!==c&&c.hasClass(u.animating)},fluid:function(){return void 0!==c&&c.hasClass(u.fluid)},visible:function(){return void 0!==c&&c.hasClass(u.popupVisible)},dropdown:function(){return m.hasClass(u.dropdown)},hidden:function(){return!k.is.visible()},rtl:function(){return"rtl"===m.attr("dir")||"rtl"===m.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){k.remove.visible(),d.preserve?void 0!==V.fn.transition&&c.transition("remove transition"):k.removePopup()},setting:function(e,t){if(V.isPlainObject(e))V.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(V.isPlainObject(e))V.extend(!0,k,e);else{if(void 0===t)return k[e];k[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,d.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),k.verbose.apply(console,arguments)))},error:function(){d.silent||(k.error=Function.prototype.bind.call(console.error,console,d.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(P||t),P=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=d.name+":",n=0;P=!1,clearTimeout(k.performance.timer),V.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",M&&(e+=" '"+M+"'"),0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):V.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var o,a,n,r=C;return e=e||L,t=t||w,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,V.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(V.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!V.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:k.error(f.method,i),!1;r=r[t]}}})),j(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),a}};F?(void 0===C&&k.initialize(),k.invoke(R)):(void 0!==C&&C.invoke("destroy"),k.initialize())}),void 0!==D?D:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:q,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:q,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noElement:"This module requires ui {element}",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",invisible:"invisible",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(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=V.fn.popup.settings.templates.escape;return void 0!==e&&(e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),e.content)&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>"),t}}}}(jQuery,window,document),function(T,e,D){"use strict";void 0!==e&&e.Math===Math||globalThis,T.fn.progress=function(h){var v,e=T(this),b=e.selector||"",y=Date.now(),x=[],w=h,C="string"==typeof w,k=[].slice.call(arguments,1);return e.each(function(){var r=T.isPlainObject(h)?T.extend(!0,{},T.fn.progress.settings,h):T.extend({},T.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,i=r.selector,l=r.error,o="."+e,a="module-"+e,c=T(this),d=T(this).find(i.bar),s=T(this).find(i.progress),u=T(this).find(i.label),f=this,p=c.data(a),m=!1,g={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var n=0,i=1,o=e/t;n<10&&!(1<(o*=i));)i=Math.pow(10,n++);return i},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){g.set.duration(),g.debug(f),g.read.metadata(),g.read.settings(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of progress",g),p=g,c.data(a,g)},destroy:function(){g.verbose("Destroying previous progress for",c),clearInterval(p.interval),g.remove.state(),c.removeData(a),p=void 0},reset:function(){g.remove.nextValue(),g.update.progress(0)},complete:function(e){(void 0===g.percent||g.percent<100)&&(g.remove.progressPoll(),!0!==e)&&g.set.percent(100)},read:{metadata:function(){var e={percent:g.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:g.helper.forceArray(c.data(t.value))};void 0!==e.total&&(g.debug("Total value set from metadata",e.total),g.set.total(e.total)),0<e.value.length&&(g.debug("Current value set from metadata",e.value),g.set.value(e.value),g.set.progress(e.value)),0<e.percent.length&&(g.debug("Current percent value set from metadata",e.percent),g.set.percent(e.percent))},settings:function(){!1!==r.total&&(g.debug("Current total set in settings",r.total),g.set.total(r.total)),!1!==r.value&&(g.debug("Current value set in settings",r.value),g.set.value(r.value),g.set.progress(g.value)),!1!==r.percent&&(g.debug("Current percent set in settings",r.percent),g.set.percent(r.percent))}},bind:{transitionEnd:function(t){d.one("transitionend"+o,function(e){clearTimeout(g.failSafeTimer),t.call(this,e)}),g.failSafeTimer=setTimeout(function(){d.triggerHandler("transitionend")},r.duration+r.failSafeDelay),g.verbose("Adding fail safe timer",g.timer)}},increment:function(e){var t;e=g.has.total()?(t=g.get.value(),e||1):(t=g.get.percent(),e||g.get.randomValue()),g.debug("Incrementing percentage by",t,t=t+e,e),t=g.get.normalizedValue(t),g.set.progress(t)},decrement:function(e){var t,n;g.get.total()?(n=(t=g.get.value())-(e=e||1),g.debug("Decrementing value by",e,t)):(n=(t=g.get.percent())-(e=e||g.get.randomValue()),g.debug("Decrementing percentage by",e,t)),n=g.get.normalizedValue(n),g.set.progress(n)},has:{progressPoll:function(){return g.progressPoll},total:function(){return!1!==g.get.total()}},get:{text:function(e,t){var n=g.get.value(t=t||0),i=g.get.total(),o=m?g.get.displayPercent(t):g.get.percent(t),a=!1!==i?Math.max(0,i-n):100-o;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",a).replace("{percent}",o).replace("{bar}",r.text.bars[t]||""),g.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return g.debug("Value cannot decrement below 0"),0;if(g.has.total()){if(e>g.total)return g.debug("Value cannot increment above total",g.total),g.total}else if(100<e)return g.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"===r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return g.debug("Generating random increment percentage"),Math.floor(Math.random()*r.random.max+r.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},displayPercent:function(e){var e=T(d[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:g.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return g.percent&&g.percent[e||0]||0},value:function(e){return g.nextValue||g.value&&g.value[e||0]||0},total:function(){return void 0!==g.total&&g.total}},create:{progressPoll:function(){g.progressPoll=setTimeout(function(){g.update.toNextValue(),g.remove.progressPoll()},g.get.updateInterval())}},is:{complete:function(){return g.is.success()||g.is.warning()||g.is.error()},success:function(){return c.hasClass(n.success)},warning:function(){return c.hasClass(n.warning)},error:function(){return c.hasClass(n.error)},active:function(){return c.hasClass(n.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){g.verbose("Removing progress poll timer"),g.progressPoll&&(clearTimeout(g.progressPoll),delete g.progressPoll)},nextValue:function(){g.verbose("Removing progress value stored for next update"),delete g.nextValue},state:function(){g.verbose("Removing stored state"),delete g.total,delete g.percent,delete g.value},active:function(){g.verbose("Removing active state"),c.removeClass(n.active)},success:function(){g.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){g.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){g.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){g.debug("set bar width with ",e),e=g.helper.forceArray(e);var o=-1,a=-1,r=g.helper.sum(e),s=d.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=T(d[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1===o&&(o=t),a=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){T(d[t]).css({borderTopLeftRadius:t===o?"":"0",borderBottomLeftRadius:t===o?"":"0",borderTopRightRadius:t===a?"":"0",borderBottomRightRadius:t===a?"":"0"})}),c.attr("data-percent",t)},duration:function(e){e=e||r.duration,g.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),d.css({"transition-duration":e})},percent:function(e){e=g.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,r.limitValues?Math.max(0,Math.min(100,e)):e});var t,n=g.has.total(),i=g.helper.sum(e),o=1<e.length&&n,a=g.helper.sum(g.helper.forceArray(g.value));o&&a>g.total?g.error(l.sumExceedsTotal,a,g.total):!o&&100<i?g.error(l.tooHigh,i):i<0?g.error(l.tooLow,i):(t=0<r.precision?r.precision:o?g.helper.derivePrecision(Math.min.apply(null,g.value),g.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),g.percent=a,n&&(g.value=e.map(function(e){return 0<t?Math.round(e/100*g.total*(10*t))/(10*t):Math.round(e/100*g.total*10)/10})),g.set.barWidth(e),g.set.labelInterval()),r.onChange.call(f,e,g.value,g.total)},labelInterval:function(){clearInterval(g.interval),g.bind.transitionEnd(function(){g.verbose("Bar finished animating, removing continuous label updates"),clearInterval(g.interval),m=!1,g.set.labels()}),m=!0,g.interval=setInterval(function(){T.contains(D.documentElement,f)||(clearInterval(g.interval),m=!1),g.set.labels()},r.framerate)},labels:function(){g.verbose("Setting both bar progress and outer label text"),g.set.barLabel(),g.set.state()},label:function(e){e&&(e=g.get.text(e),g.verbose("Setting label to text",e),u.text(e))},state:function(e){100===(e=void 0!==e?e:g.helper.sum(g.percent))?r.autoSuccess&&1===d.length&&!(g.is.warning()||g.is.error()||g.is.success())?(g.set.success(),g.debug("Automatically triggering success at 100%")):(g.verbose("Reached 100% removing active state"),g.remove.active(),g.remove.progressPoll()):0<e?(g.verbose("Adjusting active progress bar label",e),g.set.active()):(g.remove.active(),g.remove.warning(),g.remove.error(),g.remove.success(),g.set.label(r.text.active))},barLabel:function(n){s.each(function(e,t){t=T(t);void 0!==n?t.text(g.get.text(n,e)):"ratio"===r.label&&g.has.total()?(g.verbose("Adding ratio to bar label"),t.text(g.get.text(r.text.ratio,e))):"percent"===r.label&&(g.verbose("Adding percentage to bar label"),t.text(g.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,g.debug("Setting active state"),r.showActivity&&!g.is.active()&&c.addClass(n.active),g.remove.warning(),g.remove.error(),g.remove.success(),(e=r.onLabelUpdate("active",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onActive.call(f,g.value,g.total)})},success:function(e,t){e=e||r.text.success||r.text.active,g.debug("Setting success state"),c.addClass(n.success),g.remove.active(),g.remove.warning(),g.remove.error(),g.complete(t),e=r.text.success?r.onLabelUpdate("success",e,g.value,g.total):r.onLabelUpdate("active",e,g.value,g.total),g.set.label(e),g.bind.transitionEnd(function(){r.onSuccess.call(f,g.total)})},warning:function(e,t){e=e||r.text.warning,g.debug("Setting warning state"),c.addClass(n.warning),g.remove.active(),g.remove.success(),g.remove.error(),g.complete(t),(e=r.onLabelUpdate("warning",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onWarning.call(f,g.value,g.total)})},error:function(e,t){e=e||r.text.error,g.debug("Setting error state"),c.addClass(n.error),g.remove.active(),g.remove.success(),g.remove.warning(),g.complete(t),(e=r.onLabelUpdate("error",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onError.call(f,g.value,g.total)})},total:function(e){g.total=e},value:function(e){g.value=g.helper.forceArray(e)},progress:function(e){g.has.progressPoll()?(g.debug("Updated within interval, setting next update to use new value",e),g.set.nextValue(e)):(g.debug("First update in progress update interval, immediately updating",e),g.update.progress(e),g.create.progressPoll())},nextValue:function(e){g.nextValue=e}},update:{toNextValue:function(){var e=g.nextValue;e&&(g.debug("Update interval complete using last updated value",e),g.update.progress(e),g.remove.nextValue())},progress:function(e){var n=g.has.total(),e=(n&&g.set.value(e),g.helper.forceArray(e).map(function(e){var t;return!1===(e=g.get.numericValue(e))&&g.error(l.nonNumeric,e),e=g.get.normalizedValue(e),n?(t=0<g.total?e/g.total*100:100,g.debug("Calculating percent complete from total",t)):(t=e,g.debug("Setting value to exact percentage value",t)),t}));g.set.percent(e)}},setting:function(e,t){if(g.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,r,e);else{if(void 0===t)return r[e];T.isPlainObject(r[e])?T.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!r.silent&&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.silent&&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(){r.silent||(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())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(g.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r,s=p;return e=e||k,t=t||f,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,T.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!T.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:g.error(l.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(v)?v.push(n):void 0!==v?v=[v,n]:void 0!==n&&(v=n),a}};C?(void 0===p&&g.initialize(),g.invoke(w)):(void 0!==p&&p.invoke("destroy"),g.initialize())}),void 0!==v?v:this},T.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(V,q,N){"use strict";function j(e){return"function"==typeof e&&"number"!=typeof e.nodeType}q=void 0!==q&&q.Math===Math?q:globalThis,V.fn.sidebar=function(k){var T,e=V(this),D=V(q),S=V(N),A=V("body"),E=V("html"),M=V("head"),O=e.selector||"",P=Date.now(),I=[],R=k,F="string"==typeof R,L=[].slice.call(arguments,1);return e.each(function(){var o,a,e,r,s=V.isPlainObject(k)?V.extend(!0,{},V.fn.sidebar.settings,k):V.extend({},V.fn.sidebar.settings),t=s.selector,l=s.className,n=s.namespace,i=s.regExp,c=s.error,d="."+n,u="module-"+n,f=V(this),p=[q,N].indexOf(s.context)<0?S.find(s.context):A,m=p[0]===A[0],g=f.children(t.sidebar),h=(p.children(t.fixed),p.children(t.pusher)),v=this,b=f.data(u),y="",x="",w=!1,C={initialize:function(){C.debug("Initializing sidebar",k),C.create.id(),s.delaySetup?requestAnimationFrame(C.setup.layout):C.setup.layout(),requestAnimationFrame(function(){C.setup.cache()}),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),b=C,f.data(u,C)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),a="."+e,C.verbose("Creating unique id for element",e)}},destroy:function(){C.verbose("Destroying previous module for",f),f.off(d).removeData(u),C.is.ios()&&C.remove.ios(),p.off(a),D.off(a),S.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<h.find(e.target).length||h.is(e.target),e=p.is(e.target),t&&(C.verbose("User clicked on dimmed page"),C.hide()),e)&&(C.verbose("User clicked on dimmable context (scaled out page)"),C.hide())},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===V(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){C.verbose("Adding clickaway events to context",p),p.on("click"+a,C.event.clickaway).on("touchend"+a,C.event.clickaway)},scrollLock:function(){s.scrollLock&&(C.debug("Disabling page scroll"),(w=C.has.scrollbar())&&(C.save.bodyMargin(),C.set.bodyMargin()),p.addClass(l.locked)),C.verbose("Adding events to contain sidebar scroll"),S.on("touchmove"+a,C.event.touch),f.on("scroll"+d,C.event.containScroll)}},unbind:{clickaway:function(){C.verbose("Removing clickaway events from context",p),p.off(a)},scrollLock:function(){C.verbose("Removing scroll lock from page"),w&&C.restore.bodyMargin(),p.removeClass(l.locked),S.off(a),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=C.cache.width||f.outerWidth(),t=C.cache.height||f.outerHeight(),n=C.is.rtl(),i=C.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(C.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(C.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),C.is.ie()&&("left"===i||"right"===i?(C.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=V(n+="</style>").appendTo(M),C.debug("Adding sizing css to head",o)}},refresh:function(){C.verbose("Refreshing selector cache"),p=[q,N].indexOf(s.context)<0?S.find(s.context):A,C.refreshSidebars(),h=p.children(t.pusher),p.children(t.fixed),C.clear.cache()},refreshSidebars:function(){C.verbose("Refreshing other sidebars"),g=p.children(t.sidebar)},repaint:function(){C.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){C.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===p.children(t.pusher).length&&(C.debug("Adding wrapper element for sidebar"),C.error(c.pusher),h=V('<div class="pusher" />'),p.children().not(t.omitted).not(g).wrapAll(h),C.refresh()),0!==f.nextAll(t.pusher).length&&f.nextAll(t.pusher)[0]===h[0]||(C.debug("Moved sidebar to correct parent element"),C.error(c.movedSidebar,v),f.detach().prependTo(p),C.refresh()),C.clear.cache(),C.set.pushable(),C.set.direction()}},attachEvents:function(e,t){var n=V(e);t=j(C[t])?C[t]:C.toggle,0<n.length?(C.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):C.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===C.cache.leftBodyScrollbar&&(C.cache.leftBodyScrollbar=C.is.rtl()&&(C.is.iframe&&!C.is.firefox()||C.is.safari()||C.is.edge()||C.is.ie())),C.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=p.css((m?"margin-":"padding-")+(C.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),t=m?q.innerWidth-N.documentElement.clientWidth:p[0].offsetWidth-p[0].clientWidth;x=e+t}},show:function(e){if(e=j(e)?e:function(){},C.is.hidden())if(!1===s.onShow.call(v))C.verbose("Show callback returned false cancelling show");else{if(s.overlay&&(C.error(c.overlay),s.transition="overlay"),C.refresh(),C.othersActive())if(C.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!==s.transition)return void C.hideOthers(C.show);C.hideOthers()}else s.transition="overlay";C.set.dimmerStyles(),C.pushPage(function(){e.call(v),s.onVisible.call(v)}),s.onChange.call(v)}else C.debug("Sidebar is already visible")},hide:function(e){e=j(e)?e:function(){},(C.is.visible()||C.is.animating())&&!1!==s.onHide.call(v)&&(C.debug("Hiding sidebar",e),C.refreshSidebars(),C.pullPage(function(){e.call(v),s.onHidden.call(v)}),s.onChange.call(v))},othersAnimating:function(){return 0<g.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(f).filter("."+l.visible).length},othersActive:function(){return C.othersVisible()||C.othersAnimating()},hideOthers:function(e){var t=g.not(f).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i===n&&e()})},toggle:function(){C.verbose("Determining toggled direction"),C.is.hidden()?C.show():C.hide()},pushPage:function(t){var e,n,i=C.get.transition(),o="overlay"===i||C.othersActive()?f:h;t=j(t)?t:function(){},s.returnScroll&&(r=(m?D:p).scrollTop()),"scale down"===s.transition&&C.scrollToTop(),C.bind.scrollLock(),C.set.transition(i),C.repaint(),i=function(){C.bind.clickaway(),C.add.inlineCSS(),C.set.animating(),C.set.visible()},e=function(){C.set.dimmed()},n=function(e){e.target===o[0]&&(o.off("transitionend"+a,n),C.remove.animating(),t.call(v))},o.off("transitionend"+a),o.on("transitionend"+a,n),requestAnimationFrame(i),s.dimPage&&!C.othersVisible()&&requestAnimationFrame(e)},pullPage:function(t){var e,n,i=C.get.transition(),o="overlay"===i||C.othersActive()?f:h;t=j(t)?t:function(){},C.verbose("Removing context push state",C.get.direction()),C.unbind.clickaway(),C.unbind.scrollLock(),e=function(){C.set.transition(i),C.set.animating(),s.dimPage&&!C.othersVisible()&&C.set.closing(),C.remove.visible()},n=function(e){e.target===o[0]&&(o.off("transitionend"+a,n),C.remove.animating(),C.remove.closing(),C.remove.transition(),C.remove.inlineCSS(),"scale down"!==i&&!s.returnScroll||C.scrollBack(),s.dimPage&&!C.othersVisible()&&h.removeClass(l.dimmed),t.call(v))},o.off("transitionend"+a),o.on("transitionend"+a,n),requestAnimationFrame(e)},scrollToTop:function(){C.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(m?D:p)[0].scrollTo(0,0)},scrollBack:function(){C.verbose("Scrolling back to original page position"),(m?D:p)[0].scrollTo(0,r)},clear:{cache:function(){C.verbose("Clearing cached dimensions"),C.cache={}}},set:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";p.css((m?"margin-":"padding-")+n,x+"px"),p.find(t.bodyFixed.replace("right",n)).each(function(){var e=V(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+x+"px)")})},dimmerStyles:function(){s.blurring?h.addClass(l.blurring):h.removeClass(l.blurring)},ios:function(){E.addClass(l.ios)},pushed:function(){p.addClass(l.pushed)},pushable:function(){p.addClass(l.pushable)},dimmed:function(){h.addClass(l.dimmed)},active:function(){f.addClass(l.active)},animating:function(){f.addClass(l.animating)},closing:function(){h.addClass(l.closing)},transition:function(e){e=e||C.get.transition(),f.addClass(e)},direction:function(e){e=e||C.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){C.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){E.removeClass(l.ios)},pushed:function(){p.removeClass(l.pushed)},pushable:function(){p.removeClass(l.pushable)},active:function(){f.removeClass(l.active)},animating:function(){f.removeClass(l.animating)},closing:function(){h.removeClass(l.closing)},transition:function(e){e=e||C.get.transition(),f.removeClass(e)},direction:function(e){e=e||C.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";p.css((m?"margin-":"padding-")+n,y),p.find(t.bodyFixed.replace("right",n)).each(function(){var e=V(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},get:{direction:function(){return f.hasClass(l.top)?l.top:f.hasClass(l.right)?l.right:f.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=C.get.direction(),e=C.is.mobile()?"auto"===s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"===s.transition?s.defaultTransition.computer[e]:s.transition;return C.verbose("Determined transition",e),e}},has:{scrollbar:function(){return m||"hidden"!==p.css("overflow-y")}},is:{safari:function(){return void 0===C.cache.isSafari&&(C.cache.isSafari=/constructor/i.test(q.HTMLElement)||!!q.ApplePaySession),C.cache.isSafari},edge:function(){return void 0===C.cache.isEdge&&(C.cache.isEdge=!!q.setImmediate&&!C.is.ie()),C.cache.isEdge},firefox:function(){return void 0===C.cache.isFirefox&&(C.cache.isFirefox=!!q.InstallTrigger),C.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===C.cache.isIE&&(e=!q.ActiveXObject&&"ActiveXObject"in q,t="ActiveXObject"in q,C.cache.isIE=e||t),C.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(i.ios),n=e.match(i.mobileChrome);return!(!t||n||(C.verbose("Browser was found to be iOS",e),0))},mobile:function(){var e=navigator.userAgent;return e.match(i.mobile)?(C.verbose("Browser was found to be mobile",e),!0):(C.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!C.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return C.is.visible()},closed:function(){return C.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return p.hasClass(l.animating)},rtl:function(){return void 0===C.cache.isRTL&&(C.cache.isRTL="rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===A.attr("dir")||"rtl"===A.css("direction")||"rtl"===p.attr("dir")||"rtl"===p.css("direction")),C.cache.isRTL}},setting:function(e,t){if(C.debug("Changing setting",e,t),V.isPlainObject(e))V.extend(!0,s,e);else{if(void 0===t)return s[e];V.isPlainObject(s[e])?V.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(V.isPlainObject(e))V.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,s.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),C.verbose.apply(console,arguments)))},error:function(){s.silent||(C.error=Function.prototype.bind.call(console.error,console,s.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=Date.now())-(P||t),P=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=s.name+":",n=0;P=!1,clearTimeout(C.performance.timer),V.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):V.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var o,a,n,r=b;return e=e||L,t=t||v,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,V.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(V.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!V.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:C.error(c.method,i),!1;r=r[t]}}})),j(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(T)?T.push(n):void 0!==T?T=[T,n]:void 0!==n&&(T=n),a}};F?(void 0===b&&C.initialize(),C.invoke(R)):(void 0!==b&&C.invoke("destroy"),C.initialize())}),void 0!==T?T:this},V.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(g,h,v){"use strict";h=void 0!==h&&h.Math===Math?h:globalThis,g.fn.site=function(e){var l,i=Date.now(),o=[],t=e,n="string"==typeof t,c=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),a=r.namespace,d=r.error,s="module-"+a,u=g(v),f=this,p=u.data(s),m={initialize:function(){m.instantiate()},instantiate:function(){m.verbose("Storing instance of site",m),p=m,u.data(s,m)},normalize:function(){},fix:{consoleClear:function(){m.debug("Disabling programmatic console clearing"),h.console.clear=function(){}}},moduleExists:function(e){return void 0!==g.fn[e]&&void 0!==g.fn[e].settings},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){m.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){m.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,g.each(e,function(e,t){var n=!m.moduleExists(t)||g.fn[t].settings.namespace||!1;m.moduleExists(t)&&(m.verbose("Changing default setting",i,o,t),g.fn[t].settings[i]=o,a)&&n&&0<(n=g(":data(module-"+n+")")).length&&(m.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,g.each(e,function(e,t){var n;m.moduleExists(t)&&(m.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),o)&&a&&0<(n=g(":data(module-"+a+")")).length&&(m.verbose("Modifying existing settings",n),n[t]("setting",i))})}},enable:{console:function(){m.console(!0)},debug:function(e,t){e=e||r.modules,m.debug("Enabling debug for modules",e),m.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,m.debug("Enabling verbose debug for modules",e),m.change.setting("verbose",!0,e,t)}},disable:{console:function(){m.console(!1)},debug:function(e,t){e=e||r.modules,m.debug("Disabling debug for modules",e),m.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,m.debug("Disabling verbose debug for modules",e),m.change.setting("verbose",!1,e,t)}},console:function(e){e?void 0===p.cache.console?m.error(d.console):(m.debug("Restoring console function"),h.console=p.cache.console):(m.debug("Disabling console function"),p.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(){m.verbose("Destroying previous site for",u),u.removeData(s)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(void 0===t)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,m,e);else{if(void 0===t)return m[e];m[e]=t}},debug:function(){r.debug&&(r.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,r.name+":"),m.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,r.name+":"),m.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(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(m.performance.timer),g.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):g.each(o,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),o=[]}},invoke:function(i,e,t){var o,a,n,r,s=p;return e=e||c,t=t||f,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,g.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(g.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!g.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:m.error(d.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(l)?l.push(n):void 0!==l?l=[l,n]:void 0!==n&&(l=n),a}};return n?(void 0===p&&m.initialize(),m.invoke(t)):(void 0!==p&&m.destroy(),m.initialize()),void 0!==l?l:this},g.site=g.fn.site,g.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","flyout","form","modal","nag","popup","progress","rating","search","shape","sidebar","slider","state","sticky","tab","toast","transition","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},g.extend(g.expr.pseudos,{data:g.expr.createPseudo(function(t){return function(e){return!!g.data(e,t)}})})}(jQuery,window,document),function(Y,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,Y.fn.slider=function(P){var I,e=Y(this),R=Y(n),F=Y(t),L=e.selector||"",V=Date.now(),q=[],N=P,j="string"==typeof N,H=[].slice.call(arguments,1),z=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],U=0;return e.each(function(){var c,r,s,l,e,d,u,t,f,p,m,g,o,h,a,v,b=Y.isPlainObject(P)?Y.extend(!0,{},Y.fn.slider.settings,P):Y.extend({},Y.fn.slider.settings),n=b.className,i=b.metadata,y=b.namespace,x=b.error,w=b.keys,C=b.interpretLabel,k=!1,T="."+y,D="module-"+y,S=Y(this),A=this,E=S.data(D),M=1,O={initialize:function(){O.debug("Initializing slider",b),v=!0,t=U+=1,O.setup.layout(),O.setup.labels(),O.is.disabled()||O.bind.events(),O.read.metadata(),O.read.settings(),v=!1,O.instantiate()},instantiate:function(){O.verbose("Storing instance of slider",O),E=O,S.data(D,O)},destroy:function(){O.verbose("Destroying previous slider for",S),clearInterval(E.interval),O.unbind.events(),O.unbind.slidingEvents(),S.removeData(D),E=void 0},setup:{layout:function(){void 0===S.attr("tabindex")&&S.attr("tabindex",0),0===S.find(".inner").length&&S.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=O.get.precision(),s=S.find(".thumb:not(.second)"),c=s,O.is.range()&&(0===S.find(".thumb.second").length&&S.find(".inner").append("<div class='thumb second'></div>"),l=S.find(".thumb.second")),e=S.find(".track"),d=S.find(".track-fill"),g=s.width()/2},labels:function(){O.is.labeled()&&(0<(u=S.find(".labels:not(.auto)")).length?O.setup.customLabel():O.setup.autoLabel(),b.showLabelTicks)&&S.addClass(n.ticked)},customLabel:function(){var n,e=u.find(".label"),i=e.length,o=O.get.min(),a=O.get.max();e.each(function(e){var t=Y(this).attr("data-value");n=t?((a<t?a:t<o?o:t)-o)/(a-o):(e+1)/(i+1),O.update.labelPosition(n,Y(this))})},autoLabel:function(){0<(u=S.find(".labels")).length?u.empty():u=S.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=O.get.numLabels();e<=t;e++){var n=O.get.label(e),n=""!==n?e%O.get.gapRatio()?Y('<li class="halftick label"></li>'):Y('<li class="label">'+n+"</li>"):null;n&&(O.update.labelPosition(e/t,n),u.append(n))}}},bind:{events:function(){O.bind.globalKeyboardEvents(),O.bind.keyboardEvents(),O.bind.mouseEvents(),b.autoAdjustLabels&&O.bind.windowEvents()},keyboardEvents:function(){O.verbose("Binding keyboard events"),S.on("keydown"+T,O.event.keydown)},globalKeyboardEvents:function(){R.on("keydown"+T+t,O.event.activateFocus)},mouseEvents:function(){O.verbose("Binding mouse and touch events"),S.find(".track, .thumb, .inner").on("mousedown"+T,function(e){e.stopImmediatePropagation(),e.preventDefault(),O.event.down(e)}),S.on("mousedown"+T,O.event.down),S.on("mouseenter"+T,function(e){k=!0}),S.on("mouseleave"+T,function(e){k=!1}),S.find(".thumb").on("touchstart"+T,O.event.touchDown).on("touchmove"+T,O.event.move).on("touchend"+T,O.event.up).on("touchcancel"+T,O.event.touchCancel)},slidingEvents:function(){O.verbose("Binding page wide events while handle is being draged"),R.on("mousemove"+T,O.event.move),R.on("mouseup"+T,O.event.up)},windowEvents:function(){F.on("resize"+T,O.event.resize)}},unbind:{events:function(){S.find(".track, .thumb, .inner").off("mousedown"+T),S.off("mousedown"+T),S.off("mouseenter"+T),S.off("mouseleave"+T),S.find(".thumb").off("touchstart"+T).off("touchmove"+T).off("touchend"+T).off("touchcancel"+T),S.off("keydown"+T),S.off("focusout"+T),R.off("keydown"+T+t,O.event.activateFocus),F.off("resize"+T)},slidingEvents:function(){R.off("mousemove"+T),R.off("mouseup"+T)}},event:{down:function(e){e.preventDefault(),O.is.range()?(e=O.determine.eventPos(e),e=O.determine.pos(e),c=b.preventCrossover&&O.is.range()&&O.thumbVal===O.secondThumbVal?void(a=e):O.determine.closestThumb(e),void 0===h&&(h=O.get.currentThumbValue())):void 0===h&&(h=O.get.value()),O.is.disabled()||O.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),void 0===r&&(c=Y(e.target),e=e.touches?e:e.originalEvent,r=e.targetTouches[0].identifier,void 0===h)&&(h=O.get.currentThumbValue())},move:function(e){var t,n,i;"mousemove"===e.type&&e.preventDefault(),O.is.disabled()||(t=O.determine.valueFromEvent(e),"mousemove"===e.type&&void 0===c&&(n=O.determine.eventPos(e),n=O.determine.pos(n),c=n<a?s:l),0===O.get.step()||O.is.smooth()?(n=O.thumbVal,i=O.secondThumbVal,e=O.determine.smoothValueFromEvent(e),c.hasClass("second")?(b.preventCrossover&&O.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),i=t):(b.preventCrossover&&O.is.range()&&(t=Math.min(i,t),e=Math.min(i,e)),n=t),t=Math.abs(n-(i||0)),O.update.position(e),b.onMove.call(A,t,n,i)):O.update.value(t,function(e,t,n){b.onMove.call(A,e,t,n)}))},up:function(e){e.preventDefault(),O.is.disabled()||(e=O.determine.valueFromEvent(e),O.set.value(e),O.unbind.slidingEvents(),(r=void 0)!==h&&(h=void 0))},touchCancel:function(e){e.preventDefault(),(r=void 0)!==h&&(O.update.value(h),h=void 0)},keydown:function(e,t){if(b.preventCrossover&&O.is.range()&&O.thumbVal===O.secondThumbVal&&(c=void 0),O.is.focused()&&R.trigger(e),t||O.is.focused()){t=O.determine.keyMovement(e);if(0!==t)switch(e.preventDefault(),t){case 1:O.takeStep();break;case 2:O.takeStep(O.get.multiplier());break;case-1:O.backStep();break;case-2:O.backStep(O.get.multiplier())}}},activateFocus:function(e){!O.is.focused()&&O.is.hover()&&0!==O.determine.keyMovement(e)&&(e.preventDefault(),O.event.keydown(e,!0),S.trigger("focus"))},resize:function(e){M!==O.get.gapRatio()&&(O.setup.labels(),M=O.get.gapRatio())}},resync:function(){O.verbose("Resyncing thumb position based on value"),O.is.range()&&O.update.position(O.secondThumbVal,l),O.update.position(O.thumbVal,s),O.setup.labels()},takeStep:function(e){e=e||1;var t=O.get.step(),n=O.get.currentThumbValue();O.verbose("Taking a step"),0<t?O.set.value(n+t*e):0===t&&(t=O.get.precision(),O.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e||1;var t=O.get.step(),n=O.get.currentThumbValue();O.verbose("Going back a step"),0<t?O.set.value(n-t*e):0===t&&(t=O.get.precision(),O.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return S.hasClass(b.className.range)},hover:function(){return k},focused:function(){return S.is(":focus")},disabled:function(){return S.hasClass(b.className.disabled)},labeled:function(){return S.hasClass(b.className.labeled)},reversed:function(){return S.hasClass(b.className.reversed)},vertical:function(){return S.hasClass(b.className.vertical)},smooth:function(){return b.smooth||S.hasClass(b.className.smooth)}},get:{trackOffset:function(){return O.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return O.is.vertical()?e.height():e.width()},trackLeft:function(){return O.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return O.is.reversed()?O.get.trackLeft()+O.get.trackLength():O.get.trackLeft()},trackEndPos:function(){return O.is.reversed()?O.get.trackLeft():O.get.trackLeft()+O.get.trackLength()},trackStartMargin:function(){var e=O.is.vertical()?O.is.reversed()?S.css("padding-bottom"):S.css("padding-top"):O.is.reversed()?S.css("padding-right"):S.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=O.is.vertical()?O.is.reversed()?S.css("padding-top"):S.css("padding-bottom"):O.is.reversed()?S.css("padding-left"):S.css("padding-right");return e||"0px"},precision:function(){var e=O.get.step(),e=(e=0!==e?2===(e=String(e).split(".")).length?e[1].length:0:b.decimalPlaces,Math.pow(10,e));return O.debug("Precision determined",e),e},min:function(){return b.min},max:function(){var e=O.get.step(),t=O.get.min(),n=0===e?0:Math.floor((b.max-t)/e);return 0==(0===e?0:(b.max-t)%e)?b.max:t+n*e},step:function(){return b.step},numLabels:function(){var e=Math.round((O.get.max()-O.get.min())/(0===O.get.step()?1:O.get.step()));return O.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return b.labelType},label:function(e){if(C)return C(e);switch(b.labelType){case b.labelTypes.number:return Math.round((e*(0===O.get.step()?1:O.get.step())+O.get.min())*o)/o;case b.labelTypes.letter:return z[e%26];default:return e}},value:function(){return f},currentThumbValue:function(){return void 0!==c&&c.hasClass("second")?O.secondThumbVal:O.thumbVal},thumbValue:function(e){return"second"!==e?O.thumbVal:O.is.range()?O.secondThumbVal:void O.error(x.notrange)},multiplier:function(){return b.pageMultiplier},thumbPosition:function(e){return"second"!==e?p:O.is.range()?m:void O.error(x.notrange)},gapRatio:function(){var e=1;if(b.autoAdjustLabels){var t=O.get.numLabels(),n=O.get.trackLength(),i=1;if(0<n)for(;n/t*i<b.labelDistance;)t%i||(e=i),i+=1}return e}},determine:{pos:function(e){return O.is.reversed()?O.get.trackStartPos()-e+O.get.trackOffset():e-O.get.trackOffset()-O.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(O.determine.thumbPos(s)),t=Math.abs(e-t),n=parseFloat(O.determine.thumbPos(l)),e=Math.abs(e-n);return(t!==e||O.get.thumbValue()!==O.get.min())&&t<=e?s:l},closestThumbPos:function(e){var t=parseFloat(O.determine.thumbPos(s)),n=Math.abs(e-t),i=parseFloat(O.determine.thumbPos(l));return n<=Math.abs(e-i)?t:i},thumbPos:function(e){return O.is.vertical()?O.is.reversed()?e.css("bottom"):e.css("top"):O.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=O.get.min(),n=O.get.max(),e=n<e?n:e<t?t:e,i=O.get.trackLength(),n=Math.round((e-t)/(n-t)*i);return O.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=O.get.trackLength(),n=O.get.step(),e=Math.round(e*t);return 0===n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=O.determine.eventPos(e),t=O.determine.pos(e),e=e<O.get.trackOffset()?O.is.reversed()?O.get.max():O.get.min():e>O.get.trackOffset()+O.get.trackLength()?O.is.reversed()?O.get.min():O.get.max():O.determine.value(t);return e},smoothValueFromEvent:function(e){var t=O.get.min(),n=O.get.max(),i=O.get.trackLength(),e=O.determine.eventPos(e)-O.get.trackOffset(),e=(e<0?0:i<e?i:e)/i;return(e=O.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],i=0;i<t.touches.length;i++)if(t.touches[i].identifier===r){n=t.touches[i];break}var o=n.pageY,a=n.pageX;return O.is.vertical()?o:a}o=e.pageY||e.originalEvent.pageY,a=e.pageX||e.originalEvent.pageX;return O.is.vertical()?o:a},value:function(e){var t=O.is.reversed()?O.get.trackEndPos():O.get.trackStartPos(),t=(e-t)/((O.is.reversed()?O.get.trackStartPos():O.get.trackEndPos())-t),n=O.get.max()-O.get.min(),i=O.get.step(),t=t*n,n=0===i?t:Math.round(t/i)*i;return O.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&O.verbose("Rounding value to closest step: "+n),O.verbose("Cutting off additional decimal places"),Math.round((n+O.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!O.is.vertical()||O.is.reversed()?w.downArrow:w.upArrow,n=!O.is.vertical()||O.is.reversed()?w.upArrow:w.downArrow,i=!O.is.vertical()&&O.is.reversed()?w.rightArrow:w.leftArrow,o=!O.is.vertical()&&O.is.reversed()?w.leftArrow:w.rightArrow;return e===t||e===i?-1:e===n||e===o?1:e===w.pageDown?-2:e===w.pageUp?2:0}},handleNewValuePosition:function(e){var t=O.get.min(),n=O.get.max();return e<=t?e=t:n<=e&&(e=n),O.determine.positionFromValue(e)},set:{value:function(i,o){o=!1!==o;var a=void 0===h;h=void 0===h?O.get.value():h,O.update.value(i,function(e,t,n){v&&!b.fireOnInit||!o||(i!==h&&b.onChange.call(A,e,t,n),b.onMove.call(A,e,t,n)),a&&(h=void 0)})},rangeValue:function(e,t,n){var i,o,a;n=!1!==n,O.is.range()?(i=O.get.min(),o=O.get.max(),h=(a=void 0===h)?O.get.value():h,e<=i?e=i:o<=e&&(e=o),t<=i?t=i:o<=t&&(t=o),O.thumbVal=e,O.secondThumbVal=t,f=Math.abs(O.thumbVal-O.secondThumbVal),O.update.position(O.thumbVal,s),O.update.position(O.secondThumbVal,l),v&&!b.fireOnInit||!n||(f!==h&&b.onChange.call(A,f,O.thumbVal,O.secondThumbVal),b.onMove.call(A,f,O.thumbVal,O.secondThumbVal)),a&&(h=void 0)):O.error(x.notrange)},position:function(e,t){e=O.determine.value(e);"second"===t?(O.secondThumbVal=e,O.update.position(e,l)):(O.thumbVal=e,O.update.position(e,s)),f=Math.abs(O.thumbVal-(O.secondThumbVal||0)),O.set.value(f)}},update:{value:function(e,t){var n=O.get.min(),i=O.get.max();e<=n?e=n:i<=e&&(e=i),O.is.range()?((c=void 0===c?e<=O.get.currentThumbValue()?s:l:c).hasClass("second")?(b.preventCrossover&&O.is.range()&&(e=Math.max(O.thumbVal,e)),O.secondThumbVal=e):(b.preventCrossover&&O.is.range()&&(e=Math.min(O.secondThumbVal,e)),O.thumbVal=e),f=Math.abs(O.thumbVal-O.secondThumbVal)):(f=e,O.thumbVal=f),O.update.position(e),O.debug("Setting slider value to "+f),"function"==typeof t&&t(f,O.thumbVal,O.secondThumbVal)},position:function(e,t){var n=O.handleNewValuePosition(e),t=t||c,i=O.thumbVal||O.get.min(),o=O.secondThumbVal||O.get.min();O.is.range()&&t.hasClass("second")?(m=n,o=e):(p=n,i=e);var a,r=O.get.min(),s=O.get.max(),e=(e-r)/(s-r)*100,l=(Math.min(i,o)-r)/(s-r)*100,i=100*(1-(Math.max(i,o)-r)/(s-r)),o=O.is.vertical()?O.is.reversed()?(a={bottom:"calc("+e+"% - "+g+"px)",top:"auto"},{bottom:l+"%",top:i+"%"}):(a={top:"calc("+e+"% - "+g+"px)",bottom:"auto"},{top:l+"%",bottom:i+"%"}):O.is.reversed()?(a={right:"calc("+e+"% - "+g+"px)",left:"auto"},{right:l+"%",left:i+"%"}):(a={left:"calc("+e+"% - "+g+"px)",right:"auto"},{left:l+"%",right:i+"%"});t.css(a),d.css(o),O.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=O.get.trackStartMargin(),i=O.get.trackEndMargin(),o=O.is.vertical()?O.is.reversed()?"bottom":"top":O.is.reversed()?"right":"left",a=O.is.reversed()&&!O.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+i+") * "+e)+a+n+")")}},goto:{max:function(){O.set.value(O.get.max())},min:function(){O.set.value(O.get.min())}},read:{metadata:function(){var e={thumbVal:S.data(i.thumbVal),secondThumbVal:S.data(i.secondThumbVal)};e.thumbVal&&(O.is.range()&&e.secondThumbVal?(O.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),O.set.rangeValue(e.thumbVal,e.secondThumbVal)):(O.debug("Current value set from metadata",e.thumbVal),O.set.value(e.thumbVal)))},settings:function(){!1!==b.start&&(O.is.range()?(O.debug("Start position set from settings",b.start,b.end),O.set.rangeValue(b.start,b.end)):(O.debug("Start position set from settings",b.start),O.set.value(b.start)))}},setting:function(e,t){if(O.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,b,e);else{if(void 0===t)return b[e];Y.isPlainObject(b[e])?Y.extend(!0,b[e],t):b[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,O,e);else{if(void 0===t)return O[e];O[e]=t}},debug:function(){!b.silent&&b.debug&&(b.performance?O.performance.log(arguments):(O.debug=Function.prototype.bind.call(console.info,console,b.name+":"),O.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?O.performance.log(arguments):(O.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),O.verbose.apply(console,arguments)))},error:function(){b.silent||(O.error=Function.prototype.bind.call(console.error,console,b.name+":"),O.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=Date.now())-(V||t),V=t,q.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(O.performance.timer),O.performance.timer=setTimeout(O.performance.display,500)},display:function(){var e=b.name+":",n=0;V=!1,clearTimeout(O.performance.timer),Y.each(q,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",L&&(e+=" '"+L+"'"),0<q.length&&(console.groupCollapsed(e),console.table?console.table(q):Y.each(q,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),q=[]}},invoke:function(i,e,t){var o,a,n,r,s=E;return e=e||H,t=t||A,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,Y.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Y.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!Y.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:O.error(x.method,i),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(I)?I.push(n):void 0!==I?I=[I,n]:void 0!==n&&(I=n),a}};j?(void 0===E&&O.initialize(),O.invoke(N)):(void 0!==E&&E.invoke("destroy"),O.initialize())}),void 0!==I?I:this},Y.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document),function(P,I,R){"use strict";function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}I=void 0!==I&&I.Math===Math?I:globalThis,P.fn.tab=function(l){var c,d=F(this)?P(I):P(this),u=P(R),f=d.selector||"",D=Date.now(),S=[],A=l,E="string"==typeof A,M=[].slice.call(arguments,1),O=!1;return d.each(function(){var p,o,m,g,h,v=P.isPlainObject(l)?P.extend(!0,{},P.fn.tab.settings,l):P.extend({},P.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,x=v.error,n=v.regExp,i="."+v.namespace,e="module-"+v.namespace,w=P(this),a={},C=!0,r=0,k=this,s=w.data(e),T={initialize:function(){T.debug("Initializing tab menu item",w),T.determineTabs(),T.debug("Determining tabs",v.context,o),v.auto&&T.set.auto(),T.bind.events(),v.history&&!O&&(T.initializeHistory(),O=!0);var e,t=T.determine.activeTab();v.autoTabActivation&&void 0===s&&null===t&&(t=!0===v.autoTabActivation?T.get.initialPath():v.autoTabActivation,T.debug("No active tab detected, setting tab active",t),T.changeTab(t)),null!==t&&v.history&&(e=P.address.autoUpdate(),P.address.autoUpdate(!1),P.address.value(t),P.address.autoUpdate(e)),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),s=T,w.data(e,T)},destroy:function(){T.debug("Destroying tabs",w),w.removeData(e).off(i)},bind:{events:function(){var e;null!==(e=k)&&e===e.window||(T.debug("Attaching tab activation events to element",w),w.on("click"+i,T.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<w.closest(t.ui).length?(e=w.closest(t.ui),T.verbose("Using closest UI element as parent",e)):e=w,p=e.parent(),T.verbose("Determined parent element for creating context",p)):v.context?(p=[I,R].indexOf(v.context)<0?u.find(v.context):P(v.context),T.verbose("Using selector for tab context",v.context,p)):p=P("body"),v.childrenOnly?(o=p.children(t.tabs),T.debug("Searching tab context children for tabs",p,o)):(o=p.find(t.tabs),T.debug("Searching tab context for tabs",p,o))},initializeHistory:function(){if(T.debug("Initializing page state"),void 0===P.address)return T.error(x.state),!1;if("state"===v.historyType){if(T.debug("Using HTML5 to manage state"),!1===v.path)return T.error(x.path),!1;P.address.history(!0).state(v.path),P(I).trigger("popstate")}P.address.bind("change",T.event.history.change)},event:{click:function(e){var t=P(this).data(y.tab);void 0!==t?(v.history?(T.verbose("Updating page state",e),P.address.value(t)):(T.verbose("Changing tab",e),T.changeTab(t)),e.preventDefault()):T.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||T.get.initialPath(),n=v.templates.determineTitle(t)||!1;T.performance.display(),T.debug("History change event",t,e),h=e,void 0!==t&&T.changeTab(t),n&&P.address.title(n)}}},refresh:function(){m&&(T.debug("Refreshing tab",m),T.changeTab(m))},cache:{read:function(e){return void 0!==e&&a[e]},add:function(e,t){e=e||m,T.debug("Adding cached content for",e),a[e]=t},remove:function(e){e=e||m,T.debug("Removing cached content for",e),delete a[e]}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";T.verbose("Setting up automatic tab retrieval from server",e),P.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=T.get.tabElement(e);t.hasClass(b.loading)||(T.verbose("Setting loading state for",t),t.addClass(b.loading).siblings(o).removeClass(b.active+" "+b.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){P.address.value(e)}},changeTab:function(c){var d=I.history&&I.history.pushState&&v.ignoreFirstLoad&&C,u=v.auto||P.isPlainObject(v.apiSettings),f=u&&!d?T.utilities.pathToArray(c):T.get.defaultPathArray(c);c=T.utilities.arrayToPath(f),P.each(f,function(e,t){var n,i,o=f.slice(0,e+1),a=T.utilities.arrayToPath(o),r=T.is.tab(a),s=e+1===f.length,l=T.get.tabElement(a);return T.verbose("Looking for tab",t),r?(T.verbose("Tab was found",t),m=a,g=T.utilities.filterArray(f,o),s?i=!0:(r=f.slice(0,e+2),t=T.utilities.arrayToPath(r),(i=!T.is.tab(t))&&T.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(k,a)?(T.debug("onBeforeChange returned false, cancelling tab change",l),!1):i&&u?(d?(T.debug("Ignoring remote content on first tab load",a),C=!1,T.cache.add(c,l.html()),T.activate.all(a),v.onFirstLoad.call(l[0],a,g,h),v.onLoad.call(l[0],a,g,h)):(T.activate.navigation(a),T.fetch.content(a,c)),!1):(T.debug("Opened local tab",a),T.activate.all(a),T.cache.read(a)||(T.cache.add(a,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),void v.onLoad.call(l[0],a,g,h))):-1!==c.search("/")||""===c?(T.error(x.missingTab,w,p,a),!1):(c=T.escape.string(c),a=(n=P("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=T.get.tabElement(a),n&&0<n.length&&a?(T.debug("Anchor link used, opening parent tab",l,n),!1===v.onBeforeChange.call(k,a)?T.debug("onBeforeChange returned false, cancelling tab change",l):(l.hasClass(b.active)||setTimeout(function(){T.scrollTo(n)},0),T.activate.all(a),T.cache.read(a)||(T.cache.add(a,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),v.onLoad.call(l[0],a,g,h)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(T.debug("Forcing scroll to an in-page link in a hidden tab",t,e),u.scrollTop(t))},update:{content:function(e,t,n){var i=T.get.tabElement(e),o=i[0];n=void 0!==n?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(P(t).clone(!0)):n?(T.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(T.debug("Updating HTML",e,t),o.innerHTML=t)}},fetch:{content:function(t,n){var e,i=T.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"===v.cacheType&&T.cache.add(n,e),T.update.content(t,e),t==m?(T.debug("Content loaded",t),T.activate.tab(t)):T.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,g,h),v.onLoad.call(i[0],t,g,h),v.loadOnce?T.cache.add(n,!0):"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=(e=i.children().clone(!0)).not("script");T.cache.add(n,e)},0):T.cache.add(n,i.html())},urlData:{tab:n}},a=i.api("get request")||!1,a=a&&"pending"===a.state();n=n||t,e=T.cache.read(n),v.cache&&e?(T.activate.tab(t),T.debug("Adding cached content",n),v.loadOnce||("once"===v.evaluateScripts?T.update.content(t,e,!1):T.update.content(t,e)),v.onLoad.call(i[0],t,g,h)):a?(T.set.loading(t),T.debug("Content is already loading",n)):void 0!==P.api?(e=P.extend(!0,{},v.apiSettings,o),T.debug("Retrieving remote content",n,e),T.set.loading(t),i.api(e)):T.error(x.api)}},activate:{all:function(e){T.activate.tab(e),T.activate.navigation(e)},tab:function(e){var t=T.get.tabElement(e),n="siblings"===v.deactivate?t.siblings(o):o.not(t),i=t.hasClass(b.active);T.verbose("Showing tab content for",t),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=T.get.navElement(e),n="siblings"===v.deactivate?t.siblings(d):d.not(t),i=t.hasClass(b.active);T.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){T.deactivate.navigation(),T.deactivate.tabs()},navigation:function(){d.removeClass(b.active)},tabs:function(){o.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return void 0!==e&&0<T.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||o.eq(0).data(y.tab)},path:function(){return P.address.value()},defaultPathArray:function(e){return T.utilities.pathToArray(T.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+T.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(T.debug("Found default tab",t),r<v.maxDepth)return r++,T.get.defaultPath(t);T.error(x.recursion)}else T.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||m,d.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||m,t=T.utilities.pathToArray(e),t=T.utilities.last(t),e=o.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]'),t=o.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return m}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){P(t).hasClass(b.active)&&(t=P(this).data(y.tab),d.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]').hasClass(b.active))&&(n=t)}),n}},utilities:{filterArray:function(e,t){return P.grep(e,function(e){return-1===P.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?m:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(T.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,v,e);else{if(void 0===t)return v[e];P.isPlainObject(v[e])?P.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,T,e);else{if(void 0===t)return T[e];T[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,v.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),T.verbose.apply(console,arguments)))},error:function(){v.silent||(T.error=Function.prototype.bind.call(console.error,console,v.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-(D||t),D=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=v.name+":",n=0;D=!1,clearTimeout(T.performance.timer),P.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||M,t=t||k,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,P.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(P.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!P.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:T.error(x.method,i),!1;r=r[t]}}})),F(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(c)?c.push(n):void 0!==c?c=[c,n]:void 0!==n&&(c=n),a}};E?(void 0===s&&T.initialize(),T.invoke(A)):(void 0!==s&&s.invoke("destroy"),T.initialize())}),void 0!==c?c:this},P.tab=function(){P(I).tab.apply(this,arguments)},P.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(O,P,I){"use strict";function R(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.toast=function(C){var k,e=O(this),T=e.selector||"",D=Date.now(),S=[],A=C,E="string"==typeof A,M=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,r,s,l,e,c=O.isPlainObject(C)?O.extend(!0,{},O.fn.toast.settings,C):O.extend({},O.fn.toast.settings),d=c.className,u=c.selector,f=c.error,t=c.namespace,p=c.fields,m="."+t,g=t+"-module",h=O(this),v=c.context?[P,I].indexOf(c.context)<0?O(I).find(c.context):O(c.context):O("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),y=this,x=b?h.data(g):void 0,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(b||""!==c.message||""!==c.title||""!==w.get.iconClass()||c.showImage||w.has.configActions())&&("string"==typeof c.showProgress&&-1!==[d.top,d.bottom].indexOf(c.showProgress)||(c.showProgress=!1),w.create.toast(),c.closeOnClick&&(c.closeIcon||0<O(i).find(u.input).length||w.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(d.unclickable),w.bind.events()),w.instantiate(),n&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),x=w,h.data(g,x)},destroy:function(){n&&(w.debug("Removing toast",n),w.unbind.events(),n.remove(),s=i=n=void 0,c.onRemove.call(n,y),l=r=o=void 0),h.removeData(g)},show:function(e){!1===c.onShow.call(n,y)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===c.onHide.call(n,y)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),v.append(O("<div/>",{class:c.position+" "+d.container+" "+(c.horizontal?d.horizontal:"")+" "+(c.context&&"body"!==c.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){n=O("<div/>",{class:d.box});var e,t=w.get.iconClass();b?(i=c.cloneModule?h.clone().removeAttr("id"):h,l=i.find("> i"+w.helpers.toClass(d.close)),c.closeIcon=0<l.length,""!==t&&i.find(u.icon).attr("class",t+" "+d.icon),c.showImage&&i.find(u.image).attr("src",c.showImage),""!==c.title&&i.find(u.title).html(w.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(u.message).html(w.helpers.escape(c.message,c.preserveHTML))):(w.verbose("Creating toast"),i=O("<div/>",{role:"alert"}),e=O("<div/>",{class:d.content}),""!==t&&i.append(O("<i/>",{class:t+" "+d.icon})),c.showImage&&i.append(O("<img>",{class:d.image+" "+c.classImage,src:c.showImage})),""!==c.title&&(t="_"+w.get.id()+"title",i.attr("aria-labelledby",t),e.append(O("<div/>",{class:d.title,id:t,html:w.helpers.escape(c.title,c.preserveHTML)}))),t="_"+w.get.id()+"desc",i.attr("aria-describedby",t),e.append(O("<div/>",{class:d.message,id:t,html:w.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+d.toast).append(e),i.css("opacity",String(c.opacity)),c.closeIcon&&((l=O("<i/>",{class:d.close+" "+("string"==typeof c.closeIcon?c.closeIcon:""),role:"button",tabindex:0,"aria-label":c.text.close})).hasClass(d.left)?i.prepend(l):i.append(l))),i.hasClass(d.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),a=i.find(".actions"),w.has.configActions()&&(0===a.length&&(a=O("<div/>",{class:d.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical))&&(a.removeClass(d.vertical),w.error(f.verticalCard)),c.actions.forEach(function(e){var t=e[p.icon]?"<i "+(e[p.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[p.icon])+' icon"></i>':"",n=w.helpers.escape(e[p.text]||"",c.preserveHTML),i=w.helpers.deQuote(e[p.class]||""),o=e[p.click]&&R(e[p.click])?e[p.click]:function(){};a.append(O("<button/>",{html:t+n,"aria-label":(e[p.text]||e[p.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+i,on:{click:function(){var e=O(this);e.is(u.approve)||e.is(u.deny)||!1===o.call(y,h)||w.close()}}}))})),a&&a.hasClass(d.vertical)&&i.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||i.addClass(d.actions)),"auto"===c.displayTime&&(c.displayTime=Math.max(c.minDisplayTime,i.text().split(" ").length/c.wordsPerMinute*6e4)),n.append(i),0<a.length&&a.hasClass(d.attached)&&(a.addClass(d.buttons),a.detach(),i.addClass(d.attached),a.hasClass(d.vertical)?(i.wrap(O("<div/>",{class:d.vertical+" "+d.attached+" "+(c.compact?d.compact:"")})),a.hasClass(d.left)?i.addClass(d.left).parent().addClass(d.left).prepend(a):i.parent().append(a)):a.hasClass(d.top)?(n.prepend(a),i.addClass(d.bottom)):(n.append(a),i.addClass(d.top))),h!==i&&(y=(h=i)[0]),0<c.displayTime&&(t=d.progressing+" "+(c.pauseOnHover?d.pausable:""),c.showProgress&&(o=O("<div/>",{class:d.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(d.inverted)?o.addClass(d.inverted):o.removeClass(d.inverted)),r=O("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),o.addClass(c.showProgress).append(r),o.hasClass(d.top)?n.prepend(o):n.append(o),r.css("animation-duration",c.displayTime/1e3+"s")),(s=O("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(d.compact),i.addClass(d.compact),o)&&o.addClass(d.compact),c.newestOnTop?n.prependTo(w.get.container()):n.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),c.closeIcon&&l.on("click"+m,w.event.close),i.on("click"+m,w.event.click),s&&s.on("animationend"+m,w.event.close),n.on("click"+m,u.approve,w.event.approve).on("click"+m,u.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),c.closeIcon&&l.off("click"+m),i.off("click"+m),s&&s.off("animationend"+m),n.off("click"+m)}},animate:{show:function(e){e=R(e)?e:function(){},c.transition&&w.can.useElement("transition")&&(w.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,silent:c.silent,duration:c.transition.showDuration,onComplete:function(){e.call(n,y),c.onVisible.call(n,y)}}))},close:function(e){e=R(e)?e:function(){},c.transition&&void 0!==O.fn.transition?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,silent:c.silent,interval:50,onBeforeHide:function(e){e=R(e)?e:function(){},""!==c.transition.closeEasing?n&&(n.css("opacity","0"),n.wrap("<div/>").parent().hide(c.transition.closeDuration,c.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,y),c.onHidden.call(n,y),w.destroy()}}):w.error(f.noTransition)},pause:function(){s.css("animationPlayState","paused"),r&&r.css("animationPlayState","paused")},continue:function(){s.css("animationPlayState","running"),r&&r.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{id:function(){return e},containers:function(){return v.children(w.helpers.toClass(c.position)+u.container+(c.horizontal?w.helpers.toClass(d.horizontal):":not("+w.helpers.toClass(d.horizontal)+")")+(c.context&&"body"!==c.context?w.helpers.toClass(d.absolute):":not("+w.helpers.toClass(d.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return O(w.get.container()).find(u.box)},iconClass:function(){return"string"==typeof c.showIcon?c.showIcon:c.showIcon&&c.icons[c.class]?c.icons[c.class]:""},remainingTime:function(){return s?s.css("opacity")*c.displayTime:0}},set:{visible:function(){i.addClass(d.visible)}},remove:{visible:function(){i.removeClass(d.visible)}},event:{close:function(){w.close()},click:function(e){0===O(e.target).closest(u.clickable).length&&(!1!==c.onClick.call(n,y)&&c.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===c.onApprove.call(y,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===c.onDeny.call(y,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/["&'<>`]/.test(e))?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return void 0!==O.fn[e]||(w.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(w.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,c,e);else{if(void 0===t)return c[e];O.isPlainObject(c[e])?O.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,w,e);else{if(void 0===t)return w[e];w[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=Date.now())-(D||t),D=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=c.name+":",n=0;D=!1,clearTimeout(w.performance.timer),O.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",T&&(e+=" '"+T+"'"),0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):O.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=x;return e=e||M,t=t||y,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,O.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(O.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;{if(!O.isPlainObject(r[t])||e===o)return void 0!==r[t]?a=r[t]:w.error(f.method,i),!1;r=r[t]}}})),R(a)?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(k)?k.push(n):void 0!==k?k=[k,n]:void 0!==n&&(k=n),a}};E?(void 0===x&&w.initialize(),w.invoke(A)):(void 0!==x&&x.invoke("destroy"),w.initialize(),k=h)}),void 0!==k?k:this},O.toast=O.fn.toast,O.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},O.extend(O.easing,{easeOutBounce:function(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document),function(x,e){"use strict";void 0!==e&&e.Math===Math||globalThis,x.fn.transition=function(){var m,a=x(this),r=a.selector||"",s=Date.now(),g=[],h=arguments,v=h[0],b=[].slice.call(arguments,1),y="string"==typeof v;return a.each(function(n){var l,c,t,d,i,e,o,u=x(this),f=this,p={initialize:function(){l=p.get.settings.apply(f,h),d=l.className,t=l.error,i=l.metadata,o="."+l.namespace,e="module-"+l.namespace,c=u.data(e)||p,!1===(y=y&&p.invoke(v))&&(p.verbose("Converted arguments into settings object",l),l.interval?p.delay(l.interval):p.animate(),p.instantiate())},instantiate:function(){p.verbose("Storing instance of module",p),c=p,u.data(e,c)},destroy:function(){p.verbose("Destroying previous module for",f),u.removeData(e)},refresh:function(){p.verbose("Refreshing display type on next animation"),delete p.displayType},forceRepaint:function(){p.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){p.verbose("Repainting element");f.offsetWidth},delay:function(e){var t=(t=p.get.animationDirection())||(p.can.transition()?p.get.direction():"static");e=void 0!==e?e:l.interval,t="auto"===l.reverse&&t===d.outward||!0===l.reverse?(a.length-n)*e:n*e,p.debug("Delaying animation by",t),setTimeout(p.animate,t)},animate:function(e){if(l=e||l,p.debug("Preparing animation",l.animation),p.is.animating()){if(l.queue)return!l.allowRepeats&&p.has.direction()&&p.is.occurring()&&!0!==p.queuing?p.debug("Animation is currently occurring, preventing queueing same animation",l.animation):p.queue(l.animation),!1;if(!l.allowRepeats&&p.is.occurring())return p.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;p.debug("New animation started, completing previous early",l.animation),c.complete()}p.can.animate()?p.set.animating(l.animation):p.error(t.noAnimation,l.animation,f)},reset:function(){p.debug("Resetting animation to beginning conditions"),p.remove.animationCallbacks(),p.restore.conditions(),p.remove.animating()},queue:function(e){p.debug("Queueing animation of",e),p.queuing=!0,u.one("animationend.queue"+o,function(){p.queuing=!1,p.repaint(),p.animate.apply(this,l)})},complete:function(e){e&&e.target===f&&e.stopPropagation(),p.debug("Animation complete",l.animation),p.remove.completeCallback(),p.remove.failSafe(),p.is.looping()||(p.is.outward()?(p.verbose("Animation is outward, hiding element"),p.restore.conditions(),p.hide()):p.is.inward()?(p.verbose("Animation is inward, showing element"),p.restore.conditions(),p.show()):(p.verbose("Static animation completed"),p.restore.conditions(),l.onComplete.call(f)))},force:{visible:function(){var e=u.attr("style"),e=p.get.userStyle(e),t=p.get.displayType(),e=e+"display: "+t+" !important;",n=u[0].style.display;return!t||"none"===n&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(p.remove.transition(),!1):(p.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),e=void 0===e||""===e;"none"===u.css("display")||p.is.hidden()?e&&u.removeAttr("style"):(p.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(e){var n=!1;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),x.each(e,function(e,t){t!==d.inward&&t!==d.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){p.remove.completeCallback(),e=e||l.animation;e=p.get.animationClass(e);p.save.animation(e),p.force.visible()&&(p.remove.hidden(),p.remove.direction(),p.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(p.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||p.get.direction())===d.inward?p.set.inward():p.set.outward()},looping:function(){p.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){p.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){p.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(e){e=e||p.get.animationClass(),p.debug("Starting tween",e),u.addClass(e).one("animationend.complete"+o,p.complete),l.useFailSafe&&p.add.failSafe(),p.set.duration(l.duration),l.onStart.call(f)}},save:{animation:function(e){p.cache||(p.cache={}),p.cache.animation=e},displayType:function(e){"none"!==e&&u.data(i.displayType,e)},transitionExists:function(e,t){x.fn.transition.exists[e]=t,p.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=p.get.currentAnimation();e&&(u.removeClass(e),p.verbose("Removing animation class",p.cache)),p.remove.duration()}},add:{failSafe:function(){var e=p.get.duration();p.timer=setTimeout(function(){u.triggerHandler("animationend")},e+l.failSafeDelay),p.verbose("Adding fail safe timer",p.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){p.remove.queueCallback(),p.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){p.verbose("Removing fail safe timer",p.timer),p.timer&&clearTimeout(p.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){p.debug("Transitions are no longer looping"),p.is.looping()&&(p.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?x.extend(!0,{},x.fn.transition.settings,e):"function"==typeof n?x.extend({},x.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?x.extend({},x.fn.transition.settings,t,{animation:e}):"function"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,onComplete:t}):x.extend({},x.fn.transition.settings,{animation:e})},animationClass:function(e){var e=e||l.animation,t=p.can.transition()&&!p.has.direction()?p.get.direction()+" ":"";return d.animating+" "+d.transition+" "+t+e},currentAnimation:function(){return!(!p.cache||void 0===p.cache.animation)&&p.cache.animation},currentDirection:function(){return p.is.inward()?d.inward:d.outward},direction:function(){return p.is.hidden()||!p.is.visible()?d.inward:d.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),x.each(e,function(e,t){t===d.inward?n=d.inward:t===d.outward&&(n=d.outward)})),n||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||l.duration)?u.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return l.displayType||((e=void 0===e||e)&&void 0===u.data(i.displayType)&&(""===(e=u.css("display"))||"none"===e?p.can.transition(!0):p.save.displayType(e)),u.data(i.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return x.fn.transition.exists[e]}},can:{transition:function(e){var t,n,i,o,a=l.animation,r=p.get.transitionExists(a),s=p.get.displayType(!1);if(void 0===r||e){if(p.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=x("<"+t+" />").addClass(e).insertAfter(u)).addClass(a).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),t.detach().insertAfter(u),i=t.addClass(d.inward).css("animationName"),s||(t.detach().insertAfter(u),s=t.attr("class",e).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),p.verbose("Determining final display state",s),p.save.displayType(s)),t.remove(),n!==i)p.debug("Direction exists for animation",a),o=!0;else{if("none"===n||!n)return void p.debug("No animation defined in css",a);p.debug("Static animation found",a,s),o=!1}p.save.transitionExists(a,o)}return void 0!==r?r:o},animate:function(){return void 0!==p.can.transition()}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.looping)},occurring:function(e){return e="."+(e=e||l.animation).replace(" ","."),0<u.filter(e).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!0}},hide:function(){if(!1===l.onHide.call(f))return p.verbose("Hide callback returned false cancelling hide"),!1;p.verbose("Hiding element"),p.is.animating()&&p.reset(),f.blur(),p.remove.display(),p.remove.visible(),l.onBeforeHide.call(f,p.hideNow)},hideNow:function(){p.set.hidden(),p.force.hidden(),l.onHidden.call(f),l.onComplete.call(f)},show:function(e){p.force.visible()&&!1!==l.onShow.call(f)&&(p.verbose("Showing element",e),p.remove.hidden(),l.onBeforeShow.call(f,p.showNow))},showNow:function(){p.set.visible(),l.onVisible.call(f),l.onComplete.call(f)},toggle:function(){p.is.visible()?p.hide():p.show()},stop:function(){p.debug("Stopping current animation"),u.triggerHandler("animationend")},stopAll:function(){p.debug("Stopping all animation"),p.remove.queueCallback(),u.triggerHandler("animationend")},clear:{queue:function(){p.debug("Clearing animation queue"),p.remove.queueCallback()}},enable:function(){p.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){p.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(e,t){if(p.debug("Changing setting",e,t),x.isPlainObject(e))x.extend(!0,l,e);else{if(void 0===t)return l[e];x.isPlainObject(l[e])?x.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(x.isPlainObject(e))x.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,l.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),p.verbose.apply(console,arguments)))},error:function(){l.silent||(p.error=Function.prototype.bind.call(console.error,console,l.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=Date.now())-(s||t),s=t,g.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=l.name+":",n=0;s=!1,clearTimeout(p.performance.timer),x.each(g,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",r&&(e+=" '"+r+"'"),1<a.length&&(e+=" ("+a.length+")"),0<g.length&&(console.groupCollapsed(e),console.table?console.table(g):x.each(g,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),g=[]}},invoke:function(i,e,t){var o,a,n,r,s=c;return e=e||b,t=t||f,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),o=i.length-1,x.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(x.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!x.isPlainObject(s[t])||e===o)return void 0!==s[t]&&(a=s[t]),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(t,e):void 0!==a&&(n=a),Array.isArray(m)?m.push(n):void 0!==m?m=[m,n]:void 0!==n&&(m=n),void 0!==a&&a}};p.initialize()}),void 0!==m?m:this},x.fn.transition.exists={},x.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onBeforeShow:function(e){e.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(e){e.call(this)},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production."}}}(jQuery,window,document); |