!function(t){const e=t("[data-datepicker_format]");let a=0;function i(){const e=t(window).width();return e<800?1:e<=1100?2:3}if(void 0!==tribe_l10n_datatables.datepicker){let n={},d="yy-mm-dd";e.length&&e.attr("data-datepicker_format").length>=1&&(a=e.attr("data-datepicker_format"),d=datepicker_formats.main[a]);const r=t(document.getElementById("EventStartDate")),c=t(document.getElementById("EventEndDate")),o=t(document.getElementById("tribe_events_event_details"));n={dateFormat:d,showAnim:"fadeIn",changeMonth:!0,changeYear:!0,numberOfMonths:i(),showButtonPanel:!1,beforeShow(e,a){a.input.datepicker("option","numberOfMonths",i()),a.input.data("prevDate",a.input.datepicker("getDate")),void 0!==a.input.data("datepicker-min-date")&&a.input.datepicker("option","minDate",a.input.data("datepicker-min-date")),void 0!==a.input.data("datepicker-max-date")&&a.input.datepicker("option","maxDate",a.input.data("datepicker-max-date"));const n=t(a.dpDiv);n.addClass("tribe-ui-datepicker"),o.trigger("tribe.ui-datepicker-div-beforeshow",[a]),n.attrchange({trackValues:!0,callback(t){"string"==typeof t.newValue&&(t.newValue.indexOf("display: none")>=0||t.newValue.indexOf("display:none")>=0)&&(n.removeClass("tribe-ui-datepicker"),o.trigger("tribe.ui-datepicker-div-closed",[a]))}})},onSelect(e){const a=t(this).data("datepicker"),i=t.datepicker.parseDate(a.settings.dateFormat||t.datepicker._defaults.dateFormat,e,a.settings);if("EventStartDate"===this.id){const e=t(document.getElementById("EventStartDate")).data("prevDate"),a=null==e?0:function(t,e){const a=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());return Math.floor((i-a)/864e5)}(e,c.datepicker("getDate")),n=new Date(i.setDate(i.getDate()+a));c.datepicker("option","minDate",r.datepicker("getDate")).datepicker("setDate",n).datepicker_format}t(this).trigger("change"),t(this).trigger("blur")}},t.extend(n,tribe_l10n_datatables.datepicker),t(".tribe-datepicker").datepicker(n)}}(jQuery),window.tec=window.tec||{},window.tec.tickets=window.tec.tickets||{},window.tec.tickets.admin=window.tec.tickets.admin||{},window.tec.tickets.admin.orders=window.tec.tickets.admin.orders||{},window.tec.tickets.admin.orders.table={};