1var fh;!function(){var e={12:function(e,t,i){"use strict";i.d(t,{A:function(){return a}});var n=i(9627);class a{debug;constructor(e){if(!e)throw new Error("LiveRegionQueue requires a valid live region element");this.liveRegion=e,this.currentTask=null,this.debug=(0,n.K)("a11y:live-region")}async announce(e,t=100){if(e){this.currentTask&&this.currentTask.cancel(),this.currentTask=this.#e(e,t);try{await this.currentTask.promise}catch(e){"CancelledError"!==e.name&&(window.location.search.includes("debug=a11y")||window.location.search.includes("debug=errors"))&&console.error("[LiveRegionQueue] Unexpected error:",e)}}}#e(e,t){let i=!1;return{promise:new Promise((n,a)=>{setTimeout(()=>{if(i){const e=new Error("Task cancelled");e.name="CancelledError",a(e)}else this.liveRegion.textContent="",setTimeout(()=>{i||(this.liveRegion.textContent=e,window.location.search.includes("debug=a11y")&&(this.debug("Announced:",{message:e,delay:t,timestamp:Date.now()}),this.debug("DOM Content Set:",{liveRegionId:this.liveRegion.id,actualContent:this.liveRegion.textContent,ariaLive:this.liveRegion.getAttribute("aria-live"),ariaAtomic:this.liveRegion.getAttribute("aria-atomic"),visibility:getComputedStyle(this.liveRegion).visibility})),n())},10)},t)}),cancel:()=>{i=!0,window.location.search.includes("debug=a11y")&&this.debug("Cancelled:",{message:e,delay:t,timestamp:Date.now(),currentContent:this.liveRegion?.textContent||"N/A"})}}}}},163:function(e,t,i){"use strict";i.d(t,{A:function(){return a}});var n=i(7717);class a{constructor({startDate:e=null}={}){this._isRange=!1,this._startDate=e??new Date,this._endDate=this._startDate,this._format={format:function(e=!1){return e?(0,n.iO)(this):(0,n.ow)(this)}}}get isRange(){return this._isRange}get startDate(){let e=this._startDate;return e&&Object.assign(e,this._format),e}get endDate(){let e=this.isRange?this._endDate:this._startDate;return e&&Object.assign(e,this._format),e}set startDate(e){this._startDate=e}setDate(e){this.startDate=e}set endDate(e){this.isRange&&(this._endDate=e,Object.assign(this._endDate,this._format))}static fromDatepicker(e){let t=null;if(e?.core?.datepicker?.getDate)t=e.core.datepicker.getDate();else if(e?.datepicker?.getDate)t=e.datepicker.getDate();else if(e?.inputElement?.value){const i=e.inputElement.value;i&&(t=(0,n.Oi)(i),isNaN(t.getTime())&&(t=null))}return new a({startDate:t})}syncFromDatepicker(e){const t=a.fromDatepicker(e);this._startDate=t._startDate,this._endDate=t._endDate}}},334:function(e,t,i){"use strict";i.d(t,{A:function(){return s}});var n=i(9627);const a={instructions:"Use arrow keys to navigate when calendar is open.",instructionsMobile:"Tap to select. ",calendarOpen:"Calendar opened.",calendarOpenMobile:"Calendar opened.",calendarClose:"Calendar closed.",calendarCloseMobile:"Calendar closed.",changeDate:"Date changed.",changeDateMobile:"Date changed.",previousMonth:"Previous month.",nextMonth:"Next month.",previousYear:"Previous year.",nextYear:"Next year.",unavailableDate:"Unavailable date.",pastDate:"Past date, unavailable",today:"Today.",selectedDate:e=>`Selected: ${e}.`,currentFocusDate:e=>`Currently focused: ${e}.`,dateSelected:e=>r.get("selectedDate",[e]),_navigation:e=>`Use arrow keys to navigate ${e}s, "Enter" to select.`,_navigationMobile:e=>`Tap to select ${e}.`,_viewNavigation:(e,t)=>`Now in "${e}" selection for ${t}. `+r.get("_navigation",[e]),_viewNavigationMobile:(e,t)=>`Now in "${e}" selection for ${t}. `+r.get("_navigationMobile",[e]),decadeView:()=>'Now in "Decade" selection. '+r.get("_navigation",["decade"]),decadeViewMobile:()=>'Now in "Decade" selection. '+r.get("_navigationMobile",["decade"]),yearView:()=>'Now in "Year" selection. '+r.get("_navigation",["year"]),yearViewMobile:()=>'Now in "Year" selection. '+r.get("_navigationMobile",["year"]),monthView:e=>r.get("_viewNavigation",["month",e]),monthViewMobile:e=>r.get("_viewNavigationMobile",["month",e]),dateView:(e,t)=>r.get("_viewNavigation",["date",`${e} ${t}`]),dateViewMobile:(e,t)=>r.get("_viewNavigationMobile",["date",`${e} ${t}`]),errorRequired:"Date is required!",errorInvalid:"Date is invali
1d. Please enter a valid date.",errorPastDate:"Please select a date in the future.",errorFormat:"Please use MM/DD/YYYY or MM-DD-YYYY format."},r=new class{constructor(e={}){this.strings=e,this.debug=(0,n.K)("a11y:strings-base","verbose")}get(e,t){const i=this,n=e.split(","),a=t&&t.length>0;let r="",s=!1;return n.forEach((e,n)=>{if(void 0===i.strings[e])return void i.debug(`WARNING: string ${e} is not defined`);const o=0===n;"function"==typeof i.strings[e]&&s&&i.debug(`WARNING: string ${n+1}: "${e}" is a function but will not use the provided arguments`),o||(r+=" "),"function"==typeof i.strings[e]&&a&&!s?(r+=i.strings[e](...t),s=!0):"function"!=typeof i.strings[e]||a&&!s?r+=i.strings[e]:r+=i.strings[e]()}),r}info(e=null){let t="";if(e)return t+=`A11Y string: "${this.get(e)}"\n`,t;for(const[e,i]of Object.entries(this.strings))t+=`${e}: "${i}"\n`;return t}}(a);var s=r},444:function(e,t,i){"use strict";i.d(t,{A:function(){return p},X:function(){return h}});var n=i(4735),a=i(9132),r=i(334),s=i(9627),o=i(3211),c=i(7717),l=i(9418),d=i(9890),u=i(163);const h={datepickers:[],getByFormId:function(e){return this.datepickers.find(t=>t.formId===e)},removeByFormId:function(e){this.datepickers=this.datepickers.filter(t=>t.formId!==e)},add:function(e){this.datepickers.push(e)}};class p{constructor(e){this.formId=e,this.rowIndex=this.searchForm?this.searchForm.dataset.searchIndex:this.formId.split("-").at(-1),this.debug=(0,s.K)(`a11y:activity-search:${e}`),this.debugVerbose=(0,s.K)(`a11y:activity-search-all:${e}`,"verbose"),this.#t(),this.#i(),this.datepickerObject=new u.A({startDate:this.#n()}),this.core=new n.A(this.inputElement,{rowIndex:this.rowIndex,getA11yStrings:this.#a.bind(this),validate:this.#r.bind(this),onChange:this.#s.bind(this),onError:this.#o.bind(this)}),h.add(this),this.debug("ActivitySearchDatepicker initialized")}#t(){if(this.urlParams=new URLSearchParams(l.A.sanitize(window.location.search)),this.searchForm=document.getElementById(this.formId),this.submitButton=this.searchForm?.querySelector(".activity-search-submit"),this.inputElement=this.searchForm?.querySelector(`.datepicker-${this.rowIndex}`),this.errorMessageContainer=this.searchForm?.querySelector(".activity-search-form__error-message"),!this.inputElement)throw new Error(`ActivitySearchDatepicker: Could not find input element for form ${this.formId}`);this.debugVerbose("Form elements initialized",{formId:this.formId,rowIndex:this.rowIndex})}#i(){this.breakpointManager=d.A.getInstance(),this.lastErrorAnnounced=null,this.lastErrorTypeShown=null,this.mobileOverlaySetup=!1}#n(){if("date-range"===this.urlParams.get(`range_type_${this.rowIndex}`)){const e=this.urlParams.get(`start_date_${this.rowIndex}`);if(e){const t=(0,c.EW)(e);if(!isNaN(t.getTime()))return t}}return null}#a(e,t=null){const i=this.breakpointManager.isInitialized()?this.breakpointManager.isMobile():window.innerWidth<768,n=`${e}Mobile`;return this.debugVerbose(`getA11yStrings: key="${e}", isMobile=${i}, mobileKey="${n}"`),i&&r.A.get(n)?r.A.get(n,t):r.A.get(e,t)||""}#r(e){if(!e)return null;return e.getTime()<Date.now()-864e5?{type:"pastDate",msg:this.inputElement?.dataset?.errorMessageDatePast||""}:null}#s(e,t=!0,i=null){if(i=i??t,this.core.hasRecentValidationError())this.debug("[A11Y] handleDateChange: skipped due to recent validation error");else{if(t&&e&&e.getTime())this.debug("Date changed:",e),this.datepickerObject.setDate(e),this.#c(e),this.#l(e),this.inputElement.value=(0,c.ow)(e),this.#d(e),this.#u(),this.#h(),this.clearQuickSearchButtons(),this.debug("Date changed:",e);else if(t&&!e){this.debug("Date cleared"),this.datepickerObject.setDate(null),this.#p(),this.core.resetUrlParams();const e=this.#a("chooseDate")||this.inputElement.getAttribute("placeholder")||"Choose date";this.inputElement.setAttribute("aria-label",e),this.#u(),this.clearQuickSearchButtons()}i&&(this.#f(),setTimeout(()=>{this.core.close()},500))}}#o(e){this.debugVerbose("Validation error type:",e.type),"clear"===e.type?this.#u():"pastDate"===e.type?this.#g(e.type,e.msg):this.#g(e.type),!this.mobileOverlaySetup||e.type}#c(e){const t=(0,c.iO)(e),i=(0,c.iO)(e),n=document.querySelector(`#start-date-${this.rowIndex}`),a=document.querySelector(`#end-date-${this.rowIndex}`);
1n&&(n.value=t),a&&(a.value=i),this.debugVerbose("Hidden inputs updated",{startDateParams:t,endDateParams:i})}#l(e){this.core.updateUrlParams(e),this.debugVerbose("URL parameters updated")}#d(e){const t=e.toLocaleDateString(),i=`${this.#a("changeDate")||"Change Date"}, ${t}`;this.inputElement.setAttribute("aria-label",i)}#p(){const e=document.querySelector(`#start-date-${this.rowIndex}`),t=document.querySelector(`#end-date-${this.rowIndex}`);e&&(e.value=""),t&&(t.value=""),this.debugVerbose("Hidden inputs cleared",{startDateInput:e,endDateInput:t})}#u(){this.debugVerbose("[A11Y] clearErrors: clearing DOM errors");const e=this.errorMessageContainer?.querySelector(`#error-message-datepicker-${this.rowIndex}`);e&&(e.textContent="",this.errorMessageContainer.classList.remove("-error"),this.inputElement.classList.remove("-error"),(0,o.W)(this.inputElement,"invalid","false"),e.removeAttribute("role"),this.lastErrorAnnounced=null)}#g(e,t){const i=this.errorMessageContainer?.querySelector(`#error-message-datepicker-${this.rowIndex}`);if(!i)return;if(this.lastErrorTypeShown===e)return void this.debugVerbose("Duplicate error ignored:",e);this.lastErrorTypeShown=e;let n=t;if(!n){const t=a.lQ[e]||a.lQ.invalid;n=this.inputElement.dataset[t.dataAttr]||this.#a(t.fallbackKey)||`${e} error`}i.textContent=n,this.errorMessageContainer.classList.add("-error"),this.inputElement.classList.add("-error"),(0,o.W)(this.inputElement,"invalid","true"),i.setAttribute("role","alert"),this.debug("[ERROR] Error displayed:",{errorType:e,message:n})}#h(){window.mixpanel?.fareharbor&&(window.mixpanel.fareharbor.track("fhme-sbd-datepicker"),this.debugVerbose("Analytics tracked"))}clearQuickSearchButtons(e=!1){const t=this.searchForm.querySelectorAll(".activity-search-form__events-for .quick-search-button");t.forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")});const i=`${a._b.qsb}_${this.rowIndex}`,n=new URLSearchParams(window.location.search),r=n.has(i),s=n.get(i);r&&e?(0,c.Hi)("quick_search_button",this.rowIndex):r&&t.forEach(e=>{e.getAttribute("name")===s&&e.classList.add("active")})}#m(){if(this.mobileOverlaySetup)return;const e=this.searchForm.querySelector(".datepicker-dropdown");if(!e)return;if(!(this.breakpointManager.isInitialized()?this.breakpointManager.isMobile():window.innerWidth<768))return;this.mobileOverlaySetup=!0,e.classList.add("datepicker-mobile-overlay"),e.style.top="0px",e.style.left="0px",e.classList.remove("datepicker-orient-left","datepicker-orient-bottom");const t=e.querySelector(".datepicker-picker");e.innerHTML='\n <h3 class="activity-datepicker-header">\n <span class="datepicker-heading">Select Date</span>\n <button type="button" class="button close-datepicker-overlay js-close-datepicker-overlay" role="button" aria-label="Close Datepicker">\n <span class="close-datepicker-overlay-icon">â</span>\n </button>\n </h3>\n \n <div class="activity-datepicker-container">\n \x3c!-- Datepicker content will be moved here --\x3e\n </div>\n \n <div class="view-datepicker-container">\n <button class="apply-date js-apply-date -default-color" role="button" aria-label="Apply Date">Apply Date</button>\n <button class="clear-date js-clear-date" role="button" aria-label="Clear Date">Clear Date</button>\n </div>\n ';e.querySelector(".activity-datepicker-container").appendChild(t),document.body.classList.add("js-noscroll"),this.#b()}#b(){const e=this.searchForm.querySelector(".datepicker-dropdown.datepicker-mobile-overlay");if(!e)return;const t=e.querySelector(".js-close-datepicker-overlay");t&&t.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.core.userInteracted=!0,this.core.overlayOpenDate&&this.core.overlayOpenDate.toISOString()!==this.core.datepicker.getDate()?.toISOString()&&(this.core.datepicker.setDate(this.core.overlayOpenDate),this.inputElement.value=(0,c.ow)(this.core.overlayOpenDate)),this.core.close()});const i=e.querySelector(".js-apply-date");i&&i.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.core.userInteracted=!0;let t=null;try{const e=this.inputElement.value?.trim();t=(0,c.Oi)(e)}catch(e){this.#g("invalid","Please enter a valid date")}this.core.close(),this.submitButton.click()});const n=e.querySelector(".js-clear-date");n&&n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.core.userInteracted=!0,this.clearDatepicker(),this.core.close()})}#f(){const e=this.searchForm.querySelector(".datepicker-dropdown.datepicker-mobile-overlay");e&&(e.classList.remove("datepicker-mobile-overlay"),e.style.top="",e.style.left=""),document.body.classList.remove("js-noscroll"),this.mobileOverlaySetup=!1}#y(){const e=this.searchForm.querySelector(".activity-filter-interface.js-active");if(e){e.classList.remove("js-active"),document.body.classList.remove("js-noscroll");const t=this.searchForm.querySelector(".js-toggle-filters.js-active");t&&t.classList.remove("js-active")}}init(){this.core.init(this.formId),this.#v(),this.#w(),this.debug("Initialization complete")}#w(){this.core.inputElement.addEventListener("show",()=>{this.#y(),setTimeout(()=>{this.#m()},50)}),this.core.inputElement.addEventListener("hide",()=>{this.#f()})}
1#v(){if("date-range"===this.urlParams.get(`range_type_${this.rowIndex}`)){const e=this.urlParams.get(`start_date_${this.rowIndex}`);if(e){const t=(0,c.EW)(e);isNaN(t.getTime())||(this.core.datepicker.setDate(t),this.inputElement.value=(0,c.ow)(t),this.#d(t),this.datepickerObject.setDate(t),this.debug("Initial date set from URL:",t))}}}open(){this.core.open()}close(){this.core.close()}datepickerOpen(){this.open()}datepickerClose(){this.close()}clearDatepicker(){this.core.datepicker&&(this.core.datepicker.setDate({clear:!0}),this.inputElement.value=""),this.datepickerObject.setDate(null),this.#p(),this.core.resetUrlParams();const e=this.#a("chooseDate")||this.inputElement.getAttribute("placeholder")||"Choose date";this.inputElement.setAttribute("aria-label",e),this.#u(),this.clearQuickSearchButtons(),this.debugVerbose("Datepicker cleared")}clear(){this.clearDatepicker()}destroy(){h.removeByFormId(this.formId),this.core.destroy(),this.debugVerbose("Datepicker destroyed")}toggleDateError(e,t=!0){t||(e="clear"),this.#o({type:e})}handleDateSelection(e,t=!0,i=null){e&&this.#s(e,t,i)}get datepicker(){return this.core.datepicker}}},1860:function(e,t,i){"use strict";i.d(t,{Hd:function(){return s},PA:function(){return n},x8:function(){return a}});i(9132),i(4735),i(444);function n(e,t){t=t||$("body");let i=0;t.find("#wpadminbar").length&&(i+=t.find("#wpadminbar").outerHeight()),t.find(".-fixed-menu").length&&(i+=t.find(".-fixed-menu").outerHeight(),t.find(".-fixed-menu").hasClass("-has-callout-banner")&&(i-=t.find(".-fixed-menu .callout").outerHeight())),setTimeout(()=>{$([document.documentElement,document.body]).animate({scrollTop:t.find(e).offset().top-i},500)},125)}function a(){$(document).find(".-error").removeClass("-error")}const r=(e="")=>`${(()=>{if(window.FHS_ADMIN_URL)return window.FHS_ADMIN_URL;const e=window.location.pathname.match(/^(.*\/wp-admin\/)/);if(e)return`${window.location.origin}${e[1]}`;const t=window.location.pathname.match(/^(\/[^/]+\/)/);return t?`${window.location.origin}${t[1]}wp-admin/`:`${window.location.origin}/wp-admin/`})().replace(/\/?$/,"/")}${String(e).replace(/^\//,"")}`,s=()=>window.FHS_ADMIN_AJAX_URL||r("admin-ajax.php")},2744:function(e,t,i){"use strict";function n(e){return e[e.length-1]}function a(e,...t){return t.forEach(t=>{e.includes(t)||e.push(t)}),e}function r(e,t){return e?e.split(t):[]}function s(e,t,i){return(void 0===t||e>=t)&&(void 0===i||e<=i)}function o(e,t,i){return e<t?t:e>i?i:e}function c(e,t,i={},n=0,a=""){a+=`<${Object.keys(i).reduce((e,t)=>{let a=i[t];return"function"==typeof a&&(a=a(n)),`${e} ${t}="${a}"`},e)}></${e}>`;const r=n+1;return r<t?c(e,t,i,r,a):a}function l(e){return e.replace(/>\s+/g,">").replace(/\s+</,"<")}i.d(t,{Gn:function(){return r},LF:function(){return l},WD:function(){return o},_X:function(){return a},aU:function(){return c},h$:function(){return s},vM:function(){return n}})},3211:function(e,t,i){"use strict";i.d(t,{W:function(){return n}});const n=(e,t,i)=>{e&&e.setAttribute(`aria-${t}`,String(i))}},3301:function(e,t,i){var n;!function(a,r){void 0===r&&l("Pagination requires jQuery.");var s="pagination",o="__pagination-";r.fn.pagination&&(s="pagination2"),r.fn[s]=function(e){if(void 0===e)return this;var t,i,n=r(this),d=r.extend({},r.fn[s].defaults,e),u={initialize:function(){var e=this;if(n.data("pagination")||n.data("pagination",{}),!1!==e.callHook("beforeInit")){n.data("pagination").initialized&&r(".paginationjs",n).remove(),e.disabled=!!d.disabled;var t=e.model={pageRange:d.pageRange,pageSize:d.pageSize};e.parseDataSource(d.dataSource,function(i){if(e.isAsync=c.isString(i),c.isArray(i)&&(t.totalNumber=d.totalNumber=i.length),e.isDynamicTotalNumber=e.isAsync&&d.totalNumberLocator,!(d.hideWhenLessThanOnePage&&e.getTotalPage()<=1)){var a=e.render(!0);d.className&&a.addClass(d.className),t.el=a,n["bottom"===d.position?"append":"prepend"](a),e.observer(),n.data("pagination").initialized=!0,e.callHook("afterInit",a)}})}},render:function(e){var t=this,i=t.model,n=i.el||r('<div class="paginationjs"></div>'),a=!0!==e;t.callHook("beforeRender",a);var s=i.pageNumber||d.pageNumber,o=d.pageRange,c=t.getTotalPage(),l=s-o,u=s+o;return u>c&&(u=c,l=(l=c-2*o)<1?1:l),l<=1&&(l=1,u=Math.min(2*o+1,c)),n.html(t.generateHTML({currentPage:s,pageRange:o,rangeStart:l,rangeEnd:u})),t.callHook("afterRender",a),n},generateHTML:function(e){var t,i=this,n=e.currentPage,a=i.getTotalPage(),s=e.rangeStart,o=e.rangeEnd,c=i.getTotalNumber(),l=d.showPrevious,u=d.showNext,h=d.showPageNumbers,p=d.showNavigator,f=d.showGoInput,g=d.showGoButton,m=d.pageLink,b=d.prevText,y=d.nextText,v=d.ellipsisText,w=d.goButtonText,k=d.classPrefix,D=d.activeClassName,S=d.disableClassName,E=d.ulClassName,x="",N='<input type="text" class="J-paginationjs-go-pagenumber">',_='<input type="button" class="J-paginationjs-go-button" value="'+w+'">',A=r.isFunction(d.formatNavigator)?d.formatNavigator(n,a,c):d.formatNavigator,C=r.isFunction(d.formatGoInput)?d.formatGoInput(N,n,a,c):d.formatGoInput,T=r.isFunction(d.formatGoButton)?d.formatGoButton(_,n,a,c):d.formatGoButton,M=r.isFunction(d.autoHidePrevious)?d.autoHidePrevious():d.autoHidePrevious,O=r.isFunction(d.autoHideNext)?d.autoHideNext():d.autoHideNext,L=r.isFunction(d.header)?d.header(n,a,c):d.header,R=r.isFunction(d.footer)?d.footer(n,a,c):d.footer;if(L&&(x+=i.replaceVariables(L,{currentPage:n,totalPage:a,totalNumber:c})),l||h||u){if(x+='<div class="paginationjs-pages">',x+=E?'<ul class="'+E+'">':"<ul>",l&&(n<=1?M||(x+='<li class="'+k+"-prev "+S+'"><a>'+b+"</a></li>"):x+='<li class="'+k+'-prev J-paginationjs-previous" data-num="'+(n-1)+'" title="Previous page"><a href="'+m+'">'+b+"</a></li>"),h){if(s<=3)for(t=1;t<s;t++)x+=t==n?'<li class="'+k+"-page J-paginationjs-page "+D+'" data-num="'+t+'"><a>'+t+"</a></li>":'<li class="'+k+'-page J-paginationjs-page" data-num="'+t+'"><a href="'+m+'">'+t+"</a></li>";else d.showFirstOnEllipsisShow&&(x+='<li class="'+k+"-page "+k+'-first J-paginationjs-page" data-num="1"><a href="'+m+'">1</a></li>'),x+='<li class="'+k+"-ellipsis "+S+'"><a>'+v+"</a></li>";for(t=s;t<=o;t++)x+=t==n?'<li class="'+k+"-page J-paginationjs-page "+D+'" data-num="'+t+'"><a>'+t+"</a></li>":'<li class="'+k+'-page J-paginationjs-page" data-num="'+t+'"><a href="'+m+'">'+t+"</a></li>";if(o>=a-2)for(t=o+1;t<=a;t++)x+='<li class="'+k+'-page J-paginationjs-page" data-num="'+t+'"><a href="'+m+'">'+t+"</a></li>";else x+='<li class="'+k+"-ellipsis "+S+'"><a>'+v+"</a></li>",d.showLastOnEllipsisShow&&(x+='<li class="'+k+"-page "+k+'-last J-paginationjs-page" data-num="'+a+'"><a href="'+m+'">'+a+"</a></li>")}u&&(n>=a?O||(x+='<li class="'+k+"-next "+S+'"><a>'+y+"</a></li>"):x+='<li class="'+k+'-next J-paginationjs-next" data-num="'+(n+1)+'" title="Next page"><a href="'+m+'">'+y+"</a></li>"),x+="</ul></div>"}return p&&A&&(x+='<div class="'+k+'-nav J-paginationjs-nav">'+i.replaceVariables(A,{currentPage:n,totalPage:a,totalNumber:c})+"</div>"),f&&C&&(x+='<div class="'+k+'-go-input">
1'+i.replaceVariables(C,{currentPage:n,totalPage:a,totalNumber:c,input:N})+"</div>"),g&&T&&(x+='<div class="'+k+'-go-button">'+i.replaceVariables(T,{currentPage:n,totalPage:a,totalNumber:c,button:_})+"</div>"),R&&(x+=i.replaceVariables(R,{currentPage:n,totalPage:a,totalNumber:c})),x},findTotalNumberFromRemoteResponse:function(e){this.model.totalNumber=d.totalNumberLocator(e)},go:function(e,t){var i=this,a=i.model;if(!i.disabled){var s=e;if((s=parseInt(s))&&!(s<1)){var o=d.pageSize,l=i.getTotalNumber(),u=i.getTotalPage();if(!(l>0&&s>u))if(i.isAsync){var h={},p=d.alias||{};h[p.pageSize?p.pageSize:"pageSize"]=o,h[p.pageNumber?p.pageNumber:"pageNumber"]=s;var f=r.isFunction(d.ajax)?d.ajax():d.ajax,g={type:"get",cache:!1,data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",async:!0};r.extend(!0,g,f),r.extend(g.data,h),g.url=d.dataSource,g.success=function(e){i.isDynamicTotalNumber?i.findTotalNumberFromRemoteResponse(e):i.model.totalNumber=d.totalNumber,m(i.filterDataByLocator(e))},g.error=function(e,t,n){d.formatAjaxError&&d.formatAjaxError(e,t,n),i.enable()},i.disable(),d.ajaxFunction?d.ajaxFunction(g):r.ajax(g)}else m(i.getDataFragment(s))}}function m(e){if(!1===i.callHook("beforePaging",s))return!1;if(a.direction=void 0===a.pageNumber?0:s>a.pageNumber?1:-1,a.pageNumber=s,i.render(),i.disabled&&i.isAsync&&i.enable(),n.data("pagination").model=a,d.formatResult){var o=r.extend(!0,[],e);c.isArray(e=d.formatResult(o))||(e=o)}n.data("pagination").currentPageData=e,i.doCallback(e,t),i.callHook("afterPaging",s),1==s&&i.callHook("afterIsFirstPage"),s==i.getTotalPage()&&i.callHook("afterIsLastPage")}},doCallback:function(e,t){var i=this.model;r.isFunction(t)?t(e,i):r.isFunction(d.callback)&&d.callback(e,i)},destroy:function(){!1!==this.callHook("beforeDestroy")&&(this.model.el.remove(),n.off(),r("#paginationjs-style").remove(),this.callHook("afterDestroy"))},previous:function(e){this.go(this.model.pageNumber-1,e)},next:function(e){this.go(this.model.pageNumber+1,e)},disable:function(){var e=this,t=e.isAsync?"async":"sync";!1!==e.callHook("beforeDisable",t)&&(e.disabled=!0,e.model.disabled=!0,e.callHook("afterDisable",t))},enable:function(){var e=this,t=e.isAsync?"async":"sync";!1!==e.callHook("beforeEnable",t)&&(e.disabled=!1,e.model.disabled=!1,e.callHook("afterEnable",t))},refresh:function(e){this.go(this.model.pageNumber,e)},show:function(){this.model.el.is(":visible")||this.model.el.show()},hide:function(){this.model.el.is(":visible")&&this.model.el.hide()},replaceVariables:function(e,t){var i;for(var n in t){var a=t[n],r=new RegExp("<%=\\s*"+n+"\\s*%>","img");i=(i||e).replace(r,a)}return i},getDataFragment:function(e){var t=d.pageSize,i=d.dataSource,n=this.getTotalNumber(),a=t*(e-1)+1,r=Math.min(e*t,n);return i.slice(a-1,r)},getTotalNumber:function(){return this.model.totalNumber||d.totalNumber||0},getTotalPage:function(){return Math.ceil(this.getTotalNumber()/d.pageSize)},getLocator:function(e){var t;return"string"==typeof e?t=e:r.isFunction(e)?t=e():l('"locator" is incorrect. (String | Function)'),t},filterDataByLocator:function(e){var t,i=this.getLocator(d.locator);if(c.isObject(e)){try{r.each(i.split("."),function(i,n){t=(t||e)[n]})}catch(e){}t||l("dataSource."+i+" is undefined.")}return t||e},parseDataSource:function(e,t){var i=this;c.isObject(e)?t(d.dataSource=i.filterDataByLocator(e)):c.isArray(e)?t(d.dataSource=e):r.isFunction(e)?d.dataSource(function(e){c.isArray(e)||l('The parameter of "done" Function should be an Array.'),i.parseDataSource.call(i,e,t)}):"string"==typeof e?(/^https?|file:/.test(e)&&(d.ajaxDataType="jsonp"),t(e)):l('Unexpected type of "dataSource".')},callHook:function(e){var t,i=n.data("pagination"),s=Array.prototype.slice.apply(arguments);return s.shift(),d[e]&&r.isFunction(d[e])&&!1===d[e].apply(a,s)&&(t=!1),i.hooks&&i.hooks[e]&&r.each(i.hooks[e],function(e,i){!1===i.apply(a,s)&&(t=!1)}),!1!==t},observer:function(){var e=this,t=e.model.el;n.on(o+"go",function(t,i,n){(i=parseInt(r.trim(i)))&&(r.isNumeric(i)||l('"pageNumber" is incorrect. (Number)'),e.go(i,n))}),t.delegate(".J-paginationjs-page","click",function(t){var i=r(t.currentTarget),n=r.trim(i.attr("data-num"));if(n&&!i.hasClass(d.disableClassName)&&!i.hasClass(d.activeClassName))return!1!==e.callHook("beforePageOnClick",t,n)&&(e.go(n),e.callHook("afterPageOnClick",t,n),!!d.pageLink&&void 0)}),t.delegate(".J-paginationjs-previous","click",function(t){var i=r(t.currentTarget),n=r.trim(i.attr("data-num"));if(n&&!i.hasClass(d.disableClassName))return!1!==e.callHook("beforePreviousOnClick",t,n)&&(e.go(n),e.callHook("afterPreviousOnClick",t,n),!!d.pageLink&&void 0)}),t.delegate(".J-paginationjs-next","click",function(t){var i=r(t.currentTarget),n=r.trim(i.attr("data-num"));if(n&&!i.hasClass(d.disableClassName))return!1!==e.callHook("beforeNextOnClick",t,n)&&(e.go(n),e.callHook("afterNextOnClick",t,n),!!d.pageLink&&void 0)}),t.delegate(".J-paginationjs-go-button","click",function(i){var a=r(".J-paginationjs-go-pagenumber",t).val();if(!1===e.callHook("beforeGoButtonOnClick",i,a))return!1;n.trigger(o+"go",a),e.callHook("afterGoButtonOnClick",i,a)}),t.delegate(".J-paginationjs-go-pagenumber","keyup",function(i){if(13===i.which){var a=r(i.currentTarget).val();if(!1===e.callHook("beforeGoInputOnEnter",i,a))return!1;n.trigger(o+"go",a),r(".J-paginationjs-go-pagenumber",t).focus(),e.callHook("afterGoInputOnEnter",i,a)}}),n.on(o+"previous",function(t,i){e.previous(i)}),n.on(o+"next",function(t,i){e.next(i)}),n.on(o+"disable",function(){e.disable()}),n.on(o+"enable",function(){e.enable()}),n.on(o+"refresh",function(t,i){e.refresh(i)}),n.on(o+"show",function(){e.show()}),n.on(o+"hide",function(){e.hide()}),n.on(o+"destroy",function(){e.destroy()});var i=Math.max(e.getTotalPage(),1),a=d.pageNumber;e.isDynamicTotalNumber&&(a=1),d.triggerPagingOnInit&&n.trigger(o+"go",Math.min(a,i))}};if(n.data("pagination")&&!0===n.data("pagination").initialized){if(r.isNumeric(e))return n.trigger.call(this,o+"go",e,arguments[1]),this;if("string"==typeof e){var h=Array.prototype.slice.apply(arguments);switch(h[0]=o+h[0],e){case"previous":case"next":case"go":case"disable":case"enable":case"refresh":case"show":case"hide":case"destroy":n.trigger.apply(this,h);break;case"getSelectedPageNum":return n.data("pagination").model?n.data("pagination").model.pageNumber:n.data("pagination").attributes.pageNumber;case"getTotalPage":return Math.ceil(n.data("pagination").model.totalNumber/n.data("pagination").model.pageSize);case"getSelectedPageData":return n.data("pagination").currentPageData;case"isDisabled":return!0===n.data("pagination").model.disabled;default:l("Unknown action: "+e)}return this}t=n,i=["go","previous","next","disable","enable","refresh","show","hide","destroy"],r.each(i,function(e,i){t.off(o+i)}),t.data("pagination",{}),r(".paginationjs",t).remove()}else c.isObject(e)||l("Illegal options");return function(e){e.dataSource||l('"dataSource" is required.');"string"==typeof e.dataSource?void 0===e.totalNumberLocator?void 0===e.totalNumber?l('"totalNumber" is required.'):r.isNumeric(e.totalNumber)||l('"totalNumber" is incorrect. (Number)'):r.isFunction(e.totalNumberLocator)||l('"totalNumberLocator" should be a Function.'):c.isObject(e.dataSource)&&(void 0===e.locator?l('"dataSource" is an Object, please specify "locator".'):"string"==typeof e.locator||r.isFunction(e.locator)||l(e.locator+" is incorrect. (String | Function)"));void 0===e.formatResult||r.isFunction(e.formatResult)||l('"formatResult" should be a Function.')}(d),u.initialize(),this},r.fn[s].defaults={totalNumber:0,pageNumber:1,pageSize:10,pageRange:2,showPrevious:!0,showNext:!0,showPageNumbers:!0,showNavigator:!1,showGoInput
1:!1,showGoButton:!1,pageLink:"",prevText:"«",nextText:"»",ellipsisText:"...",goButtonText:"Go",classPrefix:"paginationjs",activeClassName:"active",disableClassName:"disabled",inlineStyle:!0,formatNavigator:"<%= currentPage %> / <%= totalPage %>",formatGoInput:"<%= input %>",formatGoButton:"<%= button %>",position:"bottom",autoHidePrevious:!1,autoHideNext:!1,triggerPagingOnInit:!0,hideWhenLessThanOnePage:!1,showFirstOnEllipsisShow:!0,showLastOnEllipsisShow:!0,callback:function(){}},r.fn.addHook=function(e,t){arguments.length<2&&l("Missing argument."),r.isFunction(t)||l("callback must be a function.");var i=r(this),n=i.data("pagination");n||(i.data("pagination",{}),n=i.data("pagination")),!n.hooks&&(n.hooks={}),n.hooks[e]=n.hooks[e]||[],n.hooks[e].push(t)},r[s]=function(e,t){var i;if(arguments.length<2&&l("Requires two parameters."),(i="string"!=typeof e&&e instanceof jQuery?e:r(e)).length)return i.pagination(t),i};var c={};function l(e){throw new Error("Pagination: "+e)}r.each(["Object","Array","String"],function(e,t){c["is"+t]=function(e){return function(e,t){return("object"==(t=typeof e)?null==e?"null":Object.prototype.toString.call(e).slice(8,-1):t).toLowerCase()}(e)===t.toLowerCase()}}),void 0===(n=function(){return r}.call(t,i,t,e))||(e.exports=n)}(this,window.jQuery)},3958:function(e,t,i){"use strict";var n=i(7717);!function(e){e(".activity-wants-filtering").each(function(){let t=e(this),i=[],a=[];const r=function(e){return t.find(e)},s=t.hasClass("activity-search-wrapper"),o=new URLSearchParams(window.location.search),c=t.find(".activity-search-form-js").data("search-index"),l=o.get("taxonomy_slugs_"+c),d=r(".activity-filter-interface"),u=r(".js-filter-group"),h=u.hasClass("subterms-filter-group"),p=d.find(".taxonomy-terms input[type=checkbox]"),f=t.hasClass("activity-wants-grid-on-load")||r(".activity-search-wrapper").hasClass("activity-wants-grid-on-load");let g=l?l.split(","):[];if(t.parents(".activity-wants-filtering").length)return;r(".activity-single__list").find(".js-grid-activity").removeClass("js-grid-activity"),s&&!f&&r(".js-results").hide();const m=function(e=""){if(e){const t=d.find(`.js-active-filter [data-taxonomy=${e}]`),i=d.find(`.js-filter-group[data-parent-taxonomy=${e}] .js-select-message`);t.length?i.hide():i.show()}else d.find(".js-select-message").show()},b=function(t,i){const n=e(`.js-term-filter .${t}`).attr("data-taxonomy");if(d.find("input[type=checkbox]."+t).closest(".js-filter-group").hasClass("parent-filter-group")){const n=d.find(`[data-hierachical-subterm-parent=${t}`);i?n.show():(n.hide(),n.each(function(t,i){e(i).find("input").prop("checked",!1),v(i.dataset.taxonomyId)}))}m(n)},y=function(){r(".js-active-filter").length?(r(".selected-filters").show(),r(".activity-search-form__filter-dropdown--button-mobile").addClass("filter-active")):(r(".selected-filters").hide(),r(".activity-search-form__filter-dropdown--button-mobile").removeClass("filter-active"))},v=function(e){r(".js-active-filter."+e).parent().remove(),r(".js-active-filter").length>0||(r(".selected-filters").hide(),r(".activity-search-form__filter-dropdown--button-mobile").removeClass("filter-active"))},w=function(){t.hasClass("-wants-top-2-priority")&&(r(".js-grid-activity").removeClass("-top-2-priority"),r(".js-grid-activity:visible").slice(0,2).addClass("-top-2-priority"))},k=function(){const t=new URLSearchParams(window.location.search),i=d.find("input:checked");r(".hierachical-subterm").hide(),e.each(i,function(t,i){e(i).prop("checked",!1),v(e(i).attr("class"))}),t.get("taxonomy_slugs_"+c).split(",").forEach(e=>{(0,n.Hi)(e+"_terms",c)}),(0,n.Hi)("taxonomy_slugs",c),a=[],S(),m(),y()},D=function(t){let o=document.createElement("button"),l=d.find(`[data-taxonomy-id="${t}"]`).parents(".js-filter-group").find(".taxonomy-icon");const u=d.find(".name."+t).text();o.className="js-active-filter active-filter "+t,o.innerHTML=u,o.setAttribute("title",u),l.length&&(l=e(l[0]).clone(),o.prepend(l[0]));let p=document.createElement("span");const f=d.find(`.js-term-filter input.${t}`).data("taxonomy");p.className="js-remove-filter remove-filter",p.innerHTML="<span aria-hidden='true'>✕</span> <span class='visually-hidden'>Remove filter</span>",p.dataset.taxonomy=f,o.addEventListener("click",function(){s&&(a[f].length&&a[f].includes(t)&&(a[f].splice(a[f].indexOf(t),1),(0,n.Pd)(p.dataset.taxonomy+"_terms",a[f].join(","),"activity_search",c)),a[f].length||i.splice(i.indexOf(p.dataset.taxonomy),1),(0,n.Pd)("taxonomy_slugs",i.join(","),"activity_search",c)),d.find("input[type=checkbox]."+t).prop("checked",!1),v(t),h&&b(t,!1),0===r(".js-active-filter").length&&k(),S()}),r(".js-active-filters-list").append(o),e(o).append(p).wrap("<li></li>"),y()},S=function(){const t=d.find("input:checked");let i,n={},a=[];if(r(".js-grid-activity").hide(),!t.length)return r(".js-grid-activity").show(),r(".col:empty").show(),i=r(".js-grid-activity:visible").length,void w();e.each(t,function(e,t){n[t.dataset.taxonomy]||(n[t.dataset.taxonomy]=[]);let i=t.dataset.hierachicalSubtermParent;if(i){let e=n[t.dataset.taxonomy].indexOf("."+i);-1!==e&&n[t.dataset.taxonomy].splice(e,1)}n[t.dataset.taxonomy].push("."+t.className)});for(const e in n)n.hasOwnProperty(e)&&a.push(n[e]);(function(e){let t=[],i=e.length-1,n=function(a,r){for(let s=0,o=e[r].length;s<o;s++){let o=a.slice(0);o.push(e[r][s]),r===i?t.push(o):n(o,r+1)}};return n([],0),t}
1)(a).forEach(function(e){r(".js-grid-activity"+e.join("")).show()}),i=r(".js-grid-activity:visible").length,r(".col:empty").hide(),w()},E=u.map(function(){const t=e(this),i=t.find(".js-taxonomy-label"),n=(t.find(".js-taxonomy-terms"),t.parents(".js-taxonomies-filter-bar"),{deactivate:function(){t.removeClass("js-active"),t.attr("aria-expanded",!1)},toggle:function(){t.toggleClass("js-active");const i=t.find("svg");t.attr("aria-expanded",t.hasClass("js-active"));let n=t.attr("aria-expanded");e(i).attr("aria-hidden",n),e(i).attr("focusable",!n)}});return i.on("click",function(t){t.preventDefault(),e.each(E,function(e,t){t===n?n.toggle():t.deactivate()})}),n});p.map(function(){const t=e(this),r=t.attr("class");t.on("click",function(e){const o=t.is(":checked");if(o?D(r):v(r),s){let t=e.target.dataset.taxonomy,r=e.target.className;i.includes(t)?p.filter(`[data-taxonomy=${t}]`).is(":checked")||i.splice(i.indexOf(t),1):i.push(t),(0,n.Pd)("taxonomy_slugs",i.join(","),"activity_search",c),a[t]||(a[t]=[]),e.target.checked&&!a[t].includes(r)?a[t].push(r):a[t].splice(a[t].indexOf(r),1);for(let e in a)if(a.hasOwnProperty(e)){let t=a[e].join(","),i=e+"_terms";(0,n.Pd)(i,t,"activity_search",c)}window.mixpanel?.fareharbor.track("fhme-sbd-click-filter",{filter:t})}h&&b(r,o),S()})});const x=function(){e("body").removeClass("js-noscroll"),d.removeClass("js-active")};r(".js-clear-filters").on("click",function(i){i.preventDefault(),e(this).is(".js-activity-search-clear-search")&&function(){window.mixpanel?.fareharbor.track("fhme-sbd-clear-search");let i=r(".activity-search-results-wrapper");t.removeClass("showing-results"),i.removeClass("-show"),r(".pagination-container").hide(),r(".activity-grid").show(),i.find(".activity-search-results-row").remove(),e(`.datepicker-${c}`).val(""),r(".activity-search-form__events-for").find(".active").removeClass("active"),window.history.replaceState(null,null,window.location.pathname)}(),k()}),r(".js-toggle-filters").on("click",function(t){t.preventDefault(),t.stopPropagation(),window.ActivitySearchBlockDatepickers?.datepickers&&window.ActivitySearchBlockDatepickers.datepickers.forEach(function(e){e?.datepicker?.picker?.active&&e.datepicker.hide()}),e("body").toggleClass("js-noscroll"),e(this).toggleClass("js-active"),d.toggleClass("js-active")}),r(".js-view-activities").on("click",function(e){e.preventDefault(),e.stopPropagation(),x()}),r(".activity-filter-header").on("click",function(e){e.preventDefault(),e.stopPropagation(),x()}),e(document).on("click",function(t){t.stopPropagation(),!e(t.target).parents().hasClass("activity-filter-interface")&&!e(t.target).hasClass("js-toggle-filters")&&!e(t.target).parents().hasClass("js-toggle-filters")&&x()}),function(){if(s&&l){const e=[];i=g,function(e,t){e.forEach(function(e){const i=o.get(e+"_terms_"+c);i&&i.split(",").forEach(function(i){t(e,i)})})}(g,function(t,i){e.includes(i)||(e.push(i),r("input."+i).prop("checked",!0),D(i),a[t]||(a[t]=[]),a[t].push(i),b(i,!0))})}}(),S(),window.termIds=()=>a})}(window.jQuery)},4379:function(e,t,i){"use strict";var n=i(444);document.querySelectorAll(".activity-search-form-js").forEach(e=>{new n.A(e.id).init()}),window.ActivitySearchBlockDatepickers=n.X},4735:function(e,t,i){"use strict";i.d(t,{A:function(){return Fe}});var n=i(334),a=i(9890),r=i(2744),s=i(9021);const o=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,c=/[\s!-/:-@[-`{-~å¹´ææ¥]+/;let l={};const d={y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m(e,t,i){const n=new Date(e);let a=parseInt(t,10)-1;if(isNaN(a)){if(!t)return NaN;const e=t.toLowerCase(),n=t=>t.toLowerCase().startsWith(e);if(a=i.monthsShort.findIndex(n),a<0&&(a=i.months.findIndex(n)),a<0)return NaN}return n.setMonth(a),n.getMonth()!==h(a)?n.setDate(0):n.getTime()},d(e,t){return new Date(e).setDate(parseInt(t,10))}},u={d(e){return e.getDate()},dd(e){return p(e.getDate(),2)},D(e,t){return t.daysShort[e.getDay()]},DD(e,t){return t.days[e.getDay()]},m(e){return e.getMonth()+1},mm(e){return p(e.getMonth()+1,2)},M(e,t){return t.monthsShort[e.getMonth()]},MM(e,t){return t.months[e.getMonth()]},y(e){return e.getFullYear()},yy(e){return p(e.getFullYear(),2).slice(-2)},yyyy(e){return p(e.getFullYear(),4)}};function h(e){return e>-1?e%12:h(e+12)}function p(e,t){return e.toString().padStart(t,"0")}function f(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in l)return l[e];const t=e.split(o),i=e.match(new RegExp(o,"g"));if(0===t.length||!i)throw new Error("Invalid date format.");const n=i.map(e=>u[e]),a=Object.keys(d).reduce((e,t)=>
1(i.find(e=>"D"!==e[0]&&e[0].toLowerCase()===t)&&e.push(t),e),[]);return l[e]={parser(e,t){const n=e.split(c).reduce((e,t,n)=>{if(t.length>0&&i[n]){const a=i[n][0];"M"===a?e.m=t:"D"!==a&&(e[a]=t)}return e},{});return a.reduce((e,i)=>{const a=d[i](e,n[i],t);return isNaN(a)?e:a},(0,s.Ec)())},formatter(e,i){return n.reduce((n,a,r)=>n+`${t[r]}${a(e,i)}`,"")+(0,r.vM)(t)}}}function g(e,t,i){if(e instanceof Date||"number"==typeof e){const t=(0,s.yy)(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return(0,s.Ec)();if(t&&t.toValue){const n=t.toValue(e,t,i);return isNaN(n)?void 0:(0,s.yy)(n)}return f(t).parser(e,i)}}function m(e,t,i){if(isNaN(e)||!e&&0!==e)return"";const n="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(n,t,i):f(t).formatter(n,i)}const b=document.createRange();function y(e){return b.createContextualFragment(e)}function v(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function w(e){return e.getRootNode().activeElement===e}function k(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function D(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function S(e){e.firstChild&&(e.removeChild(e.firstChild),S(e))}const E=new WeakMap,{addEventListener:x,removeEventListener:N}=EventTarget.prototype;function _(e,t){let i=E.get(e);i||(i=[],E.set(e,i)),t.forEach(e=>{x.call(...e),i.push(e)})}if(!Event.prototype.composedPath){const e=(t,i=[])=>{let n;return i.push(t),t.parentNode?n=t.parentNode:t.host?n=t.host:t.defaultView&&(n=t.defaultView),n?e(n,i):i};Event.prototype.composedPath=function(){return e(this.target)}}function A(e,t,i){const[n,...a]=e;return t(n)?n:n!==i&&"HTML"!==n.tagName&&0!==a.length?A(a,t,i):void 0}function C(e,t){const i="function"==typeof t?t:e=>e instanceof Element&&e.matches(t);return A(e.composedPath(),i,e.currentTarget)}var T={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],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",clear:"Clear",titleFormat:"MM y"}},M={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,clearButton:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,enableOnReadonly:!0,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"»",orientation:"auto",pickLevel:0,prevArrow:"«",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayButton:!1,todayButtonMode:0,todayHighlight:!1,updateOnBlur:!0,weekNumbers:0,weekStart:0};const{language:O,format:L,weekStart:R}=M;function I(e,t){return e.length<6&&t>=0&&t<7?(0,r._X)(e,t):e}function P(e,t){switch(4===e?6===t?3:!t+1:e){case 1:return s.qG;case 2:return s.qg;case 3:return s.Ny}}function F(e,t,i){return t.weekStart=e,t.weekEnd=(e+6)%7,4===i&&(t.getWeekNumber=P(4,e)),e}function j(e,t,i,n){const a=g(e,t,i);return void 0!==a?a:n}function $(e,t,i=3){const n=parseInt(e,10);return n>=0&&n<=i?n:t}function H(e,t,i,n=void 0){t in e&&(i in e||(e[i]=n?n(e[t]):e[t]),delete e[t])}function B(e,t){const i=Object.assign({},e),n={},a=t.constructor.locales,c=!!t.rangeSideIndex;let{datesDisabled:l,format:d,language:u,locale:h,maxDate:p,maxView:f,minDate:m,pickLevel:b,startView:v,weekNumbers:w,weekStart:k}=t.config||{};if(H(i,"calendarWeeks","weekNumbers",e=>e?1:0),H(i,"clearBtn","clearButton"),H(i,"todayBtn","todayButton"),H(i,"todayBtnMode","todayButtonMode"),i.language){let e;if(i.language!==u&&(a[i.language]?e=i.language:(e=i.language.split("-")[0],a[e]||(e=!1))),delete i.language,e){u=n.language=e;const t=h||a[O];h=Object.assign({format:L,weekStart:R},a[O]),u!==O&&Object.assign(h,a[u]),n.locale=h,d===t.format&&(d=n.format=h.format),k===t.weekStart&&(k=F(h.weekStart,n,w))}}if(i.format){const e="function"==typeof i.format.toDisplay,t="function"==typeof i.format.toValue,a=o.test(i.format);(e&&t||a)&&(d=n.format=i.format),delete i.format}let D=b;"pickLevel"in i&&(D=$(i.pickLevel,b,2),delete i.pickLevel),D!==b&&(D>
1b&&("minDate"in i||(i.minDate=m),"maxDate"in i||(i.maxDate=p)),l&&!i.datesDisabled&&(i.datesDisabled=[]),b=n.pickLevel=D);let S=m,E=p;if("minDate"in i){const e=(0,s.Y4)(0,0,1);S=null===i.minDate?e:j(i.minDate,d,h,S),S!==e&&(S=(0,s.bi)(S,b,!1)),delete i.minDate}if("maxDate"in i&&(E=null===i.maxDate?void 0:j(i.maxDate,d,h,E),void 0!==E&&(E=(0,s.bi)(E,b,!0)),delete i.maxDate),E<S?(m=n.minDate=E,p=n.maxDate=S):(m!==S&&(m=n.minDate=S),p!==E&&(p=n.maxDate=E)),i.datesDisabled){const e=i.datesDisabled;if("function"==typeof e)n.datesDisabled=null,n.checkDisabled=(t,i)=>e(new Date(t),i,c);else{const t=n.datesDisabled=e.reduce((e,t)=>{const i=g(t,d,h);return void 0!==i?(0,r._X)(e,(0,s.bi)(i,b,c)):e},[]);n.checkDisabled=e=>t.includes(e)}delete i.datesDisabled}if("defaultViewDate"in i){const e=g(i.defaultViewDate,d,h);void 0!==e&&(n.defaultViewDate=e),delete i.defaultViewDate}if("weekStart"in i){const e=Number(i.weekStart)%7;isNaN(e)||(k=F(e,n,w)),delete i.weekStart}if(i.daysOfWeekDisabled&&(n.daysOfWeekDisabled=i.daysOfWeekDisabled.reduce(I,[]),delete i.daysOfWeekDisabled),i.daysOfWeekHighlighted&&(n.daysOfWeekHighlighted=i.daysOfWeekHighlighted.reduce(I,[]),delete i.daysOfWeekHighlighted),"weekNumbers"in i){let e=i.weekNumbers;if(e){const t="function"==typeof e?(t,i)=>e(new Date(t),i):P(e=parseInt(e,10),k);t&&(w=n.weekNumbers=e,n.getWeekNumber=t)}else w=n.weekNumbers=0,n.getWeekNumber=null;delete i.weekNumbers}if("maxNumberOfDates"in i){const e=parseInt(i.maxNumberOfDates,10);e>=0&&(n.maxNumberOfDates=e,n.multidate=1!==e),delete i.maxNumberOfDates}i.dateDelimiter&&(n.dateDelimiter=String(i.dateDelimiter),delete i.dateDelimiter);let x=f;"maxView"in i&&(x=$(i.maxView,f),delete i.maxView),x=b>x?b:x,x!==f&&(f=n.maxView=x);let N=v;if("startView"in i&&(N=$(i.startView,N),delete i.startView),N<b?N=b:N>f&&(N=f),N!==v&&(n.startView=N),i.prevArrow){const e=y(i.prevArrow);e.childNodes.length>0&&(n.prevArrow=e.childNodes),delete i.prevArrow}if(i.nextArrow){const e=y(i.nextArrow);e.childNodes.length>0&&(n.nextArrow=e.childNodes),delete i.nextArrow}if("disableTouchKeyboard"in i&&(n.disableTouchKeyboard="ontouchstart"in document&&!!i.disableTouchKeyboard,delete i.disableTouchKeyboard),i.orientation){const e=i.orientation.toLowerCase().split(/\s+/g);n.orientation={x:e.find(e=>"left"===e||"right"===e)||"auto",y:e.find(e=>"top"===e||"bottom"===e)||"auto"},delete i.orientation}if("todayButtonMode"in i){switch(i.todayButtonMode){case 0:case 1:n.todayButtonMode=i.todayButtonMode}delete i.todayButtonMode}return Object.entries(i).forEach(([e,t])=>{void 0!==t&&e in M&&(n[e]=t)}),n}const V={show:{key:"ArrowDown"},hide:null,toggle:{key:"Escape"},prevButton:{key:"ArrowLeft",ctrlOrMetaKey:!0},nextButton:{key:"ArrowRight",ctrlOrMetaKey:!0},viewSwitch:{key:"ArrowUp",ctrlOrMetaKey:!0},clearButton:{key:"Backspace",ctrlOrMetaKey:!0},todayButton:{key:".",ctrlOrMetaKey:!0},exitEditMode:{key:"ArrowDown",ctrlOrMetaKey:!0}};const z=e=>e.map(e=>`<button type="button" class="%buttonClass% ${e}" tabindex="-1"></button>`).join("");var Y=(0,r.LF)(`<div class="datepicker">\n <div class="datepicker-picker">\n <div class="datepicker-header">\n <div class="datepicker-title"></div>\n <div class="datepicker-controls">\n ${z(["prev-button prev-btn","view-switch","next-button next-btn"])}\n </div>\n </div>\n <div class="datepicker-main"></div>\n <div class="datepicker-footer">\n <div class="datepicker-controls">\n ${z(["today-button today-btn","clear-button clear-btn"])}\n </div>\n </div>\n </div>\n</div>`),U=(0,r.LF)(`<div class="days">\n <div class="days-of-week">${(0,r.aU)("span",7,{class:"dow"})}</div>\n <div class="datepicker-grid">${(0,r.aU)("span",42)}</div>\n</div>`),W=(0,r.LF)(`<div class="week-numbers calendar-weeks">\n <div class="days-of-week"><span class="dow"></span></div>\n <div class="weeks">${(0,r.aU)("span",6,{class:"week"})}</div>\n</div>`);class K{constructor(e,t){Object.assign(this,t,{picker:e,element:y('<div class="datepicker-view"></div>').firstChild,selected:[],isRangeEnd:!!e.datepicker.rangeSideIndex}),this.init(this.picker.datepicker.config)}init(e){"pickLevel"in e&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}prepareForRender(e,t,i){this.disabled=[];const n=this.picker;
1n.setViewSwitchLabel(e),n.setPrevButtonDisabled(t),n.setNextButtonDisabled(i)}setDisabled(e,t){t.add("disabled"),(0,r._X)(this.disabled,e)}performBeforeHook(e,t){let i=this.beforeShow(new Date(t));switch(typeof i){case"boolean":i={enabled:i};break;case"string":i={classes:i}}if(i){const n=e.classList;if(!1===i.enabled&&this.setDisabled(t,n),i.classes){const e=i.classes.split(/\s+/);n.add(...e),e.includes("disabled")&&this.setDisabled(t,n)}i.content&&function(e,t){S(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(y(t)):"function"==typeof t.forEach&&t.forEach(t=>{e.appendChild(t)})}(e,i.content)}}renderCell(e,t,i,n,{selected:a,range:r},s,o=[]){e.textContent=t,this.isMinView&&(e.dataset.date=n);const c=e.classList;if(e.className=`datepicker-cell ${this.cellClass}`,i<this.first?c.add("prev"):i>this.last&&c.add("next"),c.add(...o),(s||this.checkDisabled(n,this.id))&&this.setDisabled(n,c),r){const[e,t]=r;i>e&&i<t&&c.add("range"),i===e&&c.add("range-start"),i===t&&c.add("range-end")}a.includes(i)&&c.add("selected"),i===this.focused&&c.add("focused"),this.beforeShow&&this.performBeforeHook(e,n)}refreshCell(e,t,i,[n,a]){const r=e.classList;r.remove("range","range-start","range-end","selected","focused"),t>n&&t<a&&r.add("range"),t===n&&r.add("range-start"),t===a&&r.add("range-end"),i.includes(t)&&r.add("selected"),t===this.focused&&r.add("focused")}changeFocusedCell(e){this.grid.querySelectorAll(".focused").forEach(e=>{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}class q extends K{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=y(U).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(e){let t;if("minDate"in e&&(this.minDate=e.minDate),"maxDate"in e&&(this.maxDate=e.maxDate),e.checkDisabled&&(this.checkDisabled=e.checkDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),"todayHighlight"in e&&(this.todayHighlight=e.todayHighlight),"weekStart"in e&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){const i=this.locale=e.locale;this.dayNames=i.daysMin,this.switchLabelFormat=i.titleFormat,t=!0}if("beforeShowDay"in e&&(this.beforeShow="function"==typeof e.beforeShowDay?e.beforeShowDay:void 0),"weekNumbers"in e)if(e.weekNumbers&&!this.weekNumbers){const e=y(W).firstChild;this.weekNumbers={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.weekNumbers&&!e.weekNumbers&&(this.element.removeChild(this.weekNumbers.element),this.weekNumbers=null);"getWeekNumber"in e&&(this.getWeekNumber=e.getWeekNumber),"showDaysOfWeek"in e&&(e.showDaysOfWeek?(D(this.dow),this.weekNumbers&&D(this.weekNumbers.dow)):(k(this.dow),this.weekNumbers&&k(this.weekNumbers.dow))),t&&Array.from(this.dow.children).forEach((e,t)=>{const i=(this.weekStart+t)%7;e.textContent=this.dayNames[i],e.className=this.daysOfWeekDisabled.includes(i)?"dow disabled":"dow"})}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),i=e.getMonth(),n=(0,s.Y4)(t,i,1),a=(0,s.eH)(n,this.weekStart,this.weekStart);this.first=n,this.last=(0,s.Y4)(t,i+1,0),this.start=a,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){if(this.today=this.todayHighlight?(0,s.Ec)():void 0,this.prepareForRender(m(this.focused,this.switchLabelFormat,this.locale),this.first<=this.minDate,this.last>=this.maxDate),this.weekNumbers){const e=this.weekStart,t=(0,s.eH)(this.first,e,e);Array.from(this.weekNumbers.weeks.children).forEach((i,n)=>{const a=(0,s.J4)(t,n);i.textContent=this.getWeekNumber(a,e),n>3&&i.classList[a>this.last?"add":"remove"]("next")})}Array.from(this.grid.children).forEach((e,t)=>{const i=(0,s.fi)(this.start,t),n=new Date(i),a=n.getDay(),r=[];this.today===i&&r.push("today"),this.daysOfWeekHighlighted.includes(a)&&r.push("highlighted"),this.renderCell(e,n.getDate(),i,i,this,i<this.minDate||i>this.maxDate||this.daysOfWeekDisabled.includes(a),r)})}refresh(){const e=this.range||[];
1Array.from(this.grid.children).forEach(t=>{this.refreshCell(t,Number(t.dataset.date),this.selected,e)})}refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/864e5))}}function G(e,t){if(!e||!e[0]||!e[1])return;const[[i,n],[a,r]]=e;return i>t||a<t?void 0:[i===t?n:-1,a===t?r:12]}class J extends K{constructor(e){super(e,{id:1,name:"months",cellClass:"month"})}init(e,t=!0){t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(y((0,r.aU)("span",12,{"data-month":e=>e}))),this.first=0,this.last=11),super.init(e)}setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),"minDate"in e)if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if("maxDate"in e)if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const t=new Date(e.maxDate);this.maxYear=t.getFullYear(),this.maxMonth=t.getMonth(),this.maxDate=(0,s.Y4)(this.maxYear,this.maxMonth+1,0)}e.checkDisabled&&(this.checkDisabled=this.isMinView||null===e.datesDisabled?e.checkDisabled:()=>!1),"beforeShowMonth"in e&&(this.beforeShow="function"==typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>{const i=new Date(t),n=i.getFullYear(),a=i.getMonth();return void 0===e[n]?e[n]=[a]:(0,r._X)(e[n],a),e},{}),t&&t.dates&&(this.range=t.dates.map(e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]}))}render(){this.prepareForRender(this.year,this.year<=this.minYear,this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.year<this.minYear||this.year>this.maxYear,i=this.year===this.minYear,n=this.year===this.maxYear,a=G(this.range,this.year);Array.from(this.grid.children).forEach((r,o)=>{const c=(0,s.bi)(new Date(this.year,o,1),1,this.isRangeEnd);this.renderCell(r,this.monthNames[o],o,c,{selected:e,range:a},t||i&&o<this.minMonth||n&&o>this.maxMonth)})}refresh(){const e=this.selected[this.year]||[],t=G(this.range,this.year)||[];Array.from(this.grid.children).forEach((i,n)=>{this.refreshCell(i,n,e,t)})}refreshFocus(){this.changeFocusedCell(this.focused)}}class Q extends K{constructor(e,t){super(e,t)}init(e,t=!0){var i;t&&(this.navStep=10*this.step,this.beforeShowOption=`beforeShow${i=this.cellClass,[...i].reduce((e,t,i)=>e+(i?t:t.toUpperCase()),"")}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(y((0,r.aU)("span",12)))),super.init(e)}setOptions(e){if("minDate"in e&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=(0,s.Us)(e.minDate,this.step),this.minDate=(0,s.Y4)(this.minYear,0,1))),"maxDate"in e&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=(0,s.Us)(e.maxDate,this.step),this.maxDate=(0,s.Y4)(this.maxYear,11,31))),e.checkDisabled&&(this.checkDisabled=this.isMinView||null===e.datesDisabled?e.checkDisabled:()=>!1),this.beforeShowOption in e){const t=e[this.beforeShowOption];this.beforeShow="function"==typeof t?t:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=(0,s.Us)(e,this.navStep),i=t+9*this.step;this.first=t,this.last=i,this.start=t-this.step,this.focused=(0,s.Us)(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>(0,r._X)(e,(0,s.Us)(t,this.step)),[]),t&&t.dates&&(this.range=t.dates.map(e=>{if(void 0!==e)return(0,s.Us)(e,this.step)}))}render(){this.prepareForRender(`${this.first}-${this.last}`,this.first<=this.minYear,this.last>=this.maxYear),Array.from(this.grid.children).forEach((e,t)=>{const i=this.start+t*this.step,n=(0,s.bi)(new Date(i,0,1),2,this.isRangeEnd);e.dataset.year=i,this.renderCell(e,i,i,n,this,i<this.minYear||i>this.maxYear)})}refresh(){const e=this.range||[];Array.from(this.grid.children).forEach(t=>{this.refreshCell(t,Number(t.textContent),this.selected,e)})}refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/this.step))}}function X(e,t){const i={bubbles:!0,cancelable:!0,detail:{date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e}};e.element.dispatchEvent(new CustomEvent(t,i))}function Z(e,t){const{config:i,picker:n}=e,{currentView:a,viewDate:o}=n;let c;switch(a.id){case 0:c=(0,s.PS)(o,t);break;case 1:c=(0,s.e7)(o,t);break;default:c=(0,s.e7)(o,t*a.navStep)}c=(0,r.WD)(c,i.minDate,i.maxDate),n.changeFocus(c).render()}function ee(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function te(e){e.setDate({clear:!0})}function ie(e){const t=(0,s.Ec)();1===e.config.todayButtonMode?e.setDate(t,{forceRefresh:!0,viewDate:t}):e.setFocusedDate(t,!0)}function ne(e){const t=()=>{e.config.updateOnBlur?e.update({revert:!0}):e.refresh("input"),e.hide()},i=e.element;w(i)?i.addEventListener("blur",t,{once:!0}):t()}function ae(e,t){const i=e.picker,n=new Date(i.viewDate),a=i.currentView.id,r=1===a?(0,s.PS)(n,t-n.getMonth()):(0,s.e7)(n,t-n.getFullYear());i.changeFocus(r).changeView(a-1).render()}function re(e){ee(e)}function se(e){Z(e,-1)}function oe(e){Z(e,1)}function ce(e,t){const i=C(t,".datepicker-cell");if(!i||i.classList.contains("disabled"))return;const{id:n,isMinView:a}=e.picker.currentView,r=i.dataset;a?e.setDate(Number(r.date)):ae(e,Number(1===n?r.month:r.year))}function le(e){e.preventDefault()}const de=["left","top","right","bottom"].reduce((e,t)=>
vendor: 4,429 bytes, line 1
1(e[t]=`datepicker-orient-${t}`,e),{}),ue=e=>e?`${e}px`:e;function he(e,t){if("title"in t&&(t.title?(e.controls.title.textContent=t.title,D(e.controls.title)):(e.controls.title.textContent="",k(e.controls.title))),t.prevArrow){const i=e.controls.prevButton;S(i),t.prevArrow.forEach(e=>{i.appendChild(e.cloneNode(!0))})}if(t.nextArrow){const i=e.controls.nextButton;S(i),t.nextArrow.forEach(e=>{i.appendChild(e.cloneNode(!0))})}if(t.locale&&(e.controls.todayButton.textContent=t.locale.today,e.controls.clearButton.textContent=t.locale.clear),"todayButton"in t&&(t.todayButton?D(e.controls.todayButton):k(e.controls.todayButton)),"minDate"in t||"maxDate"in t){const{minDate:t,maxDate:i}=e.datepicker.config;e.controls.todayButton.disabled=!(0,r.h$)((0,s.Ec)(),t,i)}"clearButton"in t&&(t.clearButton?D(e.controls.clearButton):k(e.controls.clearButton))}function pe(e){const{dates:t,config:i,rangeSideIndex:n}=e,a=t.length>0?(0,r.vM)(t):(0,s.bi)(i.defaultViewDate,i.pickLevel,n);return(0,r.WD)(a,i.minDate,i.maxDate)}function fe(e,t){"_oldViewDate"in e||t===e.viewDate||(e._oldViewDate=e.viewDate),e.viewDate=t;const{id:i,year:n,first:a,last:r}=e.currentView,s=new Date(t).getFullYear();switch(i){case 0:return t<a||t>r;case 1:return s!==n;default:return s<a||s>r}}function ge(e){return window.getComputedStyle(e).direction}function me(e){const t=v(e);if(t!==document.body&&t)return"visible"!==window.getComputedStyle(t).overflow?t:me(t)}class be{constructor(e){const{config:t,inputField:i}=this.datepicker=e,n=Y.replace(/%buttonClass%/g,t.buttonClass),a=this.element=y(n).firstChild,[r,s,o]=a.firstChild.children,c=r.firstElementChild,[l,d,u]=r.lastElementChild.children,[h,p]=o.firstChild.children,f={title:c,prevButton:l,viewSwitch:d,nextButton:u,todayButton:h,clearButton:p};this.main=s,this.controls=f;const g=i?"dropdown":"inline";a.classList.add(`datepicker-${g}`),he(this,t),this.viewDate=pe(e),_(e,[[a,"mousedown",le],[s,"click",ce.bind(null,e)],[f.viewSwitch,"click",re.bind(null,e)],[f.prevButton,"click",se.bind(null,e)],[f.nextButton,"click",oe.bind(null,e)],[f.todayButton,"click",ie.bind(null,e)],[f.clearButton,"click",te.bind(null,e)]]),this.views=[new q(this),new J(this),new Q(this,{id:2,name:"years",cellClass:"year",step:1}),new Q(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):i.after(this.element)}setOptions(e){he(this,e),this.views.forEach(t=>{t.init(e,!1)}),this.currentView.render()}detach(){this.element.remove()}show(){if(this.active)return;const{datepicker:e,element:t}=this,i=e.inputField;if(i){const n=ge(i);n!==ge(v(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),this.place(),t.classList.add("active"),e.config.disableTouchKeyboard&&i.blur()}else t.classList.add("active");this.active=!0,X(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active"),this.active=!1,X(this.datepicker,"hide"))}place(){const{classList:e,style:t}=this.element;t.display="block";const{width:i,height:n}=this.element.getBoundingClientRect(),a=this.element.offsetParent;t.display="";const{config:r,inputField:s}=this.datepicker,{left:o,top:c,right:l,bottom:d,width:u,height:h}=s.getBoundingClientRect();let{x:p,y:f}=r.orientation,g=o,m=c;if(a!==document.body&&a){const e=a.getBoundingClientRect();g-=e.left-a.scrollLeft,m-=e.top-a.scrollTop}else g+=window.scrollX,m+=window.scrollY;const b=me(s);let y=0,v=0,{clientWidth:w,clientHeight:k}=document.documentElement;if(b){const e=b.getBoundingClientRect();e.top>0&&(v=e.top),e.left>0&&(y=e.left),e.right<w&&(w=e.right),e.bottom<k&&(k=e.bottom)}let D=0;"auto"===p&&(o<y?(p="left",D=y-o):o+i>w?(p="right",w<l&&(D=w-l)):p="rtl"===ge(s)?l-i<y?"left":"right":"left"),"right"===p&&(g+=u-i),g+=D,"auto"===f&&(f=c-n>v&&d+n>k?"top":"bottom"),"top"===f?m-=n:m+=h,e.remove(...Object.values(de)),e.add(de[p],de[f]),t.left=ue(g),t.top=ue(m)}setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}setPrevButtonDisabled(e){this.controls.prevButton.disabled=e}setNextButtonDisabled(e){this.controls.nextButton.disabled=e}changeView(e){const t=this.currentView;return e!==t.id&&(this._oldView||(this._oldView=t),this.currentView=this.views[e],this._renderMethod="render"),this}changeFocus(e){return this._renderMethod=fe(this,e)?"render":"refreshFocus",this.views.forEach(e
1=>{e.updateFocus()}),this}update(e=void 0){const t=void 0===e?pe(this.datepicker):e;return this._renderMethod=fe(this,t)?"render":"refresh",this.views.forEach(e=>{e.updateFocus(),e.updateSelection()}),this}render(e=!0){const{currentView:t,datepicker:i,_oldView:n}=this,a=new Date(this._oldViewDate),r=e&&this._renderMethod||"render";if(delete this._oldView,delete this._oldViewDate,delete this._renderMethod,t[r](),n&&(this.main.replaceChild(t.element,n.element),X(i,"changeView")),!isNaN(a)){const e=new Date(this.viewDate);e.getFullYear()!==a.getFullYear()&&X(i,"changeYear"),e.getMonth()!==a.getMonth()&&X(i,"changeMonth")}}}function ye(e,t,i,n,a,s){if((0,r.h$)(e,a,s)){if(n(e)){return ye(t(e,i),t,i,n,a,s)}return e}}function ve(e,t,i){const n=e.picker,a=n.currentView,r=a.step||1;let o,c=n.viewDate;switch(a.id){case 0:c=(0,s.fi)(c,i?7*t:t),o=s.fi;break;case 1:c=(0,s.PS)(c,i?4*t:t),o=s.PS;break;default:c=(0,s.e7)(c,t*(i?4:1)*r),o=s.e7}c=ye(c,o,t<0?-r:r,e=>a.disabled.includes(e),a.minDate,a.maxDate),void 0!==c&&n.changeFocus(c).render()}function we(e,t){const{config:i,picker:n,editMode:a}=e,r=n.active,{key:s,altKey:o,shiftKey:c}=t,l=t.ctrlKey||t.metaKey,d=()=>{t.preventDefault(),t.stopPropagation()};if("Tab"===s)return void ne(e);if("Enter"===s){if(r)if(a)e.exitEditMode({update:!0,autohide:i.autohide});else{const t=n.currentView;t.isMinView?e.setDate(n.viewDate):(n.changeView(t.id-1).render(),d())}else e.update();return}const u=i.shortcutKeys,h={key:s,ctrlOrMetaKey:l,altKey:o,shiftKey:c},p=Object.keys(u).find(e=>{const t=u[e];return!Object.keys(t).find(e=>t[e]!==h[e])});if(p){let t;if("toggle"===p?t=p:a?"exitEditMode"===p&&(t=p):r?"hide"===p?t=p:"prevButton"===p?t=[Z,[e,-1]]:"nextButton"===p?t=[Z,[e,1]]:"viewSwitch"===p?t=[ee,[e]]:i.clearButton&&"clearButton"===p?t=[te,[e]]:i.todayButton&&"todayButton"===p&&(t=[ie,[e]]):"show"===p&&(t=p),t)return Array.isArray(t)?t[0].apply(null,t[1]):e[t](),void d()}if(!r||a)return;const f=(i,n)=>{c||l||o?e.enterEditMode():(ve(e,i,n),t.preventDefault())};"ArrowLeft"===s?f(-1,!1):"ArrowRight"===s?f(1,!1):"ArrowUp"===s?f(-1,!0):"ArrowDown"===s?f(1,!0):("Backspace"===s||"Delete"===s||s&&1===s.length&&!l)&&e.enterEditMode()}function ke(e){e.config.showOnFocus&&!e._showing&&e.show()}function De(e,t){const i=t.target;(e.picker.active||e.config.showOnClick)&&(i._active=w(i),i._clicking=setTimeout(()=>{delete i._active,delete i._clicking},2e3))}function Se(e,t){const i=t.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&e.enterEditMode(),delete i._active,e.config.showOnClick&&e.show())}function Ee(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function xe(e,t){const{element:i,picker:n}=e;if(!n.active&&!w(i))return;const a=n.element;C(t,e=>e===i||e===a)||ne(e)}function Ne(e,t){return e.map(e=>m(e,t.format,t.locale)).join(t.dateDelimiter)}function _e(e,t,i=!1){if(0===t.length)return i?[]:void 0;const{config:n,dates:a,rangeSideIndex:o}=e,{pickLevel:c,maxNumberOfDates:l}=n;let d=t.reduce((e,t)=>{let i=g(t,n.format,n.locale);return void 0===i||(i=(0,s.bi)(i,c,o),!(0,r.h$)(i,n.minDate,n.maxDate)||e.includes(i)||n.checkDisabled(i,c)||!(c>0)&&n.daysOfWeekDisabled.includes(new Date(i).getDay())||e.push(i)),e},[]);return 0!==d.length?(n.multidate&&!i&&(d=d.reduce((e,t)=>(a.includes(t)||e.push(t),e),a.filter(e=>!d.includes(e)))),l&&d.length>l?d.slice(-1*l):d):void 0}function Ae(e,t=3,i=!0,n=void 0){const{config:a,picker:r,inputField:s}=e;if(2&t){const e=r.active?a.pickLevel:a.startView;r.update(n).changeView(e).render(i)}1&t&&s&&(s.value=Ne(e.dates,a))}function Ce(e,t,i){const n=e.config;let{clear:a,render:r,autohide:s,revert:o,forceRefresh:c,viewDate:l}=i;void 0===r&&(r=!0),r?void 0===s&&(s=n.autohide):s=c=!1,l=g(l,n.format,n.locale);const d=_e(e,t,a);(d||o)&&(d&&d.toString()!==e.dates.toString()?(e.dates=d,Ae(e,r?3:1,!0,l),X(e,"changeDate")):Ae(e,c?3:1,!0,l),s&&e.hide())}function Te(e,t){return t?i=>m(i,t,e.config.locale):e=>new Date(e)}class Me{constructor(e,t={},i=void 0){e.datepicker=this,this.element=e,this.dates=[];const n=this.config=Object.assign({buttonClass:t.buttonClass&&Str
1ing(t.buttonClass)||"button",container:null,defaultViewDate:(0,s.Ec)(),maxDate:void 0,minDate:void 0},B(M,this));let a;if("INPUT"===e.tagName?(a=this.inputField=e,a.classList.add("datepicker-input"),t.container&&(n.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container))):n.container=e,i){const e=i.inputs.indexOf(a),t=i.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,this.rangepicker=i,this.rangeSideIndex=e}this._options=t,Object.assign(n,B(t,this)),n.shortcutKeys=function(e){return Object.keys(V).reduce((t,i)=>{const n=void 0===e[i]?V[i]:e[i],a=n&&n.key;if(!a||"string"!=typeof a)return t;const r={key:a,ctrlOrMetaKey:!!(n.ctrlOrMetaKey||n.ctrlKey||n.metaKey)};return a.length>1&&(r.altKey=!!n.altKey,r.shiftKey=!!n.shiftKey),t[i]=r,t},{})}(t.shortcutKeys||{});const o=(0,r.Gn)(e.value||e.dataset.date,n.dateDelimiter);delete e.dataset.date;const c=_e(this,o);c&&c.length>0&&(this.dates=c),a&&(a.value=Ne(this.dates,n));const l=this.picker=new be(this),d=[e,"keydown",we.bind(null,this)];a?_(this,[d,[a,"focus",ke.bind(null,this)],[a,"mousedown",De.bind(null,this)],[a,"click",Se.bind(null,this)],[a,"paste",Ee.bind(null,this)],[document,"mousedown",xe.bind(null,this)],[window,"resize",l.place.bind(l)]]):(_(this,[d]),this.show())}static formatDate(e,t,i){return m(e,t,i&&T[i]||T.en)}static parseDate(e,t,i){return g(e,t,i&&T[i]||T.en)}static get locales(){return T}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=B(e,this);Object.assign(this._options,e),Object.assign(this.config,t),this.picker.setOptions(t),Ae(this,3)}show(){if(this.inputField){const{config:e,inputField:t}=this;if(t.disabled||t.readOnly&&!e.enableOnReadonly)return;w(t)||e.disableTouchKeyboard||(this._showing=!0,t.focus(),delete this._showing)}this.picker.show()}hide(){this.inputField&&(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}toggle(){this.picker.active?this.inputField&&this.picker.hide():this.show()}destroy(){this.hide(),function(e){let t=E.get(e);t&&(t.forEach(e=>{N.call(...e)}),E.delete(e))}(this),this.picker.detach();const e=this.element;return e.classList.remove("datepicker-input"),delete e.datepicker,this}getDate(e=void 0){const t=Te(this,e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const t=[...e],i={},n=(0,r.vM)(e);!n||"object"!=typeof n||Array.isArray(n)||n instanceof Date||Object.assign(i,t.pop());Ce(this,Array.isArray(t[0])?t[0]:t,i)}update(e=void 0){if(!this.inputField)return;const t=Object.assign(e||{},{clear:!0,render:!0,viewDate:void 0});Ce(this,(0,r.Gn)(this.inputField.value,this.config.dateDelimiter),t)}getFocusedDate(e=void 0){return Te(this,e)(this.picker.viewDate)}setFocusedDate(e,t=!1){const{config:i,picker:n,active:a,rangeSideIndex:r}=this,o=i.pickLevel,c=g(e,i.format,i.locale);void 0!==c&&(n.changeFocus((0,s.bi)(c,o,r)),a&&t&&n.changeView(o),n.render())}refresh(e=void 0,t=!1){let i;e&&"string"!=typeof e&&(t=e,e=void 0),i="picker"===e?2:"input"===e?1:3,Ae(this,i,!t)}enterEditMode(){const e=this.inputField;e&&!e.readOnly&&this.picker.active&&!this.editMode&&(this.editMode=!0,e.classList.add("in-edit"))}exitEditMode(e=void 0){if(!this.inputField||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}var Oe=i(9132),Le=(i(9418),i(12)),Re=i(9627),Ie=i(7717),Pe=i(3211);class Fe{constructor(e,t={}){if(!e||"INPUT"!==e.tagName)throw new Error("AccessibleDatepickerCore requires a valid input element");this.inputElement=e,this.options={rowIndex:0,getA11yStrings:function(e,t=null){return n.A.get(e,t)||""},validate:()=>null,onChange:()=>{},onError:()=>{},...t},this.currentView=Oe.Pp.DateView,this.debug=(0,Re.K)("a11y:core"),this.debugVerbose=(0,Re.K)("a11y:core-all","verbose"),this.breakpointManager=a.A.getInstance(),this.url=new URL(window.location.href),this.userInteracted=!1,this.justOpenedAt=0,this.suppressPrematureHide=!1,this._globalHandlersAttached=!1,this.isOpen=!1,this.isKeyboardNavigating=!1,this.liveRegion=null,this.liveRegionQueue=null,this.datepicker=null,this.keyboardHandler=null,this.viewObserver=null,this.justSetValidationError=!1,this.dateSetLast=null,this.previousDate=null,this.overlayOpenDate=null,this.debugVerbose("Core initialized for input
1:",e.id||e.name)}init(e){this.datepicker&&this.containerElement?this.debugVerbose("Already initialized for container:",e):(this.#k(),this.containerElement=document.getElementById(e),this.datepickerDialog=this.containerElement.querySelector(".datepicker-dropdown"),this.#D(),this.#S(),this.debugVerbose("Core initialization complete"))}open(){this.datepicker&&!this.isOpen&&(this.datepicker.show(),this.#E())}close(){this.userInteracted=!0,this.datepicker&&this.isOpen&&(this.datepicker.hide(),this.#x(),setTimeout(()=>{this.#N()},Oe.Dr.liveRegionCleanup),this.debugVerbose("Datepicker closed"))}hasRecentValidationError(){return this.justSetValidationError}destroy(){this.close(),this.datepicker&&(this.datepicker.destroy(),this.datepicker=null),this.#x(),this.#N(),this.#_(),this.debugVerbose("Core destroyed")}#k(){const e=this.#A();!function(e){const t=window?.FHS_DATEPICKER_LOCALES;t&&e&&t[e]&&(Me.locales||(Me.locales={}),Me.locales[e]={...Me.locales[e]||{},...t[e]||{}})}(e);const t=Me.locales&&Me.locales[e]?e:"en";this.datepicker=new Me(this.inputElement,{autoHide:!1,beforeShowDay:this.#C.bind(this),beforeShowMonth:this.#T.bind(this),beforeShowYear:this.#M.bind(this),beforeShowDecade:this.#O.bind(this),clearButton:!1,datesDisabled:this.#L.bind(this),language:t,minDate:new Date,updateOnBlur:!1,weekStart:0})}#A(){const e=document?.documentElement?.lang||"";if(!e)return"en";const t=e.toLowerCase().split("-");return"zh"===t[0]&&["hant","hans"].includes(t[1])?`zh-${t[1]}`:t[0]}#D(){this.inputElement.addEventListener("show",this.#R.bind(this)),this.inputElement.addEventListener("hide",this.#I.bind(this)),this.inputElement.addEventListener("changeDate",this.#s.bind(this)),this.inputElement.addEventListener("keydown",this.#P.bind(this),{capture:!0}),this.inputElement.addEventListener("blur",this.#F.bind(this)),this.inputElement.addEventListener("input",this.#j.bind(this)),this.inputElement.addEventListener("focus",this.#$.bind(this))}#S(){(0,Pe.W)(this.inputElement,"expanded","false"),(0,Pe.W)(this.inputElement,"invalid","false"),(0,Pe.W)(this.inputElement,"haspopup","dialog"),this.inputElement.setAttribute("role","combobox")}#$(){this.isOpen||this.datepicker.show()}#P(e){if(!this.datepicker.picker.active&&"ArrowDown"===e.key)e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.datepicker.show()}#F(){if(!this.inputElement)return;const e=this.inputElement.value.trim();if(!e)return void this.options.onError({type:"clear",msg:""});const t=(0,Ie.Oi)(e);if(!t||isNaN(t.getTime()))this.justSetValidationError=!0,this.options.onError({type:"invalid",msg:this.options.getA11yStrings("errorInvalid")||"Date is invalid. Accepted formats are MM/DD/YYYY or MM-DD-YYYY"}),setTimeout(()=>{this.justSetValidationError=!1},Oe.Dr.announce);else{const e=this.options.validate(t);e?this.options.onError(e):(0,Ie.ny)(new Date(this.datepicker.getDate()),t)?this.options.onChange(t,!1):(this.datepicker.setDate(t),this.options.onChange(t))}}#j(e){if(!this.inputElement)return;const t=e.target.value.trim();if(t){const e=new Date(t);if(!isNaN(e.getTime())){"true"===this.inputElement.getAttribute("aria-invalid")&&this.options.onError({type:"clear",msg:""}),this.datepicker.setDate(e)}}else{"true"===this.inputElement.getAttribute("aria-invalid")&&this.options.onError({type:"clear",msg:""}),this.datepicker.setDate({clear:!0}),this.options.onChange(null,!0)}}#R(){this.overlayOpenDate=(0,Ie.Oi)(this.inputElement.value)??null,this.justOpenedAt=Date.now(),this.userInteracted=!1,this.suppressPrematureHide=!1,this.isOpen=!0,this.#E(),(0,Pe.W)(this.inputElement,"expanded","true"),this.#H(),this.#B(),this.#V(),this.#z(),window.innerWidth<768&&setTimeout(()=>{this.inputElement.blur()},0),this.debugVerbose("Datepicker opened")}#I(){if(!this.userInteracted&&!this.suppressPrematureHide&&Date.now()-this.justOpenedAt<200)return this.suppressPrematureHide=!0,void this.datepicker.show();this.isOpen=!1,this.#x(),(0,Pe.W)(this.inputElement,"expanded","false"),this.#Y(),this.#_(),setTimeout(()=>{this.#N()},Oe.Dr.liveRegionCleanup),this.debugVerbose("Datepicker closed")}#s(e){this.userInteracted=!0;const t=e.detail.date;if(!t)return void this.debug("[ERROR] No date in event, returning");const i=(0,Ie.ny)(t,this.dateSetLast),n=this.options.validate(t);if(n)return this.debug("[ERROR] Validation error:",n),void this.options.onError(n);this.debugVerbose("Date is valid, announcing and calling onChange"),this.#U(t),this.options.onChange(t,!i,!this.isMobile),this.previousDate=this.dateSetLast,this.dateSetLast=t}#H(){this.liveRegion||(this.liveRegion=document.createElement("div"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.className="sr-only",this.liveRegion.id=`datepicker-live-region-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,this.inputElement.parentNode.insertBefore(this.liveRegion,this.inputElement.nextSibling),this.liveRegionQueue=new Le.A(this.liveRegion),this.debugVerbose("Live region created:",this.liveRegion.id))}#N(){this.liveRegion&&(this.liveRegion.remove(),this.liveRegion=null,this.liveRegionQueue=null)}#_(){this.viewObserver&&(this.viewObserver.disconnect(),this.viewObserver=null),this.keyboardHandler=null}#B(){const e=this.options.getA11yStrings("calendarOpen");this.#W(e)}#Y(){const e=this.options.getA11yStrings("calendarClose");this.#W(e,500)}#U(e){const t=e.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),i=this.options.getA11yStrings("selectedDate",[t])||`${t}`;this.#W(i)}#W(e,t=Oe.Dr.announce){e&&this.liveRegionQueue?this.liveRegionQueue.announce(e,t):this.debug("[ERROR] #announceToScreenReader: no message or live region queue",{message:e,isLiveRegionQueue:!!this.liveRegionQueue,delay:t})}#V(){this.datepickerDialog||(this.datepickerDialog=this.containerElement.querySelector(".datepicker-dropdown")),setTimeout(()=>{const e=this.datepickerDialog.querySelector(".datepicker-grid");if(e){e.setAttribute("role","grid"),e.setAttribute("aria-label","Calendar");const t=this.datepickerDialog.querySelector(".prev-btn"),i=this.datepickerDialog.querySelector(".next-btn");t&&t.setAttribute("aria-label",this.options.getA11yStrings("previousMonth")),i&&i.setAttribute("aria-label",this.options.getA11yStrings("nextMonth"));this.datepickerDialog.querySelectorAll(".datepicker-cell").forEach(e
1=>{e.setAttribute("role","gridcell"),e.classList.contains("disabled")&&(e.setAttribute("aria-disabled","true"),e.setAttribute("aria-label",this.options.getA11yStrings("unavailableDate")))});const n=this.datepickerDialog.querySelector(".datepicker-title");n&&n.setAttribute("role","status"),this.datepickerDialog&&(this.datepickerDialog.setAttribute("role","dialog"),this.datepickerDialog.setAttribute("aria-modal","true"),this.datepickerDialog.setAttribute("aria-label","Choose date"));if(!this.datepickerDialog.querySelector(".datepicker-instructions")){const e=document.createElement("div");e.className="datepicker-instructions sr-only",e.setAttribute("role","status"),e.textContent=this.options.getA11yStrings("instructions"),this.datepickerDialog.appendChild(e)}}},Oe.Dr.announce)}#z(){(this.breakpointManager.isInitialized()?this.breakpointManager.isMobile():window.innerWidth<768)||(this.keyboardHandler=e=>{if(this.datepicker?.picker?.active&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)){const t=["ArrowLeft","ArrowRight"].includes(e.key),i=["ArrowUp","ArrowDown"].includes(e.key),n=e.ctrlKey||e.metaKey,a=i&&n;if(t&&n)return this.debugVerbose("[A11Y] Month-shift navigation detected:",{key:e.key,ctrlKey:e.ctrlKey,metaKey:e.metaKey}),this.isKeyboardNavigating=!0,void setTimeout(()=>{this.#K(),this.isKeyboardNavigating=!1},150);a&&(this.debug("[A11Y] Selector view (date, month, year) navigation detected:",{key:e.key,ctrlKey:e.ctrlKey,metaKey:e.metaKey,currentView:this.currentView}),this.isKeyboardNavigating=!0,setTimeout(()=>{this.#q(),this.isKeyboardNavigating=!1},150)),this.isKeyboardNavigating=!0,setTimeout(()=>{this.isKeyboardNavigating=!1},300),this.debugVerbose("[A11Y] Keyboard navigation captured:",{key:e.key,ctrlKey:e.ctrlKey,metaKey:e.metaKey,active:this.datepicker.picker.active}),setTimeout(()=>{this.#G()},Oe.Dr.announce)}})}#K(){if(!this.datepicker?.picker?.active)return;this.debugVerbose("[A11Y] announceMonthNavigation called");const e=this.datepickerDialog.querySelector(".datepicker-cell.focused"),t=new Date(parseInt(e.dataset.date)).getFullYear(),i=[];i.push(t);const n=`${this.options.getA11yStrings("monthView",i)||`Now in Month selection for ${t}.`}`;this.#W(n,Oe.Dr.announce),setTimeout(()=>{this.#G()},Oe.Dr.announceImmediateFollowUpDelay)}#q(){if(!this.datepicker?.picker?.active)return;const e=new Date(this.inputElement.value),t=new Intl.DateTimeFormat("en-US",{month:"long",year:"numeric"}).format(e).split(" "),i=t[0],n=t[1];let a,r=[];if(this.currentView===Oe.Pp.DateView)r.push(`${i} ${n}`),a="dateView";else if(this.currentView===Oe.Pp.MonthView)r.push(n),a="monthView";else if(this.currentView===Oe.Pp.YearView)a="yearView";else{if(this.currentView!==Oe.Pp.DecadeView)throw new Error(`[ERROR] #announceVie
1wNavigation: invalid view: ${this.currentView}`);a="decadeView"}const s=this.options.getA11yStrings(a,r);this.#W(s,Oe.Dr.announce)}#G(){if(!this.datepicker?.picker?.active)return void this.debug("[ERROR] announceCurrentFocusedDate: datepicker not active");const e=this.datepickerDialog.querySelector(".datepicker-cell.focused");if(!e)return void this.debug("[ERROR] announceCurrentFocusedDate: no focused date element found");const t=e.classList.contains("disabled"),i=e.classList.contains("other-month"),n=e.classList.contains("past"),a=t||i||n;if(this.debugVerbose("[A11Y] announceCurrentFocusedDate: processing element",{text:e.textContent,dataDate:e.getAttribute("data-date"),classes:e.className,isDisabled:t,isOtherMonth:i,isPast:n,isInvalid:a}),a){const n=e.textContent,a=`${n}, ${this.options.getA11yStrings("unavailableDate")}`;return this.debug("[ERROR] Invalid date announcement:",{announcement:a,dateText:n,reason:t?"disabled":i?"other-month":"past"}),void this.#W(a,Oe.Dr.announceFocusDelay)}const r=e.getAttribute("data-date");if(r){const t=parseInt(r),i=new Date(t);if(this.debugVerbose("[A11Y] announceCurrentFocusedDate: parsed date from data-date:",i),!isNaN(i.getTime())){const t=this.#J(i);return this.debug("[A11Y] Focused date announcement:",{announcement:t,date:i.toISOString(),element:e.textContent}),void this.#W(t,Oe.Dr.announceFocusDelay)}}
1this.debug("[ERROR] announceCurrentFocusedDate: no valid date found")}#J(e){return e.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"})}#L(e,t){const i=new Date,n=new Date(i.getFullYear(),i.getMonth(),i.getDate()),a=e.getTime()<n.getTime();return t===Oe.Pp.DateView?a:t===Oe.Pp.MonthView?a&&e.getMonth()!==i.getMonth():t===Oe.Pp.YearView?a&&e.getFullYear()!==i.getFullYear():t===Oe.Pp.DecadeView?a&&e.getFullYear()!==10*Math.floor(i.getFullYear()/10):void 0}#C(e){this.currentView=Oe.Pp.DateView;const t=e.getTime()<Date.now()-864e5,i=this.#Q(e);let n="",a=e.toLocaleDateString();return t&&(n+=" past-date",a+=`, ${this.options.getA11yStrings("pastDate")}`),i&&(n+=" today",a+=`, ${this.options.getA11yStrings("today")}`),{enabled:!t,classes:n.trim(),tooltip:a}}#T(){this.currentView=Oe.Pp.MonthView}#M(){this.currentView=Oe.Pp.YearView}#O(){this.currentView=Oe.Pp.DecadeView}#Q(e){const t=new Date;return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}onGlobalKeydown=e=>{this.keyboardHandler&&this.keyboardHandler(e)};onGlobalClick=e=>{if(!this.isOpen)return;const t=this.datepickerDialog,i=this.containerElement.querySelector(".datepicker-dropdown.datepicker-mobile-overlay"),n=t&&t.contains(e.target)||i&&i.contains(e.target),a=this.inputElement.contains(e.target),r=e.target.matches(".datepicker-nav, .datepicker-nav *, .datepicker-cell, .datepicker-cell *, .datepicker-title, .datepicker-title *"),s=e.target.matches(".datepicker-mobile-overlay, .datepicker-mobile-overlay *, .activity-datepicker-container, .activity-datepicker-container *");n||a||r||s||setTimeout(()=>{this.isOpen&&(this.close(),this.currentView=Oe.Pp.DateView)},50)};#E(){this._globalHandlersAttached||(document.addEventListener("keydown",this.onGlobalKeydown,!0),document.addEventListener("click",this.onGlobalClick,!0),this._globalHandlersAttached=!0)}#x(){this._globalHandlersAttached&&(document.removeEventListener("keydown",this.onGlobalKeydown,!0),document.removeEventListener("click",this.onGlobalClick,!0),this._globalHandlersAttached=!1)}get isMobile(){return this.breakpointManager.isInitialized()?this.breakpointManager.isMobile():window.innerWidth<768}updateUrlParams(e){const t=new URLSearchParams(window.location.search),i=(0,Ie.iO)(e);t.set(`${Oe._b.startDate}_${this.options.rowIndex}`,i),t.set(`${Oe._b.endDate}_${this.options.rowIndex}`,i),t.set(`${Oe._b.rangeType}_${this.options.rowIndex}`,"date-range"),t.set(`${Oe._b.action}_${this.options.rowIndex}`,"activity_search"),this.url.search=t.toString(),window.history.pushState({},"",this.url.toString())}resetUrlParams(){const e=new URLSearchParams(window.location.search);e.delete(`${Oe._b.startDate}_${this.options.rowIndex}`),e.delete(`${Oe._b.endDate}_${this.options.rowIndex}`),e.delete(`${Oe._b.rangeType}_${this.options.rowIndex}`),e.delete(`${Oe._b.action}_${this.options.rowIndex}`),e.delete(`${Oe._b.qsb}_${this.options.rowIndex}`),e.delete(`${Oe._b.pageNumber}_${this.options.rowIndex}`),window.history.pushState({},"",`${location.pathname}?${e}`)}}},7717:function(e,t,i){"use strict";i.d(t,{$p:function(){return l},DB:function(){return d},EW:function(){return a},Gw:function(){return p},Hi:function(){return g},Oi:function(){return n},Pd:function(){return f},cJ:function(){return u},iO:function(){return c},l4:function(){return s},ny:function(){return r},ow:function(){return o},tW:function(){return m},y$:function(){return h}});const n=e=>{if(!e)return null;const t=e.trim().match(/^(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2,4})$/);if(!t)return null;let[i,n,a,r]=t.map(Number);if(r<100&&(r+=2e3),n<1||n>12)return null;if(a<1||a>31)return null;if(2===n){if(a>(r%4==0&&r%100!=0||r%400==0?29:28))return null}else if(a>[31,28,31,30,31,30,31,31,30,31,30,31][n-1])return null;const s=new Date(r,n-1,a);return s.getFullYear()!==r||s.getMonth()!==n-1||s.getDate()!==a||isNaN(s.getTime())?null:s},a=e=>{if(!e)return null;const t=e.trim().match(/^(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})$/);if(!t)return null;const[i,n,a,r]=t.map(Number),s=new Date(n,a-1,r);return isNaN(s.getTime())?null:s},r=(e,t)=>!(!e||!t)&&e.getTime()===t.getTime();function s(e){return 24*e*60*60*1e3}function o(e){return e&&e.getMonth?`${e.getMonth()+1}/${e.getDate()}/${e.getFullYear()}`:""}function c(e){return e&&e.getFullYear?`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`:""}function l(e,t,i=!1){const n=new Date(e),a={month:"long",day:"numeric"},r=t.replace(/_/g,"-");return i&&(a.year="numeric"),n.toLocaleDateString(r,a)}function d(e,t){if(t.length){let i=t[t.length-1].getTime();return Array.from({length:e},(e,t)=>new Date(i+s(t+1)))}}function u(e,t,i){return i?.startDate&&"object"==typeof i.startDate?[i.startDate]:(e.find(`.datepicker-${t}`).addClass("-error"),console.error("Invalid datepicker configuration"),[])}const h=(e,t=!0,i=[])=>{const n=new Date,a=new Date(n.getTime()+s(1)),r=new Date(n.getTime()+s(6)),o=new Date(n.getTime()+s(29));let c=n,l=new Date(n.getTime()+s(2));return"this-month"===e?l=o:"this-weekend"===e?(c=new Date(n.setDate(n.getDate()+((7-n.getDay())%7+5)%7)),l=new Date(c.getTime()+s(2))):"this-week"===e?l=r:"today"===e?t||(l=n):"tomorrow"===e&&(c=a,l=t?new Date(a.getTime()+s(2)):a),function(e,t,i){if(e===t)i.push(e);else for(;e<=t;){let t=new Date(e);i.push(t),e.setDate(e.getDate()+1)}return i}(c,l,i)};function p(e,t,i,n,a){t.html(l(e.dates[0],a)),e.dates.length>1?(i.show(),n.html(l(e.dates[e.dates.length-1],a))):(i.hide(),n.html(""))}function f(e,t,i,n){const a=new URLSearchParams(window.location.search);let r="action";n&&(r=r+"_"+n,e=e+"_"+n),a.set(r,i),a.set(e,t);for(const t of a.values())t||a.delete(e);window.history.replaceState({},"",`${location.pathname}?${a}`)}function g(e,t){const i=new URLSearchParams(window.location.search);t&&(e=e+"_"+t),i.delete(e),window.history.replaceState({},"",`${location.pathname}?${i}`)}const m=(e,t)=>
1{const i=e.value?"false":"true";t.setAttribute("aria-disabled",i)}},8201:function(e,t,i){"use strict";i.r(t);var n=i(9418),a=i(1860),r=i(7717);window.jQuery,$(".activity-search").each(function(){const e=$(this);let t=new URLSearchParams(window.location.search),i=[],s=[],o={},c=[];const l=e.find(".activity-search-form-js");let d=l.attr("id"),u=l.data("search-index"),h=!0;const p=e.find(".data-container"),f=e.find(".no_results"),g=e.find(".activity-search-no-results"),m=e.find(".activity-grid-on-load"),b=e.find(".activity-search-headline"),y=e.find(".data-container").data("no-results"),v=e.find(".data-container").data("site-language");let w=e.find(".datepicker-"+u);const k=e.find(".activity-search-submit"),D=e.find(".pagination-container"),S=e.find(".loader"),E=e.find(`#search-form-${u}`),x=e.find(".activity-date-page"),N=(e.find(".js-filter-group"),e.find(".start-date-display")),_=e.find(".end-date-display"),A=e.find(".date-divider"),C=e.find(".activity-search-results-wrapper"),T=e.find(".data-container").data("wants-data-on-load")||t.has("range_type_"+u),M=e.hasClass("activity-wants-filtering")||e.find(".activity-search-wrapper").hasClass("activity-wants-filtering");let O;const L=()=>O||(O=window.ActivitySearchBlockDatepickers?.getByFormId(d),O);let R;const I=(e=!1)=>(R&&!e||(R=L()?.datepickerObject),R),P=e.find(".quick-search-button"),F=(0,a.Hd)();function j(t,l="âº",d=1,w=!1,k=!1){D.pagination({dataSource:F,pageSize:1,locator:"data",totalNumber:Math.ceil(t.length),showPageNumbers:!1,nextText:l,prevText:"â¹",pageNumber:d,className:"paginationjs-fh paginationjs-big",ajaxFunction:e=>{const i=(e.data.pageNumber-1)*e.data.pageSize,n=t.slice(i,i+1);z(!0,k?s:n),g.hide(),b.hide(),x.hide(),p.hide(),e.type="POST";const a=document.querySelector("[data-taxonomy-term]").dataset.taxonomyTerm;N.text(""),_.text("");const c=`${u}-${(0,r.ow)(t[i])}`;if(o.hasOwnProperty(c)){const t=[];for(let e=0;e<n.length;e++){const i=(0,r.ow)(n[e]),a=`${u}-${i}`;o.hasOwnProperty(a)&&t.push(o[a])}t.dates=n,t.taxonomy=a,e.success({data:t})}else{const t=U(n);t.dates=n,t.taxonomy=a,e.success({data:t})}},afterPaging:s=>{Math.ceil(D.data("pagination").model.totalNumber/D.data("pagination").model.pageSize),x.text((0,r.$p)(t[s-1],v,!0)),e.find(".paginationjs-prev").after(n.A.sanitize(`<li class="paginationjs-date"><span>${x.text()}</span></li>`));const l=new Date;l.setHours(0,0,0,0);const d=new Date(t[0]);if(d.setHours(0,0,0,0),s>1||d.getTime()>l.getTime()){e.find(".paginationjs-prev").removeClass("disabled");const n=n=>{n?.preventDefault?.(),n?.stopPropagation?.();const c=new Date(t[0].getTime()+(0,r.l4)(-1));(0,a.PA)(E,e),s>1?D.pagination("go",s-1):(0===i.filter(e=>e.getTime()===c.getTime()).length&&i.unshift(c),z(!0,[c]),U([c]).then(e=>{e.forEach(e=>{const t=`${u}-${e.date}`;o[t]=e})}).then(()=>{j(i,"âº",1,!0),z(!1)}))};e.find(".paginationjs-prev a").off("click").on("click",n)}else e.find(".paginationjs-prev").addClass("disabled");1===s&&!k&&c.length&&H(!0);const h=(0,r.DB)(1,i);e.find(".paginationjs-next a").attr({title:"Show the next day"}),e.find(".paginationjs-next a").html("<span>âº</span>"),e.find(".paginationjs-next a").off("click").on("click",t=>{t?.preventDefault?.(),t?.stopPropagation?.(),s<i.length?D.pagination("go",s+1):((0,a.PA)(E,e),i.push(...h),z(!0,h),U(h).then(e=>{e.forEach(e=>{const t=`${u}-${e.date}`;o[t]=e})}).then(()=>{j(i,"âº",s+1,!0),z(!1)}))}),e.find(".paginationjs-next a").text("âº");const p=t[s-1],f=L();f&&p&&(f.handleDateSelection(p,!0,!1),f.inputElement&&(f.inputElement.value=(0,r.ow)(p)),f.core?.datepicker&&f.core.datepicker.setDate(p))},callback:function(t){h&&!k&&(0,a.PA)(E,e);const s=p.find(".activity-search-results-row");if(s.remove(),g.hide(),m.hide(),"function"==typeof t.then)t.then(a=>{let s=[];for(let e=0;e<a.length;e++)s.push(a[e].no_results);if(s.includes(!1))a.forEach(t=>{p.append(n.A.sanitize(t.html));const i=`${u}-${t.date}`;o[i]=t,e.find(".no_results").text(y);const a=p.find(".activity-search-results-row").last(),s=(0,r.Oi)(t.date)||(0,r.EW)(t.date),c=s?(0,r.iO)(s):t.date;a.attr("data-results-date",c),a.find(".activity-grid .grid-activity").attr("data-activity-date",c)}),b.show(),p.show(),D.show(),m.hide(),f.hide(),c.length&&k&&H(!0),k=!1;
1else{a.forEach(e=>{const t=`${u}-${e.date}`;o[t]={no_results:!0},k&&(p.show(),c.push(e.date))});const e=a.some(e=>e&&"object"==typeof e&&e.error);if(k||b.show(),g.empty(),g.append(n.A.sanitize(y)),g.show(),k&&!s.includes(!1))if(e){g.empty();const e=y||p.data("no-results")||"";g.append(n.A.sanitize(e)),g.show()}else i=a.length<3||3===i.length?i:i.splice(3),j(i,"âº",d,!1,!0)}k||s.includes(!1)||m.show(),(0,r.Gw)(t,N,A,_,v)}).then(()=>{e.find(".no_results").text(y),V(s,!0,k)});else{const i=t.map(e=>!1!==e.no_results);t.forEach(t=>{if(!i.includes(!1))return H(),p.show(),b.show(),m.show(),void D.show();p.append(n.A.sanitize(t.html));const a=p.find(".activity-search-results-row").last(),s=(0,r.Oi)(t.date)||(0,r.EW)(t.date),o=s?(0,r.iO)(s):t.date;a.attr("data-results-date",o),a.find(".activity-grid .grid-activity").attr("data-activity-date",o),p.show(),b.show(),D.show(),e.find(".no_results").text(y)}),(0,r.Gw)(t,N,A,_,v),V(s,w)}e.find(".paginationjs-next").removeClass("disabled"),f.text(p.data("no-results"))},beforePaging:function(e){(0,r.Pd)("page_number",e,"activity_search",u)}})}function H(e){g.empty();let t=[];t=e?["No availabilities found",(0,r.$p)(c[0],v)].join(" "):y,g.append(n.A.sanitize(t)),g.show()}function B(e){const t=new FormData;return t.append("action","activity_search"),t.append("date",n.A.sanitize((0,r.ow)(e))),t.append("locale",n.A.sanitize(v)),["wants_learn_more","wants_book_now","wants_call_to_book","wants_list_view","searchable_activity_ids","public_headlines","wants_individual_times","wants_end_time","wants_individual_public_headlines","wants_time_and_individual_public_headline","affiliate_activities","taxonomy_slugs"].forEach(e=>t.append(e,n.A.sanitize(p.data(e.replace(/_/gi,"-"))))),function(e){const t=E.find(".js-term-filter input:checked");if(t.length<1)return e;const i=[];$.each(t,(e,n)=>{const a=n.dataset.taxonomy,r=n.className.split("-")[1];i[a]||(i[a]=[]),t.is(`[data-parent=t-${r}]`)||i[a].push(r)});for(const t in i){const a=t+"_terms";if(i.hasOwnProperty(t)){const r=i[t].join(",");e.set(a,n.A.sanitize(r))}}}(t),t}function V(t,i,n=!1){if(z(!1,[]),h&&!n&&((0,a.PA)(E,e),i&&t.length&&t.length<3)){const i=p.find(".activity-search-results-row")[t.length];(0,a.PA)(i,e)}T&&!h&&(h=!0),window.mixpanel?.fareharbor.track("fhme-sbd-view-results",{"search-index":u})}function z(t,i=[],n){const a=e.find(".activity-search-form__wrapper");if(!0===t){let t=(0,r.$p)(i[0],v);e.find(".js-date-text").text(t),S.hasClass("-visible")||S.addClass("-visible"),a.prop({disabled:!0,"aria-busy":!0}),D.prop({disabled:!0,"aria-busy":!0}),M&&e.find("button").prop({disabled:!0,"aria-busy":!0})}else S.removeClass("-visible"),a.prop({disabled:!1,"aria-busy":!1}),D.prop({disabled:!1,"aria-busy":!1}),M&&e.find("button").prop({disabled:!1,"aria-busy":!1})}function Y(t,n,r=!1){if(D.hide(),i=[],o={},"date-range"!==t){const t=L();t&&t.clearDatepicker(),e.find(".activity-search-form__events-for").find(".active").removeClass("active"),n.target.classList.add("active")}(0,a.x8)()}const U=async e=>{const t=e.map(e=>(async e=>{const t=await fetch(F,{method:"POST",body:B(e)});if(!t.ok)return console.error("[SBD] activity_search AJAX failed",t.status),{no_results:!0,date:(0,r.ow)(e),error:`AJAX ${t.status}`};const i=await t.json();return i&&"object"==typeof i?i:(console.error("[SBD] activity_search returned invalid JSON",i),{no_results:!0,date:(0,r.ow)(e),error:"Invalid activity_search response"})})(e));return await Promise.all(t)},W=function(e){e.preventDefault();const t=$(this).closest(".activity-search");t.find(".js-filter-group").removeClass("js-active");const n=$(e.target),a=$(e.target).hasClass("quick-search-button"),o=$(e.target).hasClass("activity-search-form-js"),l=$(e.target).data("range-type")||"date-range",d=L(),h=I(!0);let p,f;if(a?window.mixpanel?.fareharbor.track("fhme-sbd-quick-search",{"search-range":l,"search-index":u}):o&&window.mixpanel?.fareharbor.track("fhme-sbd-search-button",{"search-range":w.val(),"search-index":u}),Y(l,e),o&&d.clearQuickSearchButtons(!0),(0,r.Pd)("range_type",l,"activity_search",u),(0,r.Pd)("action","activity_search",null,u),a&&"date-range"===l?(f=n.data("start-date"),p=(0,r.EW)(f),i=[p],s=[...i]):a?(i=(0,r.y$)(l,!1,i),s=[...i],p=i[0],f=(0,r.iO)(p)):(i=[(0,r.Oi)(w.val())],s=[...i],p=i[0],f=(0,r.iO)(p)),(0,r.Pd)("start_date",f,"activity_search",u),(0,r.Pd)("end_date",f,"activity_search",u),a){const e=n.attr("name");(0,r.Pd)("quick_search_button",e,"activity_search",u),d.clearQuickSearchButtons(),n.addClass("active")}h.startDate=p,h.endDate=p,d.inputElement.value=(0,r.ow)(p),d.core.datepicker.setDate(p),C.addClass("-show"),M&&t.find(".results-display").hide(),g.hide(),c=[],j(i,"âº",1,!1,!0),d?.datepickerClose()};if("date-range"===t.get("range_type_"+u)){const e=t.get("start_date_"+u);
1if(e){$(w).val((0,r.ow)((0,r.EW)(e)));const t=I();t&&(t.startDate=(0,r.EW)(e)),$(".start-date").val(e),$(".end-date").val(e)}}if(T){let n,a=1;if(t.has("page_number_"+u)){const e=t.get("page_number_"+u),i=parseInt(e,10);a=Number.isFinite(i)&&i>0?i:1}if(t.has("action_"+u)){n=t.get("range_type_"+u);const e=t.get("quick_search_button_"+u);e&&P.each((t,i)=>{const n=$(i),a=n.attr("data-range-type"),r=n.attr("value");a!==e&&r!==e||i.classList.add("active")})}else n=P.first().data("range-type");h=!1,C.addClass("-show"),M&&e.find(".results-display").hide();const o=I();"date-range"===n?($(".activity-search-submit"),i=(0,r.cJ)(e,u,o),s=[...i]):(i=(0,r.y$)(n,!1,i),s=[...i],o.startDate=i[0],o.endDate=i[0],O.inputElement.value=(0,r.ow)(i[0]),O.core?.datepicker&&O.core.datepicker.setDate(i[0])),j(i,"âº",a,!1,!0)}P.on("click",W),E.on("submit",W);const K=k[0],q=w[0],G=e=>{const t=q.value;if((0,r.tW)(q,K),e.key&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation()),t)try{const e=(0,r.Oi)(t),i=L();e&&!isNaN(e.getTime())?i.toggleDateError("invalid",!1):i.toggleDateError("invalid",!0)}catch(e){}!e.key||e.key};["input","keydown","changeDate"].forEach(e=>{q.addEventListener(e,G)}),(0,r.tW)(q,K),e.find(".activity-search-form__filter-tags--clear-search").on("click",function(t){t.preventDefault();const n=L();n&&n.clearDatepicker();const a=new URLSearchParams(window.location.search).get(`taxonomy_slugs_${u}`);a&&(a.split(",").forEach(e=>{(0,r.Hi)(`${e}_terms`,u)}),(0,r.Hi)("taxonomy_slugs",u),e.find('input[type="checkbox"]:checked').prop("checked",!1)),C.removeClass("-show"),D.hide(),m.show(),p.find(".activity-search-results-row").remove(),p.hide(),b.hide(),g.hide(),e.find(".activity-search-form__events-for .active").removeClass("active"),i=[],o={},c=[],(0,r.tW)(q,K),window.mixpanel?.fareharbor&&window.mixpanel.fareharbor.track("fhme-sbd-clear-search",{"search-index":u})}),K.parentElement.addEventListener("click",e=>{if("false"===K.getAttribute("aria-disabled"))return;const t=L();t&&(e.preventDefault(),e.stopPropagation(),t.toggleDateError("invalid",!0,e))})})},9021:function(e,t,i){"use strict";function n(e){return new Date(e).setHours(0,0,0,0)}function a(){return(new Date).setHours(0,0,0,0)}function r(...e){switch(e.length){case 0:return a();case 1:return n(e[0])}const t=new Date(0);return t.setFullYear(...e),t.setHours(0,0,0,0)}function s(e,t){const i=new Date(e);return i.setDate(i.getDate()+t)}function o(e,t){return s(e,7*t)}function c(e,t){const i=new Date(e),n=i.getMonth()+t;let a=n%12;a<0&&(a+=12);const r=i.setMonth(n);return i.getMonth()!==a?i.setDate(0):r}function l(e,t){const i=new Date(e),n=i.getMonth(),a=i.setFullYear(i.getFullYear()+t);return 1===n&&2===i.getMonth()?i.setDate(0):a}function d(e,t){return(e-t+7)%7}function u(e,t,i=0){const n=new Date(e).getDay();return s(e,d(t,i)-d(n,i))}function h(e,t){return Math.round((e-t)/6048e5)+1}function p(e){const t=u(e,4,1);return h(t,u(new Date(t).setMonth(0,4),4,1))}function f(e,t){const i=u(new Date(e).setMonth(0,1),t,t),n=u(e,t,t),a=h(n,i);if(a<53)return a;return n===u(new Date(e).setDate(32),t,t)?1:a}function g(e){return f(e,0)}function m(e){return f(e,6)}function b(e,t){const i=new Date(e).getFullYear();return Math.floor(i/t)*t}function y(e,t,i){if(1!==t&&2!==t)return e;const n=new Date(e);return 1===t?i?n.setMonth(n.getMonth()+1,0):n.setDate(1):i?n.setFullYear(n.getFullYear()+1,0,0):n.setMonth(0,1),n.setHours(0,0,0,0)}i.d(t,{Ec:function(){return a},J4:function(){return o},Ny:function(){return m},PS:function(){return c},Us:function(){return b},Y4:function(){return r},bi:function(){return y},e7:function(){return l},eH:function(){return u},fi:function(){return s},qG:function(){return p},qg:function(){return g},yy:function(){return n}})},9132:function(e,t,i){"use strict";i.d(t,{Dr:function(){return a},Pp:function(){return n},_b:function(){return s},lQ:function(){return r}});const n={DateView:0,MonthView:1,YearView:2,DecadeView:3},a={announce:100,announceFocusDelay:50,announceImmediateFollowUpDelay:1e3,liveRegionCleanup:2e3},r={invalid:{type:"invalid",dataAttr:"errorMessageDateInvalid",fallbackKey:"errorInvalid"},required:{type:"required",dataAttr:"errorMessageDateRequired",fallbackKey:"errorRequired"},pastDate:{type:"pastDate",dataAttr:"errorMessageDatePast",fallbackKey:"errorPastDate"},format:{type:"format",dataAttr:"errorMessageFormat",fallbackKey:"errorFormat"}},s={startDate:"start_date",endDate:"end_date",rangeType:"range_type",action:"action",qsb:"quick_search_button",pageNumber:"page_number"}},9418:function(e,t,i){"use strict";i.d(t,{A:function(){return oe}}); 2/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */ 3const{entries:n,setPrototypeOf:a,isFrozen:r,getPrototypeOf:s,getOwnPropertyDescriptor:o}=Object;let{freeze:c,seal:l,create:d}=Object,{apply:u,construct:h}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),l||(l=function(e){return e}),u||(u=function(e,t,i){return e.apply(t,i)}),h||(h=function(e,t){return new e(...t)});const p=A(Array.prototype.forEach),f=A(Array.prototype.lastIndexOf),g=A(Array.prototype.pop),m=A(Array.prototype.push),b=A(Array.prototype.splice),y=A(String.prototype.toLowerCase),v=A(String.prototype.toString),w=A(String.prototype.match),k=A(String.prototype.replace),D=A(String.prototype.indexOf),S=A(String.prototype.trim),E=A(Object.prototype.hasOwnProperty),x=A(RegExp.prototype.test),N=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return h(_,t)});var _;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return u(e,t,n)}}function C(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;a&&a(e,null);let n=t.length;for(;n--;){let a=t[n];if("string"==typeof a){const e=i(a);e!==a&&(r(t)||(t[n]=e),a=e)}e[a]=!0}return e}function T(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function M(e){const t=d(null);for(const[i,a]of n(e)){E(e,i)&&(Array.isArray(a)?t[i]=T(a):a&&"object"==typeof a&&a.constructor===Object?t[i]=M(a):t[i]=a)}return t}function O(e,t){for(;null!==e;){const i=o(e,t);if(i){if(i.get)return A(i.get);if("function"==typeof i.value)return A(i.value)}e=s(e)}return function(){return null}}const L=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),j=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=c(["#text"]),H=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
3spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),U=l(/<%[\w\W]*|[\w\W]*%>/gm),W=l(/\$\{[\w\W]*/gm),K=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),q=l(/^aria-[\-\w]+$/),G=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=l(/^(?:\w+script|data):/i),Q=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=l(/^html$/i),Z=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:q,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:Z,DATA_ATTR:K,DOCTYPE_NAME:X,ERB_EXPR:U,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:Y,TMPLIT_EXPR:W});const te=1,ie=3,ne=7,ae=8,re=9,se=function(){return"undefined"==typeof window?null:window};var oe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se();const i=t=>e(t);if(i.version="3.2.5",i.removed=[],!t||!t.document||t.document.nodeType!==re||!t.Element)return i.isSupported=!1,i;let{document:a}=t;const r=a,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:u,Element:h,NodeFilter:_,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:T,DOMParser:Y,trustedTypes:U}=t,W=h.prototype,K=O(W,"cloneNode"),q=O(W,"remove"),J=O(W,"nextSibling"),Q=O
vendor: 9,093 bytes, line 3
3(W,"childNodes"),Z=O(W,"parentNode");if("function"==typeof l){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let oe,ce="";const{implementation:le,createNodeIterator:de,createDocumentFragment:ue,getElementsByTagName:he}=a,{importNode:pe}=r;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof n&&"function"==typeof Z&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:ge,ERB_EXPR:me,TMPLIT_EXPR:be,DATA_ATTR:ye,ARIA_ATTR:ve,IS_SCRIPT_OR_DATA:we,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:De}=ee;let{IS_ALLOWED_URI:Se}=ee,Ee=null;const xe=C({},[...L,...R,...I,...F,...$]);let Ne=null;const _e=C({},[...H,...B,...V,...z]);let Ae=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Te=null,Me=!0,Oe=!0,Le=!1,Re=!0,Ie=!1,Pe=!0,Fe=!1,je=!1,$e=!1,He=!1,Be=!1,Ve=!1,ze=!0,Ye=!1,Ue=!0,We=!1,Ke={},qe=null;const Ge=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Je=null;const Qe=C({},["audio","video","img","source","image","track"]);let Xe=null;const Ze=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let nt=it,at=!1,rt=null;const st=C({},[et,tt,it],v);let ot=C({},["mi","mo","mn","ms","mtext"]),ct=C({},["annotation-xml"]);const lt=C({},["title","style","font","a","script"]);let dt=null;const ut=["application/xhtml+xml","text/html"];let ht=null,pt=null;const ft=a.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=M(e),dt=-1===ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ht="application/xhtml+xml"===dt?v:y,Ee=E(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,ht):xe,Ne=E(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,ht):_e,rt=E(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,v):st,Xe=E(e,"ADD_URI_SAFE_ATTR")?C(M(Ze),e.ADD_URI_SAFE_ATTR,ht):Ze,Je=E(e,"ADD_DATA_URI_TAGS")?C(M(Qe),e.ADD_DATA_URI_TAGS,ht):Qe,qe=E(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,ht):Ge,Ce=E(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,ht):{},Te=E(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,ht):{},Ke=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Me=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Pe=!1!==e.SAFE_FOR_XML,Fe=e.WHOLE_DOCUMENT||!1,He=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,Ve=e.RETURN_TRUSTED_TYPE||!1,$e=e.FORCE_BODY||!1,ze=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||G,nt=e.NAMESPACE||it,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,ct=e.HTML_INTEGRATION_POINTS||ct,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Oe=!1),Be&&(He=!0),Ke&&(Ee=C({},$),Ne=[],!0===Ke.html&&(C(Ee,L),C(Ne,H)),!0===Ke.svg&&(C(Ee,R),C(Ne,B),C(Ne,z)),!0===Ke.svgFilters&&(C(Ee,I),C(Ne,B),C(Ne,z)),!0===Ke.mathMl&&(C(Ee,F),C(Ne,V),C(Ne,z))),e.ADD_TAGS&&(Ee===xe&&(Ee=M(Ee)),C(Ee,e.ADD_TAGS,ht)),e.ADD_ATTR&&(Ne===_e&&(Ne=M(Ne)),C(Ne,e.ADD_ATTR,ht)),e.ADD_URI_SAFE_ATTR&&C(Xe,e.ADD_URI_SAFE_ATTR,ht),e.FORBID_CONTENTS&&(qe===Ge&&(qe=M(qe)),C(qe,e.FORBID_CONTENTS,ht)),Ue&&(Ee["#text"]=!0),Fe&&C(Ee,["html","head","body"]),Ee.table&&(C(Ee,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');oe=e.TRUSTED_TYPES_POLICY,ce=oe.createHTML("")}else void 0===oe&&(oe=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return e.createPolicy(a,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(U,s)),null!==oe&&"string"==typeof ce&&(ce=oe.createHTML(""));c&&c(e),pt=e}},bt=C({},[...R,...I,...P]),yt=C({},[...F,...j]),vt=function(e){m(i.removed,{element:e});try{Z(e).removeChild(e)}catch(t){q(e)}},wt=function(e,t){try{m(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(He||Be)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,i=null;if($e)e="<remove></remove>"+e;else{const t=w(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===dt&&nt===it&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=oe?oe.createHTML(e):e;if(nt===it)try{t=(new Y).parseFromString(n,dt)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(nt,"template",null);try{t.documentElement.innerHTML=at?ce:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(a.createTextNode(i),r.childNodes[0]||null),nt===it?he.call(t,Fe?"html":"body")[0]:Fe?t.documentElement:r},Dt=function(e){return de.call(e.ownerDocument||e,e,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT|_.SHOW_PROCESSING_INSTRUCTION|_.SHOW_CDATA_SECTION,null)},St=function(e){return e instanceof T&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof A)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Et=function(e){return"function"==typeof u&&e instanceof u};function xt(e,t,n){p(e,e=>{e.call(i,t,n,pt)})}const Nt=function(e){let t=null;if(xt(fe.beforeSanitizeElements,e,null),St(e))return vt(e),!0;const n=ht(e.nodeName);if(xt(fe.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),e.hasChildNodes()&&!Et(e.firstElementChild)&&x(/<[/\w!]/g,e.innerHTML)&&x(/<[/\w!]/g,e.textContent))return vt(e),!0;if(e.nodeType===ne)return vt(e),!0;if(Pe&&e.nodeType===ae&&x(/<[/\w]/g,e.data))return vt(e),!0;if(!Ee[n]||Ce[n]){if(!Ce[n]&&At(n)){if(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(Ue&&!qe[n]){const t=Z(e)||e.parentNode,i=Q(e)||e.childNodes;if(i&&t){for(let n=i.length-1;n>=0;--n){const a=K(i[n],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,J(e))}}}return vt(e),!0}return e instanceof h&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});const i=y(e.tagName),n=y(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===it?"svg"===i:t.namespaceURI===et?"svg"===i&&("annotation-xml"===n||ot[n]):Boolean(bt[i]):e.namespaceURI===et?t.namespaceURI===it?"math"===i:t.namespaceURI===tt?"math"===i&&ct[n]:Boolean(yt[i]):e.namespaceURI===it?!(t.namespaceURI===tt&&!ct[n])&&!(t.namespaceURI===et&&!ot[n])&&!yt[i]&&(lt[i]||!bt[i]):!("application/xhtml+xml"!==dt||!rt[e.namespaceURI]))}(e)?(vt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===ie&&(t=e.textContent,p([ge,me,be],e=>{t=k(t,e," ")}),e.textContent!==t&&(m(i.removed,{element:e.cloneNode()}),e.textContent=t)),xt(fe.afterSanitizeElements,e,null),!1):(vt(e),!0)},_t=function(e,t,i){if(ze&&("id"===t||"name"===t)&&(i in a||i in ft))return!1;if(Oe&&!Te[t]&&x(ye,t));else if(Me&&x(ve,t));else if(!Ne[t]||Te[t]){if(!(At(e)&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&x(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,i)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(i))))return!1}else if(Xe[t]);else if(x(Se,k(i,ke,"")));
3else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==D(i,"data:")||!Je[e]){if(Le&&!x(we,k(i,ke,"")));else if(i)return!1}else;return!0},At=function(e){return"annotation-xml"!==e&&w(e,De)},Ct=function(e){xt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let a=t.length;for(;a--;){const r=t[a],{name:s,namespaceURI:o,value:c}=r,l=ht(s);let d="value"===s?c:S(c);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,xt(fe.uponSanitizeAttribute,e,n),d=n.attrValue,!Ye||"id"!==l&&"name"!==l||(wt(s,e),d="user-content-"+d),Pe&&x(/((--!?|])>)|<\/(style|title)/i,d)){wt(s,e);continue}if(n.forceKeepAttr)continue;if(wt(s,e),!n.keepAttr)continue;if(!Re&&x(/\/>/i,d)){wt(s,e);continue}Ie&&p([ge,me,be],e=>{d=k(d,e," ")});const u=ht(e.nodeName);if(_t(u,l,d)){if(oe&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(o);else switch(U.getAttributeType(u,l)){case"TrustedHTML":d=oe.createHTML(d);break;case"TrustedScriptURL":d=oe.createScriptURL(d)}try{o?e.setAttributeNS(o,s,d):e.setAttribute(s,d),St(e)?vt(e):g(i.removed)}catch(e){}}}xt(fe.afterSanitizeAttributes,e,null)},Tt=function e(t){let i=null;const n=Dt(t);for(xt(fe.beforeSanitizeShadowDOM,t,null);i=n.nextNode();)xt(fe.uponSanitizeShadowNode,i,null),Nt(i),Ct(i),i.content instanceof o&&e(i.content);xt(fe.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,s=null,c=null;if(at=!e,at&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!i.isSupported)return e;if(je||mt(t),i.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=ht(e.nodeName);if(!Ee[t]||Ce[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)n=kt("\x3c!----\x3e"),a=n.ownerDocument.importNode(e,!0),a.nodeType===te&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!He&&!Ie&&!Fe&&-1===e.indexOf("<"))return oe&&Ve?oe.createHTML(e):e;if(n=kt(e),!n)return He?null:Ve?ce:""}n&&$e&&vt(n.firstChild);const l=Dt(We?e:n);for(;s=l.nextNode();)Nt(s),Ct(s),s.content instanceof o&&Tt(s.content);if(We)return e;if(He){if(Be)for(c=ue.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(c=pe.call(r,c,!0)),c}let d=Fe?n.outerHTML:n.innerHTML;return Fe&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&x(X,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Ie&&p([ge,me,be],e=>{d=k(d,e," ")}),oe&&Ve?oe.createHTML(d):d},i.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),je=!0},i.clearConfig=function(){pt=null,je=!1},i.isValidAttribute=function(e,t,i){pt||mt({});const n=ht(e),a=ht(t);return _t(n,a,i)},i.addHook=function(e,t){"function"==typeof t&&m(fe[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=f(fe[e],t);return-1===i?void 0:b(fe[e],i,1)[0]}return g(fe[e])},i.removeHooks=function(e){fe[e]=[]},i.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}()},9627:function(e,t,i){"use strict";i.d(t,{K:function(){return n}});const n=(e,t="basic")=>{if("undefined"==typeof window)return()=>{};const i=window.location.search.toLowerCase();const n=i.includes("debug=true")||i.includes("debug=a11y")||i.includes("debug=a11y-all"),a=i.includes("debug=a11y-all"),r="verbose"===t?a:n;return(...t)=>{r&&console.log(`[${e}]`,...t)}}},9890:function(e,t,i){"use strict";i.d(t,{A:function(){return n}});class n{#X=null;#Z=null;#ee=!1;#te=[];#ie=null;constructor(e){this.#te=e||[{eventName:"isSmallBreakpoint",size:"small",px:544},{eventName:"isMediumBreakpoint",size:"medium",px:768},{eventName:"isLargeBreakpoint",size:"large",px:992},{eventName:"isXLargeBreakpoint",size:"xLarge",px:1200}],this.setBreakpoint=this.setBreakpoint.bind(this),this.setDataset=this.setDataset.bind(this),this.resizeHandler=this.resizeHandler.bind(this)}static getInstance(){return window.breakpointManager||(window.breakpointManager=new n,window.breakpointManager.#ne()),window.breakpointManager}isInitialized(){return this.#ee&&null!==this.#X}isMobile(){return"small"===this.#X?.size||"medium"===this.#X?.size}isDesktop(){return"large"===this.#X?.size||"xLarge"===this.#X?.size}isBreakpoint(e){return this.#X?.size===e}#ae(){this.setBreakpoint(),this.#re(),this.#se(),this.#ee=!0}#ne(){return"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{this.#ae()}):this.#ae(),this}#re(){return this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),window.addEventListener("resize",this.resizeHandler),this}
3#se(){return this.#X&&!this.#Z&&this.setDataset({detail:{to:this.#X.size,isMobile:this.isMobile(),isDesktop:this.isDesktop()}}),window.addEventListener("breakpointChange",this.setDataset),this}setBreakpoint(){const e=window.innerWidth;let t=this.#te[this.#te.length-1];for(const i of this.#te)if(e<i.px){t=i;break}if(!this.#X||this.#X.size!==t.size){this.#Z=this.#X,this.#X=t,null!==this.#Z&&dispatchEvent(new CustomEvent(t.eventName));const i=new CustomEvent("breakpointChange",{detail:{from:this.#Z?.size,to:t.size,width:e,isMobile:this.isMobile(),isDesktop:this.isDesktop(),initial:null===this.#Z}});dispatchEvent(i)}return this.#ee=!0,this}resizeHandler(){this.#ie||(this.#ie=setTimeout(()=>{this.#ie=null,this.setBreakpoint()},66))}setDataset({detail:e}){document.documentElement.dataset.breakpoint=e.to,document.documentElement.dataset.isMobile=e.isMobile,document.documentElement.dataset.isDesktop=e.isDesktop}}}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(3301),i(4379),i(3958);var n=i(8201);fh=n}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.