/*! jQuery UI - v1.12.1 - 2021-09-27
* http://jqueryui.com
* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/datepicker.js, widgets/menu.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(b){b.ui=b.ui||{};b.ui.version="1.12.1";var a,i=0,o=Array.prototype.slice;b.cleanData=(a=b.cleanData,function(e){for(var t,i,s=0;null!=(i=e[s]);s++)try{(t=b._data(i,"events"))&&t.remove&&b(i).triggerHandler("remove")}catch(e){}a(e)}),b.widget=function(e,i,t){var s,a,n,r={},o=e.split(".")[0],l=o+"-"+(e=e.split(".")[1]);return t||(t=i,i=b.Widget),b.isArray(t)&&(t=b.extend.apply(null,[{}].concat(t))),b.expr[":"][l.toLowerCase()]=function(e){return!!b.data(e,l)},b[o]=b[o]||{},s=b[o][e],a=b[o][e]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},b.extend(a,s,{version:t.version,_proto:b.extend({},t),_childConstructors:[]}),(n=new i).options=b.widget.extend({},n.options),b.each(t,function(t,s){function a(){return i.prototype[t].apply(this,arguments)}function n(e){return i.prototype[t].apply(this,e)}b.isFunction(s)?r[t]=function(){var e,t=this._super,i=this._superApply;return this._super=a,this._superApply=n,e=s.apply(this,arguments),this._super=t,this._superApply=i,e}:r[t]=s}),a.prototype=b.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||e},r,{constructor:a,namespace:o,widgetName:e,widgetFullName:l}),s?(b.each(s._childConstructors,function(e,t){var i=t.prototype;b.widget(i.namespace+"."+i.widgetName,a,t._proto)}),delete s._childConstructors):i._childConstructors.push(a),b.widget.bridge(e,a),a},b.widget.extend=function(e){for(var t,i,s=o.call(arguments,1),a=0,n=s.length;a<n;a++)for(t in s[a])i=s[a][t],s[a].hasOwnProperty(t)&&void 0!==i&&(b.isPlainObject(i)?e[t]=b.isPlainObject(e[t])?b.widget.extend({},e[t],i):b.widget.extend({},i):e[t]=i);return e},b.widget.bridge=function(n,t){var r=t.prototype.widgetFullName||n;b.fn[n]=function(i){var e="string"==typeof i,s=o.call(arguments,1),a=this;return e?this.length||"instance"!==i?this.each(function(){var e,t=b.data(this,r);return"instance"===i?(a=t,!1):t?b.isFunction(t[i])&&"_"!==i.charAt(0)?(e=t[i].apply(t,s))!==t&&void 0!==e?(a=e&&e.jquery?a.pushStack(e.get()):e,!1):void 0:b.error("no such method '"+i+"' for "+n+" widget instance"):b.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):a=void 0:(s.length&&(i=b.widget.extend.apply(null,[i].concat(s))),this.each(function(){var e=b.data(this,r);e?(e.option(i||{}),e._init&&e._init()):b.data(this,r,new t(i,this))})),a}},b.Widget=function(){},b.Widget._childConstructors=[],b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=b(t||this.defaultElement||this)[0],this.element=b(t),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=b(),this.hoverable=b(),this.focusable=b(),this.classesElementLookup={},t!==this&&(b.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=b(t.style?t.ownerDocument:t.document||t),this.window=b(this.document[0].defaultView||this.document[0].parentWindow)),this.options=b.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:b.noop,_create:b.noop,_init:b.noop,destroy:function(){var i=this;this._destroy(),b.each(this.classesElementLookup,function(e,t){i._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:b.noop,widget:function(){return this.element},option:function(e,t){var i,s,a,n=e;if(0===arguments.length)return b.widget.extend({},this.options);if("string"==typeof e)if(n={},e=(i=e.split(".")).shift(),i.length){for(s=n[e]=b.widget.extend({},this.options[e]),a=0;a<i.length-1;a++)s[i[a]]=s[i[a]]||{},s=s[i[a]];if(e=i.pop(),1===arguments.length)return void 0===s[e]?null:s[e];s[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];n[e]=t}return this._setOptions(n),this},_setOptions:function(e){for(var t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,i,s;for(t in e)s=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&s&&s.length&&(i=b(s.get()),this._removeClass(s,t),i.addClass(this._classes({element:i,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(a){var n=[],r=this;function e(e,t){for(var i,s=0;s<e.length;s++)i=r.classesElementLookup[e[s]]||b(),i=a.add?b(b.unique(i.get().concat(a.element.get()))):b(i.not(a.element).get()),r.classesElementLookup[e[s]]=i,n.push(e[s]),t&&a.classes[e[s]]&&n.push(a.classes[e[s]])}return a=b.extend({element:this.element,classes:this.options.classes||{}},a),this._on(a.element,{remove:"_untrackClassesElement"}),a.keys&&e(a.keys.match(/\S+/g)||[],!0),a.extra&&e(a.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;b.each(s.classesElementLookup,function(e,t){-1!==b.inArray(i.target,t)&&(s.classesElementLookup[e]=b(t.not(i.target).get()))})},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,s){var a="string"==typeof e||null===e,i={extra:a?t:i,keys:a?e:t,element:a?this.element:e,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(a,n,e){var r,o=this;"boolean"!=typeof a&&(e=n,n=a,a=!1),e?(n=r=b(n),this.bindings=this.bindings.add(n)):(e=n,n=this.element,r=this.widget()),b.each(e,function(e,t){function i(){if(a||!0!==o.options.disabled&&!b(this).hasClass("ui-state-disabled"))return("string"==typeof t?o[t]:t).apply(o,arguments)}"string"!=typeof t&&(i.guid=t.guid=t.guid||i.guid||b.guid++);var s=e.match(/^([\w:-]*)\s*(.*)$/),e=s[1]+o.eventNamespace,s=s[2];s?r.on(e,s,i):n.on(e,i)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=b(this.bindings.not(e).get()),this.focusable=b(this.focusable.not(e).get()),this.hoverable=b(this.hoverable.not(e).get())},_delay:function(e,t){var i=this;return setTimeout(function(){return("string"==typeof e?i[e]:e).apply(i,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(b(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(b(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(b(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(b(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,i){var s,a,n=this.options[e];if(i=i||{},(t=b.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],a=t.originalEvent)for(s in a)s in t||(t[s]=a[s]);return this.element.trigger(t,i),!(b.isFunction(n)&&!1===n.apply(this.element[0],[t].concat(i))||t.isDefaultPrevented())}},b.each({show:"fadeIn",hide:"fadeOut"},function(n,r){b.Widget.prototype["_"+n]=function(t,e,i){var s=(e="string"==typeof e?{effect:e}:e)?!0!==e&&"number"!=typeof e&&e.effect||r:n,a=!b.isEmptyObject(e="number"==typeof(e=e||{})?{duration:e}:e);e.complete=i,e.delay&&t.delay(e.delay),a&&b.effects&&b.effects.effect[s]?t[n](e):s!==n&&t[s]?t[s](e.duration,e.easing,i):t.queue(function(e){b(this)[n](),i&&i.call(t[0]),e()})}});var s,w,M,n,r,l,h,u,C;b.widget;function x(e,t,i){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?i/100:1)]}function I(e,t){return parseInt(b.css(e,t),10)||0}w=Math.max,M=Math.abs,n=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,u=/%$/,C=b.fn.position,b.position={scrollbarWidth:function(){if(void 0!==s)return s;var e,t=b("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=t.children()[0];return b("body").append(t),e=i.offsetWidth,t.css("overflow","scroll"),e===(i=i.offsetWidth)&&(i=t[0].clientWidth),t.remove(),s=e-i},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),t="scroll"===t||"auto"===t&&e.width<e.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight?b.position.scrollbarWidth():0,height:t?b.position.scrollbarWidth():0}},getWithinInfo:function(e){var t=b(e||window),i=b.isWindow(t[0]),s=!!t[0]&&9===t[0].nodeType;return{element:t,isWindow:i,isDocument:s,offset:!i&&!s?b(e).offset():{left:0,top:0},scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),width:t.outerWidth(),height:t.outerHeight()}}},b.fn.position=function(c){if(!c||!c.of)return C.apply(this,arguments);c=b.extend({},c);var d,p,g,f,m,e,_=b(c.of),v=b.position.getWithinInfo(c.within),y=b.position.getScrollInfo(v),k=(c.collision||"flip").split(" "),D={},t=9===(e=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:b.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()};return _[0].preventDefault&&(c.at="left top"),p=t.width,g=t.height,m=b.extend({},f=t.offset),b.each(["my","at"],function(){var e,t,i=(c[this]||"").split(" ");(i=1===i.length?n.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=n.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",e=l.exec(i[0]),t=l.exec(i[1]),D[this]=[e?e[0]:0,t?t[0]:0],c[this]=[h.exec(i[0])[0],h.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===c.at[0]?m.left+=p:"center"===c.at[0]&&(m.left+=p/2),"bottom"===c.at[1]?m.top+=g:"center"===c.at[1]&&(m.top+=g/2),d=x(D.at,p,g),m.left+=d[0],m.top+=d[1],this.each(function(){var i,e,r=b(this),o=r.outerWidth(),l=r.outerHeight(),t=I(this,"marginLeft"),s=I(this,"marginTop"),a=o+t+I(this,"marginRight")+y.width,n=l+s+I(this,"marginBottom")+y.height,h=b.extend({},m),u=x(D.my,r.outerWidth(),r.outerHeight());"right"===c.my[0]?h.left-=o:"center"===c.my[0]&&(h.left-=o/2),"bottom"===c.my[1]?h.top-=l:"center"===c.my[1]&&(h.top-=l/2),h.left+=u[0],h.top+=u[1],i={marginLeft:t,marginTop:s},b.each(["left","top"],function(e,t){b.ui.position[k[e]]&&b.ui.position[k[e]][t](h,{targetWidth:p,targetHeight:g,elemWidth:o,elemHeight:l,collisionPosition:i,collisionWidth:a,collisionHeight:n,offset:[d[0]+u[0],d[1]+u[1]],my:c.my,at:c.at,within:v,elem:r})}),c.using&&(e=function(e){var t=f.left-h.left,i=t+p-o,s=f.top-h.top,a=s+g-l,n={target:{element:_,left:f.left,top:f.top,width:p,height:g},element:{element:r,left:h.left,top:h.top,width:o,height:l},horizontal:i<0?"left":0<t?"right":"center",vertical:a<0?"top":0<s?"bottom":"middle"};p<o&&M(t+i)<p&&(n.horizontal="center"),g<l&&M(s+a)<g&&(n.vertical="middle"),w(M(t),M(i))>w(M(s),M(a))?n.important="horizontal":n.important="vertical",c.using.call(this,e,n)}),r.offset(b.extend(h,{using:e}))})},b.ui.position={fit:{left:function(e,t){var i=t.within,s=i.isWindow?i.scrollLeft:i.offset.left,a=i.width,n=e.left-t.collisionPosition.marginLeft,r=s-n,o=n+t.collisionWidth-a-s;t.collisionWidth>a?0<r&&o<=0?(i=e.left+r+t.collisionWidth-a-s,e.left+=r-i):e.left=!(0<o&&r<=0)&&o<r?s+a-t.collisionWidth:s:0<r?e.left+=r:0<o?e.left-=o:e.left=w(e.left-n,e.left)},top:function(e,t){var i=t.within,s=i.isWindow?i.scrollTop:i.offset.top,a=t.within.height,n=e.top-t.collisionPosition.marginTop,r=s-n,o=n+t.collisionHeight-a-s;t.collisionHeight>a?0<r&&o<=0?(i=e.top+r+t.collisionHeight-a-s,e.top+=r-i):e.top=!(0<o&&r<=0)&&o<r?s+a-t.collisionHeight:s:0<r?e.top+=r:0<o?e.top-=o:e.top=w(e.top-n,e.top)}},flip:{left:function(e,t){var i=t.within,s=i.offset.left+i.scrollLeft,a=i.width,n=i.isWindow?i.scrollLeft:i.offset.left,r=e.left-t.collisionPosition.marginLeft,o=r-n,l=r+t.collisionWidth-a-n,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,i="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,r=-2*t.offset[0];o<0?((s=e.left+h+i+r+t.collisionWidth-a-s)<0||s<M(o))&&(e.left+=h+i+r):0<l&&(0<(n=e.left-t.collisionPosition.marginLeft+h+i+r-n)||M(n)<l)&&(e.left+=h+i+r)},top:function(e,t){var i=t.within,s=i.offset.top+i.scrollTop,a=i.height,n=i.isWindow?i.scrollTop:i.offset.top,r=e.top-t.collisionPosition.marginTop,o=r-n,l=r+t.collisionHeight-a-n,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,i="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,r=-2*t.offset[1];o<0?((s=e.top+h+i+r+t.collisionHeight-a-s)<0||s<M(o))&&(e.top+=h+i+r):0<l&&(0<(n=e.top-t.collisionPosition.marginTop+h+i+r-n)||M(n)<l)&&(e.top+=h+i+r)}},flipfit:{left:function(){b.ui.position.flip.left.apply(this,arguments),b.ui.position.fit.left.apply(this,arguments)},top:function(){b.ui.position.flip.top.apply(this,arguments),b.ui.position.fit.top.apply(this,arguments)}}};var e;b.ui.position,b.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},b.fn.extend({uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&b(this).removeAttr("id")})}}),b.ui.safeActiveElement=function(t){var i;try{i=t.activeElement}catch(e){i=t.body}return i=!(i=i||t.body).nodeName?t.body:i},b.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=b(e.target),i=b(b.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var t,i;this.previousFilter||(t=b(e.target).closest(".ui-menu-item"),i=b(e.currentTarget),t[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i)))},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(e){this._delay(function(){b.contains(this.element[0],b.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=b(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,i,s,a=!0;switch(e.keyCode){case b.ui.keyCode.PAGE_UP:this.previousPage(e);break;case b.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case b.ui.keyCode.HOME:this._move("first","first",e);break;case b.ui.keyCode.END:this._move("last","last",e);break;case b.ui.keyCode.UP:this.previous(e);break;case b.ui.keyCode.DOWN:this.next(e);break;case b.ui.keyCode.LEFT:this.collapse(e);break;case b.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case b.ui.keyCode.ENTER:case b.ui.keyCode.SPACE:this._activate(e);break;case b.ui.keyCode.ESCAPE:this.collapse(e);break;default:t=this.previousFilter||"",s=a=!1,i=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),i===t?s=!0:i=t+i,t=this._filterMenuItems(i),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,s=this,a=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=b(this),t=e.prev(),i=b("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+a),t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(e=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=b(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),i=(t=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(t,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!b.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){var i;"icons"===e&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,s;this._hasScroll()&&(i=parseFloat(b.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(b.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),e=e.outerHeight(),t<0?this.activeMenu.scrollTop(i+t):s<t+e&&this.activeMenu.scrollTop(i+t-s+e))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=b.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var e=i?this.element:b(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},this.delay)},_close:function(e){(e=e||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!b(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;(s=this.active?"first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0):s)&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(e){var t,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=b(this)).offset().top-i-s<0}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=b(this)).offset().top-i+s}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||b(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var e=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),t=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return t.test(b.trim(b(this).children(".ui-menu-item-wrapper").text()))})}});b.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var i,s,a,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,e="input"===e;this.isMultiLine=t||!e&&this._isContentEditable(this.element),this.valueMethod=this.element[t||e?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))s=a=i=!0;else{s=a=i=!1;var t=b.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:i=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:i=!0,this._move("nextPage",e);break;case t.UP:i=!0,this._keyEvent("previous",e);break;case t.DOWN:i=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(i=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:s=!0,this._searchTimeout(e)}}},keypress:function(e){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!s){var t=b.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(a)return a=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=b("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==b.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,t){var i;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){b(e.target).trigger(e.originalEvent)});i=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:i})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(i.value),(i=t.item.attr("aria-label")||i.value)&&b.trim(i).length&&(this.liveRegion.children().hide(),b("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==b.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=b("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||b.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e=!(e=!(e=e&&(e.jquery||e.nodeType?b(e):this.document.find(e).eq(0)))||!e[0]?this.element.closest(".ui-front, dialog"):e).length?this.document[0].body:e},_initSource:function(){var i,s,a=this;b.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t(b.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(e,t){a.xhr&&a.xhr.abort(),a.xhr=b.ajax({url:s,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;e&&(t||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return b.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e=e&&this._normalize(e),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:b.map(e,function(e){return"string"==typeof e?{label:e,value:e}:b.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(b.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,e){var s=this;b.each(e,function(e,t){s._renderItemData(i,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return b("<li>").append(b("<div>").text(t.label)).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),b.extend(b.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=new RegExp(b.ui.autocomplete.escapeRegex(t),"i");return b.grep(e,function(e){return i.test(e.label||e.value||e)})}}),b.widget("ui.autocomplete",b.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),b("<div>").text(t).appendTo(this.liveRegion))}});var c;b.ui.autocomplete;function t(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},b.extend(this._defaults,this.regional[""]),this.regional.en=b.extend(!0,{},this.regional[""]),this.regional["en-US"]=b.extend(!0,{},this.regional.en),this.dpDiv=d(b("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function d(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){b(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,p)}function p(){b.datepicker._isDisabledDatepicker((c.inline?c.dpDiv.parent():c.input)[0])||(b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).addClass("ui-datepicker-next-hover"))}function g(e,t){for(var i in b.extend(e,t),t)null==t[i]&&(e[i]=t[i]);return e}b.extend(b.ui,{datepicker:{version:"1.12.1"}}),b.extend(t.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return g(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var i,s=e.nodeName.toLowerCase(),a="div"===s||"span"===s;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(b(e),a)).settings=b.extend({},t||{}),"input"===s?this._connectDatepicker(e,i):a&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?d(b("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var i=b(e);t.append=b([]),t.trigger=b([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),b.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i,s=this._get(t,"appendText"),a=this._get(t,"isRTL");t.append&&t.append.remove(),s&&(t.append=b("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(t,"buttonText"),i=this._get(t,"buttonImage"),t.trigger=b(this._get(t,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):b("<button type='button'></button>").addClass(this._triggerClass).html(i?b("<img/>").attr({src:i,alt:s,title:s}):s)),e[a?"before":"after"](t.trigger),t.trigger.on("click",function(){return b.datepicker._datepickerShowing&&b.datepicker._lastInput===e[0]?b.datepicker._hideDatepicker():(b.datepicker._datepickerShowing&&b.datepicker._lastInput!==e[0]&&b.datepicker._hideDatepicker(),b.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,i,s,a,n,r;this._get(e,"autoSize")&&!e.inline&&(n=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(t=function(e){for(a=s=i=0;a<e.length;a++)e[a].length>i&&(i=e[a].length,s=a);return s},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length))},_inlineDatepicker:function(e,t){var i=b(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv),b.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,s,a){var n,r=this._dialogInst;return r||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=b("<input type='text' id='"+n+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),b("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},b.data(this._dialogInput[0],"datepicker",r)),g(r.settings,s||{}),t=t&&t.constructor===Date?this._formatDate(r,t):t,this._dialogInput.val(t),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(n=document.documentElement.clientWidth,s=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,a=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+t,s/2-150+a]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),b.blockUI&&b.blockUI(this.dpDiv),b.data(this._dialogInput[0],"datepicker",r),this},_destroyDatepicker:function(e){var t,i=b(e),s=b.data(e,"datepicker");i.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),b.removeData(e,"datepicker"),"input"===t?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||i.removeClass(this.markerClassName).empty(),c===s&&(c=null))},_enableDatepicker:function(t){var e,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return b.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var s,a,n,r,o=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?b.extend({},b.datepicker._defaults):o?"all"===t?b.extend({},o.settings):this._get(o,t):null;s=t||{},"string"==typeof t&&((s={})[t]=i),o&&(this._curInst===o&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),n=this._getMinMaxDate(o,"min"),r=this._getMinMaxDate(o,"max"),g(o.settings,s),null!==n&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,n)),null!==r&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,r)),"disabled"in s&&(s.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(b(e),o),this._autoSize(o),this._setDate(o,a),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,i,s=b.datepicker._getInst(e.target),a=!0,n=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,b.datepicker._datepickerShowing)switch(e.keyCode){case 9:b.datepicker._hideDatepicker(),a=!1;break;case 13:return(i=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",s.dpDiv))[0]&&b.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,i[0]),(t=b.datepicker._get(s,"onSelect"))?(i=b.datepicker._formatDate(s),t.apply(s.input?s.input[0]:null,[i,s])):b.datepicker._hideDatepicker(),!1;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(e.target,e.ctrlKey?-b.datepicker._get(s,"stepBigMonths"):-b.datepicker._get(s,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(e.target,e.ctrlKey?+b.datepicker._get(s,"stepBigMonths"):+b.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&b.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&b.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&b.datepicker._adjustDate(e.target,n?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&b.datepicker._adjustDate(e.target,e.ctrlKey?-b.datepicker._get(s,"stepBigMonths"):-b.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&b.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&b.datepicker._adjustDate(e.target,n?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&b.datepicker._adjustDate(e.target,e.ctrlKey?+b.datepicker._get(s,"stepBigMonths"):+b.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&b.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?b.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,i=b.datepicker._getInst(e.target);if(b.datepicker._get(i,"constrainInput"))return t=b.datepicker._possibleChars(b.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||i<" "||!t||-1<t.indexOf(i)},_doKeyUp:function(e){e=b.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{b.datepicker.parseDate(b.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,b.datepicker._getFormatConfig(e))&&(b.datepicker._setDateFromField(e),b.datepicker._updateAlternate(e),b.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,i,s,a;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=b("input",e.parentNode)[0]),b.datepicker._isDisabledDatepicker(e)||b.datepicker._lastInput===e||(a=b.datepicker._getInst(e),b.datepicker._curInst&&b.datepicker._curInst!==a&&(b.datepicker._curInst.dpDiv.stop(!0,!0),a&&b.datepicker._datepickerShowing&&b.datepicker._hideDatepicker(b.datepicker._curInst.input[0])),!1!==(i=(s=b.datepicker._get(a,"beforeShow"))?s.apply(e,[e,a]):{})&&(g(a.settings,i),a.lastVal=null,b.datepicker._lastInput=e,b.datepicker._setDateFromField(a),b.datepicker._inDialog&&(e.value=""),b.datepicker._pos||(b.datepicker._pos=b.datepicker._findPos(e),b.datepicker._pos[1]+=e.offsetHeight),t=!1,b(e).parents().each(function(){return!(t|="fixed"===b(this).css("position"))}),s={left:b.datepicker._pos[0],top:b.datepicker._pos[1]},b.datepicker._pos=null,a.dpDiv.empty(),a.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),b.datepicker._updateDatepicker(a),s=b.datepicker._checkOffset(a,s,t),a.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":t?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),a.inline||(i=b.datepicker._get(a,"showAnim"),s=b.datepicker._get(a,"duration"),a.dpDiv.css("z-index",function(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}(b(e))+1),b.datepicker._datepickerShowing=!0,b.effects&&b.effects.effect[i]?a.dpDiv.show(i,b.datepicker._get(a,"showOptions"),s):a.dpDiv[i||"show"](i?s:null),b.datepicker._shouldFocusInput(a)&&a.input.trigger("focus"),b.datepicker._curInst=a)))},_updateDatepicker:function(e){this.maxRows=4,(c=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,i=this._getNumberOfMonths(e),s=i[1],a=e.dpDiv.find("."+this._dayOverClass+" a");0<a.length&&p.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===b.datepicker._curInst&&b.datepicker._datepickerShowing&&b.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,i){var s=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),n=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:b(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:b(document).scrollTop());return t.left-=this._get(e,"isRTL")?s-n:0,t.left-=i&&t.left===e.input.offset().left?b(document).scrollLeft():0,t.top-=i&&t.top===e.input.offset().top+r?b(document).scrollTop():0,t.left-=Math.min(t.left,t.left+s>o&&s<o?Math.abs(t.left+s-o):0),t.top-=Math.min(t.top,t.top+a>l&&a<l?Math.abs(a+r):0),t},_findPos:function(e){for(var t=this._getInst(e),i=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||b.expr.filters.hidden(e));)e=e[i?"previousSibling":"nextSibling"];return[(t=b(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,i,s=this._curInst;!s||e&&s!==b.data(e,"datepicker")||this._datepickerShowing&&(t=this._get(s,"showAnim"),i=this._get(s,"duration"),e=function(){b.datepicker._tidyDialog(s)},b.effects&&(b.effects.effect[t]||b.effects[t])?s.dpDiv.hide(t,b.datepicker._get(s,"showOptions"),i,e):s.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?i:null,e),t||e(),this._datepickerShowing=!1,(e=this._get(s,"onClose"))&&e.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),b.blockUI&&(b.unblockUI(),b("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;b.datepicker._curInst&&(t=b(e.target),e=b.datepicker._getInst(t[0]),(t[0].id===b.datepicker._mainDivId||0!==t.parents("#"+b.datepicker._mainDivId).length||t.hasClass(b.datepicker.markerClassName)||t.closest("."+b.datepicker._triggerClass).length||!b.datepicker._datepickerShowing||b.datepicker._inDialog&&b.blockUI)&&(!t.hasClass(b.datepicker.markerClassName)||b.datepicker._curInst===e)||b.datepicker._hideDatepicker())},_adjustDate:function(e,t,i){var s=b(e),e=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(e,t+("M"===i?this._get(e,"showCurrentAtPos"):0),i),this._updateDatepicker(e))},_gotoToday:function(e){var t=b(e),i=this._getInst(t[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(e,t,i){var s=b(e),e=this._getInst(s[0]);e["selected"+("M"===i?"Month":"Year")]=e["draw"+("M"===i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(s)},_selectDay:function(e,t,i,s){var a=b(e);b(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((a=this._getInst(a[0])).selectedDay=a.currentDay=b("a",s).html(),a.selectedMonth=a.currentMonth=t,a.selectedYear=a.currentYear=i,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){e=b(e);this._selectDate(e,"")},_selectDate:function(e,t){var i=b(e),e=this._getInst(i[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(i=this._get(e,"onSelect"))?i.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,i,s=this._get(e,"altField");s&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),e=this.formatDate(t,i,this._getFormatConfig(e)),b(s).val(e))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(t,a,e){if(null==t||null==a)throw"Invalid arguments";if(""===(a="object"==typeof a?a.toString():a+""))return null;function i(e){var t=k(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,t=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}");if(!(t=a.substring(h).match(t)))throw"Missing number at position "+h;return h+=t[0].length,parseInt(t[0],10)}function s(e,t,i){var s=-1,t=b.map(k(e)?i:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(b.each(t,function(e,t){var i=t[1];if(a.substr(h,i.length).toLowerCase()===i.toLowerCase())return s=t[0],h+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+h}function n(){if(a.charAt(h)!==t.charAt(D))throw"Unexpected literal at position "+h;h++}for(var r,o,l,h=0,u=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),c=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,d=(e?e.dayNames:null)||this._defaults.dayNames,p=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,g=(e?e.monthNames:null)||this._defaults.monthNames,f=-1,m=-1,_=-1,v=-1,y=!1,k=function(e){e=D+1<t.length&&t.charAt(D+1)===e;return e&&D++,e},D=0;D<t.length;D++)if(y)"'"!==t.charAt(D)||k("'")?n():y=!1;else switch(t.charAt(D)){case"d":_=i("d");break;case"D":s("D",c,d);break;case"o":v=i("o");break;case"m":m=i("m");break;case"M":m=s("M",p,g);break;case"y":f=i("y");break;case"@":f=(l=new Date(i("@"))).getFullYear(),m=l.getMonth()+1,_=l.getDate();break;case"!":f=(l=new Date((i("!")-this._ticksTo1970)/1e4)).getFullYear(),m=l.getMonth()+1,_=l.getDate();break;case"'":k("'")?n():y=!0;break;default:n()}if(h<a.length&&(o=a.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=u?0:-100)),-1<v)for(m=1,_=v;;){if(_<=(r=this._getDaysInMonth(f,m-1)))break;m++,_-=r}if((l=this._daylightSavingAdjust(new Date(f,m-1,_))).getFullYear()!==f||l.getMonth()+1!==m||l.getDate()!==_)throw"Invalid date";return l},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";function s(e,t,i){var s=""+t;if(u(e))for(;s.length<i;)s="0"+s;return s}function a(e,t,i,s){return(u(e)?s:i)[t]}var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,u=function(e){e=n+1<t.length&&t.charAt(n+1)===e;return e&&n++,e},c="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||u("'")?c+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":c+=s("d",e.getDate(),2);break;case"D":c+=a("D",e.getDay(),r,o);break;case"o":c+=s("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=s("m",e.getMonth()+1,2);break;case"M":c+=a("M",e.getMonth(),l,h);break;case"y":c+=u("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":u("'")?c+="'":d=!0;break;default:c+=t.charAt(n)}return c},_possibleChars:function(t){function e(e){return(e=a+1<t.length&&t.charAt(a+1)===e)&&a++,e}for(var i="",s=!1,a=0;a<t.length;a++)if(s)"'"!==t.charAt(a)||e("'")?i+=t.charAt(a):s=!1;else switch(t.charAt(a)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":e("'")?i+="'":s=!0;break;default:i+=t.charAt(a)}return i},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,a=this._getDefaultDate(e),n=a,r=this._getFormatConfig(e);try{n=this.parseDate(i,s,r)||a}catch(e){s=t?"":s}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=s?n.getDate():0,e.currentMonth=s?n.getMonth():0,e.currentYear=s?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(o,e,t){var i,s,e=null==e||""===e?t:"string"==typeof e?function(e){try{return b.datepicker.parseDate(b.datepicker._get(o,"dateFormat"),e,b.datepicker._getFormatConfig(o))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?b.datepicker._getDate(o):null)||new Date,i=t.getFullYear(),s=t.getMonth(),a=t.getDate(),n=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=n.exec(e);r;){switch(r[2]||"d"){case"d":case"D":a+=parseInt(r[1],10);break;case"w":case"W":a+=7*parseInt(r[1],10);break;case"m":case"M":s+=parseInt(r[1],10),a=Math.min(a,b.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(r[1],10),a=Math.min(a,b.datepicker._getDaysInMonth(i,s))}r=n.exec(e)}return new Date(i,s,a)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(s=new Date).setDate(s.getDate()+i),s):new Date(e.getTime());return(e=e&&"Invalid Date"===e.toString()?t:e)&&(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)),this._daylightSavingAdjust(e)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,a=e.selectedMonth,n=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),a===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){b.datepicker._adjustDate(i,-t,"M")},next:function(){b.datepicker._adjustDate(i,+t,"M")},hide:function(){b.datepicker._hideDatepicker()},today:function(){b.datepicker._gotoToday(i)},selectDay:function(){return b.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return b.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return b.datepicker._selectMonthYear(i,this,"Y"),!1}};b(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,a,n,r,o,l,h,u,c,d,p,g,f,m,_,v,y,k,D,b,w,M,C,x,I,T,A,N,S,F,E=new Date,Y=this._daylightSavingAdjust(new Date(E.getFullYear(),E.getMonth(),E.getDate())),O=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),P=this._get(e,"hideIfNoPrevNext"),L=this._get(e,"navigationAsDateFormat"),j=this._getNumberOfMonths(e),K=this._get(e,"showCurrentAtPos"),E=this._get(e,"stepMonths"),H=1!==j[0]||1!==j[1],R=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),U=this._getMinMaxDate(e,"min"),z=this._getMinMaxDate(e,"max"),q=e.drawMonth-K,B=e.drawYear;if(q<0&&(q+=12,B--),z)for(t=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth()-j[0]*j[1]+1,z.getDate())),t=U&&t<U?U:t;this._daylightSavingAdjust(new Date(B,q,1))>t;)--q<0&&(q=11,B--);for(e.drawMonth=q,e.drawYear=B,K=this._get(e,"prevText"),K=L?this.formatDate(K,this._daylightSavingAdjust(new Date(B,q-E,1)),this._getFormatConfig(e)):K,i=this._canAdjustMonth(e,-1,B,q)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+K+"'><span class='ui-icon ui-icon-circle-triangle-"+(O?"e":"w")+"'>"+K+"</span></a>":P?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+K+"'><span class='ui-icon ui-icon-circle-triangle-"+(O?"e":"w")+"'>"+K+"</span></a>",K=this._get(e,"nextText"),K=L?this.formatDate(K,this._daylightSavingAdjust(new Date(B,q+E,1)),this._getFormatConfig(e)):K,s=this._canAdjustMonth(e,1,B,q)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+K+"'><span class='ui-icon ui-icon-circle-triangle-"+(O?"w":"e")+"'>"+K+"</span></a>":P?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+K+"'><span class='ui-icon ui-icon-circle-triangle-"+(O?"w":"e")+"'>"+K+"</span></a>",P=this._get(e,"currentText"),K=this._get(e,"gotoCurrent")&&e.currentDay?R:Y,P=L?this.formatDate(P,K,this._getFormatConfig(e)):P,L=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",L=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(O?L:"")+(this._isInRange(e,K)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+P+"</button>":"")+(O?"":L)+"</div>":"",a=parseInt(this._get(e,"firstDay"),10),a=isNaN(a)?0:a,n=this._get(e,"showWeek"),r=this._get(e,"dayNames"),o=this._get(e,"dayNamesMin"),l=this._get(e,"monthNames"),h=this._get(e,"monthNamesShort"),u=this._get(e,"beforeShowDay"),c=this._get(e,"showOtherMonths"),d=this._get(e,"selectOtherMonths"),p=this._getDefaultDate(e),g="",m=0;m<j[0];m++){for(_="",this.maxRows=4,v=0;v<j[1];v++){if(y=this._daylightSavingAdjust(new Date(B,q,e.selectedDay)),k=" ui-corner-all",D="",H){if(D+="<div class='ui-datepicker-group",1<j[1])switch(v){case 0:D+=" ui-datepicker-group-first",k=" ui-corner-"+(O?"right":"left");break;case j[1]-1:D+=" ui-datepicker-group-last",k=" ui-corner-"+(O?"left":"right");break;default:D+=" ui-datepicker-group-middle",k=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+k+"'>"+(/all|left/.test(k)&&0===m?O?s:i:"")+(/all|right/.test(k)&&0===m?O?i:s:"")+this._generateMonthYearHeader(e,q,B,U,z,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",b=n?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",f=0;f<7;f++)b+="<th scope='col'"+(5<=(f+a+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+r[w=(f+a)%7]+"'>"+o[w]+"</span></th>";for(D+=b+"</tr></thead><tbody>",C=this._getDaysInMonth(B,q),B===e.selectedYear&&q===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,C)),M=(this._getFirstDayOfMonth(B,q)-a+7)%7,C=Math.ceil((M+C)/7),x=H&&this.maxRows>C?this.maxRows:C,this.maxRows=x,I=this._daylightSavingAdjust(new Date(B,q,1-M)),T=0;T<x;T++){for(D+="<tr>",A=n?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(I)+"</td>":"",f=0;f<7;f++)N=u?u.apply(e.input?e.input[0]:null,[I]):[!0,""],F=(S=I.getMonth()!==q)&&!d||!N[0]||U&&I<U||z&&z<I,A+="<td class='"+(5<=(f+a+6)%7?" ui-datepicker-week-end":"")+(S?" ui-datepicker-other-month":"")+(I.getTime()===y.getTime()&&q===e.selectedMonth&&e._keyEvent||p.getTime()===I.getTime()&&p.getTime()===y.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(S&&!c?"":" "+N[1]+(I.getTime()===R.getTime()?" "+this._currentClass:"")+(I.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(S&&!c||!N[2]?"":" title='"+N[2].replace(/'/g,"&#39;")+"'")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(S&&!c?"&#xa0;":F?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===Y.getTime()?" ui-state-highlight":"")+(I.getTime()===R.getTime()?" ui-state-active":"")+(S?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);D+=A+"</tr>"}11<++q&&(q=0,B++),_+=D+="</tbody></table>"+(H?"</div>"+(0<j[0]&&v===j[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}g+=_}return g+=L,e._keyEvent=!1,g},_generateMonthYearHeader:function(e,t,i,s,a,n,r,o){var l,h,u,c,d,p,g,f=this._get(e,"changeMonth"),m=this._get(e,"changeYear"),_=this._get(e,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=s&&s.getFullYear()===i,h=a&&a.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=s.getMonth())&&(!h||u<=a.getMonth())&&(y+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+o[u]+"</option>");y+="</select>"}if(_||(v+=y+(!n&&f&&m?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!m)v+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=(r=function(e){e=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(e)?d:e})(c[0]),g=Math.max(p,r(c[1]||"")),p=s?Math.max(p,s.getFullYear()):p,g=a?Math.min(g,a.getFullYear()):g,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)e.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",v+=e.yearshtml,e.yearshtml=null}return v+=this._get(e,"yearSuffix"),_&&(v+=(!n&&f&&m?"":"&#xa0;")+y),v+="</div>"},_adjustInstDate:function(e,t,i){var s=e.selectedYear+("Y"===i?t:0),a=e.selectedMonth+("M"===i?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(s,a))+("D"===i?t:0),t=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,a,t)));e.selectedDay=t.getDate(),e.drawMonth=e.selectedMonth=t.getMonth(),e.drawYear=e.selectedYear=t.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),t=i&&t<i?i:t;return e&&e<t?e:t},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var a=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(t<0?t:a[0]*a[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),a=null,n=null,r=this._get(e,"yearRange");return r&&(e=r.split(":"),r=(new Date).getFullYear(),a=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(a+=r),e[1].match(/[+\-].*/)&&(n+=r)),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!a||t.getFullYear()>=a)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);t=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),t,this._getFormatConfig(e))}}),b.fn.datepicker=function(e){if(!this.length)return this;b.datepicker.initialized||(b(document).on("mousedown",b.datepicker._checkExternalClick),b.datepicker.initialized=!0),0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this].concat(t)):b.datepicker._attachDatepicker(this,e)})},b.datepicker=new t,b.datepicker.initialized=!1,b.datepicker.uuid=(new Date).getTime(),b.datepicker.version="1.12.1";b.datepicker});