!function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r,a=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw r}}}}var l=function(e,t){if(null===e)return null;if("number"!=typeof t.step)return e;var i=e%(60*t.step);return(i-=(t.minTime||0)%(60*t.step))>=30*t.step?e+=60*t.step-i:e-=i,function(e,t){if(86400==e&&t.show2400)return e;return e%86400}(e,t)};var c,u={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,lang:{},maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:l,scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},p={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},m=function(){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,e);var r=e.extractAttrOptions(i,Object.keys(u));this.settings=this.parseSettings(a(a(a({},u),n),r))}var n,r,s;return n=e,s=[{key:"extractAttrOptions",value:function(e,t){var i,n={},r=o(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;a in e.dataset&&(n[a]=e.dataset[a])}}catch(e){r.e(e)}finally{r.f()}return n}}],(r=[{key:"time2int",value:function(e){if(""===e||null==e)return null;if(e instanceof Date)return 3600*e.getHours()+60*e.getMinutes()+e.getSeconds();if("string"!=typeof e)return e;"a"!=(e=e.toLowerCase().replace(/[\s\.]/g,"")).slice(-1)&&"p"!=e.slice(-1)||(e+="m");var t=e.match(/^(([^0-9]*))?([0-9]?[0-9])(\W?([0-5][0-9]))?(\W+([0-5][0-9]))?(([^0-9]*))$/);if(!t)return null;var i=parseInt(1*t[3],10),n=t[2]||t[9],r=i,a=1*t[5]||0,s=1*t[7]||0;if(i<=12&&n){var o=(n=n.trim())==this.settings.lang.pm||n==this.settings.lang.PM;r=12==i?o?12:0:i+(o?12:0)}else if(3600*i+60*a+s>=86400+(this.settings.show2400?1:0)){if(!1===this.settings.wrapHours)return null;r=i%24}var l=3600*r+60*a+s;if(i<12&&!n&&this.settings._twelveHourTime&&this.settings.scrollDefault){var c=l-this.settings.scrollDefault();c<0&&c>=-43200&&(l=(l+43200)%86400)}return l}},{key:"parseSettings",value:function(e){var t=this;if(e.lang=a(a({},p),e.lang),this.settings=e,e.minTime&&(e.minTime=this.time2int(e.minTime)),e.maxTime&&(e.maxTime=this.time2int(e.maxTime)),e.durationTime&&"function"!=typeof e.durationTime&&(e.durationTime=this.time2int(e.durationTime)),"now"==e.scrollDefault)e.scrollDefault=function(){return e.roundingFunction(t.time2int(new Date),e)};else if(e.scrollDefault&&"function"!=typeof e.scrollDefault){var i=e.scrollDefault;e.scrollDefault=function(){return e.roundingFunction(t.time2int(i),e)}}else e.minTime&&(e.scrollDefault=function(){return e.roundingFunction(e.minTime,e)});if("string"==typeof e.timeFormat&&e.timeFormat.match(/[gh]/)&&(e._twelveHourTime=!0),!1===e.showOnFocus&&-1!=e.showOn.indexOf("focus")&&e.showOn.splice(e.showOn.indexOf("focus"),1),e.disableTimeRanges||(e.disableTimeRanges=[]),e.disableTimeRanges.length>0){for(var n in e.disableTimeRanges)e.disableTimeRanges[n]=[this.time2int(e.disableTimeRanges[n][0]),this.time2int(e.disableTimeRanges[n][1])];for(e.disableTimeRanges=e.disableTimeRanges.sort((function(e,t){return e[0]-t[0]})),n=e.disableTimeRanges.length-1;n>0;n--)e.disableTimeRanges[n][0]<=e.disableTimeRanges[n-1][1]&&(e.disableTimeRanges[n-1]=[Math.min(e.disableTimeRanges[n][0],e.disableTimeRanges[n-1][0]),Math.max(e.disableTimeRanges[n][1],e.disableTimeRanges[n-1][1])],e.disableTimeRanges.splice(n,1))}return e}}])&&i(n.prototype,r),s&&i(n,s),e}();c=function(t){var i={},n={init:function(e){return this.each((function(){var r=t(this),s=new m(this,e),o=s.settings;if(i=o.lang,r.data("timepicker-settings",o),r.data("timepicker-obj",s),r.addClass("ui-timepicker-input"),o.useSelect)a(r);else{if(r.prop("autocomplete","off"),o.showOn)for(var l in o.showOn)r.on(o.showOn[l]+".timepicker",n.show);r.on("change.timepicker",d),r.on("keydown.timepicker",v),r.on("keyup.timepicker",b),o.disableTextInput&&r.on("keydown.timepicker",k),r.on("cut.timepicker",b),r.on("paste.timepicker",b),d.call(r.get(0),null,"initial")}}))},show:function(e){var i=t(this),s=i.data("timepicker-settings"),o=i.data("timepicker-obj");if(e&&e.preventDefault(),s.useSelect)i.data("timepicker-list").focus();else{u(i)&&i.blur();var l=i.data("timepicker-list");if(!i.prop("readonly")&&(l&&0!==l.length&&"function"!=typeof s.durationTime||(a(i),l=i.data("timepicker-list")),!r(l))){i.data("ui-timepicker-value",i.val()),f(i,l),n.hide(),"number"==typeof s.listWidth&&(console.log(s.listWidth),l.width(i.outerWidth()*s.listWidth)),l.show();var m={};s.orientation.match(/r/)?m.left=i.offset().left+i.outerWidth()-l.outerWidth()+parseInt(l.css("marginLeft").replace("px",""),10):s.orientation.match(/l/)?m.left=i.offset().left+parseInt(l.css("marginLeft").replace("px",""),10):s.orientation.match(/c/)&&(m.left=i.offset().left+(i.outerWidth()-l.outerWidth())/2+parseInt(l.css("marginLeft").replace("px",""),10)),"t"==(s.orientation.match(/t/)?"t":s.orientation.match(/b/)?"b":i.offset().top+i.outerHeight(!0)+l.outerHeight()>t(window).height()+t(window).scrollTop()?"t":"b")?(l.addClass("ui-timepicker-positioned-top"),m.top=i.offset().top-l.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)):(l.removeClass("ui-timepicker-positioned-top"),m.top=i.offset().top+i.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)),l.offset(m);var d=l.find(".ui-timepicker-selected");if(!d.length){var g=o.time2int(h(i));null!==g?d=p(i,l,g):s.scrollDefault&&(d=p(i,l,s.scrollDefault()))}if(d.length&&!d.hasClass("ui-timepicker-disabled")||(d=l.find("li:not(.ui-timepicker-disabled):first")),d&&d.length){var k=l.scrollTop()+d.position().top-d.outerHeight();l.scrollTop(k)}else l.scrollTop(0);return s.stopScrollPropagation&&t(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",(function(e){e.preventDefault();var i=t(this).scrollTop();t(this).scrollTop(i+e.originalEvent.deltaY)})),t(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",c),t(window).on("resize.ui-timepicker",c),s.closeOnWindowScroll&&t(document).on("scroll.ui-timepicker",c),i.trigger("showTimepicker"),this}}},hide:function(e){var i=t(this),n=i.data("timepicker-settings");return n&&n.useSelect&&i.blur(),t(".ui-timepicker-wrapper").each((function(){var e=t(this);if(r(e)){var i=e.data("timepicker-input"),n=i.data("timepicker-settings");n&&n.selectOnBlur&&y(i),e.hide(),i.trigger("hideTimepicker")}})),this},option:function(i,n){return"string"==typeof i&&void 0===n?t(this).data("timepicker-settings")[i]:this.each((function(){var r=t(this),s=r.data("timepicker-settings"),o=r.data("timepicker-obj"),l=r.data("timepicker-list");"object"==e(i)?s=t.extend(s,i):"string"==typeof i&&(s[i]=n),s=o.parseSettings(s),r.data("timepicker-settings",s),d.call(r.get(0),{type:"change"},"initial"),l&&(l.remove(),r.data("timepicker-list",!1)),s.useSelect&&a(r)}))},getSecondsFromMidnight:function(){return t(this).data("timepicker-obj").time2int(h(this))},getTime:function(e){var i=t(this),n=i.data("timepicker-obj"),r=h(i);if(!r)return null;var a=n.time2int(r);if(null===a)return null;e||(e=new Date);var s=new Date(e);return s.setHours(a/3600),s.setMinutes(a%3600/60),s.setSeconds(a%60),s.setMilliseconds(0),s},isVisible:function(){var e=this.data("timepicker-list");return!(!e||!r(e))},setTime:function(e){var t=this.data("timepicker-settings"),i=this.data("timepicker-obj");if(t.forceRoundTime)var n=o(i.time2int(e),t);else n=w(i.time2int(e),t);return e&&null===n&&t.noneOption&&(n=e),g(this,n,"initial"),d.call(this.get(0),{type:"change"},"initial"),this.data("timepicker-list")&&f(this,this.data("timepicker-list")),this},remove:function(){if(this.hasClass("ui-timepicker-input")){var e=this.data("timepicker-settings");return this.removeAttr("autocomplete","off"),this.removeClass("ui-timepicker-input"),this.removeData("timepicker-settings"),this.off(".timepicker"),this.data("timepicker-list")&&this.data("timepicker-list").remove(),e.useSelect&&this.show(),this.removeData("timepicker-list"),this}}};function r(e){var t=e[0];return t.offsetWidth>0&&t.offsetHeight>0}function a(e){var i=e.data("timepicker-settings"),r=e.data("timepicker-list"),a=e.data("timepicker-obj");if(r&&r.length&&(r.remove(),e.data("timepicker-list",!1)),i.useSelect){r=t("