fomantic-ui 2.10.0-beta.64 → 2.10.0-beta.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +0 -2
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +2 -2
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +21 -21
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +6 -12
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +7 -5
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +2 -2
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +7 -5
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +11 -13
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +6 -6
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +47 -208
- package/dist/components/reset.min.css +2 -2
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +2 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +6 -6
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +12 -14
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +8 -6
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +3 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +12 -14
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +98 -268
- package/dist/semantic.js +117 -123
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +1 -1
- package/src/definitions/behaviors/form.js +1 -1
- package/src/definitions/behaviors/visibility.js +11 -13
- package/src/definitions/modules/calendar.js +20 -20
- package/src/definitions/modules/dropdown.js +5 -11
- package/src/definitions/modules/flyout.js +6 -4
- package/src/definitions/modules/modal.js +6 -4
- package/src/definitions/modules/popup.js +10 -12
- package/src/definitions/modules/progress.js +5 -5
- package/src/definitions/modules/sidebar.js +1 -1
- package/src/definitions/modules/slider.js +5 -5
- package/src/definitions/modules/sticky.js +11 -13
- package/src/definitions/modules/toast.js +7 -5
- package/src/definitions/modules/transition.js +2 -2
- package/src/themes/default/globals/reset.overrides +45 -201
- package/tasks/admin/distributions/create.js +2 -2
- package/tasks/config/project/config.js +1 -1
- package/tasks/install.js +3 -1
- package/test/meteor/assets.js +2 -2
- package/test/meteor/fonts.js +10 -11
package/.eslintrc.js
CHANGED
|
@@ -83,8 +83,6 @@ module.exports = {
|
|
|
83
83
|
// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
|
|
84
84
|
'no-restricted-globals': 'off',
|
|
85
85
|
'no-restricted-properties': 'off',
|
|
86
|
-
'unicorn/no-array-for-each': 'off',
|
|
87
|
-
'unicorn/prefer-number-properties': 'off',
|
|
88
86
|
'unicorn/prefer-reflect-apply': 'off',
|
|
89
87
|
'unicorn/prefer-top-level-await': 'off', // needs Node 14+
|
|
90
88
|
|
package/dist/components/ad.css
CHANGED
package/dist/components/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
|
2
|
+
* # Fomantic-UI 2.10.0-beta.65+923b474 - API
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
421
|
const isCheckbox = $('[name="' + CSS.escape(el.name) + '"]', $form).attr('type') === 'checkbox';
|
|
422
|
-
const floatValue = parseFloat(el.value);
|
|
422
|
+
const floatValue = Number.parseFloat(el.value);
|
|
423
423
|
let value = (isCheckbox && el.value === 'on')
|
|
424
424
|
|| el.value === 'true'
|
|
425
425
|
|| (String(floatValue) === el.value
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
|
2
|
+
* # Fomantic UI - 2.10.0-beta.65+923b474
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* https://fomantic-ui.com/
|
|
5
5
|
*
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(j,O,r){"use strict";function P(e){return null!==e&&e===e.window}function C(e){return"function"==typeof e&&"number"!=typeof e.nodeType}O=void 0!==O&&O.Math===Math?O:globalThis,j.fn.api=function(...e){const t=C(this)?j(O):j(this);let x=Date.now(),A=[];const k=e[0],S="string"==typeof k,T=e.slice(1),w=function(e,t){let n;return[O,r].includes(e)?n=j(e):0===(n=j(t.document).find(e)).length&&(n=t.frameElement?w(e,t.parent):O),n};let D;return t.each(function(){const i=j.isPlainObject(k)?j.extend(!0,{},j.fn.api.settings,k):j.extend({},j.fn.api.settings),l=i.regExp;var e=i.namespace;const t=i.metadata,n=i.selector,a=i.error,r=i.className,o="."+e,s="module-"+e,u=j(this),f=u.closest(n.form),c=i.stateContext?w(i.stateContext,O):u;let d,p,g,m,v,b;const h=this,y=c[0];let R=u.data(s);const q={initialize:function(){S||(b=i.data,q.bind.events()),q.instantiate()},instantiate:function(){q.verbose("Storing instance of module",q),R=q,u.data(s,R)},destroy:function(){q.verbose("Destroying previous module for",h),u.removeData(s).off(o)},bind:{events:function(){var e=q.get.event();e?(q.verbose("Attaching API events to element",e),u.on(e+o,q.event.trigger)):"now"===i.on&&(q.debug("Querying API endpoint immediately"),q.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch{}return e}},read:{cachedResponse:function(e){var t=O.sessionStorage.getItem(e+q.get.normalizedData());return q.debug("Using cached response",e,i.data,t),q.decode.json(t)}},write:{cachedResponse:function(e,t){j.isPlainObject(t)&&(t=JSON.stringify(t)),O.sessionStorage.setItem(e+q.get.normalizedData(),t),q.verbose("Storing cached response for url",e,i.data,t)}},query:function(){if(q.is.disabled())q.debug("Element is disabled API request aborted");else{if(q.is.loading()){if(!i.interruptRequests)return void q.debug("Cancelling request, previous request is still pending");q.debug("Interrupting previous request"),q.abort()}if(i.defaultData&&j.extend(!0,i.urlData,q.get.defaultData()),i.serializeForm&&(i.data=q.add.formData(b||i.data)),!1===(p=q.get.settings()))return q.cancelled=!0,void q.error(a.beforeSend);if(q.cancelled=!1,(g=q.get.templatedURL())||q.is.mocked()){if((g=q.add.urlData(g))||q.is.mocked()){if(p.url=i.base+g,d=j.extend(!0,{},i,{type:i.method||i.type,data:m,url:i.base+g,beforeSend:i.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),q.debug("Querying URL",d.url),q.verbose("Using AJAX settings",d),"local"===i.cache&&q.read.cachedResponse(g))return q.debug("Response returned from local cache"),q.request=q.create.request(),void q.request.resolveWith(y,[q.read.cachedResponse(g)]);i.throttle?i.throttleFirstRequest||q.timer?(q.debug("Throttling request",i.throttle),clearTimeout(q.timer),q.timer=setTimeout(function(){q.timer&&delete q.timer,q.debug("Sending throttled request",m,d.method),q.send.request()},i.throttle)):(q.debug("Sending request",m,d.method),q.send.request(),q.timer=setTimeout(function(){},i.throttle)):(q.debug("Sending request",m,d.method),q.send.request())}}else q.error(a.missingURL)}},should:{removeError:function(){return!0===i.hideError||"auto"===i.hideError&&!q.is.form()}},is:{disabled:function(){return 0<u.filter(n.disabled).length},expectingJSON:function(){return"json"===i.dataType||"jsonp"===i.dataType},form:function(){return u.is("form")||c.is("form")},mocked:function(){return i.mockResponse||i.mockResponseAsync||i.response||i.responseAsync},input:function(){return u.is("input")},loading:function(){return!!q.request&&"pending"===q.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(q.verbose("XHR request determined to be aborted"),!0):(q.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return q.is.expectingJSON()&&C(i.successTest)?(q.debug("Checking JSON returned success",i.successTest,e),i.successTest(e)?(q.debug("Response passed success test",e),!0):(q.debug("Response failed success test",e),!1)):(q.verbose("Response is not JSON, skipping validation",i.successTest,e),!0)}},was:{cancelled:function(){return q.cancelled||!1},successful:function(){return q.request&&"resolved"===q.request.state()},failure:function(){return q.request&&"rejected"===q.request.state()},complete:function(){return q.request&&("resolved"===q.request.state()||"rejected"===q.request.state())}},add:{urlData:function(o,s=i.urlData){var e,t;return o&&(e=o.match(l.required),t=o.match(l.optional),e&&(q.debug("Looking for required URL variables",e),j.each(e,function(e,t){var n=t.slice(1,-1);let r=j.isPlainObject(s)&&void 0!==s[n]?s[n]:void 0!==u.data(n)?u.data(n):void 0!==c.data(n)?c.data(n):s[n];if(void 0===r)return q.error(a.requiredParameter,n,o),o=!1;q.verbose("Found required variable",n,r),r=i.encodeParameters?q.get.urlEncodedValue(r):r,o=o.replace(t,r)})),t&&(q.debug("Looking for optional URL variables",e),j.each(t,function(e,t){var n=t.slice(2,-1),r=j.isPlainObject(s)&&void 0!==s[n]?s[n]:void 0!==u.data(n)?u.data(n):void 0!==c.data(n)?c.data(n):s[n];o=void 0!==r?(q.verbose("Optional variable Found",n,r),o.replace(t,r)):(q.verbose("Optional variable not found",n),o.includes("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(n=b||i.data){let a={};var e="formdata"===i.serializeForm,t=j.isPlainObject(n);if(e)a=new FormData(f[0]),i.processData=void 0!==i.processData&&i.processData,i.contentType=void 0!==i.contentType&&i.contentType;else{const r=f.serializeArray(),u={},c={},d=function(e,t,n){return e[t]=n,e};j.each(j('input[type="file"]',f),function(e,n){j.each(j(n)[0].files,function(e,t){r.push({name:n.name,value:t})})}),j.each(r,function(e,t){if(l.validate.test(t.name)){var n="checkbox"===j('[name="'+CSS.escape(t.name)+'"]',f).attr("type"),r=parseFloat(t.value);let e=n&&"on"===t.value||"true"===t.value||(String(r)===t.value?r:"false"!==t.value&&t.value);const s=t.name.match(l.key)||[],i=t.name.replace(/\[]$/,"");i in u?Array.isArray(c[i])?c[i].push(e):c[i]=[c[i],e]:(u[i]=0,c[i]=e),i.includes("[]")||(e=c[i]);for(;0<s.length;){var o=s.pop();""!==o||Array.isArray(e)?l.fixed.test(o)?e=d([],o,e):l.named.test(o)&&(e=d({},o,e)):e=d([],u[i]++,e)}a=j.extend(!0,a,e)}})}return n=t?(q.debug("Extending existing data with form data",n,a),e?(j.each(Object.keys(n),function(e,t){a.append(t,n[t])}),a):j.extend(!0,{},n,a)):(q.debug("Adding form data",a),a)}},send:{request:function(){q.set.loading(),q.request=q.create.request(),q.is.mocked()?q.mockedXHR=q.create.mockedXHR():q.xhr=q.create.xhr(),i.onRequest.call(y,q.request,q.xhr)}},event:{trigger:function(e){q.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){const r=this;var o=Date.now()-v,o=i.loadingDuration-o,s=!!C(i.onResponse)&&(q.is.expectingJSON()&&!i.rawResponse?i.onResponse.call(r,j.extend(!0,{},e)):i.onResponse.call(r,e)),o=Math.max(o,0);s&&(q.debug("Modified API response in onResponse callback",i.onResponse,s,e),e=s),0<o&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.validResponse(e)?q.request.resolveWith(r,[e,n]):q.request.rejectWith(r,[n,"invalid"])},o)},fail:function(e,t,n){const r=this;var o=Date.now()-v,o=i.loadingDuration-o;0<(o=Math.max(o,0))&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.abortedRequest(e)?q.request.rejectWith(r,[e,"aborted",n]):q.request.rejectWith(r,[e,"error",t,n])},o)}},request:{done:function(e,t){q.debug("Successful API Response",e),"local"===i.cache&&g&&(q.write.cachedResponse(g,e),q.debug("Saving server response locally",q.cache)),i.onSuccess.call(y,e,u,t)},complete:function(e,t){let n,r;q.was.successful()?(r=e,n=t):(n=e,r=q.get.responseFromXHR(n)),q.remove.loading(),i.onComplete.call(y,r,u,n)},fail:function(e,t,n){var r=q.get.responseFromXHR(e),o=q.get.errorFromRequest(r,t,n);if("aborted"===t)return q.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),i.onAbort.call(y,t,u,e),!0;"invalid"===t?q.debug("JSON did not pass success test. A server-side error has most likely occurred",r):"error"===t&&void 0!==e&&(q.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&void 0!==n&&""!==n&&q.error(a.statusMessage+n,d.url),i.onError.call(y,o,u,e)),i.errorDuration&&"aborted"!==t&&(q.debug("Adding error state"),q.set.error(),q.should.removeError()&&setTimeout(function(){q.remove.error()},i.errorDuration)),q.debug("API Request failed",o,e),i.onFailure.call(y,r,u,e)}}},create:{request:function(){return j.Deferred().always(q.event.request.complete).done(q.event.request.done).fail(q.event.request.fail)},mockedXHR:function(){const e=i.mockResponse||i.response,t=i.mockResponseAsync||i.responseAsync;var n;let r;const o=j.Deferred().always(q.event.xhr.complete).done(q.event.xhr.done).fail(q.event.xhr.fail);return e?(r=C(e)?(q.debug("Using specified synchronous callback",e),e.call(y,p)):(q.debug("Using settings specified response",e),e),o.resolveWith(y,[r,!1,{responseText:r}])):C(t)&&(n=function(e){q.debug("Async callback returned response",e),e?o.resolveWith(y,[e,!1,{responseText:e}]):o.rejectWith(y,[{responseText:e},!1,!1])},q.debug("Using specified async response callback",t),t.call(y,p,n)),o},xhr:function(){var e=j.ajax(d).always(q.event.xhr.always).done(q.event.xhr.done).fail(q.event.xhr.fail);return q.verbose("Created server request",e,d),e}},set:{error:function(){q.verbose("Adding error state to element",c),c.addClass(r.error)},loading:function(){q.verbose("Adding loading state to element",c),c.addClass(r.loading),v=Date.now()}},remove:{error:function(){q.verbose("Removing error state from element",c),c.removeClass(r.error)},loading:function(){q.verbose("Removing loading state from element",c),c.removeClass(r.loading)}},get:{normalizedData:function(){return"string"==typeof i.data?i.data:JSON.stringify(i.data,Object.keys(i.data).sort())},responseFromXHR:function(e){return!!j.isPlainObject(e)&&(q.is.expectingJSON()?q.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return j.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==i.error[t]?i.error[t]:n},request:function(){return q.request||!1},xhr:function(){return q.xhr||!1},settings:function(){var e=i.beforeSend.call(h,i);return void 0===e&&q.error(a.noReturnedValue),!1===e?e:void 0!==e?j.extend(!0,{},e):j.extend(!0,{},i)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),n=O.encodeURIComponent(e);return t!==e?(q.debug("URL value is already encoded, avoiding double encoding",e),e):(q.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){const e={};return P(h)||(q.is.input()?e.value=u.val():q.is.form()||(e.text=u.text())),e},event:function(){return P(h)||"now"===i.on?(q.debug("API called without element, no events attached"),!1):"auto"===i.on?u.is("input")?void 0!==h.oninput?"input":void 0!==h.onpropertychange?"propertychange":"keyup":u.is("form")?"submit":"click":i.on},templatedURL:function(e=i.action||u.data(t.action)||!1){if(g=i.url||u.data(t.url)||!1)return q.debug("Using specified url",g),g;if(e){if(q.debug("Looking up url for action",e,i.api),void 0===i.api[e]&&!q.is.mocked())return void q.error(a.missingAction,i.action,i.api);g=i.api[e]}else q.is.form()&&(g=u.attr("action")||c.attr("action")||!1,q.debug("No url or action specified, defaulting to form action",g));return g}},abort:function(){const e=q.get.xhr();e&&"resolved"!==e.state()&&(q.debug("Cancelling API request"),e.abort())},reset:function(){q.remove.error(),q.remove.loading()},setting:function(e,t){if(q.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,i,e);else{if(void 0===t)return i[e];j.isPlainObject(i[e])?j.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,q,e);else{if(void 0===t)return q[e];q[e]=t}},debug:function(...e){!i.silent&&i.debug&&(i.performance?q.performance.log(e):(q.debug=Function.prototype.bind.call(console.info,console,i.name+":"),q.debug.apply(console,e)))},verbose:function(...e){!i.silent&&i.verbose&&i.debug&&(i.performance?q.performance.log(e):(q.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),q.verbose.apply(console,e)))},error:function(...e){i.silent||(q.error=Function.prototype.bind.call(console.error,console,i.name+":"),q.error.apply(console,e))},performance:{log:function(e){var t,n;i.performance&&(n=(t=Date.now())-(x||t),x=t,A.push({Name:e[0],Arguments:e.slice(1),"Execution Time":n})),clearTimeout(q.performance.timer),q.performance.timer=setTimeout(function(){q.performance.display()},500)},display:function(){var e=i.name+":";let n=0;x=!1,clearTimeout(q.performance.timer),j.each(A,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<A.length&&(console.groupCollapsed(e),console.table(A),console.groupEnd()),A=[]}},invoke:function(r,e=T,t=h){let o=R,s,i,n;return"string"==typeof r&&void 0!==o&&(r=r.split(/[ .]/),s=r.length-1,j.each(r,function(e,t){var n=e!==s?t+r[e+1].charAt(0).toUpperCase()+r[e+1].slice(1):r;if(j.isPlainObject(o[n])&&e!==s)o=o[n];else{if(void 0!==o[n])return i=o[n],!1;{if(!j.isPlainObject(o[t])||e===s)return void 0!==o[t]?i=o[t]:q.error(a.method,r),!1;o=o[t]}}})),C(i)?n=i.apply(t,e):void 0!==i&&(n=i),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),i}};S?(void 0===R&&q.initialize(),q.invoke(k)):(void 0!==R&&R.invoke("destroy"),q.initialize())}),void 0!==D?D:this},j.api=j.fn.api,j.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",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.",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);
|
|
11
|
+
!function(j,O,r){"use strict";function P(e){return null!==e&&e===e.window}function C(e){return"function"==typeof e&&"number"!=typeof e.nodeType}O=void 0!==O&&O.Math===Math?O:globalThis,j.fn.api=function(...e){const t=C(this)?j(O):j(this);let x=Date.now(),A=[];const k=e[0],S="string"==typeof k,T=e.slice(1),w=function(e,t){let n;return[O,r].includes(e)?n=j(e):0===(n=j(t.document).find(e)).length&&(n=t.frameElement?w(e,t.parent):O),n};let D;return t.each(function(){const i=j.isPlainObject(k)?j.extend(!0,{},j.fn.api.settings,k):j.extend({},j.fn.api.settings),l=i.regExp;var e=i.namespace;const t=i.metadata,n=i.selector,a=i.error,r=i.className,o="."+e,s="module-"+e,u=j(this),f=u.closest(n.form),c=i.stateContext?w(i.stateContext,O):u;let d,p,g,m,v,b;const h=this,y=c[0];let R=u.data(s);const q={initialize:function(){S||(b=i.data,q.bind.events()),q.instantiate()},instantiate:function(){q.verbose("Storing instance of module",q),R=q,u.data(s,R)},destroy:function(){q.verbose("Destroying previous module for",h),u.removeData(s).off(o)},bind:{events:function(){var e=q.get.event();e?(q.verbose("Attaching API events to element",e),u.on(e+o,q.event.trigger)):"now"===i.on&&(q.debug("Querying API endpoint immediately"),q.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch{}return e}},read:{cachedResponse:function(e){var t=O.sessionStorage.getItem(e+q.get.normalizedData());return q.debug("Using cached response",e,i.data,t),q.decode.json(t)}},write:{cachedResponse:function(e,t){j.isPlainObject(t)&&(t=JSON.stringify(t)),O.sessionStorage.setItem(e+q.get.normalizedData(),t),q.verbose("Storing cached response for url",e,i.data,t)}},query:function(){if(q.is.disabled())q.debug("Element is disabled API request aborted");else{if(q.is.loading()){if(!i.interruptRequests)return void q.debug("Cancelling request, previous request is still pending");q.debug("Interrupting previous request"),q.abort()}if(i.defaultData&&j.extend(!0,i.urlData,q.get.defaultData()),i.serializeForm&&(i.data=q.add.formData(b||i.data)),!1===(p=q.get.settings()))return q.cancelled=!0,void q.error(a.beforeSend);if(q.cancelled=!1,(g=q.get.templatedURL())||q.is.mocked()){if((g=q.add.urlData(g))||q.is.mocked()){if(p.url=i.base+g,d=j.extend(!0,{},i,{type:i.method||i.type,data:m,url:i.base+g,beforeSend:i.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),q.debug("Querying URL",d.url),q.verbose("Using AJAX settings",d),"local"===i.cache&&q.read.cachedResponse(g))return q.debug("Response returned from local cache"),q.request=q.create.request(),void q.request.resolveWith(y,[q.read.cachedResponse(g)]);i.throttle?i.throttleFirstRequest||q.timer?(q.debug("Throttling request",i.throttle),clearTimeout(q.timer),q.timer=setTimeout(function(){q.timer&&delete q.timer,q.debug("Sending throttled request",m,d.method),q.send.request()},i.throttle)):(q.debug("Sending request",m,d.method),q.send.request(),q.timer=setTimeout(function(){},i.throttle)):(q.debug("Sending request",m,d.method),q.send.request())}}else q.error(a.missingURL)}},should:{removeError:function(){return!0===i.hideError||"auto"===i.hideError&&!q.is.form()}},is:{disabled:function(){return 0<u.filter(n.disabled).length},expectingJSON:function(){return"json"===i.dataType||"jsonp"===i.dataType},form:function(){return u.is("form")||c.is("form")},mocked:function(){return i.mockResponse||i.mockResponseAsync||i.response||i.responseAsync},input:function(){return u.is("input")},loading:function(){return!!q.request&&"pending"===q.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(q.verbose("XHR request determined to be aborted"),!0):(q.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return q.is.expectingJSON()&&C(i.successTest)?(q.debug("Checking JSON returned success",i.successTest,e),i.successTest(e)?(q.debug("Response passed success test",e),!0):(q.debug("Response failed success test",e),!1)):(q.verbose("Response is not JSON, skipping validation",i.successTest,e),!0)}},was:{cancelled:function(){return q.cancelled||!1},successful:function(){return q.request&&"resolved"===q.request.state()},failure:function(){return q.request&&"rejected"===q.request.state()},complete:function(){return q.request&&("resolved"===q.request.state()||"rejected"===q.request.state())}},add:{urlData:function(o,s=i.urlData){var e,t;return o&&(e=o.match(l.required),t=o.match(l.optional),e&&(q.debug("Looking for required URL variables",e),j.each(e,function(e,t){var n=t.slice(1,-1);let r=j.isPlainObject(s)&&void 0!==s[n]?s[n]:void 0!==u.data(n)?u.data(n):void 0!==c.data(n)?c.data(n):s[n];if(void 0===r)return q.error(a.requiredParameter,n,o),o=!1;q.verbose("Found required variable",n,r),r=i.encodeParameters?q.get.urlEncodedValue(r):r,o=o.replace(t,r)})),t&&(q.debug("Looking for optional URL variables",e),j.each(t,function(e,t){var n=t.slice(2,-1),r=j.isPlainObject(s)&&void 0!==s[n]?s[n]:void 0!==u.data(n)?u.data(n):void 0!==c.data(n)?c.data(n):s[n];o=void 0!==r?(q.verbose("Optional variable Found",n,r),o.replace(t,r)):(q.verbose("Optional variable not found",n),o.includes("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(n=b||i.data){let a={};var e="formdata"===i.serializeForm,t=j.isPlainObject(n);if(e)a=new FormData(f[0]),i.processData=void 0!==i.processData&&i.processData,i.contentType=void 0!==i.contentType&&i.contentType;else{const r=f.serializeArray(),u={},c={},d=function(e,t,n){return e[t]=n,e};j.each(j('input[type="file"]',f),function(e,n){j.each(j(n)[0].files,function(e,t){r.push({name:n.name,value:t})})}),j.each(r,function(e,t){if(l.validate.test(t.name)){var n="checkbox"===j('[name="'+CSS.escape(t.name)+'"]',f).attr("type"),r=Number.parseFloat(t.value);let e=n&&"on"===t.value||"true"===t.value||(String(r)===t.value?r:"false"!==t.value&&t.value);const s=t.name.match(l.key)||[],i=t.name.replace(/\[]$/,"");i in u?Array.isArray(c[i])?c[i].push(e):c[i]=[c[i],e]:(u[i]=0,c[i]=e),i.includes("[]")||(e=c[i]);for(;0<s.length;){var o=s.pop();""!==o||Array.isArray(e)?l.fixed.test(o)?e=d([],o,e):l.named.test(o)&&(e=d({},o,e)):e=d([],u[i]++,e)}a=j.extend(!0,a,e)}})}return n=t?(q.debug("Extending existing data with form data",n,a),e?(j.each(Object.keys(n),function(e,t){a.append(t,n[t])}),a):j.extend(!0,{},n,a)):(q.debug("Adding form data",a),a)}},send:{request:function(){q.set.loading(),q.request=q.create.request(),q.is.mocked()?q.mockedXHR=q.create.mockedXHR():q.xhr=q.create.xhr(),i.onRequest.call(y,q.request,q.xhr)}},event:{trigger:function(e){q.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){const r=this;var o=Date.now()-v,o=i.loadingDuration-o,s=!!C(i.onResponse)&&(q.is.expectingJSON()&&!i.rawResponse?i.onResponse.call(r,j.extend(!0,{},e)):i.onResponse.call(r,e)),o=Math.max(o,0);s&&(q.debug("Modified API response in onResponse callback",i.onResponse,s,e),e=s),0<o&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.validResponse(e)?q.request.resolveWith(r,[e,n]):q.request.rejectWith(r,[n,"invalid"])},o)},fail:function(e,t,n){const r=this;var o=Date.now()-v,o=i.loadingDuration-o;0<(o=Math.max(o,0))&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.abortedRequest(e)?q.request.rejectWith(r,[e,"aborted",n]):q.request.rejectWith(r,[e,"error",t,n])},o)}},request:{done:function(e,t){q.debug("Successful API Response",e),"local"===i.cache&&g&&(q.write.cachedResponse(g,e),q.debug("Saving server response locally",q.cache)),i.onSuccess.call(y,e,u,t)},complete:function(e,t){let n,r;q.was.successful()?(r=e,n=t):(n=e,r=q.get.responseFromXHR(n)),q.remove.loading(),i.onComplete.call(y,r,u,n)},fail:function(e,t,n){var r=q.get.responseFromXHR(e),o=q.get.errorFromRequest(r,t,n);if("aborted"===t)return q.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),i.onAbort.call(y,t,u,e),!0;"invalid"===t?q.debug("JSON did not pass success test. A server-side error has most likely occurred",r):"error"===t&&void 0!==e&&(q.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&void 0!==n&&""!==n&&q.error(a.statusMessage+n,d.url),i.onError.call(y,o,u,e)),i.errorDuration&&"aborted"!==t&&(q.debug("Adding error state"),q.set.error(),q.should.removeError()&&setTimeout(function(){q.remove.error()},i.errorDuration)),q.debug("API Request failed",o,e),i.onFailure.call(y,r,u,e)}}},create:{request:function(){return j.Deferred().always(q.event.request.complete).done(q.event.request.done).fail(q.event.request.fail)},mockedXHR:function(){const e=i.mockResponse||i.response,t=i.mockResponseAsync||i.responseAsync;var n;let r;const o=j.Deferred().always(q.event.xhr.complete).done(q.event.xhr.done).fail(q.event.xhr.fail);return e?(r=C(e)?(q.debug("Using specified synchronous callback",e),e.call(y,p)):(q.debug("Using settings specified response",e),e),o.resolveWith(y,[r,!1,{responseText:r}])):C(t)&&(n=function(e){q.debug("Async callback returned response",e),e?o.resolveWith(y,[e,!1,{responseText:e}]):o.rejectWith(y,[{responseText:e},!1,!1])},q.debug("Using specified async response callback",t),t.call(y,p,n)),o},xhr:function(){var e=j.ajax(d).always(q.event.xhr.always).done(q.event.xhr.done).fail(q.event.xhr.fail);return q.verbose("Created server request",e,d),e}},set:{error:function(){q.verbose("Adding error state to element",c),c.addClass(r.error)},loading:function(){q.verbose("Adding loading state to element",c),c.addClass(r.loading),v=Date.now()}},remove:{error:function(){q.verbose("Removing error state from element",c),c.removeClass(r.error)},loading:function(){q.verbose("Removing loading state from element",c),c.removeClass(r.loading)}},get:{normalizedData:function(){return"string"==typeof i.data?i.data:JSON.stringify(i.data,Object.keys(i.data).sort())},responseFromXHR:function(e){return!!j.isPlainObject(e)&&(q.is.expectingJSON()?q.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return j.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==i.error[t]?i.error[t]:n},request:function(){return q.request||!1},xhr:function(){return q.xhr||!1},settings:function(){var e=i.beforeSend.call(h,i);return void 0===e&&q.error(a.noReturnedValue),!1===e?e:void 0!==e?j.extend(!0,{},e):j.extend(!0,{},i)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),n=O.encodeURIComponent(e);return t!==e?(q.debug("URL value is already encoded, avoiding double encoding",e),e):(q.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){const e={};return P(h)||(q.is.input()?e.value=u.val():q.is.form()||(e.text=u.text())),e},event:function(){return P(h)||"now"===i.on?(q.debug("API called without element, no events attached"),!1):"auto"===i.on?u.is("input")?void 0!==h.oninput?"input":void 0!==h.onpropertychange?"propertychange":"keyup":u.is("form")?"submit":"click":i.on},templatedURL:function(e=i.action||u.data(t.action)||!1){if(g=i.url||u.data(t.url)||!1)return q.debug("Using specified url",g),g;if(e){if(q.debug("Looking up url for action",e,i.api),void 0===i.api[e]&&!q.is.mocked())return void q.error(a.missingAction,i.action,i.api);g=i.api[e]}else q.is.form()&&(g=u.attr("action")||c.attr("action")||!1,q.debug("No url or action specified, defaulting to form action",g));return g}},abort:function(){const e=q.get.xhr();e&&"resolved"!==e.state()&&(q.debug("Cancelling API request"),e.abort())},reset:function(){q.remove.error(),q.remove.loading()},setting:function(e,t){if(q.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,i,e);else{if(void 0===t)return i[e];j.isPlainObject(i[e])?j.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,q,e);else{if(void 0===t)return q[e];q[e]=t}},debug:function(...e){!i.silent&&i.debug&&(i.performance?q.performance.log(e):(q.debug=Function.prototype.bind.call(console.info,console,i.name+":"),q.debug.apply(console,e)))},verbose:function(...e){!i.silent&&i.verbose&&i.debug&&(i.performance?q.performance.log(e):(q.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),q.verbose.apply(console,e)))},error:function(...e){i.silent||(q.error=Function.prototype.bind.call(console.error,console,i.name+":"),q.error.apply(console,e))},performance:{log:function(e){var t,n;i.performance&&(n=(t=Date.now())-(x||t),x=t,A.push({Name:e[0],Arguments:e.slice(1),"Execution Time":n})),clearTimeout(q.performance.timer),q.performance.timer=setTimeout(function(){q.performance.display()},500)},display:function(){var e=i.name+":";let n=0;x=!1,clearTimeout(q.performance.timer),j.each(A,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<A.length&&(console.groupCollapsed(e),console.table(A),console.groupEnd()),A=[]}},invoke:function(r,e=T,t=h){let o=R,s,i,n;return"string"==typeof r&&void 0!==o&&(r=r.split(/[ .]/),s=r.length-1,j.each(r,function(e,t){var n=e!==s?t+r[e+1].charAt(0).toUpperCase()+r[e+1].slice(1):r;if(j.isPlainObject(o[n])&&e!==s)o=o[n];else{if(void 0!==o[n])return i=o[n],!1;{if(!j.isPlainObject(o[t])||e===s)return void 0!==o[t]?i=o[t]:q.error(a.method,r),!1;o=o[t]}}})),C(i)?n=i.apply(t,e):void 0!==i&&(n=i),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),i}};S?(void 0===R&&q.initialize(),q.invoke(k)):(void 0!==R&&R.invoke("destroy"),q.initialize())}),void 0!==D?D:this},j.api=j.fn.api,j.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",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.",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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
|
2
|
+
* # Fomantic-UI 2.10.0-beta.65+923b474 - Calendar
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
const tooltipWidth = window.getComputedStyle($cell[0], '::after').width.replace(/[^\d.]/g, '');
|
|
542
542
|
const tooltipPosition = $cell.attr('data-position');
|
|
543
543
|
// use a fallback width of 250 (calendar width) for IE/Edge (which return "auto")
|
|
544
|
-
const calcPosition = (winWidth - $cell.width() - (parseInt(tooltipWidth, 10) || 250)) > $cell.offset().left ? 'right' : 'left';
|
|
544
|
+
const calcPosition = (winWidth - $cell.width() - (Number.parseInt(tooltipWidth, 10) || 250)) > $cell.offset().left ? 'right' : 'left';
|
|
545
545
|
if (!tooltipPosition.includes(calcPosition)) {
|
|
546
546
|
$cell.attr('data-position', tooltipPosition.replace(/(left|right)/, calcPosition));
|
|
547
547
|
}
|
|
@@ -718,11 +718,11 @@
|
|
|
718
718
|
},
|
|
719
719
|
class: {
|
|
720
720
|
mutation: function (mutations) {
|
|
721
|
-
|
|
721
|
+
for (const mutation of mutations) {
|
|
722
722
|
if (mutation.attributeName === 'class') {
|
|
723
723
|
module.check.disabled();
|
|
724
724
|
}
|
|
725
|
-
}
|
|
725
|
+
}
|
|
726
726
|
},
|
|
727
727
|
},
|
|
728
728
|
},
|
|
@@ -1323,7 +1323,7 @@
|
|
|
1323
1323
|
if (!(date instanceof Date)) {
|
|
1324
1324
|
date = parser.date('' + date, settings);
|
|
1325
1325
|
}
|
|
1326
|
-
if (!date || isNaN(date.getTime())) {
|
|
1326
|
+
if (!date || Number.isNaN(date.getTime())) {
|
|
1327
1327
|
return null;
|
|
1328
1328
|
}
|
|
1329
1329
|
|
|
@@ -1664,7 +1664,7 @@
|
|
|
1664
1664
|
const textDate = new Date(text);
|
|
1665
1665
|
const numberOnly = text.match(/^\d+$/) !== null;
|
|
1666
1666
|
const isShortYear = text.match(/^(?:\d{1,2}[./-]){2}\d{1,2}$/) !== null;
|
|
1667
|
-
if (!isShortYear && !numberOnly && !isNaN(textDate.getDate())) {
|
|
1667
|
+
if (!isShortYear && !numberOnly && !Number.isNaN(textDate.getDate())) {
|
|
1668
1668
|
return textDate;
|
|
1669
1669
|
}
|
|
1670
1670
|
text = text.toLowerCase();
|
|
@@ -1702,8 +1702,8 @@
|
|
|
1702
1702
|
if (hour < 0 || minute < 0) {
|
|
1703
1703
|
parts = number.split(':');
|
|
1704
1704
|
for (k = 0; k < Math.min(2, parts.length); k++) {
|
|
1705
|
-
j = parseInt(parts[k], 10);
|
|
1706
|
-
if (isNaN(j)) {
|
|
1705
|
+
j = Number.parseInt(parts[k], 10);
|
|
1706
|
+
if (Number.isNaN(j)) {
|
|
1707
1707
|
j = 0;
|
|
1708
1708
|
}
|
|
1709
1709
|
if (k === 0) {
|
|
@@ -1739,8 +1739,8 @@
|
|
|
1739
1739
|
|
|
1740
1740
|
// year > settings.centuryBreak
|
|
1741
1741
|
for (i = 0; i < numbers.length; i++) {
|
|
1742
|
-
j = parseInt(numbers[i], 10);
|
|
1743
|
-
if (!isNaN(j) && j >= settings.centuryBreak && i === numbers.length - 1) {
|
|
1742
|
+
j = Number.parseInt(numbers[i], 10);
|
|
1743
|
+
if (!Number.isNaN(j) && j >= settings.centuryBreak && i === numbers.length - 1) {
|
|
1744
1744
|
if (j <= 99) {
|
|
1745
1745
|
j += settings.currentCentury - 100;
|
|
1746
1746
|
}
|
|
@@ -1757,8 +1757,8 @@
|
|
|
1757
1757
|
k = i > 1 || settings.monthFirst
|
|
1758
1758
|
? i
|
|
1759
1759
|
: (i === 1 ? 0 : 1);
|
|
1760
|
-
j = parseInt(numbers[k], 10);
|
|
1761
|
-
if (!isNaN(j) && j >= 1 && j <= 12) {
|
|
1760
|
+
j = Number.parseInt(numbers[k], 10);
|
|
1761
|
+
if (!Number.isNaN(j) && j >= 1 && j <= 12) {
|
|
1762
1762
|
month = j;
|
|
1763
1763
|
numbers.splice(k, 1);
|
|
1764
1764
|
|
|
@@ -1769,8 +1769,8 @@
|
|
|
1769
1769
|
|
|
1770
1770
|
// day
|
|
1771
1771
|
for (i = 0; i < numbers.length; i++) {
|
|
1772
|
-
j = parseInt(numbers[i], 10);
|
|
1773
|
-
if (!isNaN(j) && j >= 1 && j <= 31) {
|
|
1772
|
+
j = Number.parseInt(numbers[i], 10);
|
|
1773
|
+
if (!Number.isNaN(j) && j >= 1 && j <= 31) {
|
|
1774
1774
|
day = j;
|
|
1775
1775
|
numbers.splice(i, 1);
|
|
1776
1776
|
|
|
@@ -1781,8 +1781,8 @@
|
|
|
1781
1781
|
// year <= settings.centuryBreak
|
|
1782
1782
|
if (year < 0) {
|
|
1783
1783
|
for (i = numbers.length - 1; i >= 0; i--) {
|
|
1784
|
-
j = parseInt(numbers[i], 10);
|
|
1785
|
-
if (!isNaN(j)) {
|
|
1784
|
+
j = Number.parseInt(numbers[i], 10);
|
|
1785
|
+
if (!Number.isNaN(j)) {
|
|
1786
1786
|
if (j <= 99) {
|
|
1787
1787
|
j += settings.currentCentury;
|
|
1788
1788
|
}
|
|
@@ -1799,8 +1799,8 @@
|
|
|
1799
1799
|
// hour
|
|
1800
1800
|
if (hour < 0) {
|
|
1801
1801
|
for (i = 0; i < numbers.length; i++) {
|
|
1802
|
-
j = parseInt(numbers[i], 10);
|
|
1803
|
-
if (!isNaN(j) && j >= 0 && j <= 23) {
|
|
1802
|
+
j = Number.parseInt(numbers[i], 10);
|
|
1803
|
+
if (!Number.isNaN(j) && j >= 0 && j <= 23) {
|
|
1804
1804
|
hour = j;
|
|
1805
1805
|
numbers.splice(i, 1);
|
|
1806
1806
|
|
|
@@ -1812,8 +1812,8 @@
|
|
|
1812
1812
|
// minute
|
|
1813
1813
|
if (minute < 0) {
|
|
1814
1814
|
for (i = 0; i < numbers.length; i++) {
|
|
1815
|
-
j = parseInt(numbers[i], 10);
|
|
1816
|
-
if (!isNaN(j) && j >= 0 && j <= 59) {
|
|
1815
|
+
j = Number.parseInt(numbers[i], 10);
|
|
1816
|
+
if (!Number.isNaN(j) && j >= 0 && j <= 59) {
|
|
1817
1817
|
minute = j;
|
|
1818
1818
|
numbers.splice(i, 1);
|
|
1819
1819
|
|
|
@@ -1859,7 +1859,7 @@
|
|
|
1859
1859
|
date = new Date(year, month, 0, hour, minute);
|
|
1860
1860
|
}
|
|
1861
1861
|
|
|
1862
|
-
return isNaN(date.getTime()) ? null : date;
|
|
1862
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
1863
1863
|
},
|
|
1864
1864
|
},
|
|
1865
1865
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
|
2
|
+
* # Fomantic UI - 2.10.0-beta.65+923b474
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* https://fomantic-ui.com/
|
|
5
5
|
*
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(ie,w,x){"use strict";w=void 0!==w&&w.Math===Math?w:globalThis,ie.fn.calendar=function(...e){const t=ie(this),m=ie(x);let g=Date.now(),D=[];const y=e[0],v="string"==typeof y,b=e.slice(1);let M;const C={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}},re=["","one","two","three","four","five","six","seven","eight"];return t.each(function(){const _=ie.isPlainObject(y)?ie.extend(!0,{},ie.fn.calendar.settings,y):ie.extend({},ie.fn.calendar.settings),Q=_.className,n=_.namespace,o=_.selector,Z=_.formatter,X=_.parser,ee=_.metadata,te=C[_.minTimeGap],l=_.error,e="."+n,t="module-"+n,r=ie(this),i=r.find(o.input);let s=r.find(o.activator);const d=this;let u=r.data(t),ae=u&&u.popupId?m.find("#"+u.popupId):r.find(o.popup),c,p=!1;const ne=r.hasClass(Q.inverted);let f=!1,h=!1,a;const oe={initialize:function(){oe.debug("Initializing calendar for",d,r),c=oe.get.isTouch(),oe.setup.config(),oe.setup.popup(),oe.setup.inline(),oe.setup.input(),oe.setup.date(),oe.create.calendar(),oe.bind.events(),oe.observeChanges(),oe.instantiate()},instantiate:function(){oe.verbose("Storing instance of calendar"),u=oe,r.data(t,u)},destroy:function(){oe.verbose("Destroying previous calendar for",d),r.removeData([ee.date,ee.focusDate,ee.startDate,ee.endDate,ee.minDate,ee.maxDate,ee.mode,ee.monthOffset,t]),oe.unbind.events(),oe.disconnect.classObserver()},setup:{config:function(){null!==oe.get.minDate()&&oe.set.minDate(r.data(ee.minDate)),null!==oe.get.maxDate()&&oe.set.maxDate(r.data(ee.maxDate)),oe.setting("type",oe.get.type()),oe.setting("on",_.on||"click")},popup:function(){if(!_.inline&&(0!==s.length||0!==(s=r.children().first()).length))if(void 0===ie.fn.popup)oe.error(l.popup);else{if(0===ae.length)if(_.context)oe.popupId=n+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),ae=ie("<div/>",{id:oe.popupId}).addClass(Q.popup).appendTo(m.find(_.context));else{const a=s.parent();var t=0<a.closest(o.append).length?"appendTo":"prependTo";ae=ie("<div/>").addClass(Q.popup)[t](a)}ae.addClass(Q.calendar),ne&&ae.addClass(Q.inverted);let e=function(...e){return oe.refreshTooltips(),_.onVisible.apply(ae,e)};0===i.length&&(ae.attr("tabindex","0"),e=function(...e){return oe.refreshTooltips(),oe.focus(),_.onVisible.apply(ae,e)});t=oe.setting("on"),t=ie.extend({},_.popupOptions,{popup:ae,movePopup:!_.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(...e){return oe.set.focusDate(oe.get.date()),oe.set.mode(oe.get.validatedMode(_.startMode)),_.onShow.apply(ae,e)},onVisible:e,onHide:_.onHide,onHidden:function(...e){return oe.blur(),_.onHidden.apply(ae,e)}});oe.popup(t)}},inline:function(){0<s.length&&!_.inline||(_.inline=!0,ae=ie("<div/>").addClass(Q.calendar).appendTo(r),0===i.length&&ae.attr("tabindex","0"))},input:function(){_.touchReadonly&&0<i.length&&c&&i.prop("readonly",!0),oe.check.disabled()},date:function(){let e;_.initialDate?e=X.date(_.initialDate,_):void 0!==r.data(ee.date)?e=X.date(r.data(ee.date),_):0<i.length&&(e=X.date(i.val(),_)),oe.set.date(e,_.formatInput,!1),oe.set.mode(oe.get.mode(),!1)}},trigger:{change:function(){const e=i[0];var t;e&&(t=new Event("change",{bubbles:!0}),oe.verbose("Triggering native change event"),e.dispatchEvent(t))}},create:{calendar:function(){let a,n,o,r,i,s,q;var l=oe.get.mode(),d=new Date,W=oe.get.date();let u=oe.get.focusDate();const e=oe.helper.dateInRange(u||W||X.date(_.initialDate,_)||d);u||(u=e,oe.set.focusDate(u,!1,!1));var c="year"===l,p="month"===l,f="day"===l,h="hour"===l,m="minute"===l,R="time"===_.type,t=Math.max(_.multiMonth,1),V=f?oe.get.monthOffset():0,g=e.getMinutes(),D=e.getHours(),y=e.getDate(),G=e.getMonth()+V,v=e.getFullYear(),b=f?_.showWeekNumbers?8:7:h?4:te.column;let P=f||h?6:te.row;var M=f?t:1;let C=ae;var w=C.hasClass("left")?"right center":"left center";for(C.empty(),1<M&&(q=ie("<div/>").addClass(Q.grid).appendTo(C)),r=0;r<M;r++){1<M&&(T=ie("<div/>").addClass(Q.column).appendTo(q),C=T);var x=G+r,T=(new Date(v,x,1).getDay()-_.firstDayOfWeek%7+7)%7,Y=(!_.constantHeight&&f&&(Y=new Date(v,x+1,0).getDate()+T,P=Math.ceil(Y/7)),c?10:p?1:0),k=f?1:0,O=h||m?1:0,B=h||m?y:1,K=new Date(v-Y,x-k,B-O,D),k=new Date(v+Y,x+k,B+O,D),B=c?new Date(10*Math.ceil(v/10)-9,0,0):p?new Date(v,0,0):f?new Date(v,x,0):new Date(v,x,y,-1),O=c?new Date(10*Math.ceil(v/10)+1,0,1):p?new Date(v+1,0,1):f?new Date(v,x+1,1):new Date(v,x,y+1);let e=l;f&&_.showWeekNumbers&&(e+=" andweek");const E=ie("<table/>").addClass(Q.table).addClass(e).addClass(re[b]+" column").appendTo(C);ne&&E.addClass(Q.inverted);let t=b;if(!R){var U=ie("<thead/>").appendTo(E),F=(i=ie("<tr/>").appendTo(U),s=ie("<th/>").attr("colspan",""+b).appendTo(i),c||p?new Date(v,0,1):f?new Date(v,x,1):new Date(v,x,y,D,g));const z=ie("<span/>").addClass(Q.link).appendTo(s);z.text(oe.helper.dateFormat(Z[l+"Header"],F));F=p?_.disableYear?"day":"year":f?_.disableMonth?"year":"month":"day";if(z.data(ee.mode,F),0===r){const I=ie("<span/>").addClass(Q.prev).appendTo(s);I.data(ee.focusDate,K),I.toggleClass(Q.disabledCell,!oe.helper.isDateInRange(B,l)),ie("<i/>").addClass(Q.prevIcon).appendTo(I)}if(r===M-1){const j=ie("<span/>").addClass(Q.next).appendTo(s);j.data(ee.focusDate,k),j.toggleClass(Q.disabledCell,!oe.helper.isDateInRange(O,l)),ie("<i/>").addClass(Q.nextIcon).appendTo(j)}if(f)for(i=ie("<tr/>").appendTo(U),_.showWeekNumbers&&((s=ie("<th/>").appendTo(i)).text(_.text.weekNo),s.addClass(Q.weekCell),t--),a=0;a<t;a++)(s=ie("<th/>").appendTo(i)).text(Z.dayColumnHeader((a+_.firstDayOfWeek)%7,_))}var $=ie("<tbody/>").appendTo(E);for(a=c?10*Math.ceil(v/10)-9:f?1-T:0,n=0;n<P;n++)for(i=ie("<tr/>").appendTo($),f&&_.showWeekNumbers&&((s=ie("<th/>").appendTo(i)).text(oe.get.weekOfYear(v,x,a+1-_.firstDayOfWeek)),s.addClass(Q.weekCell)),o=0;o<t;o++,a++){const S=c?new Date(a,x,1,D,g):p?new Date(v,a,1,D,g):f?new Date(v,x,a,D,g):h?new Date(v,x,y,a):new Date(v,x,y,D,a*_.minTimeGap);var A=c?a:p?_.text.monthsShort[a]:f?S.getDate():oe.helper.dateFormat(Z.cellTime,S),A=((s=ie("<td/>").addClass(Q.cell).appendTo(i)).text(A),s.data(ee.date,S),f&&S.getMonth()!==(x+12)%12),N=!_.selectAdjacentDays&&A||!oe.helper.isDateInRange(S,l)||_.isDisabled(S,l)||oe.helper.isDisabled(S,l)||!oe.helper.isEnabled(S,l);let e;N?(null!==(H=oe.helper.findDayAsObject(S,l,_.disabledDates))&&H[ee.message]&&(s.attr("data-tooltip",H[ee.message]),s.attr("data-position",H[ee.position]||w),(H[ee.inverted]||ne&&void 0===H[ee.inverted])&&s.attr("data-inverted",""),H[ee.variation]&&s.attr("data-variation",H[ee.variation])),"hour"===l&&null!==(H=oe.helper.findHourAsObject(S,l,_.disabledHours))&&H[ee.message]&&(s.attr("data-tooltip",H[ee.message]),s.attr("data-position",H[ee.position]||w),(H[ee.inverted]||ne&&void 0===H[ee.inverted])&&s.attr("data-inverted",""),H[ee.variation]&&s.attr("data-variation",H[ee.variation]))):null!==(e=oe.helper.findDayAsObject(S,l,_.eventDates))&&(s.addClass(e[ee.class]||_.eventClass),e[ee.message]&&(s.attr("data-tooltip",e[ee.message]),s.attr("data-position",e[ee.position]||w),(e[ee.inverted]||ne&&void 0===e[ee.inverted])&&s.attr("data-inverted",""),e[ee.variation]&&s.attr("data-variation",e[ee.variation])));var H=oe.helper.dateEqual(S,W,l),J=oe.helper.dateEqual(S,d,l),A=(s.toggleClass(Q.adjacentCell,A&&!e),s.toggleClass(Q.disabledCell,N),s.toggleClass(Q.activeCell,H&&!(A&&N)),h||m||s.toggleClass(Q.todayCell,!A&&J),{mode:l,adjacent:A,disabled:N,active:H,today:J});Z.cell(s,S,A),oe.helper.dateEqual(S,u,l)&&oe.set.focusDate(S,!1,!1)}if(_.today){F=ie("<tr/>").appendTo($);const L=ie("<td/>").attr("colspan",""+b).addClass(Q.today).appendTo(F);L.text(Z.today(_)),L.data(ee.date,d)}oe.update.focus(!1,E),_.inline&&oe.refreshTooltips()}}},update:{focus:function(e,t=ae){const i=oe.get.mode();var a=oe.get.date();const s=oe.get.focusDate(),l=oe.get.startDate(),d=oe.get.endDate(),u=(e?s:null)||a||(c?null:s);t.find("td").each(function(){const e=ie(this);var t,a,n,o,r=e.data(ee.date);r&&(t=e.hasClass(Q.disabledCell),a=e.hasClass(Q.activeCell),n=e.hasClass(Q.adjacentCell),o=oe.helper.dateEqual(r,s,i),r=!!u&&(!!l&&oe.helper.isDateInRange(r,i,l,u)||!!d&&oe.helper.isDateInRange(r,i,u,d)),e.toggleClass(Q.focusCell,o&&(!c||p)&&(!n||_.selectAdjacentDays&&n)&&!t),oe.helper.isTodayButton(e)||e.toggleClass(Q.rangeCell,r&&!a&&!t))})}},refresh:function(){oe.create.calendar()},refreshTooltips:function(){const n=ie(w).width();ae.find("td[data-position]").each(function(){const e=ie(this);var t=w.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,"");const a=e.attr("data-position");t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";a.includes(t)||e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){oe.debug("Binding events"),ae.on("mousedown"+e,oe.event.mousedown),ae.on("touchstart"+e,oe.event.mousedown),ae.on("mouseup"+e,oe.event.mouseup),ae.on("touchend"+e,oe.event.mouseup),ae.on("mouseover"+e,oe.event.mouseover),0<i.length?(i.on("input"+e,oe.event.inputChange),i.on("focus"+e,oe.event.inputFocus),i.on("blur"+e,oe.event.inputBlur),i.on("keydown"+e,oe.event.keydown)):ae.on("keydown"+e,oe.event.keydown)}},unbind:{events:function(){oe.debug("Unbinding events"),ae.off(e),0<i.length&&i.off(e)}},event:{mouseover:function(e){const t=ie(e.target);var a=t.data(ee.date),e=1===e.buttons;a&&oe.set.focusDate(a,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),p=e.type.includes("touch");const t=ie(e.target);e=t.data(ee.date);e&&oe.set.focusDate(e,!1,!0,!0)},mouseup:function(e){oe.focus(),e.preventDefault(),e.stopPropagation(),p=!1;let t=ie(e.target);if(!t.hasClass("disabled")){const r=t.parent();var a,e=(t=r.data(ee.date)||r.data(ee.focusDate)||r.data(ee.mode)?r:t).data(ee.date),n=t.data(ee.focusDate),o=t.data(ee.mode);e&&!1!==_.onSelect.call(d,e,oe.get.mode())?(a=t.hasClass(Q.today),oe.selectDate(e,a)):n?oe.set.focusDate(n):o&&oe.set.mode(o)}},keydown:function(e){var t=e.which;if(9===t&&oe.popup("hide"),oe.popup("is visible")){var a=oe.get.mode();switch(t){case 37:case 38:case 39:case 40:{var n="day"===a?7:"hour"===a?4:"minute"===a?te.column:3,n=37===t?-1:38===t?-n:39===t?1:n;n*="minute"===a?_.minTimeGap:1;const l=oe.get.focusDate()||oe.get.date()||new Date;var o=l.getFullYear()+("year"===a?n:0),r=l.getMonth()+("month"===a?n:0),i=l.getDate()+("day"===a?n:0),s=l.getHours()+("hour"===a?n:0),n=l.getMinutes()+("minute"===a?n:0);let e=new Date(o,r,i,s,n);"time"===_.type&&(e=oe.helper.mergeDateTime(l,e)),oe.helper.isDateInRange(e,a)&&oe.set.focusDate(e);break}case 13:o=oe.get.focusDate();o&&!_.isDisabled(o,a)&&!oe.helper.isDisabled(o,a)&&oe.helper.isEnabled(o,a)&&!1!==_.onSelect.call(d,o,oe.get.mode())&&oe.selectDate(o),e.preventDefault(),e.stopPropagation();break;case 27:oe.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),oe.popup("show"))},inputChange:function(){var e=i.val(),e=X.date(e,_);oe.set.date(e,!1)},inputFocus:function(){ae.addClass(Q.active)},inputBlur:function(){var e;ae.removeClass(Q.active),_.formatInput&&(e=oe.get.date(),e=oe.helper.dateFormat(Z[_.type],e),i.val(e)),h&&(oe.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&oe.check.disabled()})}}},observeChanges:function(){a=new MutationObserver(oe.event.class.mutation),oe.debug("Setting up mutation observer",a),oe.observe.class()},disconnect:{classObserver:function(){0<i.length&&a&&a.disconnect()}},observe:{class:function(){0<i.length&&a&&a.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(Q.disabled)}},check:{disabled:function(){i.attr("tabindex",oe.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){e=Date.UTC(e,t,a+3)/864e5,t=Math.floor(e/7),a=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(a,0,7)/6048e5)+1},formattedDate:function(e,t){return oe.helper.dateFormat(e||Z[_.type],t||oe.get.date())},date:function(e){return oe.helper.dateObjectOrFormatted(e,r.data(ee.date))},inputDate:function(){return i.val()},focusDate:function(e){return oe.helper.dateObjectOrFormatted(e,r.data(ee.focusDate))},startDate:function(e){const t=oe.get.calendarModule(_.startCalendar);return t?t.get.date(e):oe.helper.dateObjectOrFormatted(e,r.data(ee.startDate))},endDate:function(e){const t=oe.get.calendarModule(_.endCalendar);return t?t.get.date(e):oe.helper.dateObjectOrFormatted(e,r.data(ee.endDate))},minDate:function(){return r.data(ee.minDate)||null},maxDate:function(){return r.data(ee.maxDate)||null},monthOffset:function(){return r.data(ee.monthOffset)||_.monthOffset||0},mode:function(){var e=r.data(ee.mode)||_.startMode;return oe.get.validatedMode(e)},validatedMode:function(e){return oe.get.validModes().includes(e)?e:"time"===_.type?"hour":"month"===_.type?"month":"year"===_.type?"year":"day"},type:function(){return r.data(ee.type)||_.type},validModes:function(){const e=[];return"time"!==_.type&&(_.disableYear&&"year"!==_.type||e.push("year"),(_.disableMonth||"year"===_.type)&&"month"!==_.type||e.push("month"),_.type.includes("date")&&e.push("day")),_.type.includes("time")&&(e.push("hour"),_.disableMinute||e.push("minute")),e},isTouch:function(){try{return x.createEvent("TouchEvent"),!0}catch{return!1}},calendarModule:function(e){return e?(e=e instanceof ie?e:m.find(e).first()).data(t):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=oe.helper.sanitiseDate(e),e=oe.helper.dateInRange(e);var n=oe.get.mode(),o=oe.helper.dateFormat(Z[_.type],e);if(a&&!1===_.onBeforeChange.call(d,e,o,n))return!1;if(oe.set.focusDate(e),_.isDisabled(e,n))return!1;var r=oe.get.endDate();r&&e&&r<e&&oe.set.endDate(),oe.set.dataKeyValue(ee.date,e),t&&0<i.length&&i.val(o),a&&_.onChange.call(d,e,o,n)},startDate:function(e,t){e=oe.helper.sanitiseDate(e);const a=oe.get.calendarModule(_.startCalendar);a&&a.set.date(e),oe.set.dataKeyValue(ee.startDate,e,t)},endDate:function(e,t){e=oe.helper.sanitiseDate(e);const a=oe.get.calendarModule(_.endCalendar);a&&a.set.date(e),oe.set.dataKeyValue(ee.endDate,e,t)},focusDate:function(e,t,a,n){e=oe.helper.sanitiseDate(e),e=oe.helper.dateInRange(e);var o="day"===oe.get.mode();const r=oe.get.focusDate();o&&e&&r&&((o=12*(e.getFullYear()-r.getFullYear())+e.getMonth()-r.getMonth())&&(o=oe.get.monthOffset()-o,oe.set.monthOffset(o,!1)));o=oe.set.dataKeyValue(ee.focusDate,e,!!e&&t);a=!1!==a&&o&&!1===t||f!=n,f=n,a&&oe.update.focus(n)},minDate:function(e){e=oe.helper.sanitiseDate(e),null!==_.maxDate&&_.maxDate<=e?oe.verbose("Unable to set minDate variable bigger that maxDate variable",e,_.maxDate):(oe.setting("minDate",e),oe.set.dataKeyValue(ee.minDate,e))},maxDate:function(e){e=oe.helper.sanitiseDate(e),null!==_.minDate&&_.minDate>=e?oe.verbose("Unable to set maxDate variable lower that minDate variable",e,_.minDate):(oe.setting("maxDate",e),oe.set.dataKeyValue(ee.maxDate,e))},monthOffset:function(e,t){var a=Math.max(_.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),oe.set.dataKeyValue(ee.monthOffset,e,t)},mode:function(e,t){oe.set.dataKeyValue(ee.mode,e,t)},dataKeyValue:function(e,t,a){var n=r.data(e),n=n===t||n<=t&&t<=n;return t?r.data(e,t):r.removeData(e),(a=!1!==a&&!n)&&oe.refresh(),!n}},selectDate:function(e,t){oe.verbose("New date selection",e);var a=oe.get.mode();if(t||"minute"===a||_.disableMinute&&"hour"===a||"date"===_.type&&"day"===a||"month"===_.type&&"month"===a||"year"===_.type&&"year"===a){t=!1===oe.set.date(e);if(!t&&(h=!0,_.closable)){oe.popup("hide");const n=oe.get.calendarModule(_.endCalendar);n&&(n.refresh(),"focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{t="year"===a?_.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";oe.set.mode(t),"hour"===a||"day"===a&&oe.get.date()?oe.set.date(e,!0,!1):oe.set.focusDate(e)}},changeDate:function(e){oe.set.date(e)},clear:function(){oe.set.date()},popup:function(...e){return s.popup(...e)},focus:function(){(0<i.length?i:ae).trigger("focus")},blur:function(){(0<i.length?i:ae).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(oe,t,_);var a=t.getDate(),n=t.getMonth(),o=t.getFullYear(),r=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=oe.get.weekOfYear(o,n,a+1-_.firstDayOfWeek),d=i%12||12;const u=(i<12?_.text.am:_.text.pm).toLowerCase(),c={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:_.text.monthsShort[n],MMMM:_.text.months[n],Y:o,YY:String(o).slice(2),YYYY:o,d:r,dd:_.text.dayNamesShort[r].slice(0,2),ddd:_.text.dayNamesShort[r],dddd:_.text.dayNames[r],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(_.regExp.token,function(e){return e in c?c[e]:e.slice(1,-1)})},dateObjectOrFormatted:function(e="",t=null){return(t=oe.helper.sanitiseDate(t)||null)?""===e?t:oe.helper.dateFormat(e,t):null},isDisabled:function(n,o){return("day"===o||"month"===o||"year"===o||"hour"===o)&&("day"===o&&_.disabledDaysOfWeek.includes(n.getDay())||_.disabledDates.some(function(e){let t=!1;if((e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date)t=oe.helper.dateEqual(n,e,o);else if(null!==e&&"object"==typeof e)if(e[ee.year])"number"==typeof e[ee.year]?t=n.getFullYear()===e[ee.year]:Array.isArray(e[ee.year])&&(t=e[ee.year].includes(n.getFullYear()));else if(e[ee.month]){if("number"==typeof e[ee.month])t=n.getMonth()===e[ee.month];else if(Array.isArray(e[ee.month]))t=e[ee.month].includes(n.getMonth());else if(e[ee.month]instanceof Date){const a=oe.helper.sanitiseDate(e[ee.month]);t=n.getMonth()===a.getMonth()&&n.getFullYear()===a.getFullYear()}}else e[ee.date]&&"day"===o&&(e[ee.date]instanceof Date?t=oe.helper.dateEqual(n,oe.helper.sanitiseDate(e[ee.date]),o):Array.isArray(e[ee.date])&&(t=e[ee.date].some(function(e){return oe.helper.dateEqual(n,e,o)})));return t})||"hour"===o&&_.disabledHours.some(function(e){let t=!1;return(e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date?t=oe.helper.dateEqual(n,e,o):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[ee.date]&&(e[ee.date]instanceof Date?t=oe.helper.dateEqual(n,oe.helper.sanitiseDate(e[ee.date])):Array.isArray(e[ee.date])&&(t=e[ee.date].some(function(e){return oe.helper.dateEqual(n,e,o)}))),e[ee.days]&&("number"==typeof e[ee.days]?t=n.getDay()===e[ee.days]:Array.isArray(e[ee.days])&&(t=e[ee.days].includes(n.getDay()))),e[ee.hours]&&("number"==typeof e[ee.hours]?t=t&&n.getHours()===e[ee.hours]:Array.isArray(e[ee.hours])&&(t=t&&e[ee.hours].includes(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===_.enabledDates.length||_.enabledDates.some(function(e){let t=!1;return(e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date?t=oe.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[ee.date]&&(t=oe.helper.dateEqual(a,oe.helper.sanitiseDate(e[ee.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n of e){if((n="string"==typeof n?oe.helper.sanitiseDate(n):n)instanceof Date&&oe.helper.dateEqual(t,n,a)){const o={};return o[ee.date]=n,o}if(null!==n&&"object"==typeof n)if(n[ee.year]){if("number"==typeof n[ee.year]&&t.getFullYear()===n[ee.year])return n;if(Array.isArray(n[ee.year])&&n[ee.year].includes(t.getFullYear()))return n}else if(n[ee.month]){if("number"==typeof n[ee.month]&&t.getMonth()===n[ee.month])return n;if(Array.isArray(n[ee.month])){if(n[ee.month].includes(t.getMonth()))return n}else if(n[ee.month]instanceof Date){const r=oe.helper.sanitiseDate(n[ee.month]);if(t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear())return n}}else if(n[ee.date]&&"day"===a){if(n[ee.date]instanceof Date&&oe.helper.dateEqual(t,oe.helper.sanitiseDate(n[ee.date]),a))return n;if(Array.isArray(n[ee.date])&&n[ee.date].some(function(e){return oe.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a){var n=function(e,t){if(t[ee.hours])return"number"==typeof t[ee.hours]&&e.getHours()===t[ee.hours]||Array.isArray(t[ee.hours])&&t[ee.hours].includes(e.getHours())?t:void 0};for(const o of e){if("number"==typeof o&&t.getHours()===o)return null;if(null!==o&&"object"==typeof o)if(o[ee.days]&&n(t,o)){if("number"==typeof o[ee.days]&&t.getDay()===o[ee.days])return o;if(Array.isArray(o[ee.days])&&o[ee.days].includes(t.getDay()))return o}else if(o[ee.date]&&n(t,o)){if(o[ee.date]instanceof Date&&oe.helper.dateEqual(t,oe.helper.sanitiseDate(o[ee.date])))return o;if(Array.isArray(o[ee.date])&&o[ee.date].some(function(e){return oe.helper.dateEqual(t,e,a)}))return o}else if(n(t,o))return o}}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:X.date(""+e,_))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){a=a||"day";var n="time"===_.type,o="year"===a,r=o||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||o?0:e.getMonth(),n||r?1:e.getDate(),a?e.getHours():0,i?_.minTimeGap*Math.floor(e.getMinutes()/_.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||o?0:t.getMonth(),n||r?1:t.getDate(),a?t.getHours():0,i?_.minTimeGap*Math.floor(t.getMinutes()/_.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===oe.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var o;return a||n||(a=(o=oe.get.startDate())&&_.minDate?new Date(Math.max(o,_.minDate)):o||_.minDate,n=_.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),_.minTimeGap*Math.ceil(a.getMinutes()/_.minTimeGap)),!(!e||a&&0<oe.helper.dateDiff(e,a,t)||n&&0<oe.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=oe.get.startDate())&&_.minDate?new Date(Math.max(n,_.minDate)):n||_.minDate,a=_.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),_.minTimeGap*Math.ceil(t.getMinutes()/_.minTimeGap));var n="time"===_.type;return e&&(t&&0<oe.helper.dateDiff(e,t,"minute")?n?oe.helper.mergeDateTime(e,t):t:a&&0<oe.helper.dateDiff(a,e,"minute")?n?oe.helper.mergeDateTime(e,a):a: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()===_.text.today}},setting:function(e,t){if(oe.debug("Changing setting",e,t),ie.isPlainObject(e))ie.extend(!0,_,e);else{if(void 0===t)return _[e];ie.isPlainObject(_[e])?ie.extend(!0,_[e],t):_[e]=t}},internal:function(e,t){if(ie.isPlainObject(e))ie.extend(!0,oe,e);else{if(void 0===t)return oe[e];oe[e]=t}},debug:function(...e){!_.silent&&_.debug&&(_.performance?oe.performance.log(e):(oe.debug=Function.prototype.bind.call(console.info,console,_.name+":"),oe.debug.apply(console,e)))},verbose:function(...e){!_.silent&&_.verbose&&_.debug&&(_.performance?oe.performance.log(e):(oe.verbose=Function.prototype.bind.call(console.info,console,_.name+":"),oe.verbose.apply(console,e)))},error:function(...e){_.silent||(oe.error=Function.prototype.bind.call(console.error,console,_.name+":"),oe.error.apply(console,e))},performance:{log:function(e){var t,a;_.performance&&(a=(t=Date.now())-(g||t),g=t,D.push({Name:e[0],Arguments:e.slice(1),Element:d,"Execution Time":a})),clearTimeout(oe.performance.timer),oe.performance.timer=setTimeout(function(){oe.performance.display()},500)},display:function(){var e=_.name+":";let a=0;g=!1,clearTimeout(oe.performance.timer),ie.each(D,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",0<D.length&&(console.groupCollapsed(e),console.table(D),console.groupEnd()),D=[]}},invoke:function(n,e=b,t=d){let o=u,r,i,a;var s;return"string"==typeof n&&void 0!==o&&(n=n.split(/[ .]/),r=n.length-1,ie.each(n,function(e,t){var a=e!==r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(ie.isPlainObject(o[a])&&e!==r)o=o[a];else{if(void 0!==o[a])return i=o[a],!1;{if(!ie.isPlainObject(o[t])||e===r)return void 0!==o[t]?i=o[t]:oe.error(l.method,n),!1;o=o[t]}}})),"function"==typeof(s=i)&&"number"!=typeof s.nodeType?a=i.apply(t,e):void 0!==i&&(a=i),Array.isArray(M)?M.push(a):void 0!==M?M=[M,a]:void 0!==a&&(M=a),i}};v?(void 0===u&&oe.initialize(),oe.invoke(y)):(void 0!==u&&u.invoke("destroy"),oe.initialize())}),void 0!==M?M:this},ie.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:!1,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,a){}},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");const a=new Date(e);var n=null!==e.match(/^\d+$/);if(!(null!==e.match(/^(?:\d{1,2}[./-]){2}\d{1,2}$/))&&!n&&!isNaN(a.getDate()))return a;e=e.toLowerCase();let o,r,i,s=-1,l=-1,d=-1,u=-1,c=-1,p;var f,n="time"===t.type,h=!t.type.includes("time");const m=e.split(t.regExp.dateWords),g=e.split(t.regExp.dateNumbers);let D,y;if(!h)for(p=!!m.includes(t.text.am.toLowerCase())||!m.includes(t.text.pm.toLowerCase())&&void 0,o=0;o<g.length;o++)if((D=g[o]).includes(":")){if(l<0||s<0)for(f=D.split(":"),i=0;i<Math.min(2,f.length);i++)r=parseInt(f[i],10),isNaN(r)&&(r=0),0===i?l=r%24:s=r%60;g.splice(o,1)}if(!n){for(const b of m)if(0<b.length){for(r=0;r<t.text.months.length;r++)if((y=(y=t.text.months[r]).slice(0,b.length).toLowerCase())===b){u=r+1;break}if(0<=u)break}for(o=0;o<g.length;o++)if(r=parseInt(g[o],10),!isNaN(r)&&r>=t.centuryBreak&&o===g.length-1){r<=99&&(r+=t.currentCentury-100),c=r,g.splice(o,1);break}if(u<0)for(o=0;o<g.length;o++)if(i=1<o||t.monthFirst?o:1===o?0:1,r=parseInt(g[i],10),!isNaN(r)&&1<=r&&r<=12){u=r,g.splice(i,1);break}for(o=0;o<g.length;o++)if(r=parseInt(g[o],10),!isNaN(r)&&1<=r&&r<=31){d=r,g.splice(o,1);break}if(c<0)for(o=g.length-1;0<=o;o--)if(r=parseInt(g[o],10),!isNaN(r)){r<=99&&(r+=t.currentCentury),c=r,g.splice(o,1);break}}if(!h){if(l<0)for(o=0;o<g.length;o++)if(r=parseInt(g[o],10),!isNaN(r)&&0<=r&&r<=23){l=r,g.splice(o,1);break}if(s<0)for(o=0;o<g.length;o++)if(r=parseInt(g[o],10),!isNaN(r)&&0<=r&&r<=59){s=r,g.splice(o,1);break}}if(s<0&&l<0&&d<0&&u<0&&c<0)return null;s<0&&(s=0),l<0&&(l=0),d<0&&(d=1),u<0&&(u=1),c<0&&(c=(new Date).getFullYear()),void 0!==p&&(p?12===l&&(l=0):l<12&&(l+=12));let v=new Date(c,u-1,d,l,s);return v.getMonth()===u-1&&v.getFullYear()===c||(v=new Date(c,u,0,l,s)),isNaN(v.getTime())?null:v}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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);
|
|
11
|
+
!function(ie,w,x){"use strict";w=void 0!==w&&w.Math===Math?w:globalThis,ie.fn.calendar=function(...e){const t=ie(this),h=ie(x);let g=Date.now(),D=[];const y=e[0],b="string"==typeof y,v=e.slice(1);let M;const C={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}},re=["","one","two","three","four","five","six","seven","eight"];return t.each(function(){const _=ie.isPlainObject(y)?ie.extend(!0,{},ie.fn.calendar.settings,y):ie.extend({},ie.fn.calendar.settings),Q=_.className,n=_.namespace,o=_.selector,Z=_.formatter,X=_.parser,ee=_.metadata,te=C[_.minTimeGap],l=_.error,e="."+n,t="module-"+n,r=ie(this),i=r.find(o.input);let s=r.find(o.activator);const d=this;let u=r.data(t),ae=u&&u.popupId?h.find("#"+u.popupId):r.find(o.popup),c,p=!1;const ne=r.hasClass(Q.inverted);let f=!1,m=!1,a;const oe={initialize:function(){oe.debug("Initializing calendar for",d,r),c=oe.get.isTouch(),oe.setup.config(),oe.setup.popup(),oe.setup.inline(),oe.setup.input(),oe.setup.date(),oe.create.calendar(),oe.bind.events(),oe.observeChanges(),oe.instantiate()},instantiate:function(){oe.verbose("Storing instance of calendar"),u=oe,r.data(t,u)},destroy:function(){oe.verbose("Destroying previous calendar for",d),r.removeData([ee.date,ee.focusDate,ee.startDate,ee.endDate,ee.minDate,ee.maxDate,ee.mode,ee.monthOffset,t]),oe.unbind.events(),oe.disconnect.classObserver()},setup:{config:function(){null!==oe.get.minDate()&&oe.set.minDate(r.data(ee.minDate)),null!==oe.get.maxDate()&&oe.set.maxDate(r.data(ee.maxDate)),oe.setting("type",oe.get.type()),oe.setting("on",_.on||"click")},popup:function(){if(!_.inline&&(0!==s.length||0!==(s=r.children().first()).length))if(void 0===ie.fn.popup)oe.error(l.popup);else{if(0===ae.length)if(_.context)oe.popupId=n+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),ae=ie("<div/>",{id:oe.popupId}).addClass(Q.popup).appendTo(h.find(_.context));else{const a=s.parent();var t=0<a.closest(o.append).length?"appendTo":"prependTo";ae=ie("<div/>").addClass(Q.popup)[t](a)}ae.addClass(Q.calendar),ne&&ae.addClass(Q.inverted);let e=function(...e){return oe.refreshTooltips(),_.onVisible.apply(ae,e)};0===i.length&&(ae.attr("tabindex","0"),e=function(...e){return oe.refreshTooltips(),oe.focus(),_.onVisible.apply(ae,e)});t=oe.setting("on"),t=ie.extend({},_.popupOptions,{popup:ae,movePopup:!_.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(...e){return oe.set.focusDate(oe.get.date()),oe.set.mode(oe.get.validatedMode(_.startMode)),_.onShow.apply(ae,e)},onVisible:e,onHide:_.onHide,onHidden:function(...e){return oe.blur(),_.onHidden.apply(ae,e)}});oe.popup(t)}},inline:function(){0<s.length&&!_.inline||(_.inline=!0,ae=ie("<div/>").addClass(Q.calendar).appendTo(r),0===i.length&&ae.attr("tabindex","0"))},input:function(){_.touchReadonly&&0<i.length&&c&&i.prop("readonly",!0),oe.check.disabled()},date:function(){let e;_.initialDate?e=X.date(_.initialDate,_):void 0!==r.data(ee.date)?e=X.date(r.data(ee.date),_):0<i.length&&(e=X.date(i.val(),_)),oe.set.date(e,_.formatInput,!1),oe.set.mode(oe.get.mode(),!1)}},trigger:{change:function(){const e=i[0];var t;e&&(t=new Event("change",{bubbles:!0}),oe.verbose("Triggering native change event"),e.dispatchEvent(t))}},create:{calendar:function(){let a,n,o,r,i,s,q;var l=oe.get.mode(),d=new Date,W=oe.get.date();let u=oe.get.focusDate();const e=oe.helper.dateInRange(u||W||X.date(_.initialDate,_)||d);u||(u=e,oe.set.focusDate(u,!1,!1));var c="year"===l,p="month"===l,f="day"===l,m="hour"===l,h="minute"===l,R="time"===_.type,t=Math.max(_.multiMonth,1),V=f?oe.get.monthOffset():0,g=e.getMinutes(),D=e.getHours(),y=e.getDate(),G=e.getMonth()+V,b=e.getFullYear(),v=f?_.showWeekNumbers?8:7:m?4:te.column;let P=f||m?6:te.row;var M=f?t:1;let C=ae;var w=C.hasClass("left")?"right center":"left center";for(C.empty(),1<M&&(q=ie("<div/>").addClass(Q.grid).appendTo(C)),r=0;r<M;r++){1<M&&(T=ie("<div/>").addClass(Q.column).appendTo(q),C=T);var x=G+r,T=(new Date(b,x,1).getDay()-_.firstDayOfWeek%7+7)%7,Y=(!_.constantHeight&&f&&(Y=new Date(b,x+1,0).getDate()+T,P=Math.ceil(Y/7)),c?10:p?1:0),N=f?1:0,k=m||h?1:0,B=m||h?y:1,K=new Date(b-Y,x-N,B-k,D),N=new Date(b+Y,x+N,B+k,D),B=c?new Date(10*Math.ceil(b/10)-9,0,0):p?new Date(b,0,0):f?new Date(b,x,0):new Date(b,x,y,-1),k=c?new Date(10*Math.ceil(b/10)+1,0,1):p?new Date(b+1,0,1):f?new Date(b,x+1,1):new Date(b,x,y+1);let e=l;f&&_.showWeekNumbers&&(e+=" andweek");const E=ie("<table/>").addClass(Q.table).addClass(e).addClass(re[v]+" column").appendTo(C);ne&&E.addClass(Q.inverted);let t=v;if(!R){var U=ie("<thead/>").appendTo(E),O=(i=ie("<tr/>").appendTo(U),s=ie("<th/>").attr("colspan",""+v).appendTo(i),c||p?new Date(b,0,1):f?new Date(b,x,1):new Date(b,x,y,D,g));const z=ie("<span/>").addClass(Q.link).appendTo(s);z.text(oe.helper.dateFormat(Z[l+"Header"],O));O=p?_.disableYear?"day":"year":f?_.disableMonth?"year":"month":"day";if(z.data(ee.mode,O),0===r){const I=ie("<span/>").addClass(Q.prev).appendTo(s);I.data(ee.focusDate,K),I.toggleClass(Q.disabledCell,!oe.helper.isDateInRange(B,l)),ie("<i/>").addClass(Q.prevIcon).appendTo(I)}if(r===M-1){const j=ie("<span/>").addClass(Q.next).appendTo(s);j.data(ee.focusDate,N),j.toggleClass(Q.disabledCell,!oe.helper.isDateInRange(k,l)),ie("<i/>").addClass(Q.nextIcon).appendTo(j)}if(f)for(i=ie("<tr/>").appendTo(U),_.showWeekNumbers&&((s=ie("<th/>").appendTo(i)).text(_.text.weekNo),s.addClass(Q.weekCell),t--),a=0;a<t;a++)(s=ie("<th/>").appendTo(i)).text(Z.dayColumnHeader((a+_.firstDayOfWeek)%7,_))}var $=ie("<tbody/>").appendTo(E);for(a=c?10*Math.ceil(b/10)-9:f?1-T:0,n=0;n<P;n++)for(i=ie("<tr/>").appendTo($),f&&_.showWeekNumbers&&((s=ie("<th/>").appendTo(i)).text(oe.get.weekOfYear(b,x,a+1-_.firstDayOfWeek)),s.addClass(Q.weekCell)),o=0;o<t;o++,a++){const S=c?new Date(a,x,1,D,g):p?new Date(b,a,1,D,g):f?new Date(b,x,a,D,g):m?new Date(b,x,y,a):new Date(b,x,y,D,a*_.minTimeGap);var F=c?a:p?_.text.monthsShort[a]:f?S.getDate():oe.helper.dateFormat(Z.cellTime,S),F=((s=ie("<td/>").addClass(Q.cell).appendTo(i)).text(F),s.data(ee.date,S),f&&S.getMonth()!==(x+12)%12),A=!_.selectAdjacentDays&&F||!oe.helper.isDateInRange(S,l)||_.isDisabled(S,l)||oe.helper.isDisabled(S,l)||!oe.helper.isEnabled(S,l);let e;A?(null!==(H=oe.helper.findDayAsObject(S,l,_.disabledDates))&&H[ee.message]&&(s.attr("data-tooltip",H[ee.message]),s.attr("data-position",H[ee.position]||w),(H[ee.inverted]||ne&&void 0===H[ee.inverted])&&s.attr("data-inverted",""),H[ee.variation]&&s.attr("data-variation",H[ee.variation])),"hour"===l&&null!==(H=oe.helper.findHourAsObject(S,l,_.disabledHours))&&H[ee.message]&&(s.attr("data-tooltip",H[ee.message]),s.attr("data-position",H[ee.position]||w),(H[ee.inverted]||ne&&void 0===H[ee.inverted])&&s.attr("data-inverted",""),H[ee.variation]&&s.attr("data-variation",H[ee.variation]))):null!==(e=oe.helper.findDayAsObject(S,l,_.eventDates))&&(s.addClass(e[ee.class]||_.eventClass),e[ee.message]&&(s.attr("data-tooltip",e[ee.message]),s.attr("data-position",e[ee.position]||w),(e[ee.inverted]||ne&&void 0===e[ee.inverted])&&s.attr("data-inverted",""),e[ee.variation]&&s.attr("data-variation",e[ee.variation])));var H=oe.helper.dateEqual(S,W,l),J=oe.helper.dateEqual(S,d,l),F=(s.toggleClass(Q.adjacentCell,F&&!e),s.toggleClass(Q.disabledCell,A),s.toggleClass(Q.activeCell,H&&!(F&&A)),m||h||s.toggleClass(Q.todayCell,!F&&J),{mode:l,adjacent:F,disabled:A,active:H,today:J});Z.cell(s,S,F),oe.helper.dateEqual(S,u,l)&&oe.set.focusDate(S,!1,!1)}if(_.today){O=ie("<tr/>").appendTo($);const L=ie("<td/>").attr("colspan",""+v).addClass(Q.today).appendTo(O);L.text(Z.today(_)),L.data(ee.date,d)}oe.update.focus(!1,E),_.inline&&oe.refreshTooltips()}}},update:{focus:function(e,t=ae){const i=oe.get.mode();var a=oe.get.date();const s=oe.get.focusDate(),l=oe.get.startDate(),d=oe.get.endDate(),u=(e?s:null)||a||(c?null:s);t.find("td").each(function(){const e=ie(this);var t,a,n,o,r=e.data(ee.date);r&&(t=e.hasClass(Q.disabledCell),a=e.hasClass(Q.activeCell),n=e.hasClass(Q.adjacentCell),o=oe.helper.dateEqual(r,s,i),r=!!u&&(!!l&&oe.helper.isDateInRange(r,i,l,u)||!!d&&oe.helper.isDateInRange(r,i,u,d)),e.toggleClass(Q.focusCell,o&&(!c||p)&&(!n||_.selectAdjacentDays&&n)&&!t),oe.helper.isTodayButton(e)||e.toggleClass(Q.rangeCell,r&&!a&&!t))})}},refresh:function(){oe.create.calendar()},refreshTooltips:function(){const n=ie(w).width();ae.find("td[data-position]").each(function(){const e=ie(this);var t=w.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,"");const a=e.attr("data-position");t=n-e.width()-(Number.parseInt(t,10)||250)>e.offset().left?"right":"left";a.includes(t)||e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){oe.debug("Binding events"),ae.on("mousedown"+e,oe.event.mousedown),ae.on("touchstart"+e,oe.event.mousedown),ae.on("mouseup"+e,oe.event.mouseup),ae.on("touchend"+e,oe.event.mouseup),ae.on("mouseover"+e,oe.event.mouseover),0<i.length?(i.on("input"+e,oe.event.inputChange),i.on("focus"+e,oe.event.inputFocus),i.on("blur"+e,oe.event.inputBlur),i.on("keydown"+e,oe.event.keydown)):ae.on("keydown"+e,oe.event.keydown)}},unbind:{events:function(){oe.debug("Unbinding events"),ae.off(e),0<i.length&&i.off(e)}},event:{mouseover:function(e){const t=ie(e.target);var a=t.data(ee.date),e=1===e.buttons;a&&oe.set.focusDate(a,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),p=e.type.includes("touch");const t=ie(e.target);e=t.data(ee.date);e&&oe.set.focusDate(e,!1,!0,!0)},mouseup:function(e){oe.focus(),e.preventDefault(),e.stopPropagation(),p=!1;let t=ie(e.target);if(!t.hasClass("disabled")){const r=t.parent();var a,e=(t=r.data(ee.date)||r.data(ee.focusDate)||r.data(ee.mode)?r:t).data(ee.date),n=t.data(ee.focusDate),o=t.data(ee.mode);e&&!1!==_.onSelect.call(d,e,oe.get.mode())?(a=t.hasClass(Q.today),oe.selectDate(e,a)):n?oe.set.focusDate(n):o&&oe.set.mode(o)}},keydown:function(e){var t=e.which;if(9===t&&oe.popup("hide"),oe.popup("is visible")){var a=oe.get.mode();switch(t){case 37:case 38:case 39:case 40:{var n="day"===a?7:"hour"===a?4:"minute"===a?te.column:3,n=37===t?-1:38===t?-n:39===t?1:n;n*="minute"===a?_.minTimeGap:1;const l=oe.get.focusDate()||oe.get.date()||new Date;var o=l.getFullYear()+("year"===a?n:0),r=l.getMonth()+("month"===a?n:0),i=l.getDate()+("day"===a?n:0),s=l.getHours()+("hour"===a?n:0),n=l.getMinutes()+("minute"===a?n:0);let e=new Date(o,r,i,s,n);"time"===_.type&&(e=oe.helper.mergeDateTime(l,e)),oe.helper.isDateInRange(e,a)&&oe.set.focusDate(e);break}case 13:o=oe.get.focusDate();o&&!_.isDisabled(o,a)&&!oe.helper.isDisabled(o,a)&&oe.helper.isEnabled(o,a)&&!1!==_.onSelect.call(d,o,oe.get.mode())&&oe.selectDate(o),e.preventDefault(),e.stopPropagation();break;case 27:oe.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),oe.popup("show"))},inputChange:function(){var e=i.val(),e=X.date(e,_);oe.set.date(e,!1)},inputFocus:function(){ae.addClass(Q.active)},inputBlur:function(){var e;ae.removeClass(Q.active),_.formatInput&&(e=oe.get.date(),e=oe.helper.dateFormat(Z[_.type],e),i.val(e)),m&&(oe.trigger.change(),m=!1)},class:{mutation:function(e){for(const t of e)"class"===t.attributeName&&oe.check.disabled()}}},observeChanges:function(){a=new MutationObserver(oe.event.class.mutation),oe.debug("Setting up mutation observer",a),oe.observe.class()},disconnect:{classObserver:function(){0<i.length&&a&&a.disconnect()}},observe:{class:function(){0<i.length&&a&&a.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(Q.disabled)}},check:{disabled:function(){i.attr("tabindex",oe.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){e=Date.UTC(e,t,a+3)/864e5,t=Math.floor(e/7),a=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(a,0,7)/6048e5)+1},formattedDate:function(e,t){return oe.helper.dateFormat(e||Z[_.type],t||oe.get.date())},date:function(e){return oe.helper.dateObjectOrFormatted(e,r.data(ee.date))},inputDate:function(){return i.val()},focusDate:function(e){return oe.helper.dateObjectOrFormatted(e,r.data(ee.focusDate))},startDate:function(e){const t=oe.get.calendarModule(_.startCalendar);return t?t.get.date(e):oe.helper.dateObjectOrFormatted(e,r.data(ee.startDate))},endDate:function(e){const t=oe.get.calendarModule(_.endCalendar);return t?t.get.date(e):oe.helper.dateObjectOrFormatted(e,r.data(ee.endDate))},minDate:function(){return r.data(ee.minDate)||null},maxDate:function(){return r.data(ee.maxDate)||null},monthOffset:function(){return r.data(ee.monthOffset)||_.monthOffset||0},mode:function(){var e=r.data(ee.mode)||_.startMode;return oe.get.validatedMode(e)},validatedMode:function(e){return oe.get.validModes().includes(e)?e:"time"===_.type?"hour":"month"===_.type?"month":"year"===_.type?"year":"day"},type:function(){return r.data(ee.type)||_.type},validModes:function(){const e=[];return"time"!==_.type&&(_.disableYear&&"year"!==_.type||e.push("year"),(_.disableMonth||"year"===_.type)&&"month"!==_.type||e.push("month"),_.type.includes("date")&&e.push("day")),_.type.includes("time")&&(e.push("hour"),_.disableMinute||e.push("minute")),e},isTouch:function(){try{return x.createEvent("TouchEvent"),!0}catch{return!1}},calendarModule:function(e){return e?(e=e instanceof ie?e:h.find(e).first()).data(t):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=oe.helper.sanitiseDate(e),e=oe.helper.dateInRange(e);var n=oe.get.mode(),o=oe.helper.dateFormat(Z[_.type],e);if(a&&!1===_.onBeforeChange.call(d,e,o,n))return!1;if(oe.set.focusDate(e),_.isDisabled(e,n))return!1;var r=oe.get.endDate();r&&e&&r<e&&oe.set.endDate(),oe.set.dataKeyValue(ee.date,e),t&&0<i.length&&i.val(o),a&&_.onChange.call(d,e,o,n)},startDate:function(e,t){e=oe.helper.sanitiseDate(e);const a=oe.get.calendarModule(_.startCalendar);a&&a.set.date(e),oe.set.dataKeyValue(ee.startDate,e,t)},endDate:function(e,t){e=oe.helper.sanitiseDate(e);const a=oe.get.calendarModule(_.endCalendar);a&&a.set.date(e),oe.set.dataKeyValue(ee.endDate,e,t)},focusDate:function(e,t,a,n){e=oe.helper.sanitiseDate(e),e=oe.helper.dateInRange(e);var o="day"===oe.get.mode();const r=oe.get.focusDate();o&&e&&r&&((o=12*(e.getFullYear()-r.getFullYear())+e.getMonth()-r.getMonth())&&(o=oe.get.monthOffset()-o,oe.set.monthOffset(o,!1)));o=oe.set.dataKeyValue(ee.focusDate,e,!!e&&t);a=!1!==a&&o&&!1===t||f!=n,f=n,a&&oe.update.focus(n)},minDate:function(e){e=oe.helper.sanitiseDate(e),null!==_.maxDate&&_.maxDate<=e?oe.verbose("Unable to set minDate variable bigger that maxDate variable",e,_.maxDate):(oe.setting("minDate",e),oe.set.dataKeyValue(ee.minDate,e))},maxDate:function(e){e=oe.helper.sanitiseDate(e),null!==_.minDate&&_.minDate>=e?oe.verbose("Unable to set maxDate variable lower that minDate variable",e,_.minDate):(oe.setting("maxDate",e),oe.set.dataKeyValue(ee.maxDate,e))},monthOffset:function(e,t){var a=Math.max(_.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),oe.set.dataKeyValue(ee.monthOffset,e,t)},mode:function(e,t){oe.set.dataKeyValue(ee.mode,e,t)},dataKeyValue:function(e,t,a){var n=r.data(e),n=n===t||n<=t&&t<=n;return t?r.data(e,t):r.removeData(e),(a=!1!==a&&!n)&&oe.refresh(),!n}},selectDate:function(e,t){oe.verbose("New date selection",e);var a=oe.get.mode();if(t||"minute"===a||_.disableMinute&&"hour"===a||"date"===_.type&&"day"===a||"month"===_.type&&"month"===a||"year"===_.type&&"year"===a){t=!1===oe.set.date(e);if(!t&&(m=!0,_.closable)){oe.popup("hide");const n=oe.get.calendarModule(_.endCalendar);n&&(n.refresh(),"focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{t="year"===a?_.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";oe.set.mode(t),"hour"===a||"day"===a&&oe.get.date()?oe.set.date(e,!0,!1):oe.set.focusDate(e)}},changeDate:function(e){oe.set.date(e)},clear:function(){oe.set.date()},popup:function(...e){return s.popup(...e)},focus:function(){(0<i.length?i:ae).trigger("focus")},blur:function(){(0<i.length?i:ae).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(oe,t,_);var a=t.getDate(),n=t.getMonth(),o=t.getFullYear(),r=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=oe.get.weekOfYear(o,n,a+1-_.firstDayOfWeek),d=i%12||12;const u=(i<12?_.text.am:_.text.pm).toLowerCase(),c={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:_.text.monthsShort[n],MMMM:_.text.months[n],Y:o,YY:String(o).slice(2),YYYY:o,d:r,dd:_.text.dayNamesShort[r].slice(0,2),ddd:_.text.dayNamesShort[r],dddd:_.text.dayNames[r],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(_.regExp.token,function(e){return e in c?c[e]:e.slice(1,-1)})},dateObjectOrFormatted:function(e="",t=null){return(t=oe.helper.sanitiseDate(t)||null)?""===e?t:oe.helper.dateFormat(e,t):null},isDisabled:function(n,o){return("day"===o||"month"===o||"year"===o||"hour"===o)&&("day"===o&&_.disabledDaysOfWeek.includes(n.getDay())||_.disabledDates.some(function(e){let t=!1;if((e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date)t=oe.helper.dateEqual(n,e,o);else if(null!==e&&"object"==typeof e)if(e[ee.year])"number"==typeof e[ee.year]?t=n.getFullYear()===e[ee.year]:Array.isArray(e[ee.year])&&(t=e[ee.year].includes(n.getFullYear()));else if(e[ee.month]){if("number"==typeof e[ee.month])t=n.getMonth()===e[ee.month];else if(Array.isArray(e[ee.month]))t=e[ee.month].includes(n.getMonth());else if(e[ee.month]instanceof Date){const a=oe.helper.sanitiseDate(e[ee.month]);t=n.getMonth()===a.getMonth()&&n.getFullYear()===a.getFullYear()}}else e[ee.date]&&"day"===o&&(e[ee.date]instanceof Date?t=oe.helper.dateEqual(n,oe.helper.sanitiseDate(e[ee.date]),o):Array.isArray(e[ee.date])&&(t=e[ee.date].some(function(e){return oe.helper.dateEqual(n,e,o)})));return t})||"hour"===o&&_.disabledHours.some(function(e){let t=!1;return(e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date?t=oe.helper.dateEqual(n,e,o):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[ee.date]&&(e[ee.date]instanceof Date?t=oe.helper.dateEqual(n,oe.helper.sanitiseDate(e[ee.date])):Array.isArray(e[ee.date])&&(t=e[ee.date].some(function(e){return oe.helper.dateEqual(n,e,o)}))),e[ee.days]&&("number"==typeof e[ee.days]?t=n.getDay()===e[ee.days]:Array.isArray(e[ee.days])&&(t=e[ee.days].includes(n.getDay()))),e[ee.hours]&&("number"==typeof e[ee.hours]?t=t&&n.getHours()===e[ee.hours]:Array.isArray(e[ee.hours])&&(t=t&&e[ee.hours].includes(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===_.enabledDates.length||_.enabledDates.some(function(e){let t=!1;return(e="string"==typeof e?oe.helper.sanitiseDate(e):e)instanceof Date?t=oe.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[ee.date]&&(t=oe.helper.dateEqual(a,oe.helper.sanitiseDate(e[ee.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n of e){if((n="string"==typeof n?oe.helper.sanitiseDate(n):n)instanceof Date&&oe.helper.dateEqual(t,n,a)){const o={};return o[ee.date]=n,o}if(null!==n&&"object"==typeof n)if(n[ee.year]){if("number"==typeof n[ee.year]&&t.getFullYear()===n[ee.year])return n;if(Array.isArray(n[ee.year])&&n[ee.year].includes(t.getFullYear()))return n}else if(n[ee.month]){if("number"==typeof n[ee.month]&&t.getMonth()===n[ee.month])return n;if(Array.isArray(n[ee.month])){if(n[ee.month].includes(t.getMonth()))return n}else if(n[ee.month]instanceof Date){const r=oe.helper.sanitiseDate(n[ee.month]);if(t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear())return n}}else if(n[ee.date]&&"day"===a){if(n[ee.date]instanceof Date&&oe.helper.dateEqual(t,oe.helper.sanitiseDate(n[ee.date]),a))return n;if(Array.isArray(n[ee.date])&&n[ee.date].some(function(e){return oe.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a){var n=function(e,t){if(t[ee.hours])return"number"==typeof t[ee.hours]&&e.getHours()===t[ee.hours]||Array.isArray(t[ee.hours])&&t[ee.hours].includes(e.getHours())?t:void 0};for(const o of e){if("number"==typeof o&&t.getHours()===o)return null;if(null!==o&&"object"==typeof o)if(o[ee.days]&&n(t,o)){if("number"==typeof o[ee.days]&&t.getDay()===o[ee.days])return o;if(Array.isArray(o[ee.days])&&o[ee.days].includes(t.getDay()))return o}else if(o[ee.date]&&n(t,o)){if(o[ee.date]instanceof Date&&oe.helper.dateEqual(t,oe.helper.sanitiseDate(o[ee.date])))return o;if(Array.isArray(o[ee.date])&&o[ee.date].some(function(e){return oe.helper.dateEqual(t,e,a)}))return o}else if(n(t,o))return o}}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:X.date(""+e,_))||Number.isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){a=a||"day";var n="time"===_.type,o="year"===a,r=o||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||o?0:e.getMonth(),n||r?1:e.getDate(),a?e.getHours():0,i?_.minTimeGap*Math.floor(e.getMinutes()/_.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||o?0:t.getMonth(),n||r?1:t.getDate(),a?t.getHours():0,i?_.minTimeGap*Math.floor(t.getMinutes()/_.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===oe.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var o;return a||n||(a=(o=oe.get.startDate())&&_.minDate?new Date(Math.max(o,_.minDate)):o||_.minDate,n=_.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),_.minTimeGap*Math.ceil(a.getMinutes()/_.minTimeGap)),!(!e||a&&0<oe.helper.dateDiff(e,a,t)||n&&0<oe.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=oe.get.startDate())&&_.minDate?new Date(Math.max(n,_.minDate)):n||_.minDate,a=_.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),_.minTimeGap*Math.ceil(t.getMinutes()/_.minTimeGap));var n="time"===_.type;return e&&(t&&0<oe.helper.dateDiff(e,t,"minute")?n?oe.helper.mergeDateTime(e,t):t:a&&0<oe.helper.dateDiff(a,e,"minute")?n?oe.helper.mergeDateTime(e,a):a: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()===_.text.today}},setting:function(e,t){if(oe.debug("Changing setting",e,t),ie.isPlainObject(e))ie.extend(!0,_,e);else{if(void 0===t)return _[e];ie.isPlainObject(_[e])?ie.extend(!0,_[e],t):_[e]=t}},internal:function(e,t){if(ie.isPlainObject(e))ie.extend(!0,oe,e);else{if(void 0===t)return oe[e];oe[e]=t}},debug:function(...e){!_.silent&&_.debug&&(_.performance?oe.performance.log(e):(oe.debug=Function.prototype.bind.call(console.info,console,_.name+":"),oe.debug.apply(console,e)))},verbose:function(...e){!_.silent&&_.verbose&&_.debug&&(_.performance?oe.performance.log(e):(oe.verbose=Function.prototype.bind.call(console.info,console,_.name+":"),oe.verbose.apply(console,e)))},error:function(...e){_.silent||(oe.error=Function.prototype.bind.call(console.error,console,_.name+":"),oe.error.apply(console,e))},performance:{log:function(e){var t,a;_.performance&&(a=(t=Date.now())-(g||t),g=t,D.push({Name:e[0],Arguments:e.slice(1),Element:d,"Execution Time":a})),clearTimeout(oe.performance.timer),oe.performance.timer=setTimeout(function(){oe.performance.display()},500)},display:function(){var e=_.name+":";let a=0;g=!1,clearTimeout(oe.performance.timer),ie.each(D,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",0<D.length&&(console.groupCollapsed(e),console.table(D),console.groupEnd()),D=[]}},invoke:function(n,e=v,t=d){let o=u,r,i,a;var s;return"string"==typeof n&&void 0!==o&&(n=n.split(/[ .]/),r=n.length-1,ie.each(n,function(e,t){var a=e!==r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(ie.isPlainObject(o[a])&&e!==r)o=o[a];else{if(void 0!==o[a])return i=o[a],!1;{if(!ie.isPlainObject(o[t])||e===r)return void 0!==o[t]?i=o[t]:oe.error(l.method,n),!1;o=o[t]}}})),"function"==typeof(s=i)&&"number"!=typeof s.nodeType?a=i.apply(t,e):void 0!==i&&(a=i),Array.isArray(M)?M.push(a):void 0!==M?M=[M,a]:void 0!==a&&(M=a),i}};b?(void 0===u&&oe.initialize(),oe.invoke(y)):(void 0!==u&&u.invoke("destroy"),oe.initialize())}),void 0!==M?M:this},ie.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:!1,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,a){}},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");const a=new Date(e);var n=null!==e.match(/^\d+$/);if(!(null!==e.match(/^(?:\d{1,2}[./-]){2}\d{1,2}$/))&&!n&&!Number.isNaN(a.getDate()))return a;e=e.toLowerCase();let o,r,i,s=-1,l=-1,d=-1,u=-1,c=-1,p;var f,n="time"===t.type,m=!t.type.includes("time");const h=e.split(t.regExp.dateWords),g=e.split(t.regExp.dateNumbers);let D,y;if(!m)for(p=!!h.includes(t.text.am.toLowerCase())||!h.includes(t.text.pm.toLowerCase())&&void 0,o=0;o<g.length;o++)if((D=g[o]).includes(":")){if(l<0||s<0)for(f=D.split(":"),i=0;i<Math.min(2,f.length);i++)r=Number.parseInt(f[i],10),Number.isNaN(r)&&(r=0),0===i?l=r%24:s=r%60;g.splice(o,1)}if(!n){for(const v of h)if(0<v.length){for(r=0;r<t.text.months.length;r++)if((y=(y=t.text.months[r]).slice(0,v.length).toLowerCase())===v){u=r+1;break}if(0<=u)break}for(o=0;o<g.length;o++)if(r=Number.parseInt(g[o],10),!Number.isNaN(r)&&r>=t.centuryBreak&&o===g.length-1){r<=99&&(r+=t.currentCentury-100),c=r,g.splice(o,1);break}if(u<0)for(o=0;o<g.length;o++)if(i=1<o||t.monthFirst?o:1===o?0:1,r=Number.parseInt(g[i],10),!Number.isNaN(r)&&1<=r&&r<=12){u=r,g.splice(i,1);break}for(o=0;o<g.length;o++)if(r=Number.parseInt(g[o],10),!Number.isNaN(r)&&1<=r&&r<=31){d=r,g.splice(o,1);break}if(c<0)for(o=g.length-1;0<=o;o--)if(r=Number.parseInt(g[o],10),!Number.isNaN(r)){r<=99&&(r+=t.currentCentury),c=r,g.splice(o,1);break}}if(!m){if(l<0)for(o=0;o<g.length;o++)if(r=Number.parseInt(g[o],10),!Number.isNaN(r)&&0<=r&&r<=23){l=r,g.splice(o,1);break}if(s<0)for(o=0;o<g.length;o++)if(r=Number.parseInt(g[o],10),!Number.isNaN(r)&&0<=r&&r<=59){s=r,g.splice(o,1);break}}if(s<0&&l<0&&d<0&&u<0&&c<0)return null;s<0&&(s=0),l<0&&(l=0),d<0&&(d=1),u<0&&(u=1),c<0&&(c=(new Date).getFullYear()),void 0!==p&&(p?12===l&&(l=0):l<12&&(l+=12));let b=new Date(c,u-1,d,l,s);return b.getMonth()===u-1&&b.getFullYear()===c||(b=new Date(c,u,0,l,s)),Number.isNaN(b.getTime())?null:b}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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);
|
package/dist/components/card.css
CHANGED