1/*! For license information please see o5csf.e11cea41cd2bd1806515.js.LICENSE.txt */ 2(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[2945,9668],{50179(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>Cn});var a=n(77963),r=n(99750),i=n(14258),o=n(79704),s=n(56639);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p(a.key),a)}}function d(e,t,n){return t=f(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function v(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=l(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v(n=d(this,t,[e]),"uieName","calendar-sf-component"),v(n,"calendarInstance",null),v(n,"modifiers",{active:""}),n.componentName=e.componentName||n.uieName,n.ui={calendar:"calendar-sf-activity__calendar",calendarBtn:"calendar-sf-activity__button",heading:"calendar-sf-activity__heading",noEvents:"calendar-sf-activity__no-events",resultsHeading:"#results-heading"},n.modifiers={active:"is--active"},n.init(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),n=t,a=[{key:"saveSelectedDate",value:function(e){try{sessionStorage.setItem(t.SESSION_KEY,e)}catch(e){}}},{key:"restoreSelectedDate",value:function(){try{return sessionStorage.getItem(t.SESSION_KEY)||""}catch(e){return""}}},{key:"replaceArrowsWithButtons",value:function(){var e=this;[{selector:".flatpickr-prev-month",label:"Previous month",monthDelta:-1,instanceKey:"prevMonthNav"},{selector:".flatpickr-next-month",label:"Next month",monthDelta:1,instanceKey:"nextMonthNav"}].forEach(function(t){var n,a=t.selector,r=t.label,i=(t.monthDelta,t.instanceKey),o=document.querySelector(a);if(o&&"BUTTON"!==o.tagName){var s=document.createElement("button");s.setAttribute("type","button"),s.setAttribute("aria-label",r),s.setAttribute("tabindex","0"),s.className=o.className,s.innerHTML=o.innerHTML,null===(n=o.parentNode)||void 0===n||n.replaceChild(s,o),e.calendarInstance&&(e.calendarInstance[i]=s)}})}},{key:"announceToScreenReader",value:function(e){var t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.style.position="absolute",t.style.left="-10000px",t.style.width="1px",t.style.height="1px",t.style.overflow="hidden",t.textContent=e,document.body.appendChild(t),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},1e3)}},{key:"convertToTableStructure",value:function(){var e=this,t=document.querySelector(".flatpickr-innerContainer");if(t){var n=t.querySelector(".flatpickr-calendar-table");n&&n.remove();var a=t.querySelector(".flatpickr-weekdays"),i=t.querySelector(".flatpickr-days .dayContainer"),o=null==i?void 0:i.querySelectorAll(".flatpickr-day");if(a&&o){var s=document.createElement("table");s.className="flatpickr-calendar-table",s.setAttribute("role","grid"),s.setAttribute("aria-labelledby","flatpickr-month-label flatpickr-year-label");var l=document.createElement("thead"),c=document.createElement("tr"),d=["Su","Mo","Tu","We","Th","Fr","Sa"];
2["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].forEach(function(e,t){var n=document.createElement("th");n.setAttribute("scope","col"),n.className="flatpickr-weekday",n.setAttribute("abbr",e),n.textContent=d[t],c.appendChild(n)}),l.appendChild(c),s.appendChild(l);var u=document.createElement("tbody"),f=null,h=0;o.forEach(function(t){var n;0===h&&(f=document.createElement("tr"),u.appendChild(f));var a=document.createElement("td");a.className=t.className,t.dateObj&&(a.dateObj=t.dateObj);var i=t.dateObj,o=i?(0,r.Yk)(i.getMonth()):"",s=i?i.getDate():"",l=i?i.getFullYear():"";if(t.classList.contains("nextMonthDay")||t.classList.contains("prevMonthDay"))a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.classList.remove("day-has-event"),a.textContent=t.textContent;else if(t.classList.contains("day-has-event")&&!t.classList.contains("flatpickr-disabled")){if(a.setAttribute("tabindex",t.classList.contains("selected-date-custom")?"0":"-1"),a.setAttribute("aria-selected",t.classList.contains("selected-date-custom")?"true":"false"),a.setAttribute("aria-label","".concat(o," ").concat(s," ").concat(l)),t.classList.contains("today")&&a.setAttribute("aria-current","date"),i){var c=String(i.getMonth()+1).padStart(2,"0"),d=String(s).padStart(2,"0");a.setAttribute("data-date","".concat(l,"-").concat(c,"-").concat(d))}a.textContent=String(s||t.textContent),a.addEventListener("click",function(){i&&e.calendarInstance&&e.calendarInstance.setDate(i,!0)})}else{if(a.setAttribute("tabindex","-1"),a.setAttribute("aria-disabled","true"),i){var v=String(i.getMonth()+1).padStart(2,"0"),p=String(s).padStart(2,"0");a.setAttribute("data-date","".concat(l,"-").concat(v,"-").concat(p))}a.textContent=String(s||t.textContent)}null===(n=f)||void 0===n||n.appendChild(a),7===++h&&(h=0)}),s.appendChild(u);var v=u.querySelector("tr:last-child");if(v&&Array.from(v.querySelectorAll("td")).every(function(e){return e.classList.contains("nextMonthDay")||e.classList.contains("prevMonthDay")})&&v.remove(),!s.querySelector('td[tabindex="0"]')){var p=s.querySelector("td.day-has-event"),m=s.querySelector('td:not([aria-hidden="true"])'),y=p||m;y&&y.setAttribute("tabindex","0")}this.addKeyboardNavigation(s);var b=t.querySelector(".flatpickr-days");b&&a.parentNode&&(a.parentNode.insertBefore(s,a),a.style.display="none",b.style.display="none",a.setAttribute("aria-hidden","true"),b.setAttribute("aria-hidden","true"),a.setAttribute("hidden",""),b.setAttribute("hidden",""),a.setAttribute("inert",""),b.setAttribute("inert",""))}}}},{key:"focusBoundaryEventCell",value:function(e){var t=document.querySelector(".flatpickr-calendar-table");if(t){var n=Array.from(t.querySelectorAll("td[data-date]")),a=n.filter(function(e){return e.classList.contains("day-has-event")});if(a.length){var r="first"===e?a[0]:a[a.length-1];n.forEach(function(e){return e.setAttribute("tabindex","-1")}),r.setAttribute("tabindex","0"),r.focus()}}}},{key:"focusDayInTable",value:function(e){var t=document.querySelector(".flatpickr-calendar-table");if(t){var n=Array.from(t.querySelectorAll("td[data-date]"));if(n.length){var a=n.find(function(t){return parseInt(t.getAttribute("data-date").split("-")[2],10)===e}),r=n.filter(function(e){return e.classList.contains("day-has-event")}),i=(null!=a&&a.classList.contains("day-has-event")?a:null)||r[0]||n[n.length-1];n.forEach(function(e){return e.setAttribute("tabindex","-1")}),i.setAttribute("tabindex","0"),i.focus()}}}},{key:"addKeyboardNavigation",value:function(e){var t=this,n=e.querySelector("tbody");n&&e.addEventListener("keydown",function(a){var r=a.target,i="TD"===r.tagName?r:null;if(i&&"true"!==i.getAttribute("aria-hidden")){var o=i.parentElement,s=Array.from(n.querySelectorAll("tr")),l=s.indexOf(o),c=Array.from(o.children).indexOf(i),d=null;switch(a.key){case"ArrowRight":a.preventDefault();var u=Array.from(e.querySelectorAll('td.day-has-event:not([aria-hidden="true"])')),f=u.indexOf(i);f<u.length-1?d=u[f+1]:t.calendarInstance&&(t.hasEventsInDirection("next")?(t.calendarInstance.changeMonth(1),setTimeout(function(){return t.focusBoundaryEventCell("first")},50)):t.announceToScreenReader("No dates available"));break;case"ArrowLeft":a.preventDefault();var h=Array.from(e.querySelectorAll('td.day-has-event:not([aria-hidden="true"])')),v=h.indexOf(i);v>0?d=h[v-1]:t.calendarInstance&&(t.hasEventsInDirection("prev")?(t.calendarInstance.changeMonth(-1),setTimeout(function(){return t.focusBoundaryEventCell("last")},50)):t.announceToScreenReader("No dates available"));break;case"ArrowDown":a.preventDefault();for(var p=!1,m=l+1;m<s.length;m++){var y=s[m].children[c];if(null!=y&&y.classList.contains("day-has-event")&&"true"!==y.getAttribute("aria-hidden")){d=y,p=!0;break}}!p&&t.calendarInstance&&(t.hasEventsInDirection("next")?(t.calendarInstance.changeMonth(1),setTimeout(function(){return t.focusBoundaryEventCell("first")},50)):t.announceToScreenReader("No dates available"));break;case"ArrowUp":a.preventDefault();for(var b=!1,g=l-1;g>=0;g--){var w=s[g].children[c];if(null!=w&&w.classList.contains("day-has-event")&&"true"!==w.getAttribute("aria-hidden")){d=w,b=!0;break}}!b&&t.calendarInstance&&(t.hasEventsInDirection("prev")?(t.calendarInstance.changeMonth(-1),setTimeout(function(){return t.focusBoundaryEventCell("last")},50)):t.announceToScreenReader("No dates available"));break;case"Home":a.preventDefault(),d=Array.from(o.querySelectorAll('td.day-has-event:not([aria-hidden="true"])'))[0]||null;break;case"End":a.preventDefault();var k=Array.from(o.querySelectorAll('td.day-has-event:not([aria-hidden="true"])'));d=k[k.length-1]||null;break;case"PageUp":if(a.preventDefault(),!t.calendarInstance)break;if(!t.hasEventsInDirection("next")){t.announceToScreenReader("No dates available");break}var C=i.getAttribute("data-date"),_=C?parseInt(C.split("-")[2],10):1;t.calendarInstance.changeMonth(a.shiftKey?12:1),setTimeout(function(){t.focusDayInTable(_)},50);break;case"PageDown":if(a.preventDefault(),!t.calendarInstance)break;if(!t.hasEventsInDirection("prev")){t.announceToScreenReader("No dates available");break}var q=i.getAttribute("data-date"),S=q?parseInt(q.split("-")[2],10):1;t.calendarInstance.changeMonth(a.shiftKey?-12:-1),setTimeout(function(){t.focusDayInTable(S)},50);break;case"Enter":case" ":a.preventDefault(),i.classList.contains("day-has-event")&&i.click()}d&&(i.setAttribute("tabindex","-1"),d.setAttribute("tabindex","0"),d.focus())}})}},{key:"announceEmptyMonthIfNeeded",value:function(){if(0===document.querySelectorAll(".flatpickr-calendar-table td.day-has-event").length){var e,t,n=document.querySelector(".flatpickr-current-month .cur-month"),a=document.querySelector(".flatpickr-current-month .cur-year-label"),r="".concat(null!==(e=null==n?void 0:n.textContent)&&void 0!==e?e:""," ").concat(null!==(t=null==a?void 0:a.textContent)&&void 0!==t?t:"").trim();this.announceToScreenReader("No events in ".concat(r,". Continue navigating for available dates."))}}},{key:"hasEventsInDirection",value:function(e){var t;if(!this.calendarInstance||null===(t=this.store)||void 0===t||null===(t=t.listOfEventDates)||void 0===t||!t.length)return!1;var n=this.calendarInstance.currentYear,a=this.calendarInstance.currentMonth,r="prev"===e?new Date(n,a,1):new Date(n,a+1,0,23,59,59);return this.store.listOfEventDates.some(function(t){var n=t.split("/");if(3!==n.length)return!1;var a=new Date(parseInt(n[2],10),parseInt(n[0],10)-1,parseInt(n[1],10));return"prev"===e?a<r:a>r})}},{key:"updateMonthNavBoundaries",value:function(e){var t=null!=e?e:document.activeElement,n=document.querySelector(".flatpickr-prev-month"),a=document.querySelector(".flatpickr-next-month");if(n){var r=this.hasEventsInDirection("prev"),i=t===n;n.disabled=!r,n.classList.toggle("flatpickr-disabled",!r),n.setAttribute("tabindex",r?"0":"-1"),n.setAttribute("aria-label",r?"Previous month":"Previous month, no dates available"),!r&&i&&a&&!a.disabled&&a.focus()}
2if(a){var o=this.hasEventsInDirection("next"),s=t===a;a.disabled=!o,a.classList.toggle("flatpickr-disabled",!o),a.setAttribute("tabindex",o?"0":"-1"),a.setAttribute("aria-label",o?"Next month":"Next month, no dates available"),!o&&s&&n&&!n.disabled&&n.focus()}}},{key:"updateCalendarAlly",value:function(){var e=this,t=document.activeElement,n=document.querySelector(".flatpickr-next-month"),a=document.querySelector(".flatpickr-prev-month");if(a){a.setAttribute("aria-label","Previous month");var i=a.querySelector("svg");i&&(i.setAttribute("aria-hidden","true"),i.setAttribute("focusable","false")),a.classList.contains("flatpickr-disabled")?(a.disabled=!0,a.setAttribute("tabindex","-1")):(a.disabled=!1,a.setAttribute("tabindex","0"));var o=a._keydownHandler;o&&a.removeEventListener("keydown",o);var s=function(t){var n="Enter"===t.key||" "===t.key;a.disabled?n&&(t.preventDefault(),t.stopPropagation()):n&&(t.preventDefault(),t.stopPropagation(),e.calendarInstance&&(e.calendarInstance.changeMonth(-1),setTimeout(function(){var t,n=document.querySelector(".flatpickr-current-month"),a=null==n||null===(t=n.textContent)||void 0===t?void 0:t.trim();a&&e.announceToScreenReader("Navigated to ".concat(a))},100),setTimeout(function(){var e=document.querySelector(".flatpickr-prev-month");e&&e.focus()},50)))};a._keydownHandler=s,a.addEventListener("keydown",s)}if(n){n.setAttribute("aria-label","Next month");var l=n.querySelector("svg");l&&(l.setAttribute("aria-hidden","true"),l.setAttribute("focusable","false")),n.classList.contains("flatpickr-disabled")?(n.disabled=!0,n.setAttribute("tabindex","-1")):(n.disabled=!1,n.setAttribute("tabindex","0"));var c=n._keydownHandler;c&&n.removeEventListener("keydown",c);var d=function(t){var a="Enter"===t.key||" "===t.key;n.disabled?a&&(t.preventDefault(),t.stopPropagation()):a&&(t.preventDefault(),t.stopPropagation(),e.calendarInstance&&(e.calendarInstance.changeMonth(1),setTimeout(function(){var t,n=document.querySelector(".flatpickr-current-month"),a=null==n||null===(t=n.textContent)||void 0===t?void 0:t.trim();a&&e.announceToScreenReader("Navigated to ".concat(a))},100),setTimeout(function(){var e=document.querySelector(".flatpickr-next-month");e&&e.focus()},50)))};n._keydownHandler=d,n.addEventListener("keydown",d)}var u=document.querySelector(".flatpickr-current-month"),f=null==u?void 0:u.querySelector(".numInputWrapper"),h=null==u?void 0:u.querySelector(".cur-year");if(u){u.id="flatpickr-current-month",u.setAttribute("aria-live","polite"),u.setAttribute("aria-atomic","true");var v=this.calendarInstance?String(this.calendarInstance.currentYear):(null==h?void 0:h.value)||String((new Date).getFullYear()),p=u.querySelector(".cur-year-label");p||((p=document.createElement("span")).className="cur-year-label",p.id="flatpickr-year-label",p.style.padding="0 5px",p.style.fontWeight="inherit",u.appendChild(p)),p.textContent=v,f&&(f.style.display="none",f.setAttribute("aria-hidden","true"))}Array.from(document.querySelectorAll(".flatpickr-day")).forEach(function(e){if(!e.classList.contains("prevMonthDay")&&!e.classList.contains("nextMonthDay")){var t=e.dateObj;if(t){var n=(0,r.Yk)(t.getMonth()),a=t.getDate(),i=t.getFullYear();if(e.classList.contains("day-has-event")){var o="".concat(n," ").concat(a," ").concat(i);e.setAttribute("aria-label",o),e.setAttribute("tabindex","0"),e.removeAttribute("aria-disabled")}else e.setAttribute("tabindex","-1"),e.setAttribute("aria-disabled","true"),e.classList.add("flatpickr-disabled"),e.setAttribute("title","".concat(n," ").concat(a," ").concat(i)),e.removeAttribute("aria-label"),e.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),this.convertToTableStructure();var m=null==u?void 0:u.querySelector("span.cur-month"),y=null==u?void 0:u.querySelector(".cur-year-label");if(m&&y){m.id="flatpickr-month-label";var b=m.textContent,g=y.textContent,w="".concat(b," ").concat(g),k=document.querySelector(".flatpickr-days");k&&k.setAttribute("aria-label",w)}this.updateMonthNavBoundaries(t)}},{key:"createCalendar",value:function(){var e=this,t=new Date,n="";if("string"==typeof this.store.selectedDate&&s(this.store.selectedDate,["MM/DD/YYYY","M/D/YYYY"],!0).isValid()){n=this.store.selectedDate,this.store.selectedEventsView="Custom";var a=document.getElementById("search-views");a&&(a.value="Custom")}var i=document.getElementById("calendar");i?this.calendarInstance=(0,o.default)(i,{inline:!0,minDate:t,defaultDate:n,dateFormat:"m/d/Y",showMonths:1,appendTo:i,static:!0,monthSelectorType:"static",prevArrow:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
2ox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><polyline points="15 18 9 12 15 6"/></svg>',nextArrow:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><polyline points="9 18 15 12 9 6"/></svg>',onReady:function(t,n,a){e.store.calendarInstance=a,i&&i.removeAttribute("readonly");var r=document.querySelector(".flatpickr-calendar");r&&i&&i.appendChild(r);var o=i.querySelector(".flatpickr-input");o&&(o.setAttribute("tabindex","0"),o.setAttribute("aria-label","Date picker calendar")),setTimeout(function(){e.replaceArrowsWithButtons(),e.updateCalendarAlly()},0)},onChange:function(t,n){e.onSelect(n)},onMonthChange:function(){setTimeout(function(){e.updateCalendarAlly(),e.announceEmptyMonthIfNeeded()},0)},onYearChange:function(){setTimeout(function(){e.updateCalendarAlly(),e.announceEmptyMonthIfNeeded()},0)},onDayCreate:function(t,n,a,i){var o=i.dateObj,s=(0,r.Yq)(o);e.store.listOfEventDates.indexOf(s)>-1?(i.classList.add("day-has-event"),i.setAttribute("role","button"),e.store.selectedDate===s&&i.classList.add("selected-date-custom")):(i.classList.add("no-event"),i.removeAttribute("aria-label"))},locale:{weekdays:{shorthand:["S","M","T","W","T","F","S"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}}}):console.error("Calendar element #calendar not found")}},{key:"onSelect",value:function(e){var t=this;this.store.selectedEventsView="Custom",this.store.selectedDate=(0,r.Yq)(e),this.saveSelectedDate(this.store.selectedDate);var n=new Date(e),a=(0,r.Yk)(n.getMonth()),i=n.getDate(),o=n.getFullYear();this.announceToScreenReader("Selected ".concat(a," ").concat(i,", ").concat(o,". Showing events for this date.")),document.querySelectorAll(".flatpickr-day.selected-date-custom").forEach(function(e){e.classList.remove("selected-date-custom")}),document.querySelectorAll('.flatpickr-calendar-table td[aria-selected="true"]').forEach(function(e){e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")});var s=(0,r.Yq)(e);document.querySelectorAll(".flatpickr-day").forEach(function(e){var t=e.dateObj;t&&(0,r.Yq)(t)===s&&e.classList.add("selected-date-custom")}),document.querySelectorAll(".flatpickr-calendar-table td.selected-date-custom").forEach(function(e){e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0")}),document.dispatchEvent(new CustomEvent("filter-results"));var l=document.getElementById("search-views");l&&(l.value="Custom");var c=document.querySelector(".".concat(this.ui.calendarBtn));c&&c.classList.add(this.modifiers.active),setTimeout(function(){t.updateCalendarAlly();var e=document.querySelector(".flatpickr-calendar-table td.selected-date-custom");e&&e.focus()},0)}},{key:"setDate",value:function(e){this.calendarInstance&&this.calendarInstance.setDate(e,!1)}},{key:"getCalendarInstance",value:function(){return this.calendarInstance}},{key:"afterRender",value:function(){this.store.selectedDate=this.restoreSelectedDate(),this.store.updateCalendarAlly=this.updateCalendarAlly.bind(this),this.createCalendar(),this.updateCalendarAlly()}},{key:"template",value:function(){return'<h2 class="'.concat(this.ui.heading,'" qa-handles="O5-Calendar-widget-heading">\n <span qa-handles="O5-Calendar-widget-heading-text">Calendar</span>\n </h2>')}}],a&&c(n.prototype,a),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,i}(a.uA);v(m,"SESSION_KEY","csf-calendar-selected-date");const y=m;var b=n(19952),g={},w=function(e){if(!e||!e.includes("/"))return e;var t=e.split("/");return t.shift(),t.join("/").replaceAll("-"," ")},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"calendar-sf-filter-live-region",n=arguments.length>
22&&void 0!==arguments[2]?arguments[2]:40,a=document.getElementById(t);a||((a=document.createElement("div")).id=t,a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),a.style.position="absolute",a.style.width="1px",a.style.height="1px",a.style.padding="0",a.style.margin="-1px",a.style.overflow="hidden",a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="nowrap",a.style.border="0",document.body.appendChild(a)),a.textContent="",g[t]&&window.clearTimeout(g[t]),g[t]=window.setTimeout(function(){a.textContent=e},n)};function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function _(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,j(a.key),a)}}function q(e,t,n){return t=E(t),function(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function O(e,t,n){return(t=j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=C(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==C(t)?t:t+""}var L=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),O(n=q(this,t,[e]),"uieName","calendar-sf-pills-component"),O(n,"pills",[]),O(n,"pendingFocusTarget",null),O(n,"boundContainerClick",void 0),O(n,"boundContainerKeydown",void 0),O(n,"focusFallbackSelector",".calendar-sf-results .js-uib-customselect-btn"),n.ui={jsBtn:"js-toggle-pill-btn",jsRadio:".js-toggle-radio",jsClear:"js-clear-pills"},n.boundContainerClick=n.onContainerClick.bind(n),n.boundContainerKeydown=n.onContainerKeydown.bind(n),n.init(),n.setup(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(t,e),n=t,a=[{key:"setup",value:function(){document.addEventListener("updateSFPills",this.render.bind(this)),document.addEventListener("filter-results",this.render.bind(this))}},{key:"beforeRender",value:function(){this.pills=this.store.selectedFilters||[]}},{key:"afterRender",value:function(){var e=this.element;e&&(e.removeEventListener("click",this.boundContainerClick),e.removeEventListener("keydown",this.boundContainerKeydown),e.addEventListener("click",this.boundContainerClick),e.addEventListener("keydown",this.boundContainerKeydown)),this.togglePillsWrapperVisibility(),this.applyPendingFocus()}},{key:"togglePillsWrapperVisibility",value:function(){var e,t=null===(e=this.element)||void 0===e?void 0:e.closest(".calendar-sf-pills");t&&t.classList.toggle("is--empty",0===this.pills.length)}},{key:"onContainerClick",value:function(e){var t=e.target,n=t.closest(".".concat(this.ui.jsBtn)),a=t.closest(".".concat(this.ui.jsClear));n?this.onClickRemovePill(e,n):a&&this.onClickClearFilters(e,a)}},{key:"onContainerKeydown",value:function(e){var t=e.target;if("Enter"===e.key||" "===e.key){e.preventDefault();var n=t.closest(".".concat(this.ui.jsBtn)),a=t.closest(".".concat(this.ui.jsClear));n?this.onClickRemovePill(e,n):a&&this.onClickClearFilters(e,a)}}},{key:"isHiddenOrDisabled",value:function(e){return e.disabled||null===e.offsetParent}},{key:"shouldSkipAsFocusTarget",value:function(e){return e.classList.contains("calendar-sf-pills__btn")||e.classList.contains("calendar-sf-pills__clear")}},{key:"getFallbackFocusTarget",value:function(){return document.querySelector(this.focusFallbackSelector)}},{key:"getPreviousFocusableElement",value:function(e){var t=this,n=e.closest(".calendar-sf-results")||document,a=Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not
2([tabindex="-1"])')).filter(function(e){return!t.isHiddenOrDisabled(e)}),r=a.indexOf(e);if(r>0)for(var i=r-1;i>=0;i-=1)if(!this.shouldSkipAsFocusTarget(a[i]))return a[i];for(var o=a.length-1;o>=0;o-=1)if(a[o]!==e&&!this.shouldSkipAsFocusTarget(a[o]))return a[o];return this.getFallbackFocusTarget()}},{key:"applyPendingFocus",value:function(){var e=this;if(this.pendingFocusTarget){var t=this.pendingFocusTarget;this.pendingFocusTarget=null;var n=0,a=function(){var r,i="string"==typeof t?document.querySelector(t):t;if(i&&document.contains(i))r=i;else{var o=Array.from(document.querySelectorAll(".calendar-sf-pills__container .calendar-sf-pills__btn"));r=o.length>0?o[o.length-1]:e.getFallbackFocusTarget()}r&&(r.focus({preventScroll:!0}),document.activeElement===r)||(n+=1)<8&&requestAnimationFrame(a)};requestAnimationFrame(a)}}},{key:"onClickRemovePill",value:function(e,t){e.preventDefault(),e.stopPropagation();var n,a=t.closest(".calendar-sf-pills__container"),r=(a?Array.from(a.querySelectorAll(".calendar-sf-pills__btn")):[]).indexOf(t),i=this.getPreviousFocusableElement(t),o=t.getAttribute("data-value")||t.value,s=w(o);return n=o.includes("radius")?document.querySelector(".js-clear-btn"):document.querySelector('.calendar-sf-filter-tray [value="'.concat(o,'"]')),this.pendingFocusTarget=r>0?'.calendar-sf-pills__container .calendar-sf-pills__btn[data-id="'.concat(r-1,'"]'):i||this.getFallbackFocusTarget(),o.includes("radius")?(k("Filter removed. Location filter cleared."),void(n&&n.click())):n instanceof HTMLInputElement?(k("".concat(s," Filter removed.")),n.checked=!1,void n.dispatchEvent(new Event("change",{bubbles:!0}))):n?(k("".concat(s," Filter removed.")),void n.click()):(this.store.selectedFilters=(this.store.selectedFilters||[]).filter(function(e){return e!==o}),k("".concat(s," Filter removed.")),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("filter-results")),void document.dispatchEvent(new CustomEvent("updateSFPills")))}},{key:"onClickClearFilters",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.preventDefault();var n=t||e.target.closest(".".concat(this.ui.jsClear)),a=n?this.getPreviousFocusableElement(n):null;this.pendingFocusTarget=a||this.getFallbackFocusTarget(),document.querySelectorAll(".calendar-sf-filter-tray__checkbox").forEach(function(e){e.checked=!1,e.classList.remove("minus--show")}),Object.keys(this.store.filterData).forEach(function(e){var t=document.querySelector("#event-".concat(e));t&&t.classList.contains("is--expanded")&&t.click()}),this.store.selectedFilters=[],this.store.savedFilters=[],this.store.selectedAction="clear",k("Filters removed. All filters cleared.");var r=document.querySelector(".js-location-field");r&&(r.value="");var i=document.querySelector(".js-remove-location");i&&(i.style.display="none");var o=document.querySelector(".js-apply-btn");o&&(o.disabled=!0),document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("filter-results")),this.render()}},{key:"serializeData",value:function(){return{selectedFilters:this.pills}}},{key:"template",value:function(e){var t=this,n=e.selectedFilters.length>=1;return'<div class="calendar-sf-pills__container" qa-handles="O5-CSF-pills-wrapper">\n '.concat(n?'<div class="calendar-sf-pills__label dmp-type__body-3-bold" qa-handles="O5-CSF-pill-label">Filtered by:</div>':"",'\n <div class="calendar-sf-pills__wrapper" qa-handles="O5-CSF-pills-container">\n ').concat(e.selectedFilters.map(function(e,n){if(!e||!e.includes("/"))return"";var a=e.split("/"),r=a[0];a.shift();var i=a.join("/").replaceAll("-"," ");return'<div class="calendar-sf-pills__pill" qa-handles="O5-CSF-pill">\n <div class="calendar-sf-pills__inner" qa-handles="O5-CSF-pill-inner">\n <button id="filter-'.concat(n,'" \n class="calendar-sf-pills__btn ').concat(t.ui.jsBtn,'"\n data-category="').concat(r,'"\n data-value="').concat(e,'" \n data-id="').concat(n,'"\n qa-handles="O5-CSF-pill-button"\n aria-label="').concat(i,' remove filter">\n ').concat(i,'\n <svg class="calendar-sf-pills__icon icon" qa-handles="O5-CSF-pill-icon" aria-hidden="true" width="18" height="18" viewBox="0 -960 960 960" fill="currentColor"><path d="m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144 56 56ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q
2-54 54-127 85.5T480-80Z"/></svg>\n </button>\n </div>\n </div>')}).join(""),"\n </div>\n ").concat(n?'<div class="calendar-sf-pills__pill--clear" qa-handles="O5-CSF-pill-clear-wrapper">\n <div class="calendar-sf-pills__inner" qa-handles="O5-CSF-pill-clear-inner">\n <button class="calendar-sf-pills__clear '.concat(this.ui.jsClear,'" qa-handles="O5-CSF-pill-clear-button">\n Clear filter').concat(e.selectedFilters.length>1?"s":"","\n </button>\n </div>\n </div>"):"","\n </div>")}}],a&&_(n.prototype,a),r&&_(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);const x=L;var D=n(56639);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function I(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function F(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,H(a.key),a)}}function M(e,t,n){return t=N(t),function(e,t){if(t&&("object"==A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,B()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(B=function(){return!!e})()}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function H(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=A(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==A(t)?t:t+""}var Z=function(e){function t(e){var n,a,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=M(this,t,[e]),a=n,i="calendar-sf-results-component",(r=H(r="uieName"))in a?Object.defineProperty(a,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[r]=i,n.componentName=e.componentName||n.uieName,n.ui={pagination:".calendar-pagination",jsEventsView:"js-results-views",jsEventLink:".js-results-link-btn"},n.store.filterResultOnLoad&&(n.store.filterResultOnLoad=!1,n.populateFromSelectedFilter()),document.addEventListener("filter-results",n.filterEventList.bind(n)),document.addEventListener("setSelectedFilter",n.populateFromSelectedFilter.bind(n)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(t,e),n=t,a=[{key:"announceToScreenReader",value:function(e){var t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.style.position="absolute",t.style.left="-10000px",t.style.width="1px",t.style.height="1px",t.style.overflow="hidden",t.textContent=e,document.body.appendChild(t),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},1e3)}},{key:"afterRender",value:function(){var e=this,t=document.querySelector(".".concat(this.ui.jsEventsView)),n=document.querySelectorAll(this.ui.jsEventLink),a=document.querySelectorAll(".address-link");if(t&&t.addEventListener("change",this.onChangeSelectEventsView.bind(this)),n.forEac
2h(function(t){t.parentElement.addEventListener("click",e.onClickRoute.bind(e)),t.parentElement.addEventListener("keydown",function(t){"Enter"===t.key&&e.onClickRoute(t)})}),a.forEach(function(t){t.addEventListener("click",e.onClickAddressLink.bind(e))}),this.store.focusFirstResult){var r,i=null===(r=document.querySelector(this.ui.jsEventLink))||void 0===r?void 0:r.parentElement;if(i){var o=i.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:o-90,behavior:"smooth"}),i.focus()}}var s=document.querySelector('[data-sf-module="o5-csf-custom-select-parent"]');if(s){var l=new b.A({element:this.element});if(l.parentSelector=s,l.start(),""!==this.store.selectedEventsView){var c='[value="'.concat(this.store.selectedEventsView,'"]'),d=document.querySelector("#calendar-sf-results-component-select ".concat(c)),u=l.element.querySelector(".js-uib-customselect-selected-value");d&&u&&(u.innerHTML=d.innerHTML)}else{var f=l.element.querySelector(".js-uib-customselect-option.is--selected"),h=l.element.querySelector(".js-uib-customselect-selected-value");f&&h&&(h.innerHTML=f.innerHTML.trim())}var v=l.element.querySelector(".js-uib-customselect-option.is--selected");v&&v.setAttribute("aria-selected","true")}document.querySelectorAll(".calendar-sf-results__description p").forEach(function(e){e.innerHTML=e.innerHTML.replace(/ /g," ")});var p=document.querySelector(".calendar-sf-results .js-uib-customselect-btn");if(p){p.removeAttribute("aria-label"),p.setAttribute("aria-labelledby","".concat(this.componentName,"-select-label")),p.hasAttribute("tabindex")||p.setAttribute("tabindex","0");var m=p._keydownHandler;m&&p.removeEventListener("keydown",m);var y=function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p.click())};p._keydownHandler=y,p.addEventListener("keydown",y)}var g=this.element.querySelector(".calendar-sf-pills-data--desktop");g&&new x({element:g,store:this.store})}},{key:"beforeRender",value:function(){this.store.numOfPages=Math.ceil(this.store.filteredResults.length/this.store.resultsPerPage)}},{key:"onClickAddressLink",value:function(e){e.stopImmediatePropagation()}},{key:"onChangeSelectEventsView",value:function(e){var t=this,n=e.currentTarget.value,a=this.store.selectedEventsView;this.store.selectedEventsView=n,this.store.currPageNum=1,this.filterEventList(),document.dispatchEvent(new CustomEvent("filter-results-paginate"));var r=e.currentTarget.querySelector('option[value="'.concat(n,'"]'));if(r&&this.announceToScreenReader("Filter changed to ".concat(r.textContent,". Results updated.")),"Custom"===a){var i=new Date,o=this.store.calendarInstance;this.store.selectedDate="",o&&(o.setDate(new Date(i.getFullYear(),i.getMonth()+1,1),!1),o.setDate(i,!1)),this.store.updateCalendarAlly&&setTimeout(function(){t.store.updateCalendarAlly()},0)}setTimeout(function(){var e=document.querySelector(".calendar-sf-results .js-uib-customselect-btn");e&&e.focus()},100),document.dispatchEvent(new CustomEvent("setCsfStore")),setTimeout(function(){var e=document.querySelector(".".concat(t.ui.jsEventsView));e&&e.focus()},300)}},{key:"onClickRoute",value:function(e){if(e.preventDefault(),"keydown"===e.type&&"Enter"!==e.key)return!1;var t=e.currentTarget.querySelector("[data-route]").dataset.route;try{window.dispatchEvent(new CustomEvent("routing",{detail:{route:t}}))}catch(e){console.error("Error ",e);var n=document.createEvent("Event");n.initEvent("routing",!1,!0),window.dispatchEvent(n)}}},{key:"serializeData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{componentName:this.uieName,events:this.store.filteredResults,views:this.store.eventsView,isFiltered:e,allDDValues:["All events","This week","This month","Today","Custom"]}}},{key:"template",value:function(e){var t=this,n=this.ui,a=this.store.aemData.noResultsCopy;return'<div class="calendar-sf-results__sorter calendar__col" data-sf-module="o5-csf-custom-select-parent" qa-handles="O5-Calendar-results-sorter">\n \n <label class="events-views" id="'.concat(this.componentName,'-select-label" for="').concat(this.componentName,'-select" qa-handles="O5-Calendar-results-sorter-label">\n View events by\n </label>\n <select id="').concat(this.componentName,'-select" name="views" class="').concat(n.jsEventsView,' js-field search-views" data-uib-custom-select qa-
2handles="O5-Calendar-results-sorter-select">\n ').concat(e.allDDValues.map(function(n){var a=t.store.selectedEventsView===n?" selected":"Custom"!==n&&e.views.includes(n)?"":' aria-disabled="true" disabled="disabled"';return'<option value="'.concat(n,'"').concat(a,">").concat(n,"</option>")}).join(""),'\n </select>\n </div>\n <div class="calendar-sf-pills csf-pills-desktop" role="group" aria-label="Filtered by" qa-handles="O5-CSF-filter-pills-wrapper">\n <div id="calendar-sf-filter-pills-desktop" class="calendar-sf-pills-data calendar-sf-pills-data--desktop" data-optum-library-cmp="calendar-sf-pills-data" qa-handles="O5-csf-pills-desktop"></div>\n </div>\n <div class="calendar-sf-results__list" qa-handles="O5-Calendar-results-cards">\n ').concat(e.events.length?'<div class="calendar-section__inner" qa-handles="O5-Calendar-results-inner">\n <div class="calendar-section__item" qa-handles="O5-Calendar-results-item">\n <ul class="calendar-sf-results__cards" qa-handles="O5-Calendar-results-list">\n '.concat(this.eventTemplate(e.events),"\n </ul>\n </div> \n </div>"):'<div aria-live="polite" aria-atomic="true" qa-handles="O5-Calendar-no-results"><h2 id="noResultMsg" qa-handles="O5-Calendar-no-results-heading">'.concat(a,"</h2></div>"),"\n </div>")}},{key:"eventTemplate",value:function(e){var t="",n=0,a=this.store.resultsPerPage;this.store.numOfPages<this.store.currPageNum&&(this.store.currPageNum=1);var r=this.store.currPageNum;r>1&&(n=(a=this.store.resultsPerPage*r)-this.store.resultsPerPage);for(var i=n;i<a&&void 0!==e[i]&&e[i];i++){var o=e[i],s=o.isWelmed,l=o.name,c=o.startDateWithoutYear,d=o.startTimeDisplay,u=o.endTimeDisplay,f=o.description,h=o.IsThisVirtualEvent,v=void 0!==h&&h,p=o.address,m=o.street,y=o.city,b=o.state,g=o.postalCode,w=o.id,k=o.lat,C=o.lng,_=o.topic,q=o.details,S=o.businessName,E=o.timeZone,T=f.replace(/ /g," "),O=encodeURIComponent(p),j="https://www.google.com/maps/dir/?api=1¢er=".concat(k,",").concat(C,"&zoom=15&destination=").concat(O),L="";L=s?l?"".concat(_,": ").concat(l):"".concat(_):"".concat(_).concat(q?": ".concat(q):""),t+='<li class="calendar-sf-results__card" qa-handles="O5-Calendar-result-card">\n <div id="'.concat(w,'" class="calendar-sf-results__link" qa-handles="O5-Calendar-result-link-wrapper">\n <div class="calendar-sf-results__details dmp-container" qa-handles="O5-Calendar-result-details">\n <a href="#" qa-handles="O5-Calendar-result-anchor">\n <h3 id="calendar-sf-results__name-').concat(i,'" class="calendar-sf-results__topic js-results-link-btn" data-route="').concat(w,'" qa-handles="O5-Calendar-result-topic">').concat(L,'</h3>\n </a>\n <div class="calendar-sf-results__personal calendar__flex dmp-row" qa-handles="O5-Calendar-result-personal">\n <ul class="calendar-sf-results__left dmp-col-12 dmp-col-xl-4" qa-handles="O5-Calendar-result-meta-list">\n <li class="calendar__flex" qa-handles="O5-Calendar-result-date-row">\n <div class="calendar__colauto" qa-handles="O5-Calendar-result-date-icon-wrap">\n <svg class="icon" role="img" aria-label="calendar" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-1
27 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"/></svg>\n </div>\n <div class="calendar__col" qa-handles="O5-Calendar-result-date-copy-wrap">\n <p id="calendar-sf-results__date-').concat(i,'" class="calendar-sf-results__date" qa-handles="O5-Calendar-result-date">\n ').concat(c,'\n </p>\n </div>\n </li>\n <li class="calendar__flex" qa-handles="O5-Calendar-result-time-row">\n <div class="calendar__colauto" qa-handles="O5-Calendar-result-time-icon-wrap">\n <svg class="icon" role="img" aria-label="Time" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z"/></svg>\n </div>\n <div class="calendar__col" qa-handles="O5-Calendar-result-time-copy-wrap">\n <p class="calendar-sf-results__display-time" id=\'calendar-sf-results__time-').concat(i,'\' qa-handles="O5-Calendar-result-time">\n ').concat(d,"-").concat(u," ").concat(E,"\n </p>\n </div>\n </li>\n ").concat(v?'<li class="calendar__flex" qa-handles="O5-Calendar-result-virtual-row">\n <div class="calendar__colauto" qa-handles="O5-Calendar-result-virtual-icon-wrap">\n <svg class="icon" role="img" aria-label="Virtual event" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M320-120v-80h80v-80H160q-33 0-56.5-23.5T80-360v-400q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v400q0 33-23.5 56.5T800-280H560v80h80v80H320ZM160-360h640v-400H160v400Zm0 0v-400 400Z"/></svg>\n </div>\n <div class="calendar__col" qa-handles="O5-Calendar-result-virtual-copy-wrap">\n <p class="calendar-sf-results__virtual" qa-handles="O5-Calendar-result-virtual">\n Virtual event\n </p>\n </div>\n </li>':""," \n ").concat(v?"":'<li class="calendar__flex" qa-handles="O5-Calendar-result-location-row">\n <div class="calendar__colauto" qa-handles="O5-Calendar-result-location-icon-wrap">\n <svg class="icon" role="img" aria-label="Location" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-480q33 0 56.5-23.5T560-560q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 33 23.5 56.5T480-480Zm0 294q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Zm0-480Z"/></svg>\n </div>\n <div class="calendar-sf-results__address calendar__col" qa-handles="O5-Calendar-result-location-copy-wrap">\n <div qa-handles="O5-Calendar-result-location-container">\n <div class="calendar-sf-results__address-link" qa-handles="O5-Calendar-result-a
2ddress-link-wrap">\n <div class="calendar-sf-results__business-name" qa-handles="O5-Calendar-result-business-name"> '.concat(this.capitalizeWords(S.toLowerCase()),'</div>\n <a class="address-link" id="address-link-').concat(i,'" target="_self" tabindex="0" href="').concat(j,'" aria-labelledby="address-link-').concat(i," calendar-sf-results__name-").concat(i," calendar-sf-results__date-").concat(i,'" qa-handles="O5-Calendar-result-address-link">\n <span class="calendar-sf-results__address-line">').concat(m,'</span>\n <span class="calendar-sf-results__address-line">').concat(y,", ").concat(b," ").concat(g,"</span>\n </a>\n </div>\n </div>\n </div>\n </li>"),'\n </ul>\n <div class="calendar-sf-results__description dmp-col-12 dmp-col-xl-8" qa-handles="O5-Calendar-result-description">\n <p qa-handles="O5-Calendar-result-description-copy">\n ').concat(T,"\n </p>\n </div>\n </div>\n </div>\n </div>\n </li>")}return t}},{key:"capitalizeWords",value:function(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})}},{key:"filterEventList",value:function(){var e=I(this.store.allEvents),t=this.store.selectedFilters,n=this.store.selectedEventsView;if(""!==this.store.selectedEventsView){var a=document.getElementById("search-views");a&&(a.value=n)}if(t&&t.length>0||"All events"!==n){var r=this.categorizeListIntoObject(t);if(e.map(function(e){var t=[];e.tags.map(function(e){if(!e.includes("radius"))return t.push(e)}),e.tags=t}),void 0!==r.radius&&void 0!==r.radius[0]){var i=r.radius[0].split(" miles of ");this.convertSearchToLatLng(e,i[1],i[0])}r.view=[n],e=this.multiVariantFiltering(e,r,n)}this.store.filteredResults=e,this.store.numOfPages=Math.ceil(this.store.filteredResults.length/this.store.resultsPerPage),document.dispatchEvent(new CustomEvent("filter-results-paginate")),this.render(),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("updateSFPills"))}},{key:"convertSearchToLatLng",value:function(e,t,n){var a=this;!this.store.originCoords||this.store.originCoords.length<2||0===this.store.originCoords[0]&&0===this.store.originCoords[1]||e.map(function(e){null!=e.lat&&null!=e.lng&&(e.distanceFromOrigin=a.getDistance(a.store.originCoords,[e.lng,e.lat],!0),e.distanceFromOrigin<parseInt(n)&&e.tags.push("radius/".concat(n," miles of ").concat(t)))})}},{key:"getDistance",value:function(e,t,n){function a(e){return e*Math.PI/180}var r=e[0],i=e[1],o=t[0],s=t[1],l=a(s-i),c=a(o-r),d=Math.sin(l/2)*Math.sin(l/2)+Math.cos(a(i))*Math.cos(a(s))*Math.sin(c/2)*Math.sin(c/2),u=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))*6371;return n&&(u/=1.60934),u}},{key:"categorizeListIntoObject",value:function(e){var t={};return e.forEach(function(e){e=e.split("/"),void 0===t[e[0]]&&(t[e[0]]=[]),t[e[0]].push(e[1])}),t}},{key:"multiVariantFiltering",value:function(e,t,n){var a=this,r=Object.keys(t);return e.filter(function(e){var i={};return i=a.categorizeListIntoObject(e.tags),r.every(function(r){return!t[r].length||void 0!==i[r]&&("view"===r?a.determineViewType(e,n):i[r].some(function(e){return t[r].includes(e)}))})})}},{key:"determineViewType",value:function(e,t){var n=e.views;if("All events"===t)return!0;var a=D(),r=D(e.startDate,"dddd, MMMM DD, YYYY");switch(t){case"Today":return r.isSame(a,"day");case"This week":return a.week()===r.week();case"This month":return a.month()===r.month();case"Custom":return r.isSame(D(this.store.selectedDate,"MM/DD/YYYY"));default:var i=n[n.indexOf(t)];if(void 0!==i){var o=i.split("/");return a[o[0]]()===parseInt(o[1])}}return!1}},{key:"populateFromSelectedFilter",value:function(){var e,t=this,n=!1,a=this.store.selectedFilters;if((a=a.filter(function(e,t,n){return n.indexOf(e)==t})).length>
20)if(a.forEach(function(a){if(a.indexOf("radius")>-1){var r=a.replace("radius/","").split(" miles of ");t.store.search=r[1],t.store.radius=r[0],e=r[1],n=!0}else{var i='[value="'.concat(a,'"]'),o=document.querySelector(i);o instanceof HTMLInputElement&&!o.checked&&(o.checked=!0),o instanceof HTMLInputElement&&t.setTypeTopicChecks(o)}}),n){if("undefined"==typeof google||!google.maps||!google.maps.Geocoder)return this.store.originCoords=[0,0],document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),void this.filterEventList();(new google.maps.Geocoder).geocode({address:"".concat(e,", USA")},function(e,n){t.store.originCoords="OK"==n?[e[0].geometry.location.lng(),e[0].geometry.location.lat()]:[0,0],document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),t.filterEventList()})}else document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),this.filterEventList();else this.filterEventList()}},{key:"setTypeTopicChecks",value:function(e){if(void 0===e)return!1;var t=e.id.split("-");if(void 0!==t){t=t[t.length-1];var n=".master-".concat(t),a=".detail-".concat(t),r=[];if(e.classList.contains(n.slice(1))&&document.querySelectorAll(a).forEach(function(t){t instanceof HTMLInputElement&&(t.checked=e.checked,r.push(t.value))}),e.classList.contains(a.slice(1)))try{if(e.checked){var i=!0;if(document.querySelectorAll(a).forEach(function(e){e instanceof HTMLInputElement&&(i=i&&e.checked)}),i){var o=document.querySelector(n);o instanceof HTMLInputElement&&(o.checked=!0,r.push(o.value))}}else{var s=document.querySelector(n);s instanceof HTMLInputElement&&(s.checked=!1)}}catch(e){console.error("no master event type found")}this.store.selectedFilters=[].concat(I(this.store.selectedFilters),r),this.store.selectedFilters=this.store.selectedFilters.filter(function(e,t,n){return n.indexOf(e)===t}),this.store.savedFilters=I(this.store.selectedFilters)}}}],a&&F(n.prototype,a),r&&F(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);const V=Z;var Y=n(67206);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function z(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function W(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ee(a.key),a)}}function K(e,t,n){return t=$(t),function(e,t){if(t&&("object"==G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,X()?Reflect.construct(t,n||[],$(e).constructor):t.apply(e,n))}function X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function Q(e,t,n){return(t=ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=G(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==G(t)?t:t+""}const te=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Q(n=K(this,t,[e]),"uieName","calendar-sf-filter-tray-component"),Q(n,"categories",[]),Q(n,"currItemIndex",0),Q(n,"boundSyncHeadingText",void 0),Q(n,"modifiers",{collapsed:"collapsed",active:"is--active"}),n.ui={jsCheckbox:".js-checkbox-input",jsLocationField:".js-location-field",jsGetZipcodeBtn:".js-get-zipcode-btn",jsApplyLocationBtn:".js-apply-btn",jsClearLocationBtn:".js-clear-btn",jsSuggestions:".js-suggestions",jsSuggestionsItem:".js-suggestions-item",jsRemoveLocation:".js-remove-location",trigger:".
2js-accordion-trigger",expanded:".is--expanded"},n.selector=".calendar-sf-filter-tray",n.boundSyncHeadingText=n.syncHeadingText.bind(n),n.shouldRender=n.store.filterData&&Object.keys(n.store.filterData).length>0,n.init(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),n=t,a=[{key:"afterRender",value:function(){var e=this,t={element:this.element,selector:"",store:this.store};document.querySelector(this.selector).addEventListener("change",function(t){t.target.matches(e.ui.jsCheckbox)&&e.onChangeSelectFilter(t)});var n=document.querySelector(this.selector);n&&["click","keypress","keydown"].forEach(function(t){n.addEventListener(t,function(t){var n=t.target;(n.matches(e.ui.trigger)||n.closest(e.ui.trigger))&&e.onClickToggleAccordion(t)})});var a=document.querySelector(this.ui.jsLocationField);a&&(a.addEventListener("input",this.onInputToggleUseMyLocation.bind(this)),a.addEventListener("focus",this.onInputToggleUseMyLocation.bind(this)),a.addEventListener("keydown",this.onInputToggleUseMyLocation.bind(this)),a.addEventListener("keypress",this.onInputToggleUseMyLocation.bind(this)),a.addEventListener("focusout",this.onLocationFieldFocusOut.bind(this)));var r=document.querySelector(this.ui.jsSuggestions);r&&(r.addEventListener("keydown",this.onKeydownNavigateSuggestions.bind(this)),r.addEventListener("keypress",this.onKeydownNavigateSuggestions.bind(this)));var i=document.querySelector(this.ui.jsGetZipcodeBtn);i&&(i.addEventListener("click",this.getUserLatLngOnClick.bind(this)),i.addEventListener("mousedown",this.getUserLatLngOnClick.bind(this)),i.addEventListener("focusout",this.onGetLocationBtnFocusOut.bind(this)));var o=document.querySelector(this.ui.jsApplyLocationBtn);o&&(o.addEventListener("click",this.applyLocationFilterOnClick.bind(this)),o.addEventListener("keypress",this.applyLocationFilterOnClick.bind(this)));var s=document.querySelector(this.ui.jsClearLocationBtn);s&&(s.addEventListener("click",this.clearLocationFilterOnClick.bind(this)),s.addEventListener("keypress",this.clearLocationFilterOnClick.bind(this)));var l=document.querySelector(this.ui.jsRemoveLocation);l&&(l.addEventListener("click",this.onClickClearZipCode.bind(this)),l.addEventListener("keypress",this.onClickClearZipCode.bind(this)));var c=document.getElementById("location-radius-select");c&&c.addEventListener("change",this.onRadiusChangeEnableFilterBtn.bind(this)),document.addEventListener("click",this.onClickOutsideHideList.bind(this)),this.store.filterEventTypes.includes("In-person event")||(document.querySelector(".calendar-sf-filter-tray__filters-categories:first-child").style.display="none"),this.expandAccordions(),this.determineMinusOnCheckbox(),Object.keys(this.store.filterData).length>0&&new Y.A({ui:this.ui,element:this.element});var d=document.querySelector('[data-aem-module="o5-csf-location-custom-select-parent"]');if(d){var u,f=new b.A({element:this.element});if(f.parentSelector=d,f.start(),0===this.store.radius&&0===this.store.aemData.preferredRadius){var h,v=null===(h=f.element.querySelector(".js-uib-customselect-option.is--selected"))||void 0===h?void 0:h.innerHTML;f.element.querySelector(".js-uib-customselect-selected-value").innerHTML=v?v.trim():""}else{var p,m=f.element,y=document.getElementById("location-radius-select"),g='[value="'.concat(this.store.radius,'"]'),w=this.store.radius;this.store.aemData.preferredRadius>0&&!window.location.href.includes("radius")&&(g='[value="'.concat(this.store.aemData.preferredRadius,'"]'),w=this.store.aemData.preferredRadius,y.querySelectorAll(".calendar-sf-filter-tray__location-radius-option").forEach(function(e){e.value==w&&(e.selected=!0)}));var k=null===(p=y.querySelector(g))||void 0===p?void 0:p.innerHTML;k&&(m.querySelector(".js-uib-customselect-selected-value").innerHTML=k)}null===(u=f.element.querySelector(".js-uib-customselect-option.is--selected"))||void 0===u||u.setAttribute("aria-selected","true")}var C=this.element.querySelector(".calendar-sf-pills-data--mobile");C&&new x(Object.assign(t,{element:C})),document.removeEventListener("updateSFPills",this.boundSyncHeadingText),document.removeEventListener("filter-results",this.boundSyncHeadingText),document.addEventListener("updateSFPills",this.boundSyncHeadingText),document.addEventListener("filter-results",this.boundSyncHeadingText),this.syncHeadingText()}},{key:"syncHeadingText",value:function(){var e=document.getElementById("calendar-sf-filter-tray__heading_id");if(e){var t=(this.store.selectedFilters||[]).length>0;e.textContent=t?"Filtered by":"Filter by"}}},{key:"onRadiusChangeEnableFilterBtn",value:function(){this.store.radius=Number(document.querySelector("#location-radius-select").value),""!==document.querySelector(this.ui.jsLocationField).value?document.querySelector(this.ui.jsApplyLocationBtn).disabled=!1:document.querySelector(this.ui.jsApplyLocationBtn).disabled=!0,k("Filter changed. Distance preference updated.")}},{key:"onClickClearZipCode",value:function(e){this.clearSearch(e);var t=document.querySelector(this.ui.jsLocationField);t&&t instanceof HTMLInputElement&&(t.value="",t.focus())}},{key:"onInputToggleUseMyLocation",value:function(e){var t=e.currentTarget,n=document.querySelector(this.ui.jsGetZipcodeBtn),a=n.classList.contains("collapsed"),r=t.value;
2if(27===e.keyCode)return this.hideSuggestiveList(),void t.setAttribute("aria-expanded","false");if(""!==r?(n.classList.add("collapsed"),t.classList.add("is--active"),t.setAttribute("value",r),document.querySelector(this.ui.jsRemoveLocation).style.display="block",document.querySelector(this.ui.jsApplyLocationBtn).disabled=!1):(t.setAttribute("value",""),document.querySelector(this.ui.jsRemoveLocation).style.display="none",document.querySelector(this.ui.jsApplyLocationBtn).disabled=!0),"input"===e.type&&(""===r&&(t.classList.remove("is--active"),document.querySelector(this.ui.jsSuggestions).classList.add("collapsed"),t.setAttribute("aria-expanded","false")),this.toggleSuggestiveField(r),document.querySelector(this.ui.jsSuggestions).classList.contains("collapsed")?t.setAttribute("aria-expanded","false"):t.setAttribute("aria-expanded","true")),"focus"===e.type&&a&&""===r&&(t.classList.remove("is--active"),n.classList.remove("collapsed")),"keypress"===e.type&&""===r&&32===e.keyCode&&n.dispatchEvent(new Event("mousedown")),13===e.keyCode){var i=document.querySelector(this.ui.jsApplyLocationBtn);e.preventDefault(),i&&(i.focus(),i.click())}40===e.keyCode&&document.getElementById("location-suggestive-0").focus()}},{key:"onLocationFieldFocusOut",value:function(e){var t=document.querySelector(this.ui.jsLocationField),n=e.relatedTarget;this.hideSuggestiveList(),t&&t.setAttribute("aria-expanded","false"),n&&n.matches(this.ui.jsGetZipcodeBtn)||this.collapseGetLocationButton()}},{key:"onGetLocationBtnFocusOut",value:function(e){this.collapseGetLocationButton()}},{key:"collapseGetLocationButton",value:function(){var e=document.querySelector(this.ui.jsGetZipcodeBtn);e&&e.classList.add(this.modifiers.collapsed)}},{key:"toggleSuggestiveField",value:function(e){var t=this,n=document.getElementById("location-suggestive"),a=0;if(n.innerHTML="",""===e.trim())return!1;(/^[0-9]+$/.test(e)?this.store.zipCodesList.filter(function(t){return t.includes(e)}):this.store.cityStateList.filter(function(t){return t.toUpperCase().includes(e.toUpperCase())})).forEach(function(t,r){if(t.length>0&&a<=7){var i=t.toLowerCase(),o=i.indexOf(e.toLowerCase()),s=e.length,l='<li id="location-suggestive-'.concat(r,'" class="calendar-sf-filter-tray__location-suggestive-item js-suggestions-item" role="option" tabindex="-1">');l+=i.substring(0,o),l+="<span>".concat(i.substring(o,o+s),"</span>"),l+=i.substring(o+s),l+="</li>",n.insertAdjacentHTML("beforeend",l),a++}}),n.classList.remove("collapsed"),n.hasChildNodes()?n.querySelectorAll(this.ui.jsSuggestionsItem).forEach(function(e){e.addEventListener("mousedown",t.selectSuggestionsItem.bind(t)),e.addEventListener("keypress",t.selectSuggestionsItem.bind(t))}):n.classList.add("collapsed")}},{key:"onClickOutsideHideList",value:function(e){var t=e.target.closest(this.ui.container),n=document.querySelector(this.ui.jsSuggestions);null!=n&&n.classList.contains(this.modifiers.collapsed)||(!t||t&&!t.isEqualNode(document.querySelector("".concat(this.ui.jsSuggestionsItem,".").concat(this.modifiers.active))))&&this.hideSuggestiveList()}},{key:"onKeydownNavigateSuggestions",value:function(e){var t,n,a,r,i;if(9===e.keyCode&&this.hideSuggestiveList(),(38===e.keyCode||40===e.keyCode)&&(e.preventDefault(),n=(t=e.currentTarget).previousElementSibling,a=t.querySelectorAll(this.ui.jsSuggestionsItem),38===e.keyCode&&-1!==this.currItemIndex?this.currItemIndex--:40===e.keyCode&&this.currItemIndex<a.length-1&&(null===n.getAttribute("aria-activedescendant")&&-1!==this.currItemIndex||this.currItemIndex++),r=a[this.currItemIndex],null===(i=t.querySelector(".".concat(this.modifiers.active)))||void 0===i||i.classList.remove(this.modifiers.active),r?(r.focus(),n.setAttribute("aria-activedescendant",r.id),r.classList.add(this.modifiers.active)):(n.removeAttribute("aria-activedescendant"),this.currItemIndex=-1,n.focus())),13===e.keyCode&&(r=(a=(t=e.currentTarget).querySelectorAll(this.ui.jsSuggestionsItem))[this.currItemIndex])&&r.click(),27===e.keyCode){e.preventDefault(),this.hideSuggestiveList();var o=document.querySelector(this.ui.jsLocationField);o&&o instanceof HTMLInputElement&&(o.setAttribute("aria-expanded","fal
2se"),o.focus())}}},{key:"hideSuggestiveList",value:function(){var e=document.querySelector(this.ui.jsSuggestions);e&&(null!=e&&e.classList.contains(this.modifiers.collapsed)||(e.classList.add(this.modifiers.collapsed),this.currItemIndex=-1))}},{key:"selectSuggestionsItem",value:function(e){if("keypress"===e.type&&13!==e.keyCode)return!1;e.preventDefault(),document.querySelector(this.ui.jsLocationField).value=e.target.innerHTML.replace("<span>","").replace("</span>","");var t=document.getElementById("location-suggestive");t.classList.add("collapsed"),t.innerHTML="",this.convertSearchToLatLng()}},{key:"convertSearchToLatLng",value:function(){var e=this,t=new google.maps.Geocoder,n=Number(document.querySelector(".js-location-radius-select").value),a=document.querySelector(this.ui.jsLocationField).value;if(this.store.selectedFilters.length>0)for(var r=0;r<this.store.selectedFilters.length;r++)this.store.selectedFilters[r].includes("radius")&&this.store.selectedFilters.splice(r,1);a=this.capitalizeName(a),this.store.selectedFilters.push("radius/".concat(n," miles of ").concat(a)),t.geocode({address:"".concat(a,", USA")},function(t,n){e.store.originCoords="OK"==n?[t[0].geometry.location.lng(),t[0].geometry.location.lat()]:[0,0],document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("filter-results"))})}},{key:"capitalizeName",value:function(e){return e.replace(/\b(\w)/g,function(e){return e.toUpperCase()})}},{key:"getUserLatLngOnClick",value:function(e){var t=this,n=e.currentTarget;if("keypress"===e.type&&13!==e.keyCode)return!1;e.preventDefault();var a="https://www.googleapis.com/geolocation/v1/geolocate?",r=document.getElementById("googleMaps");a+=null!=r&&r.src?r.src.substring(r.src.indexOf("key=")):"",fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({considerIp:"true"})}).then(function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(function(e){t.getZipCode(e.location)}).catch(function(){console.error("Browser does not support getCurrentPosition")}),n.classList.add("collapsed")}},{key:"getZipCode",value:function(e){var t=this,n=document.querySelector(this.ui.jsLocationField),a=new google.maps.LatLng(e.lat,e.lng);(new google.maps.Geocoder).geocode({latLng:a},function(e,a){if(a===google.maps.GeocoderStatus.OK){if(e[0])for(var r=0;r<e[0].address_components.length;r++){var i=e[0].address_components[r];if("postal_code"===i.types[0]){n.value=i.short_name,document.querySelector(t.ui.jsGetZipcodeBtn).classList.add("collapsed"),n.focus();break}}}else console.error("Geocoder failed due to: "+a)})}},{key:"clearLocationFilterOnClick",value:function(e){this.clearSearch(e)}},{key:"clearSearch",value:function(e){var t,n=document.querySelector(this.ui.jsLocationField).value;if(this.capitalizeName(n),e.preventDefault(),"keypress"===e.keypress&&13!==e.keyCode)return!1;t=-1,this.store.selectedFilters.forEach(function(e,n){e.indexOf("radius/")>-1&&(t=n)}),t>-1&&this.store.selectedFilters.splice(t,1);var a=document.querySelector(this.ui.jsApplyLocationBtn);a instanceof HTMLButtonElement&&(a.disabled=!0);var r=document.querySelector("#location-radius-select");this.store.radius=r?r.value:null;var i='[value = "'.concat(this.store.radius,'"]');document.querySelector('[data-aem-module="o5-csf-location-custom-select-parent"] .js-uib-customselect-selected-value').innerHTML=document.querySelector("#location-radius-select").querySelector(i).innerHTML,document.querySelector(this.ui.jsLocationField).value="",document.querySelector(this.ui.jsRemoveLocation).style.display="none",this.store.search="",this.store.radius=0,this.store.currPageNum=1,k("Filter removed. Location filter cleared."),document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("updateSFPills")),document.dispatchEvent(new CustomEvent("filter-results"))}},{key:"applyLocationFilterOnClick",value:function(e){e.preventDefault();var t=document.querySelector(this.ui.jsLocationField);if("keypress"===e.type&&13!==e.keyCode)return!1;t&&""!==t.value&&(this.store.currPageNum=1,this.convertSearchToLatLng(),k("Filter changed. Showing events near ".concat(t.value,"."))),document.dispatchEvent(new CustomEvent("updateSFPills"))}},{key:"determineMinusOnCheckbox",value:function(){for(var e=2*document.querySelectorAll(".master-checkbox").length,t=function(){var e=document.querySelector(".master-".concat(n)),t=document.querySelectorAll(".detail-".concat(n)),a=t.length,r=0;t.forEach(function(e){e.checked&&r++}),e&&r>0&&r<a&&e.classList.add("minus--show")},n=0;n<=e;n++)t()}},{key:"onChangeSelectFilter",value:function(e){var t,n=this,a=e.target,r=[],i=a.id.split("-"),o=0,s=a.checked?"added":"removed",l=w(a.value);if(r.push(a.value),void 0!==i){var c;if(i=[i[i.length-1]],t=document.querySelector(".master-".concat(i)),a.classList.contains("master-".concat(i))&&(null===(c=t)||void 0===c||c.classList.remove("minus--show"),document.querySelectorAll(".detail-".concat(i)).forEac
2h(function(e){e.checked=a.checked,r.push(e.value)})),a.classList.contains("detail-".concat(i)))if(a.checked){var d=!0;document.querySelectorAll(".detail-".concat(i)).forEach(function(e){d=d&&e.checked,t&&e.checked&&!t.classList.contains("minus--show")&&(t.classList.add("minus--show"),t.indeterminate=!0)}),d&&t&&(t.checked=!0,r.push(t.value),t.classList.remove("minus--show"),t.indeterminate=!1)}else t&&(t.checked=!1,r.push(t.value),t.classList.remove("minus--show"),t.indeterminate=!1);document.querySelectorAll(".detail-".concat(i)).forEach(function(e){e.checked&&o++}),o>0&&o<document.querySelectorAll(".detail-".concat(i)).length&&t&&(t.classList.add("minus--show"),t.indeterminate=!0)}if(r&&a.checked)for(var u=0;u<r.length;u++)this.store.selectedFilters.push(r[u]);else for(var f=function(e){n.store.selectedFilters=n.store.selectedFilters.filter(function(t){return t!==r[e]})},h=0;h<r.length;h++)f(h);this.store.selectedFilters=this.store.selectedFilters.filter(function(e,t,n){return n.indexOf(e)===t}),this.store.savedFilters=z(this.store.selectedFilters),this.store.currPageNum=1,k("Filter ".concat(s,". ").concat(l,".")),document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters")),document.dispatchEvent(new CustomEvent("setCsfStore")),document.dispatchEvent(new CustomEvent("updateSFPills")),document.dispatchEvent(new CustomEvent("filter-results"))}},{key:"expandAccordions",value:function(){var e=this;this.categories.forEach(function(t){if(e.store.selectedFilters.some(function(e){return e.includes(t.filterLabel)})){var n=document.getElementById(t.label.toLowerCase().replaceAll(" ","-"));n&&n.click()}})}},{key:"serializeData",value:function(){var e=this.store.aemData,t=this.store.filterLanguages,n=this.store.filterEventTypes,a=e.showFilterSection,r=(this.store.selectedFilters||[]).length>0,i=[{label:e.eventLocationLabelFilter,show:"true"==a,data:this.store.allEvents,method:"createFindLocationTpl",id:"event-radius",filterLabel:"radius"},{label:e.eventTopicLabelFilter,show:!0,data:this.store.filterData.sort(function(e,t){return e.type>t.type?1:t.type>e.type?-1:0}),method:"createCategoryList",id:"event-topic",filterLabel:"topic"},{label:e.eventLanguagesLabelFilter,show:t.length>1&&"english"===t[0].toLowerCase(),data:t,method:"createLanguagesList",id:"event-language",filterLabel:"language"},{label:e.eventTypeLabelFilter,show:n.length>1,data:n,method:"createTypeList",id:"event-type",filterLabel:"type"}];return this.categories=i,{collection:i,heading:r?"Filtered by":"Filter by",filterHeading:"Filter your results",info:"Selecting a filter will change the results immediately.",closeBtn:"Done",showFilter:this.store.aemData.showFilterSection}}},{key:"template",value:function(e){var t=this,n=e.showFilter;return'<div class="calendar-sf-popover" qa-handles="O5-CSF-filter-popover">\n\t\t\t<button id="filters-popover-btn" class="calendar-sf-popover-btn calendar-sf-popover__btn uib-mobile-popover__btn dmp-btn dmp-btn--md dmp-btn--2 is--inactive js-ui-b-mobile-popover-toggle" aria-controls="filters-popover-content" data-focus-element=".calendar-sf-popover__heading" qa-handles="O5-CSF-filter-open-button">\n\t\t\t\t<svg class="icon material-filter" aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M400-240v-80h160v80H400ZM240-440v-80h480v80H240ZM120-640v-80h720v80H120Z"/></svg>\n\t\t\t\t'.concat(e.filterHeading,'\n\t\t\t\t<svg class="icon" aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>\n\t\t\t</button>\n <div role="region" id="filters-popover-content" \n class="uib-mobile-popover__content calendar-sf-popover__content js-ui-b-mobile-popover-content"\n aria-labelledby="calendar-sf-filter-popover__heading-id" aria-modal="true" qa-handles="O5-CSF-filter-popover-content">\n <div class="uib-mobile-popover__scroller" qa-handles="O5-CSF-filter-popover-scroller">\n <div class="calendar-sf-filter-tray__container calendar__flex" qa-handles="O5-CSF-filter-tray-container">\n <h2 id="search-heading" class="calendar-sf-filter-tray__heading calendar-sf-filter-tray__heading--mobile" qa-handles="O5-CSF-filter-mobile-heading">Filter your results</h2>\n <div class="dmp-col-2 uib-mobile-popover__close" qa-handles="O5-CSF-filter-close-wrap">\n <button id="filters-popover-close-btn" \n class="uib-mobile-popover__close-btn js-ui-b-mobile-popover-close-btn"\n\t\t\t\t\t\t\t\tqa-handles="O5-CSF-filter-close-button"\n aria-label="close filters dialog">\n\t\t\t\t\t\t\t\t<svg class="icon" aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>
2\n <span class="dmp-util-assist__text">\n ').concat(e.closeBtn,"\n </span> \n </button>\n </div>\n </div>\n ").concat("true"===n?'<h3 class="calendar-sf-filter-tray__heading" id="calendar-sf-filter-tray__heading_id" qa-handles="O5-CSF-filter-heading">'.concat(e.heading,'</h3> \n <div class="calendar-sf-filter-tray__header" role="group" aria-labelledby="calendar-sf-filter-tray__heading_id" qa-handles="O5-CSF-filter-header">\n <div class="calendar-sf-filter-tray__info calendar-sf-popover__subheader" qa-handles="O5-CSF-filter-info">').concat(e.info,"</div>\n </div>"):"",'\n \n \n <div class="calendar-sf-pills csf-pills-mobile" role="group" aria-labelledby="calendar-sf-filter-pills-mobile" qa-handles="O5-CSF-filter-pills-wrapper">\n <div id="calendar-sf-filter-pills-mobile" class="calendar-sf-pills-data calendar-sf-pills-data--mobile" data-optum-library-cmp="calendar-sf-pills-data" qa-handles="O5-csf-pills-mobile"></div>\n </div>\n <div class="calendar-sf-filter-tray__filters-container" qa-handles="O5-Calendar-filterContainer">\n ').concat(e.collection.map(function(e){var n=e.show,a=e.label,r=e.method,i=e.data;return n?t.accordionTemplate(a,t[r](i,t.store.selectedFilters,a)):""}).join(""),"\n </div>\n </div>\n </div>\n\t\t</div>")}},{key:"accordionTemplate",value:function(e,t){var n=e.toLowerCase().replaceAll(" ","-");return'<div class="calendar-sf-filter-tray__filters-categories" qa-handles="O5-CSF-filter-category-group">\n <div class="calendar-sf-filter-tray__filters js-accordion-trigger" id="'.concat(n,'" role="button" aria-controls="calendar-sf-filter-tray__category-').concat(n,'" aria-expanded="false" tabindex="0" qa-handles="O5-CSF-filter-accordion-trigger">\n\t\t\t\n <div class="calendar-sf-filter-tray__icon-container" qa-handles="O5-CSF-filter-accordion-icon-container">\n <div class="calendar-sf-filter-tray__icon-bg" qa-handles="O5-CSF-filter-accordion-icon-bg">\n <svg class="careticon" xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true" focusable="false" qa-handles="O5-CSF-filter-accordion-icon">\n\t\t\t\t\t<path\n\t\t\t\t\t\td="M13.95 10.05C13.35 10.65 13.35 11.55 13.95 12.15L19.8 18L13.95 23.85C13.35 24.45 13.35 25.35 13.95 25.95C14.55 26.55 15.45 26.55 16.05 25.95L22.95 19.05C23.55 18.45 23.55 17.55 22.95 16.95L16.05 10.05C15.45 9.44998 14.55 9.44998 13.95 10.05Z"\n\t\t\t\t\t\tfill="#3D3C38" />\n\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</div>\n <span qa-handles="O5-CSF-filter-accordion-label">').concat(e,"</span>\n\t\t</div>\n\t\t").concat(t,"\n\t</div>")}},{key:"createFindLocationTpl",value:function(e,t,n){var a=this.store.aemData,r=""!==a.searchLocationHelperText?'<p id="location-helper-text" class="calendar-sf-filter-tray__location-search-helper-txt">'.concat(a.searchLocationHelperText,"</p>"):"",i=n.toLowerCase().replaceAll(" ","-"),o=""!==a.searchLocationHelperText?"has-helper-text":"",s="",l=0;return t.map(function(e){e.indexOf("radius/")>-1&&(s=e.split("/")[1],l=parseInt(s.split(" miles of ")[0]),s=s.split(" miles of ")[1])}),'<div class="calendar-sf-filter-tray__category" id="calendar-sf-filter-tray__category-'.concat(i,'" role="region" aria-labelledby="').concat(i,'" qa-handles="O5-CSF-filter-location-category">\n <div class="calendar-sf-filter-tray__location-search-content" qa-handles="O5-CSF-filter-location-search-content">\n <label id="location-search-label" class="calendar-sf-filter-tray__location-search-label" for="location-search" qa-handles="O5-CSF-filter-location-label">Enter city or ZIP:</label>\n <div id="filter-location-search" class="calendar-sf-filter-tray__location-search" qa-handles="O5-CSF-filter-location-search">\n <input id="location-search" class="calendar-sf-filter-tray__location-search-field js-location-field" value="').concat(s,'" aria-expanded="false" type="text" autocomplete="off" role="combobox" aria-autocomplete="list" aria-labelledBy="location-search-label" aria-describedby="location-helper
2-text" aria-controls="location-suggestive" qa-handles="O5-CSF-filter-location-input"/>\n\t\t\t\t\t').concat(r,'\n <ul id="location-suggestive" class="calendar-sf-filter-tray__location-suggestive js-suggestions collapsed ').concat(o,'" role="listbox" qa-handles="O5-CSF-filter-location-suggestions"></ul>\n <button class="calendar-sf-filter-tray__location-search-remove-icon material material-times-circle js-remove-location" aria-label="Clear city or ZIP" tabindex="0" qa-handles="O5-CSF-filter-location-remove-button">\n <svg class="icon" qa-handles="O5-CSF-filter-location-remove-icon" aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144 56 56ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>\n </button>\n <button id="get-location-btn" class="calendar-sf-filter-tray__get-location collapsed js-get-zipcode-btn" tabindex="0" qa-handles="O5-CSF-filter-get-location-button">\n\t\t\t\t\t\t<svg class="icon material-location-arrow" aria-hidden="true" focusable="false" viewBox="0 -960 960 960" fill="currentColor"><path d="M516-120 402-402 120-516v-56l720-268-268 720h-56Zm26-148 162-436-436 162 196 78 78 196Zm-78-196Z"/></svg>\n\t\t\t\t\t\tUse my Location\n\t\t\t\t\t</button>\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n <div class="calendar-sf-filter-tray__location-radius-content" data-aem-module="o5-csf-location-custom-select-parent" qa-handles="O5-CSF-filter-radius-content">\n <label id="location-radius-select-label" class="calendar-sf-filter-tray__location-radius-select-label" for="location-radius-select" qa-handles="O5-CSF-filter-radius-label">Within miles:</label>\n <select label-id="location-radius-select-label" id="location-radius-select" class="calendar-sf-filter-tray__location-radius-select js-location-radius-select" data-uib-custom-select qa-handles="O5-CSF-filter-radius-select">\n\t\t\t\t\t').concat(this.createRadiusSelect(a.radiusValues,l),'\n\t\t\t\t</select>\n\t\t\t</div>\n <div class="calendar-sf-filter-tray__location-btns-content" qa-handles="O5-CSF-filter-location-buttons-content">\n <div class="calendar-sf-filter-tray__location-btns" qa-handles="O5-CSF-filter-location-buttons">\n <button id="location-apply-btn" class="dmp-btn dmp-btn--1 dmp-btn--md js-apply-btn" disabled qa-handles="O5-CSF-filter-apply-button">Filter</button>\n <button id="location-clear-btn" class="dmp-btn dmp-btn--1 dmp-btn--md js-clear-btn" qa-handles="O5-CSF-filter-clear-button">Clear</button>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>')}},{key:"createRadiusSelect",value:function(e,t){return e.map(function(e){return e===t?'<option class="calendar-sf-filter-tray__location-radius-option" value="'.concat(e,'" selected="selected">').concat(e," miles</option>"):'<option class="calendar-sf-filter-tray__location-radius-option" value="'.concat(e,'">').concat(e," miles</option>")}).join("")}},{key:"createCategoryList",value:function(e,t,n){var a=this,r={},i=n.toLowerCase().replaceAll(" ","-");e.forEach(function(e){r[e.type]?r[e.type].push(e):r[e.type]=[e]});var o=!1,s="";""!==sessionStorage.getItem("parentTagClicked")&&(o=!0,s=sessionStorage.getItem("parentTagClicked"));var l=Object.keys(r).map(function(e,n){var i=r[e].map(function(r){return a.checkboxTemplate({id:"".concat(r.topic,"-").concat(n),label:r.topic,value:"topic/".concat(r.topic),modifierClass:"detail-".concat(n),isChecked:o?e==s:t.includes("topic/".concat(r.topic)),isSubGroup:!0})}).join("");return a.checkboxTemplate({id:"".concat(e,"-").concat(n),label:e,value:"topic/".concat(e),modifierClass:"master-checkbox master-".concat(n),isChecked:t.includes("topic/".concat(e)),childTpl:i})}).join("");return sessionStorage.setItem("parentTagClicked",""),o=!1,'<div class="calendar-sf-filter-tray__category" id="calendar-sf-filter-tray__category-'.concat(i,'" role="region" aria-labelledby="').concat(i,'" qa-handles="O5-CSF-filter-topic-category">
2\n <ul qa-handles="O5-CSF-filter-topic-list">').concat(l,"</ul>\n\t\t</div>")}},{key:"createLanguagesList",value:function(e,t,n){var a=this,r=n.toLowerCase().replaceAll(" ","-");return'<div class="calendar-sf-filter-tray__category" \n\t\t\tid="calendar-sf-filter-tray__category-'.concat(r,'" \n\t\t\trole="region" \n aria-labelledby="').concat(r,'"\n qa-handles="O5-CSF-filter-language-category">\n <ul qa-handles="O5-CSF-filter-language-list">\n\t\t\t\t').concat(e.map(function(e,n){var r="filter-".concat(e,"-").concat(n),i="language/".concat(e),o=t.includes(i);return a.checkboxTemplate({id:r,label:e,value:i,isChecked:o})}).join(""),"\n\t\t\t</ul>\n\t\t</div>")}},{key:"createTypeList",value:function(e,t,n){var a=this,r=n.toLowerCase().replaceAll(" ","-"),i=e.map(function(e){var n="type/".concat(e),r=t.includes(n);return a.checkboxTemplate({id:e,label:e,value:n,isChecked:r})}).join("");return'<div class="calendar-sf-filter-tray__category" id="calendar-sf-filter-tray__category-'.concat(r,'" role="region" aria-labelledby="').concat(r,'" qa-handles="O5-CSF-filter-type-category"><ul qa-handles="O5-CSF-filter-type-list">').concat(i,"</ul></div>")}},{key:"checkboxTemplate",value:function(e){var t=e.id,n=e.label,a=e.value,r=e.isChecked,i=e.isSubGroup,o=e.modifierClass,s=void 0===o?"":o,l=e.childTpl,c=void 0===l?"":l,d=i?" calendar-sf-filter-tray__subgroup":"";return t=t.replace(/\s/g,"-").toLowerCase(),'<li class="calendar-sf-filter-tray__group'.concat(d,'" qa-handles="O5-CSF-filter-checkbox-group">\n\t\t\t<input id="').concat(t,'"\n\t\t\t\tclass="calendar-sf-filter-tray__checkbox js-checkbox-input ').concat(s,'" \n\t\t\t\ttype="checkbox" \n\t\t\t\ttabindex="0"\n qa-handles="O5-CSF-filter-checkbox"\n\t\t\t\t').concat(r?"checked":"",'\n\t\t\t\tvalue="').concat(a,'" />\n <label for="').concat(t,'" class="calendar-sf-filter-tray__checkbox-label" qa-handles="O5-CSF-filter-checkbox-label">').concat(n,"</label>\n ").concat(c?'<ul qa-handles="O5-CSF-filter-checkbox-children">'.concat(c,"</ul>"):"","\n\t\t</li>")}},{key:"beforeRender",value:function(){this.store.numOfPages=Math.ceil(this.store.filteredResults.length/this.store.resultsPerPage)}},{key:"onClickToggleAccordion",value:function(e){if(32===e.keyCode&&e.preventDefault(),!(16===e.ke
2yCode||9===e.keyCode||"keypress"===e.type&&13!==e.keyCode||"keydown"===e.type&&27!==e.keyCode)){e.preventDefault();var t=e.target.closest(this.ui.trigger);if(t){var n=t.nextElementSibling,a=this.ui.expanded.slice(1);(27!==e.keyCode||t.classList.contains(a))&&(t.classList.contains(a)?(t.setAttribute("aria-expanded","false"),t.classList.remove(a),n.style.display="none"):(t.setAttribute("aria-expanded","true"),t.classList.add(a),n.style.display="block",setTimeout(function(){var e=n.querySelector('[name="firstName"]');e&&e.focus()},200)))}}}}],a&&W(n.prototype,a),r&&W(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);var ne=n(92359);function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function re(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,de(a.key),a)}}function ie(e,t,n){return t=se(t),function(e,t){if(t&&("object"==ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oe()?Reflect.construct(t,n||[],se(e).constructor):t.apply(e,n))}function oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oe=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}function ce(e,t,n){return(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(e){var t=function(e,t){if("object"!=ae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=ae(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ae(t)?t:t+""}const ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ce(n=ie(this,t,[e]),"uieName","calendar-sf-activity-module"),ce(n,"useSessionStoage",!1),n.componentName=e.componentName||n.uieName,n.init(),n.setup(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&le(e,t)}(t,e),n=t,(a=[{key:"setup",value:function(){this.store.stopScroll=!1,this.store.selectedFilters=this.store.savedFilters,0===this.store.selectedFilters.length&&(this.store.filteredResults=this.store.allEvents)}},{key:"getZipCode",value:function(e){var t=[];return""!==e&&void 0!==e&&null!==(t=e.match(/\d{5}/))[0]&&t[0]}},{key:"beforeRender",value:function(){if(void 0!==window.performance.getEntriesByType("navigation")&&window.performance.getEntriesByType("navigation").length>0){var e=window.performance.getEntriesByType("navigation")[0].type;this.useSessionStoage="navigate"==e||"reload"==e}this.useSessionStoage&&(null!==sessionStorage.getItem("".concat(this.store.storeName,"-currPageNum"))&&(this.store.currPageNum=JSON.parse(sessionStorage.getItem("".concat(this.store.storeName,"-currPageNum")))),null!==sessionStorage.getItem("".concat(this.store.storeName,"-resultsPerPage"))&&(this.store.resultsPerPage=JSON.parse(sessionStorage.getItem("".concat(this.store.storeName,"-resultsPerPage")))))}},{key:"afterRender",value:function(){var e={element:this.element,selector:"",store:this.store};document.dispatchEvent(new CustomEvent("setSelectedFilter")),new y(Object.assign(e,{selector:"calendar-sf-activity__categories"})),new V(Object.assign(e,{selector:"calendar-sf-results"})),new ne.A(Object.assign(e,{selector:"o5-pagination",backFromDetailPage:this.useSessionStoage})),new te(Object.assign(e,{selector:"calendar-sf-filter-tray"}))}},{key:"serializeData",value:function(){return{mainHeading:this.store.aemData.headingOne,mainDescription:this.store.aemData.headingOneDescription,subHeading:this.store.aemData.headingTwo}}},{key:"template",value:function(e){var t="string"==typeof e.mainHeading?e.mainHeading.trim():"",n='<div class="dmp-row" qa-handles="O5-Calendar-activity-row"><div class="calendar-serp__header dmp-col-12" qa-handles="O5-Calendar-header">\n\t\t '.concat(t?'<h1 class="calendar-serp__heading" qa-handles="O5-Calendar-heading">'.concat(t,"</h1>"):"",'\n\t\t <p class="calendar-serp__mainDescription" qa-handles="O5-Calendar-description">').concat(e.mainDescription,"</div>\n\t\t</div>\n\t\t</div>\n\t\t");return n+='<div class="calendar-region dmp-row" qa-handles="O5-Calendar-region">\n\t\t\t<div class="calendar-sidepanel calendar-sf-activity__border dmp-col-12 dmp-col-lg-6 dmp-col-xl-4" qa-handles="O5-Calendar-leftPanel">\n\t\t\t <section class="calendar-sf-activity__categories" qa-handles="O5-Calendar-categories-section">\n\t\t\t\t<div class="calendar-sf-activity__categories" data-optum-library-cmp="calendar-sf-activity__categories" qa-handles="O5-Calendar-categories"></div>\n\t\t\t </section>\n\t\t\t <div id="calendar" class="calendar-sf-activity__calendar" qa-handles="O5-Calendar-widget"></div>',n+=' <section class="calendar-sf-filter-tray" qa-handles="O5-CSF-FilterTray" data-optum-library-cmp="calendar-sf-filter-tray"></section>',n+='</div>\n\t\t\t\t<div class="dmp-col-12 dmp-col-lg-6 dmp-col-xl-8" qa-handles="O5-Calendar-results-panel">\n\t\t\t\t\t<div class="calendar-sf-activity-results" qa-handles="O5-Calendar-results-wrapper">\n\t\t\t\t\t\t<div data-optum-library-cmp="calendar-sf-results" class="calendar-sf-results" qa-handles="calendar-sf-results"></div>\n\t\t\t\t\t\t<div class="calendar__row" qa-handles="O5-Calendar-pagination-row">\n\t\t\t\t\t\t<div data-optum-library-cmp="o5-pagination" qa_handles="o5-calendar-sf-pagination"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>'}}])&&re(n.prototype,a),r&&re(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function he(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
vendor: 4,267 bytes, line 2
2if(!n){if(Array.isArray(e)||(n=pe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function pe(e,t){if(e){if("string"==typeof e)return me(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function ye(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_e(a.key),a)}}function be(e,t,n){return t=we(t),function(e,t){if(t&&("object"==fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ge()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function ke(e,t){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ke(e,t)}function Ce(e,t,n){return(t=_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e){var t=function(e,t){if("object"!=fe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=fe(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fe(t)?t:t+""}var qe='<svg class="icon" role="img" aria-label="Location" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-480q33 0 56.5-23.5T560-560q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 33 23.5 56.5T480-480Zm0 294q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Zm0-480Z"/></svg>',Se='<svg class="icon" role="img" aria-label="Virtual event" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M320-120v-80h80v-80H160q-33 0-56.5-23.5T80-360v-400q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v400q0 33-23.5 56.5T800-280H560v80h80v80H320ZM160-360h640v-400H160v400Zm0 0v-400 400Z"/></svg>',Ee='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm720 0v-120q0-44-24.5-84.5T666-434q51 6 96 20.5t84 35.5q36 20 55 44.5t19 53.5v120H760ZM360-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Zm400-160q0 66-47 113t-113 47q-11 0-28-2.5t-28-5.5q27-32 41.5-71t14.5-81q0-42-14.5-81T544-792q14-5 28-6.5t28-1.5q66 0 113 47t47 113ZM120-240h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0 320Zm0-400Z"/></svg>',Te='<svg class="icon" role="img" aria-label="calendar" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-1
27 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"/></svg>',Oe='<svg class="icon" role="img" aria-label="Time" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z"/></svg>',je='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80Zm-480-80q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h40v-80h80v80h240v-80h80v80h40q33 0 56.5 23.5T760-720v244q-20-3-40-3t-40 3v-164H200v400h280q0 20 3 40t11 40H200Zm0-560h480v-80H200v80Zm0 0v-80 80Z"/></svg>
2',Le='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>',xe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ce(n=be(this,t,[e]),"uieName","calendar-sf-event__sidebar"),Ce(n,"calData",{name:"",startDate:"",endDate:"",description:"",address:""}),n.ui={subheading:".calendar-sf-event__subtitle",dropdown:".calendar-sf-event__sidebar-dropdown",checkbox:".calendar-sf-filter-tray__checkbox",btn:".dmp-btn",button:".dmp-btn__md ",buttonReverse:".dmp-btn__1",labelSelect:".calendar-sf-event__label-select",addCalendarEvent:".calendar-sf-event__add-calendar-event",addCalendarButton:".calendar-sf-event__add-calendar-button",jsAddEvent:".js-add-sf-event",btnText:".calendar-sf-event__button-text",calBtn:".calendar-sf-event__button",hidePrint:".calendar-sf-event__hide-print",locationInfo:".calendar-sf-event__location",mapIcon:".oi-location",windowIcon:".oi-new-window",iconStyle:".calendar-sf-event__icon",mobileNew:".mobile-new-window",desktopNew:".desktop-new-window",windowMessage:".desktop-new-window__message",pills:".calendar-sf-event__pills",jsFilterTag:".js-filter-tag"},n.init(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ke(e,t)}(t,e),n=t,a=[{key:"formatCalData",value:function(){var e=this.store.selectedEvent;this.calData.name="".concat(e.topic).concat(e.details?": ".concat(e.details):""),this.calData.startDate=e.calStartDate.replace(/-|:|\.\d+/g,""),this.calData.endDate=e.calEndDate.replace(/-|:|\.\d+/g,""),this.calData.description=e.description,this.calData.address=e.address.toLowerCase().replace(/\b\w/g,function(e){return e.toUpperCase()})}},{key:"afterRender",value:function(){this.bindEventListeners(),this.formatCalData(),document.getElementById("add-to-calendar-select").style.display="none"}},{key:"bindEventListeners",value:function(){var e=this,t=document.querySelector(this.ui.jsAddEvent);t&&(t.addEventListener("click",this.onClickAddEventToCalendar.bind(this)),t.addEventListener("keydown",this.onClickAddEventToCalendar.bind(this)));var n=document.querySelector(this.ui.labelSelect);n&&(n.addEventListener("click",this.onClickSelectLabel.bind(this)),n.addEventListener("keydown",this.onClickSelectLabel.bind(this)));var a=document.getElementById("add-to-calendar-select");a&&a.addEventListener("keydown",this.onClickAddEventToCalendar.bind(this)),document.querySelectorAll(this.ui.jsFilterTag).forEach(function(t){t.addEventListener("click",e.onClickFilterByTag.bind(e)),t.addEventListener("keypress",e.onClickFilterByTag.bind(e))})}},{key:"onClickSelectLabel",value:function(e){var t=e.target.textContent.trim(),n=document.getElementById("add-to-calendar-select");if("click"===e.type||13===e.keyCode){switch(t){case"Outlook":case"Apple":this.createIcsCal();break;case"Google":window.open(this.createGoogleCal(),"_blank");break;case"Yahoo":window.open(this.createYahooCal(),"_blank")}n&&(n.style.display="none")}27===e.keyCode&&n&&(n.style.display="none")}},{key:"onClickAddEventToCalendar",value:function(e){var t=document.getElementById("add-to-calendar-select"),n=document.querySelector(this.ui.jsAddEvent);if(27===e.keyCode&&t&&(t.style.display="none",n&&n.setAttribute("aria-expanded","false")),"click"===e.type&&t){var a="block"===t.style.display;t.style.display=a?"none":"block",n&&n.setAttribute("aria-expanded",a?"false":"true")}}},{key:"onClickFilterByTag",value:function(e){var t=this;if(e.preventDefault(),"keypress"===e.type&&13!==e.which)return!1;var n=e.currentTarget.getAttribute("data-filter-tag");if(null===n)return!1;for(var a="",r=0;r<this.store.selectedFilters.length;r++)this.store.selectedFilters[r].indexOf("radius/")>-1&&(a=this.store.selectedFilters[r]);this.store.selectedFilters=[],this.store.selectedFilters.push(n);var i,o=n.split("/")[1],s=[],l=ve(this.store.filterData);try{for(l.s();!(i=l.n()).done;){var c=i.value;c.type==o&&s.push(c)}}catch(e){l.e(e)}finally{l.f()}if(0==s.length){var d,u=[],f=ve(this.store.filterData);try{for(f.s();!(d=f.n()).done;){var h=d.value;h.topic==o&&u.push(h)}}catch(e){f.e(e)}finally{f.f()}}else{sessionStorage.setItem("parentTagClicked",o);var v=new Set;
2s.forEach(function(e){if(!v.has(e.topic)){var n="topic/".concat(e.topic);t.store.selectedFilters.push(n),v.add(e.topic)}})}""!==a&&this.store.selectedFilters.push(a),this.store.savedFilters=he(this.store.selectedFilters);var p=document.getElementById("search-views");p&&(p.value="All events"),this.store.selectedEventsView="All events",this.store.currPageNum=1,this.store.selectedDate="",document.dispatchEvent(new CustomEvent("setCsfStore")),this.store.queryParamsFromFilterSource="EventDetailTag",document.dispatchEvent(new CustomEvent("generateQueryParamsFromFilters"));try{window.dispatchEvent(new CustomEvent("routing",{detail:{route:""}}))}catch(e){console.error("error");var m=document.createEvent("Event");m.initEvent("routing",!1,!0),window.dispatchEvent(m)}var y=new Date,b=this.store.calendarInstance;b&&(b.setDate(new Date(y.getFullYear(),y.getMonth()+1,1),!1),b.setDate(y,!1))}},{key:"createGoogleCal",value:function(){var e=["?text=".concat(encodeURIComponent(this.calData.name)),"&dates=".concat(this.calData.startDate,"/").concat(this.calData.endDate),"&details=".concat(encodeURIComponent(this.calData.description)||""),"&location=".concat(encodeURIComponent(this.calData.address))].join("");return"https://calendar.google.com/calendar/r/eventedit".concat(e)}},{key:"createIcsCal",value:function(){var e=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT","URL:".concat(document.URL),"DTSTART:".concat(this.calData.startDate),"DTEND:".concat(this.calData.endDate),"SUMMARY:".concat(this.calData.name),"DESCRIPTION:".concat(this.calData.description),"LOCATION:".concat(this.calData.address),"END:VEVENT","END:VCALENDAR"].join("\n"),t=navigator.userAgent;if(t.indexOf("Trident")>-1||t.indexOf("Edge")>-1){var n=new Blob([e]),a=window.navigator;a.msSaveOrOpenBlob&&a.msSaveOrOpenBlob(n,"download.ics")}else window.location.href="data:text/calendar;charset=utf8,".concat(encodeURIComponent(e));return e}},{key:"createYahooCal",value:function(){var e=["&title=".concat(encodeURIComponent(this.calData.name)),"&st=".concat(this.calData.startDate),"&et=".concat(this.calData.endDate),"&desc=".concat(encodeURIComponent(this.calData.description)),"&in_loc=".concat(encodeURIComponent(this.calData.address))].join("");return"http://calendar.yahoo.com/?v=60&view=d&type=20".concat(e)}},{key:"parseAddress",value:function(e){var t=e.address?e.address:"";if(""===t)return"";var n,a=t.split(", "),r=a.length-1,i="";if(r<2)return"";function o(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})}n="".concat(o(a[r-2].toLowerCase()),", ").concat(a[r-1],", ").concat(a[r]);for(var s=0;s<r-2;s++)i+="".concat(a[s],", ");return'\n\t\t\t<div qa-handles="O5-Calendar-sidebar-address-business">\n\t\t\t\t'.concat(qe,"\n\t\t\t\t").concat(o(e.businessName.toLowerCase())?"".concat(o(e.businessName.toLowerCase())):"",' \n\t\t\t</div>\n\t\t\t<div class="calendar-sf-event__address" qa-handles="O5-Calendar-sidebar-address">\n\t\t\t<a href="').concat(this.directionsLink(e.lat,e.lng,e.address),'" target="_self" qa-handles="O5-Calendar-sidebar-address-link">\n\t\t\t\t<div qa-handles="O5-Calendar-sidebar-address-line1">').concat(o(i.toLowerCase()),'</div>\n\t\t\t\t<div qa-handles="O5-Calendar-sidebar-address-line2">').concat(n,"\n\t\t\t</a>\n\t\t\t</div>")}},{key:"getVirtualEvent",value:function(e){return e.IsThisVirtualEvent?'<div class="calendar-sf-event__virtual" qa-handles="O5-Calendar-sidebar-virtual-event">\n\t\t\t\t\t\t<div qa-handles="O5-Calendar-sidebar-virtual-icon-wrap">\n\t\t\t\t\t\t\t'.concat(Se,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div qa-handles="O5-Calendar-sidebar-virtual-copy">Virtual event</div>\n\t\t\t\t</div>'):""}},{key:"directionsLink",value:function(e,t,n){var a="https://www.google.com/maps/search/?api=1&query=";return 0!==e&&0!==t?"".concat(a).concat(e,",").concat(t):"".concat(a).concat(n)}},{key:"filterTagsByCategory",value:function(e,t){return e.filter(function(e){return e.split("/")[0]!=t})}},{key:"categoryPills",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,r.ZS)(this.ui);return this.store.filterLanguages.length>1&&"english"===this.store.filterLanguages[0].toLowerCase()||(e=this.filterTagsByCategory(e,"language")),this.store.filterEventTypes.length>1||(e=this.filterTagsByCategory(e,"type")),e.map(function(e){var n=e.split("/"),a=n.shift(),r=n.join("/");
2return""!==r&&"view"!==a&&"radius"!==a?'<a href="javascript:void(0);" \n\t\t\t\t\tclass="calendar-sf-event__pills-button '.concat(t.jsFilterTag,'" \n\t\t\t\t\tdata-filter-tag="').concat(e,'"\n\t\t\t\t\ttabindex="0"\n\t\t\t\t\tqa-handles="O5-Calendar-sidebar-category-pill">\n\t\t\t\t\t').concat(r,"\n\t\t\t\t</a>"):""}).join("")}},{key:"serializeData",value:function(){return this.store.selectedEvent}},{key:"template",value:function(e){var t=(0,r.ZS)(this.ui),n=1===e.spotsLeft?"spot":"spots";return"".concat(e.displaySpots&&e.spotsLeft?'<div class="spots-left" qa-handles="O5-Calendar-sidebar-spots-left">'.concat(Ee,'<div qa-handles="O5-Calendar-sidebar-spots-left-copy">').concat(e.spotsLeft," ").concat(n," left</div></div>"):"",'\n\t\t\t<h2 class="').concat(t.subheading,'" qa-handles="O5-Calendar-sidebar-date-heading">').concat(this.store.aemData.dateTimeHeading,'</h2>\n\t\t\t<div class="o5-csf-icon" qa-handles="O5-Calendar-sidebar-date-row">\n\t\t\t\t').concat(Te,"\n\t\t\t\t").concat(e.startDate,'\n\t\t\t</div>\n\t\t\t<div class="o5-csf-icon" qa-handles="O5-Calendar-sidebar-time-row">\n\t\t\t\t').concat(Oe,"\n\t\t\t\t").concat(e.startTimeDisplay," - ").concat(e.endTimeDisplay," ").concat(e.timeZone,'\n\t\t\t</div>\n\t\t\t<div class="').concat(t.dropdown," ").concat(t.print,'" qa-handles="O5-Calendar-sidebar-add-calendar-wrap"> \n\t\t\t\t<button class="').concat(t.addCalendarButton," ").concat(t.btn," ").concat(t.button," ").concat(t.buttonReverse," ").concat(t.jsAddEvent,'" aria-expanded="false" qa-handles="O5-Calendar-sidebar-add-calendar-button">\n\t\t\t\t\t').concat(je,'\n\t\t\t\t\tAdd to calendar\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div id="add-to-calendar-select" class="').concat(t.addCalendarEvent,'" role="group" aria-labelledby="select a calendar" qa-handles="O5-Calendar-sidebar-add-calendar-options">\n\t\t\t\t<div class="calendar-sf-event__label-disabled" qa-handles="O5-Calendar-sidebar-add-calendar-placeholder">\n\t\t\t\t\t').concat(Le,'\n\t\t\t\t\tSelect a calendar\n\t\t\t\t</div>\n\t\t\t\t<div class="').concat(t.labelSelect,'" tabindex="0" role="link" qa-handles="O5-Calendar-sidebar-calendar-option">Outlook</div>\n\t\t\t\t<div class="').concat(t.labelSelect,'" tabindex="0" role="link" qa-handles="O5-Calendar-sidebar-calendar-option">Google</div>\n\t\t\t\t<div class="').concat(t.labelSelect,'" tabindex="0" role="link" qa-handles="O5-Calendar-sidebar-calendar-option">Apple</div>\n\t\t\t\t<div class="').concat(t.labelSelect,'" tabindex="0" role="link" qa-handles="O5-Calendar-sidebar-calendar-option">Yahoo</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<h2 class="').concat(t.subheading,'" qa-handles="O5-Calendar-sidebar-location-heading">').concat(this.store.aemData.locationInfoHeading,'</h2>\n\t\t\t<div qa-handles="O5-Calendar-sidebar-location-section">\n\t\t\t\t<div class="').concat(t.locationInfo,'" qa-handles="O5-Calendar-sidebar-location-info">\n\t\t\t\t').concat(this.getVirtualEvent(e)?this.getVirtualEvent(e):this.parseAddress(e),'\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<h2 class="').concat(t.subheading,'" qa-handles="O5-Calendar-sidebar-category-heading">').concat(this.store.aemData.categoryTagsHeading,'</h2>\n\t\t\t<div class="').concat(t.pills,'" qa-handles="O5-Calendar-sidebar-category-pills">\n\t\t\t\t').concat(this.categoryPills(e.tags),"\n\t\t\t</div>")}}],a&&ye(n.prototype,a),i&&ye(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,i}(a.uA);const De=xe;var Ae=n(95166),Ie=n.n(Ae),Pe=n(89668),Fe=n(17777);function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Be(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,a,r,i){var l=a&&a.prototype instanceof s?a:s,c=Object.create(l.prototype);return Ne(c,"_invoke",function(n,a,r){var i,s,l,c=0,d=r||[],u=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,o}};function h(n,a){for(s=n,l=a,t=0;!u&&c&&!r&&t<d.length;t++){var r,i=d[t],h=f.p,v=i[2];n>3?(r=v===a)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,f.v=a,f.n=i[1]):h<v&&(r=n<3||i[0]>a||a>v)&&(i[4]=n,i[5]=a,f.n=v,s=0))}if(r||n>1)return o;throw u=!0,a}return function(r,d,v){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,v),s=d,l=v;(t=s<2?e:l)||!u;){i||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(u=f.n<0)?l:n.call(a,f))!==o)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,r,i),!0),c}var o={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(Ne(t={},a,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ne(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,Ne(u,"constructor",c),Ne(c,"constructor",l),l.displayName="GeneratorFunction",Ne(c,r,"GeneratorFunction"),Ne(u),Ne(u,r,"Generator"),Ne(u,a,function(){return this}),Ne(u,"toString",function(){return"[object Generator]"}),(Be=function(){return{w:i,m:f}})()}function Ne(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Ne=function(e,t,n,a){function i(t,n){Ne(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Ne(e,t,n,a)}function Re(e,t,n,a,r,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(a,r)}function He(){He=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,a,r){var i=RegExp(e,a);return t.set(i,r||t.get(e)),$e(i,n.prototype)}function a(e,n){var a=t.get(n);return Object.keys(a).reduce(function(t,n){var r=a[n];if("number"==typeof r)t[n]=e[r];else{for(var i=0;void 0===e[r[i]]&&i+1<r.length;)i++;t[n]=e[r[i]]}return t},Object.create(null))}return Xe(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=a(n,this);var r=n.indices;r&&(r.groups=a(r,this))}return n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var i=t.get(this);return e[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(""===n)return e;var a=i[t];return Array.isArray(a)?"$"+a.join("$"):"number"==typeof a?"$"+a:""}))}if("function"==typeof r){var o=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=Me(e[e.length-1])&&(e=[].slice.call(e)).push(a(e,o)),r.apply(this,e)})}return e[Symbol.replace].call(this,n,r)},He.apply(this,arguments)}function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach(function(t){Je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ye(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Ge(){return Ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ge.apply(null,arguments)}function ze(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Qe(a.key),a)}}function Ue(e,t,n){return t=Ke(t),function(e,t){if(t&&("object"==Me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,We()?Reflect.construct(t,n||[],Ke(e).constructor):t.apply(e,n))}function We(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(We=function(){return!!e})()}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}function Xe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$e(e,t)}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}function Je(e,t,n){return(t=Qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=Me(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Me(t)?t:t+""}var et='<svg class="icon icon--error" aria-hidden="true" width="20" height="20" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q
2-54 54-127 85.5T480-80Z"/></svg>',tt='<svg class="icon icon--error" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',nt='<svg class="icon icon--check-circle" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',at='<svg class="calendar-sf-waitlist-cta__notification-icon icon icon--check-circle" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',rt='<svg class="calendar-sf-registration__close icon icon--close" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>',it=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Je(n=Ue(this,t,[e]),"uieName","calendar-sf-registration-component"),Je(n,"selector",".calendar-sf-registration"),Je(n,"modifiers",{requiredTxt:"is--required",invalidTxt:"is--invalid",disabled:"is--disabled",checked:"is--checked",invalid:"is--invalid",disclaimer:"is--disclaimer"}),Je(n,"options",{}),Je(n,"showRegMsgOnTransition",!1),n.ui={displaySpots:".calendar-sf-registration__display-spots",spotsLeft:".calendar-sf-registration__spots-left",accordionBtn:".calendar-sf-registration__accordion-btn",submitBtn:".calendar-sf-registration__submit-btn",drawer:".calendar-sf-registration__drawer",textbox:".calendar-sf-registration__textbox",groupHeading:".calendar-sf-registration__group-heading",inputGroup:".calendar-sf-registration__group",nestedGroup:".calendar-sf-registration__nested-group",fieldset:".calendar-sf-registration__fieldset",radio:".calendar-sf-registration__radio",contactText:".calendar-sf-registration__text-id",checkbox:".calendar-sf-registration__checkbox",checkboxInput:".calendar-sf-registration__contact-checkbox-input",contactIcon:".calendar-sf-registration__contact-icon",label:".calendar-sf-registration__label",disclaimerText:".calendar-sf-registration__disclaimer-text",agreement:".calendar-sf-registration__agreement",optin:".calendar-sf-registration__optin",agreeBtn:".calendar-sf-registration__agree-btn",msgArea:".calendar-sf-registration__messenger",info:".calendar-sf-registration__info",numberChanger:".calendar-sf-registration__number-changer",fields:".js-field",formCheckbox:".js-checkbox-toggle",formRadio:".js-radio-toggle",formSubmitBtn:".js-submit-form-btn",messenger:".js-field-messenger",guestField:".js-guest-field",regexField:".js-regex-field",notification:".js-notification-msg",errNotification:".js-notification-error-msg",parent:"[data-form]"},n.setOptions(),n.shouldRender=n.store.selectedEvent.allowRegistration,n.init(),n}return Xe(t,e),n=t,a=[{key:"brokerEnabled",get:function(){return!0===this.store.aemData.useBrokerEndpoint||"true"===this.store.aemData.useBrokerEndpoint}},{key:"setOptions",value:function(){var e;this.brokerEnabled?e="Broker Calendar":(e=""===this.store.aemData.marketCode?"":this.store.aemData.marketCode+" ",e+=""===this.store.aemData.cdoCode?"":this.store.aemData.cdoCode+" ",e+="DMX Calendar"),this.options={hasCheckboxes:!0,formType:"registration",payload:{phoneOptIn:!1,emailOptIn:!1,directMailOptIn:!1,smsOptIn:!1,doNotC
2ontact:!0,numberofGuests:0,registrationType:"Registered",leadSourceDetail:e},userInfo:{},selectedRadioBtn:null,labelledbyIds:{}}}},{key:"afterRender",value:function(){var e=this,t=this.store.aemData;if(""!==t.termsAndConditionsText){var n=Fe.default.sanitize(this.decodeHtml(t.termsAndConditionsText)),a=document.getElementById("agreementTandC");a&&(a.innerHTML=n)}if(""!==t.agreeToTermsText){var r=Fe.default.sanitize(this.decodeHtml(t.agreeToTermsText)),i=document.getElementById("disclaimer-1");i&&(i.innerHTML=r)}if(""!==t.optInToReceiveInfoText){var o=Fe.default.sanitize(this.decodeHtml(t.optInToReceiveInfoText)),s=document.getElementById("optindisclaimer");s&&(s.innerHTML=o)}["contactMethod","emailText","phoneText","phoneRequired","phoneSet","mailText","mailRequired","mailSet"].forEach(function(e){var t=document.getElementById(e);t&&(t.style.display="none")});var l=document.getElementById("optin");l&&l.addEventListener("change",this.showContactMethod.bind(this));var c=document.getElementById("emailCheck");c&&(c.addEventListener("click",this.onClickToggleCheckbox.bind(this)),c.addEventListener("keydown",this.onClickToggleCheckbox.bind(this)));var d=document.getElementById("phoneCheck");d&&(d.addEventListener("click",this.showPhone.bind(this)),d.addEventListener("keydown",this.showPhone.bind(this)));var u=document.getElementById("mailCheck");u&&(u.addEventListener("click",this.showMail.bind(this)),u.addEventListener("keydown",this.showMail.bind(this)));var f=document.getElementById("smsCheck");f&&(f.addEventListener("click",this.onClickToggleCheckbox.bind(this)),f.addEventListener("keydown",this.onClickToggleCheckbox.bind(this)));var h=document.getElementById("agreement");h&&(h.addEventListener("click",this.register.bind(this)),h.addEventListener("keydown",this.register.bind(this)));var v=document.getElementById("agreementTandC");v&&v.addEventListener("click",this.saveFormData.bind(this));var p=document.querySelector(this.selector);if(p){p.addEventListener("click",function(t){t.target.closest(e.ui.formSubmitBtn)&&e.onClickSubmitForm(t)});var m=p.querySelector("form");m&&m.addEventListener("submit",function(t){e.onClickSubmitForm(t)}),p.addEventListener("blur",function(t){var n=t.target;n&&(n.matches(e.ui.guestField)?e.onBlurRoundNumber(t):n.matches(e.ui.fields)&&n.hasAttribute("required")&&!n.classList.contains(e.ui.regexField.slice(1))&&(""===n.value.trim()?e.showError(n):e.hideError(n)))},!0),this.populateFormDataFromStorage()}this.handleA11yUniqueIdentifiers(),this.populateStates(),this.dobSetup()}},{key:"saveFormData",value:function(){var e=document.querySelectorAll("".concat(this.selector," ").concat(this.ui.fields)),t=this.getFormData(e);Object.keys(t).length>0&&(this.store.eventFormData=t,document.dispatchEvent(new CustomEvent("setCsfStore")))}},{key:"populateFormDataFromStorage",value:function(){var e=this,t=this.store.eventFormData,n=Object.keys(t);n.length>0&&n.forEach(function(n){var a="".concat(e.ui.fields,'[name="').concat(n,'"]'),r=document.querySelector("".concat(e.selector," ").concat(a));r&&(r.value=t[n])})}},{key:"getFormData",value:function(e){var t=this,n={};e.forEach(function(e){var a=e.getAttribute("name"),r=t.resolveFieldName(e),i=a&&""!==a.trim()?a:r,o=e.value;i&&null!=o&&""!==o&&(n[i]=o)}),this.options.payload.numberofGuests&&(n.numberofGuests=parseInt(this.options.payload.numberofGuests,10)+1);var a=Ge({},(Ye(n),n));if(n.preferredContactMethod){a.doNotContact=!1;var r={Phone:"phoneOptIn","Direct mail":"directMailOptIn",Email:"emailOptIn",SMS:"smsOptIn"};n.preferredContactMethod.split(",").forEach(function(e){a[r[e]]=!0})}return Ve({},a)}},{key:"handleA11yUniqueIdentifiers",value:function(){var e={disclaimer:["disclaimer"]};for(var t in e){var n=e[t];this.options.labelledbyIds[t]||(this.options.labelledbyIds[t]=""),this.options.labelledbyIds[t]=this.options.labelledbyIds[t]+=n.join(" ")}}},{key:"decodeHtml",value:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"resolveFieldName",value:function(e){return"string"==typeof(null==e?void 0:e.name)&&""!==e.name.trim()?e.name:"job-title"===(null==e?void 0:e.id)?"title":"company-name"===(null==e?void 0:e.id)?"company":""}}
2,{key:"register",value:function(e){if("keydown"===e.type&&" "!==e.key&&"Enter"!==e.key)return!1;var t=document.getElementById("agreement"),n=document.querySelector(".js-submit-form-btn");n&&t&&"checkbox"===t.type&&(n.disabled=!t.checked)}},{key:"showContactMethod",value:function(e){var t=e.target,n=document.getElementById("contactMethod"),a=document.getElementById("first-heading");t.checked?(t.setAttribute("aria-expanded","true"),n&&(n.style.display="block"),a&&(a.style.display="flex"),this.setContactMethodErrorState(!1)):(t.setAttribute("aria-expanded","false"),n&&(n.style.display="none"),this.resetOptinCheckboxes())}},{key:"resetOptinCheckboxes",value:function(){var e=document.getElementById("phoneCheck"),t=document.getElementById("emailCheck"),n=document.getElementById("mailCheck"),a=document.getElementById("first-heading");null!=e&&e.classList.contains("is--checked")&&e.click(),null!=t&&t.classList.contains("is--checked")&&t.click(),null!=n&&n.classList.contains("is--checked")&&n.click();var r=document.getElementById("smsCheck");null!=r&&r.classList.contains("is--checked")&&r.click(),a&&(a.style.display="none"),this.setContactMethodErrorState(!1)}},{key:"setContactMethodErrorState",value:function(e){var t=document.getElementById("optin-error"),n=document.getElementById("first-heading"),a=document.getElementById("first-heading-error-icon"),r=document.querySelectorAll("".concat(this.selector," .js-contact-check"));t&&(t.hidden=!e),n&&n.classList.toggle("optin-error-heading",e),a&&(a.hidden=!e),r.forEach(function(t){e?(t.setAttribute("aria-invalid","true"),t.setAttribute("aria-describedby","optin-error")):(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"))})}},{key:"syncPreferredContactMethodWithVisibleState",value:function(){var e=this,t=Array.from(document.querySelectorAll("".concat(this.selector," .js-contact-check"))).filter(function(t){var n=t.classList.contains(e.modifiers.checked);return t.checked=n,n}).map(function(e){return e.getAttribute("data-contact")||e.value||""}).filter(Boolean).join(","),n=document.querySelector("".concat(this.selector," .js-contact-group"));return n&&(n.value=t),t}},{key:"showEmail",value:function(e){if("keydown"!==e.type||" "===e.key||"Enter"===e.key){"keydown"===e.type&&e.preventDefault();var t=document.getElementById("emailCheck"),n=document.getElementById("emailText");if(e.currentTarget.classList.contains(this.ui.checkbox.slice(1))){var a=t,r=a.closest(this.ui.parent),i=null==r?void 0:r.querySelector('input[type="text"], input[type="tel"], select'),o=null==r?void 0:r.querySelector("button"),s=a.classList.contains(this.modifiers.disclaimer);if(a.classList.contains(this.modifiers.checked)){if(i&&(i.required=!1,i.disabled=!0,i.classList.contains(this.modifiers.invalid)&&this.hideError(i)),o&&(o.disabled=!0),s&&a.removeAttribute("aria-labelledby"),a.classList.contains("js-contact-check")){var l=a.getAttribute("data-contact"),c=document.querySelector(".js-contact-group"),d=((null==c?void 0:c.value)||"").split(",");c.value=d.filter(function(e){return e!==l}).join(",")}}else if(i&&(i.required=!0,i.disabled=!1),o&&(o.disabled=!1),s&&a.setAttribute("aria-labelledby",this.options.labelledbyIds.disclaimer),a.classList.contains("js-contact-check")){var u=a.getAttribute("data-contact"),f=document.querySelector(".js-contact-group"),h=(null==f?void 0:f.value)||"";f.value=""===h?u||"":"".concat(h,",").concat(u)}}null!=t&&t.classList.contains(this.modifiers.checked)?(t.classList.remove(this.modifiers.checked),n&&(n.style.display="none")):(t.classList.add(this.modifiers.checked),n&&(n.style.display="block")),this.syncPreferredContactMethodWithVisibleState()}}},{key:"showPhone",value:function(e){if("keydown"!==e.type||" "===e.key||"Enter"===e.key){"keydown"===e.type&&e.preventDefault();var t=document.getElementById("phoneCheck"),n=document.getElementById("phoneText");if(e.currentTarget.classList.contains(this.ui.checkbox.slice(1))){var a=t,r=a.closest(this.ui.parent),i=null==r?void 0:r.querySelector('input[type="text"], input[type="tel"], select'),o=null==r?void 0:r.querySelector("button"),s=a.classList.contains(this.modifiers.disclaimer);if(a.classList.contains(this.modifiers.checked)){if(i&&(i.required=!1,i.disabled=!0,i.classList.contains(this.modifiers.invalid)&&this.hideError(i)),o&&(o.disabled=!0),s&&a.removeAttribute("aria-labelledby"),a.classList.contains("js-contact-check")){var l=a.getAttribute("data-contact"),c=document.querySelector(".js-contact-group"),d=((null==c?void 0:c.value)||"").split(",");c.value=d.filter(function(e){return e!==l}).join(",")}}else if(i&&(i.required=!0,i.disabled=!1),o&&(o.disabled=!1),s&&a.setAttribute("aria-labelledby",this.options.labelledbyIds.disclaimer),a.classList.contains("js-contact-check")){var u=a.getAttribute("data-contact"),f=document.querySelector(".js-contact-group"),h=(null==f?void 0:f.value)||"";f.value=""===h?u||"":"".concat(h,",").concat(u)}}null!=t&&t.classList.contains(this.modifiers.checked)?(n&&(n.style.display="none"),t.classList.remove(this.modifiers.checked)):(n&&(n.style.display="block"),t.classList.add(this.modifiers.checked)),this.syncPreferredContactMethodWithVisibleState()}}},{key:"showMail",value:function(e){var t,n=this;if("keydown"!==e.type||" "===e.key||"Enter"===e.key){"keydown"===e.type&&e.preventDefault();var a=document.getElementById("mailCheck"),r=document.getElementById("mailText"),i=document.getElementById("mailRequired"),o=document.getElementById("mailSet"),s=a.closest(this.ui.parent),l=Array.from(null!==(t=null==s?void 0:s.querySelectorAll('input[type="text"], input[type="tel"], select'))&&void 0!==t?t:[]),c=null==s?void 0:s.querySelector("button"),d=a.classList.contains(this.modifiers.disclaimer),u=a.classList.contains(this.modifiers.checked);if(u){if(l.forEach(function(e){e.required=!1,e.disabled=!0,e.classList.contains(n.modifiers.invalid)&&n.hideError(e)}),c&&(c.disabled=!0),d&&a.removeAttribute("aria-labelledby"),a.classList.contains("js-contact-check")){var f=a.getAttribute("data-contact"),h=document.querySelector(".js-contact-group"),v=((null==h?void 0:h.value)||"").split(",");h.value=v.filter(function(e){return e!==f}).join(",")}}else if(l.forEach(function(e){e.required=!0,e.disabled=!1}),c&&(c.disabled=!1),d&&a.setAttribute("aria-labelledby",this.options.labelledbyIds.disclaimer),a.classList.contains("js-contact-check")){var p=a.getAttribute("data-contact"),m=document.querySelector(".js-contact-group"),y=(null==m?void 0:m.value)||"";m.value=""===y?p||"":"".concat(y,",").concat(p)}u?(r&&(r.style.display="none"),i&&(i.style.display="none"),o&&(o.style.display="none"),a.classList.remove(this.modifiers.checked)):(r&&(r.style.display="block"),i&&(a.querySelector(".calendar-sf-registration__label").style.display="flex",i.style.display="block"),o&&(o.style.display="block"),a.classList.add(this.modifiers.checked)),this.syncPreferredContactMethodWithVisibleState()}}},{key:"addMethodContactListTemplate",value:function(e,t){var n=this,a=t.contactMethodList.map(function(t,a){var r="".concat(t.id,"-").concat(a),i="".concat(t.id,"-sample-").concat(a),o="".concat(t.id,"-error-").concat(a);if(t.hasOwnProperty("isVisible")&&!t.isVisible)return"";if(!t.type)return'\n <div class="'.concat(e.inputGroup,' contactOptions" data-form\n qa-handles="O5-Calendar-registration-contact-group">\n <div class="contactOptions__container">\n <input type="checkbox"\n id="').concat(t.dataId,'"\n class="').concat(e.checkboxInput,' js-contact-check"\n value="').concat(t.data,'"\n data-contact="').concat(t.data,'"\n qa-handles="O5-Calendar-registration-contact-checkbox">
2\n <label for="').concat(t.dataId,'"\n class="').concat(e.label,'"\n qa-handles="O5-Calendar-registration-contact-label">\n ').concat(t.label,"\n </label>\n </div>\n </div>");var s=t.fieldset?n.createInputFields({fieldset:t.fieldset,ui:e,initiallyDisabled:!0}):'\n <div class="'.concat(e.inputGroup,'" data-form>\n <label for="').concat(t.id,'" id="').concat(r,'-nested"\n class="').concat(e.label,'">\n <strong>').concat(t.label,'</strong>\n <span class="is--required" aria-hidden="true">*</span>\n </label>\n <input type="').concat(t.type,'"\n id="').concat(t.id,'"\n name="').concat(t.name,'"\n class="').concat(e.textbox,' js-field js-regex-field"\n maxlength="').concat(t.maxLength,'"\n ').concat("email"===t.type?'autocomplete="email" inputmode="email"':"","\n ").concat("tel"===t.type?'autocomplete="tel" inputmode="tel"':"",'\n aria-describedby="').concat(t.placeholder?i+" ":"").concat(o,'"\n qa-handles="O5-Calendar-registration-contact-input"\n disabled>\n ').concat(t.placeholder?'<p id="'.concat(i,'" class="').concat(e.info,'"\n qa-handles="O5-Calendar-registration-contact-placeholder">').concat(t.placeholder,"</p>"):"",'\n <div id="').concat(o,'"\n class="').concat(e.msgArea,' js-field-messenger"\n data-error-msg="').concat(t.errorMsg,'"\n data-error-msg2="').concat(t.errorMsg2||"",'"\n qa-handles="O5-Calendar-registration-contact-error"></div>\n </div>');return'\n <div class="'.concat(e.inputGroup,' contactOptions" data-form\n qa-handles="O5-Calendar-registration-contact-group">\n <div class="contactOptions__container">\n <input type="checkbox"\n id="').concat(t.dataId,'"\n class="').concat(e.checkboxInput,' js-contact-check js-reveals-nested"\n value="').concat(t.data,'"\n data-contact="').concat(t.data,'"\n qa-handles="O5-Calendar-registration-contact-checkbox">\n <label for="').concat(t.dataId,'"\n class="').concat(e.label,'"\n qa-handles="O5-Calendar-registration-contact-label">\n ').concat(t.label,'\n </label>\n </div>\n\n <div class="').concat(e.nestedGroup," ").concat(n.modifiers.disabled,'"\n id="').concat(t.fieldsetId,'"\n qa-handles="O5-Calendar-registration-contact-nested-group">\n ').concat(s,"\n </div>\n </div>")}).join("");return'\n <fieldset class="'.concat(e.fieldset,' calendar-sf-registration__contact-heading"\n id="contactMethod"\n qa-handles="O5-Calendar-registration-contact-method-section">\n\n <legend id="first-heading"\n class="').concat(e.groupHeading,'"\n qa-handles="O5-Calendar-registration-contact-method-heading">\n <span id="first-heading-error-icon" hidden><span class="sr-only">Error:</span>').concat(et,'</span>
2\n <span class="calendar-sf-registration__contact-method-text">').concat(t.contactMethodTxt,'</span>\n <span class="is--required" aria-hidden="true">*</span>\n <span class="sr-only"> (required)</span>\n </legend>\n <div id="optin-error"\n class="calendar-sf-registration__optin-error"\n aria-live="polite"\n aria-atomic="true"\n qa-handles="O5-Calendar-registration-contact-method-error"\n hidden>\n <div class="optin-error-msg" qa-handles="O5-Calendar-registration-contact-method-error-copy">Error: Please select a method of contact from the options below.</div>\n </div>\n\n <input type="hidden"\n id="preferredContactMethod"\n name="preferredContactMethod"\n class="js-field js-contact-group"\n value=""\n qa-handles="O5-Calendar-registration-contact-method-hidden-input">\n\n ').concat(a,"\n </fieldset>")}},{key:"addAgreementTemplate",value:function(e,t){return'<div class="'.concat(e.agreement,'" qa-handles="O5-Calendar-registration-agreement">\n <div class="').concat(e.inputGroup,'" qa-handles="O5-Calendar-registration-agreement-group">\n <h3 class="').concat(e.groupHeading,'" qa-handles="O5-Calendar-registration-agreement-heading">').concat(t.agreement.title,'</h3>\n <div id="agreementTandC" qa-handles="O5-Calendar-registration-agreement-content"></div>\n </div>\n </div>')}},{key:"addOptInTemplate",value:function(e,t){return'<div class="'.concat(e.optin,'" qa-handles="O5-Calendar-registration-optin">\n\t\t\t<div class="').concat(e.inputGroup,'" data-form qa-handles="O5-Calendar-registration-optin-group">\n <div class="').concat(e.checkbox,'" qa-handles="O5-Calendar-registration-optin-checkbox">\n <input\n type="checkbox"\n id="optin"\n class="calendar-sf-registration__optin-input"\n aria-controls="contactMethod"\n aria-expanded="false"\n ').concat(""!==this.store.aemData.optInToReceiveInfoText?'aria-describedby="optindisclaimer"':"",'\n qa-handles="O5-Calendar-registration-optin-input" />\n <label for="optin" class="').concat(e.label,'" qa-handles="O5-Calendar-registration-optin-label">\n <strong>').concat(t.optin.label,"</strong>\n </label>\n </div>\n\t\t\t\t").concat(""!==this.store.aemData.optInToReceiveInfoText?'<p id="optindisclaimer" class="'.concat(e.disclaimerText,'" qa-handles="O5-Calendar-registration-optin-disclaimer"></p>'):"","\n </div>\n </div>")}},{key:"createInputFields",value:function(e){var t=this,n=e.fieldset,a=e.ui,i=e.initiallyDisabled,o=void 0!==i&&i;try{if(!n&&(0,r.n)())throw new Error("You have not passed in any fieldsets into your createInputFields method.");var s={"first-name":"given-name","last-name":"family-name",email:"email",phone:"tel",zip:"postal-code","company-name":"organization","job-title":"organization-title",DOB:"bday"},l=["address","email","phone","zip"],c=["email","tel"],d=["zip","phone"];return n.map(function(e,n){var r,i="".concat(e.id,"-").concat(n),u="".concat(e.id,"-error"),f="".concat(e.id,"-helper-text"),h="phone"===e.id,v=l.includes(e.id)&&(h||!!e.placeholder),p=e.required||e.mandatory,m=t.resolveFieldName(e),y=s[e.id]||"",b=void 0!==e.errorMsg2?'data-error-msg2="'.concat(e.errorMsg2,'"'):"";if(r=p?"".concat(et,"\n <strong>").concat(e.label,'</strong>\n <span aria-hidden="true" class="').concat(t.modifiers.requiredTxt,'">*</span>'):"<strong>".concat(e.label,'</strong><span class="sr-only"> (optional)</span>'),e.hasOwnProperty("isVisible")&&!e.isVisible)return"";var g="dob"===m,w="state"===m,k=w?'<select id="state"\n class="'.concat(a.textbox,' js-field js-regex-field"\n name="state"\n ').concat(p?'required aria-required="true"':"",'\n autocomplete="address-level1"\n aria-describedby="').concat(u,'"\n ').concat(o?"disabled":"",'\n qa-handles="O5-Calendar-registration-state-select"></select>'):g?'<div class="date-dropdowns" role="group"\n aria-labelledby="'.concat(i,'"\n qa-handles="O5-Calendar-registration-dob-group">\n <input id="DOB" name="DOB" type="hidden"\n class="js-field js-dob"\n ').concat(p?'required aria-required="true"':"",'\n autocomplete="bday"\n qa-handles="O5-Calendar-registration-dob-input">\n <select id="dob-month" class="month" name="DOB_[month]"\n aria-label="Month" autocomplete="bday-month"\n ').concat(p?'required aria-required="true"':"",'\n qa-handles="O5-Calendar-registration-dob-month"></select>\n <select id="dob-day" class="day" name="DOB_[day]"\n aria-label="Day" autocomplete="bday-day"\n ').concat(p?'required aria-required="true"':"",'\n qa-handles="O5-Calendar-registration-dob-day"></select>\n <select id="dob-year" class="year" name="DOB_[year]"\n aria-label="Year" autocomplete="bday-year"\n ').concat(p?'required aria-required="true"':"",'\n qa-handles="O5-Calendar-registration-dob-year"></select>\n </div>'):function(e){var t=c.includes(e.type)||d.includes(e.id),n="number"===e.type,r=[a.textbox,"js-field",t?"js-regex-field":"",n?"js-guest-field":""].filter(
2Boolean).join(" "),i=[v?f:"",v?u:""].filter(Boolean).join(" ");return'<input\n type="'.concat(e.type,'"\n id="').concat(e.id,'"\n name="').concat(e.name,'"\n class="').concat(r,'"\n maxlength="').concat(e.maxLength,'"\n ').concat(p?"required":"","\n ").concat(n?'min="0"':"","\n ").concat(y?'autocomplete="'.concat(y,'"'):"","\n ").concat("tel"===e.type?'inputmode="tel"':"","\n ").concat("email"===e.type?'inputmode="email"':"","\n ").concat(i?'aria-describedby="'.concat(i,'"'):"","\n ").concat(o?"disabled":"",'\n qa-handles="O5-Calendar-registration-field-input" />')}(e),C=w?"state":g?"dob-month":e.id;return'<div class="'.concat(a.inputGroup,'" data-form\n qa-handles="O5-Calendar-registration-field-group">\n <label for="').concat(C,'"\n class="').concat(a.label,'"\n qa-handles="O5-Calendar-registration-field-label">\n ').concat(r," ").concat(e.showDisclaimer?t.createDisclaimerContent(e):"","\n </label>\n\n ").concat(k,"\n\n ").concat(v?'<p id="'.concat(f,'" class="').concat(a.info,'"\n qa-handles="O5-Calendar-registration-field-placeholder">').concat(h?'<span aria-hidden="true">'.concat(e.placeholder,'</span><span class="sr-only">Format: three digits, dash, three digits, dash, four digits.</span>'):e.placeholder,"</p>"):"","\n\n ").concat(e.errorMsg?'<div id="'.concat(u,'" class="').concat(a.msgArea,' js-field-messenger"\n data-error-msg="').concat(e.errorMsg,'"\n qa-handles="O5-Calendar-registration-field-error"\n ').concat(b,"></div>"):"","\n </div>")}).join("")}catch(e){console.error(e)}}},{key:"createDisclaimerContent",value:function(e){return'<div class="calendar-sf-waitlist-cta__disclaimer-info" qa-handles="O5-Calendar-registration-disclaimer">\n <button class="calendar-sf-waitlist-cta__info-btn js-info-popup-btn" type="button" tabindex="0" qa-handles="O5-Calendar-registration-disclaimer-button">'.concat(et,'</button>\n <div class="calendar-sf-waitlist-cta__info-container is--hidden" qa-handles="O5-Calendar-registration-disclaimer-content">\n <span class="calendar-sf-waitlist-cta__info-container-pointer"></span>\n <h3 class="calendar-sf-waitlist-cta__info-heading" qa-handles="O5-Calendar-registration-disclaimer-heading">').concat(e.dobInfoHeading,'</h3>\n <p class="calendar-sf-waitlist-cta__info-para" qa-handles="O5-Calendar-registration-disclaimer-copy">').concat(e.dobInfo,"</p>\n </div>\n </div>")}},{key:"populateStates",value:function(){var e=document.getElementById("state");if(e){e.innerHTML="";var t=document.createElement("option");t.value="",t.disabled=!0,t.selected=!0,t.textContent="Select a state",e.appendChild(t),Ie().forEach(function(t){var n=document.createElement("option");n.value=t.abbrv,n.textContent=t.name,e.appendChild(n)})}}},{key:"dobSetup",value:function(){var e=document.getElementById("dob-day"),t=document.getElementById("dob-month"),n=document.getElementById("dob-year");if(e&&t&&n){var a=[31,28,31,30,31,30,31,31,30,31,30,31],r=["January","February","March","April","May","June","July","August","September","October","November","December"];e.innerHTML="",t.innerHTML="",n.innerHTML="";for(var i='<option value="">Day</option>',o=1;o<=a[0];o++){var s=("0"+o).slice(-2);i+='<option value="'+s+'">'+s+"</option>"}e.innerHTML=i,e.value="";for(var l='<option value="">Month</option>',c=1;c<=12;c++){var d=c-1;l+='<option value="'+("0"+c).slice(-2)+'">'+r[d]+"</option>"}t.innerHTML=l,t.value="";for(var u=(new Date).getFullYear(),f='<option value="">Year</option>',h=u;h>=u-120;h--)f+='<option value="'+h+'">'+h+"</option>";n.innerHTML=f,n.value=""}}},{key:"serializeData",value:function(){var e=this.store.selectedEvent,t=e.spotsLeft-1,n=t>1?"There are only ".concat(t," additional spots left that can be reserved."):"There is only 1 additional spot left that can be reserved.";return{toggleTxt:"Registration form ",submitText:"Register",contactMethodTxt:"Preferred method(s) of contact",termsAndConditionsText:this.store.aemData.termsAndConditionsText,fieldset1:[{id:"first-name",type:"text",name:"firstName",label:"First name",placeholder:"",errorMsg:"Please enter your first name.",maxLength:300,required:!0},{id:"last-name",type:"text",name:"lastName",label:"Last name",placeholder:"",errorMsg:"Please enter your last name",maxLength:300,required:!0},{id:"email",type:"email",name:"email",label:"Email",placeholder:"[email protected]",errorMsg:"Please enter your email address",errorMsg2:"Please enter a valid email address",maxLength:300,required:!0},{id:"phone",type:"tel",label:this.brokerEnabled?"Phone number":"Phone",name:"phoneNumber",placeholder:"XXX-XXX-XXXX",errorMsg:"Please enter a phone number.",errorMsg2:"Please enter a valid phone number.",maxLength:12,required:!0,isVisible:!!this.brokerEnabled||(null==e?void 0:e.requirePhone)},{id:"dob",type:"hidden",name:"dob",label:"Date of birth",placeholder:"",errorMsg:"Please enter your date of birth",required:!0,isVisible:!this.brokerEnabled},{id:"zip",type:"text",name:"zip",label:"Zip code",placeholder:"XXXXX or XXXXX-XXXX",errorMsg:"Please enter a valid zip code",maxLength:10,required:!0,isVisible:!this.brokerEnabled},{id:"company-name",type:"text",name:"company",label:"Company name",placeholder:"",errorMsg:"Please enter your company name.",maxLength:300,required:!0,isVisible:this.brokerEnabled},{id:"job-title",type:"text",name:"jobTitle",label:"Job title",placeholder:"",errorMsg:"Please enter your job title.",maxLength:300,required:!0,isVisible:this.brokerEnabled}],fieldset2:[{id:"guest-number",type:"number",name:"numberofGuests",label:"Number of additional attendees",placeholder:"",errorMsg:"".concat(n),errorMsg2:"".concat(n),maxLength:20,required:!1,mandatory:!1,isVisible:!this.brokerEnabled}],contactMethodList:[{id:"method-email",dataId:"emailCheck",label:"Email",n
2ame:"email",data:"Email",text:this.store.aemData.emailText,textId:"emailText"},{id:"method-phone",dataId:"phoneCheck",label:"Phone",name:"phoneNumber",data:"Phone",text:this.store.aemData.phoneText,textId:"phoneText",isVisible:!this.brokerEnabled&&(null==e?void 0:e.requirePhone)},{id:"method-mail",dataId:"mailCheck",type:"mail",label:"Direct mail",data:"Direct mail",text:this.store.aemData.directMailText,textId:"mailText",spanId:"mailRequired",fieldsetId:"mailSet",isVisible:!this.brokerEnabled,fieldset:[{id:"address",type:"text",name:"street",label:"Address",placeholder:"1201 N 175th St.",errorMsg:"Please enter valid address.",maxLength:300,required:!1,mandatory:!0},{id:"city",type:"text",name:"city",label:"City",placeholder:"",errorMsg:"Please enter valid city",maxLength:300,required:!1,mandatory:!0},{id:"state",type:"state",name:"state",label:"State",placeholder:"",errorMsg:"Please enter valid state",maxLength:100,required:!1,mandatory:!0}]},{id:"method-sms",dataId:"smsCheck",label:"SMS",name:"SMS",data:"SMS",text:"",textId:"smsText",isVisible:this.brokerEnabled}],agreement:{title:"Terms & Conditions",label:"I agree to the Terms & Conditions",document:[this.store.aemData.agreeToTermsText]},optin:{label:"Opt in to receive more information",text:this.store.aemData.optInToReceiveInfoText}}}},{key:"template",value:function(e){var t=(0,r.ZS)(this.ui),n=this.store.selectedEvent,a=n.spotsLeft-1,i='<div class="'.concat(t.fieldset,' data-guest-spots">\n ').concat(this.createInputFields({fieldset:e.fieldset2,ui:t}),"\n </div>");return'<h3 class="calendar-sf-registration__subtitle" qa-handles="O5-Calendar-registration-subtitle">'.concat(e.toggleTxt,'</h3>\n <div id="registration-form-drawer" qa-handles="O5-Calendar-registration-drawer">\n <form class="calendar-sf-registration__form form" qa-handles="O5-Calendar-registration-form">\n <p id="form-message" class="').concat(t.info,'" qa-handles="O5-Calendar-registration-form-message">\n Fields marked with an asterisk <span class="').concat(this.modifiers.requiredTxt,'">*</span> are required.\n </p>\n <div class="').concat(t.fieldset,'" qa-handles="O5-Calendar-registration-primary-fieldset">\n ').concat(this.createInputFields({fieldset:e.fieldset1,ui:t}),"\n </div>\n ").concat(a>0&&n.displayGuestField?i:"","\n ").concat(this.addAgreementTemplate(t,e),"\n ").concat(this.addOptInTemplate(t,e),"\n \n ").concat(this.addMethodContactListTemplate(t,e),'\n \n <div class="calendar-sf-registration__notification js-notification-msg" tabindex="0" qa-handles="O5-Calendar-registration-notification"></div>\n <button type="submit" class="').concat(t.submitBtn,' dmp-btn dmp-btn--md dmp-btn--1 js-submit-form-btn js-trigger-notification" qa-handles="O5-Calendar-registration-submit-button" >\n ').concat(e.submitText,'\n </button>\n\t\t\t\t\t<div class="calendar-sf-registration__error-notification js-notification-error-msg" tabindex="0" qa-handles="O5-Calendar-registration-error-notification"></div> \n </form>\n </div>')}},{key:"validateAndGetFormData",value:function(e,t){var n=this,a=[],r=!1,i={},o=this.syncPreferredContactMethodWithVisibleState();e.forEach(function(e){if(!e.disabled){var t=e.getAttribute("name"),o=(e.getAttribute("id"),n.resolveFieldName(e)),s=t&&""!==t.trim()?t:o,l=e.value||"",c=e.hasAttribute("required"),d=e.classList.contains(n.ui.regexField.slice(1)),u=n.validateSpecialFields({name:s,value:l,isSpecialField:d,isRequired:c});c&&""===l||c&&""!==l&&d&&!u?(a.push(!1),d?n.showError(e,!0):n.showError(e)):""===l||!c||u&&!u||(a.push(!0),n.hideError(e)),s&&(i[s]=l),a.includes(!1)?r=!1:(r=!0,""===l||e.disabled||s&&(n.options.payload[s]=l,n.options.userInfo[s]=l))}}),this.options.payload.numberofGuests&&(this.options.payload.numberofGuests=parseInt(this.options.payload.numberofGuests,10)+1);var s=Ge({},(Ye(this.options.payload),this.options.payload));if(o&&(i.preferredContactMethod=o),i.preferredContactMethod){s.doNotContact=!1;var l={Phone:"phoneOptIn","Direct mail":"directMailOptIn",Email:"emailOptIn",SMS:"smsOptIn"};i.preferredContactMethod.split(",").forEach(function(e){s[l[e]]=!0});var c=document.getElementById("first-heading");c&&(c.style.display="flex"),this.setContactMethodErrorState(!1)}else{var d=document.getElementById("optin");if(null!=d&&d.checked){r=!1;var u=document.getElementById("first-heading");u&&(u.style.display="flex"),this.setContactMethodErrorState(!0)}}if(t&&(s["Terms&Conditions"]=!0,s.optInToReceiveMoreInformation=!(!s.emailOptIn&&!s.directMailOptIn),s.directMailOptIn)){s.countryCode="US";var f=s.state,h=document.querySelector('#state option[value="'.concat(f,'"]'));s.state=(null==h?void 0:h.textContent)||"",s.stateCode=f}var v=Ve({},s);return"jobTitle"in v&&(v.title=v.jobTitle,delete v.jobTitle),r?Ve({},v):r}},{key:"validateSpecialFields",value:function(e){var t=e.name,n=e.value,a=e.isSpecialField,r=e.isRequired,i=!0,o=null;if(!a||a&&!r)return!1;switch(t){case"firstName":case"lastName":i=""!==n;break;case"email":i=(o=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(n);break;case"phoneNumber":var s=null,l=null;if(i=(o=He(/(\d{10})|(\d{3}-\d{3}-\d{4})/,{nodash:1,dash:2}
2)).test(n),null!=(l=n.match(o)))for(var c in l=n.match(o).groups)if(l[c]&&""!==l[c]){s=c;break}(i&&"nodash"===s&&n.length>10||!i)&&(i=!1);break;case"zip":i=5===n.length?/^[0-9]*$/.test(n):10===n.length&&/(?:[^\d]|^)(\d{5}\-\d{4})(?:[^\d]|$)/.test(n);break;case"numberofGuests":var d=this.store.selectedEvent.spotsLeft-1;parseInt(n)>d&&(i=!1)}return i}},{key:"onClickSubmitForm",value:(o=Be().m(function e(t){var n,a,r,i,o,s,l,c,d,u,f,h,v,p,m,y,b,g,w,k,C,_;return Be().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.preventDefault(),n=this.store.selectedEvent.isWelmed,a=t.target,r=(null==a?void 0:a.closest(this.ui.formSubmitBtn))||document.querySelector("".concat(this.selector," ").concat(this.ui.formSubmitBtn))){e.n=1;break}return e.a(2);case 1:if(i=document.querySelectorAll("".concat(this.selector," ").concat(this.ui.fields)),o=this.validateAndGetFormData(i,n),s="".concat(window.location.origin,"/bin/dmp/eventRegistration"),l="application/x-www-form-urlencoded; charset=UTF-8","boolean"!=typeof o&&((f=(null===(c=this.store.selectedEvent)||void 0===c?void 0:c.id)||(null===(d=this.store.selectedEvent)||void 0===d?void 0:d.EventId)||(null===(u=this.store.selectedEvent)||void 0===u?void 0:u.eventId))&&(o.eventId=f),this.brokerEnabled&&(o.recordType="012Vx0000071PUzIAM")),n&&(s="".concat(window.location.origin,"/bin/dmp/wellmed-registration"),l="application/json"),!o||!o.eventId){e.n=9;break}return e.p=2,e.n=3,(0,Pe.getCsrfToken)();case 3:return h=e.v,e.n=4,fetch(s,{method:"POST",headers:{"CSRF-Token":h,"Content-Type":l,Accept:"application/json"},body:JSON.stringify(o),credentials:"same-origin"});case 4:if((v=e.v).ok){e.n=5;break}throw new Error("Response status: ".concat(v.status));case 5:return e.n=6,v.json();case 6:p=e.v,200===v.status?(this.store.notifyUser=!0,this.updateSpotsLeft(p),this.notifyUser(!0)):500===v.status&&p.message.includes("please add with status of Waitlisted")&&(this.store.notifyUser=!1,this.updateSpotsLeft(p)),e.n=8;break;case 7:e.p=7,_=e.v,console.error("An error occurred while processing the form:",_);case 8:this.options.checkboxes?((b=document.querySelector("input.".concat(this.modifiers.invalid)))&&"hidden"!==b.getAttribute("type")?b.focus():(g=document.querySelector("select.month"))&&g.focus(),this.options.hasCheckboxes&&(null==(k=null===(w=r.closest(this.ui.parent))||void 0===w?void 0:w.querySelectorAll(this.ui.formCheckbox))||k.forEach(function(e){e.dispatchEvent(new Event("click"))}))):(y=null===(m=r.closest(".calendar-sf-waitlist-cta__form"))||void 0===m?void 0:m.querySelector(".js-cancel-top-btn"))&&y.dispatchEvent(new Event("click")),e.n=10;break;case 9:!1===o&&(C=document.querySelector("".concat(this.selector," input.").concat(this.modifiers.invalid,':not([type="hidden"]), ').concat(this.selector," select.").concat(this.modifiers.invalid)))&&C.focus();case 10:return e.a(2)}},e,this,[[2,7]])}),s=function(){var e=this,t=arguments;return new Promise(function(n,a){var r=o.apply(e,t);function i(e){Re(r,n,a,i,s,"next",e)}function s(e){Re(r,n,a,i,s,"throw",e)}i(void 0)})},function(e){return s.apply(this,arguments)})},{key:"updateSpotsLeft",value:function(e){0===parseInt(e.message.NumberofSpotsLeft)&&(document.body.setAttribute("tabindex","0"),(0,r.oG)(800),document.body.focus(),setTimeout(function(){document.body.removeAttribute("tabindex")},1e3),this.showRegMsgOnTransition=!0),document.dispatchEvent(new CustomEvent("updateSpotsLeft"))}},{key:"onClickToggleCheckbox",value:function(e){var t=e.target,n=e.currentTarget,a=n instanceof HTMLInputElement&&"checkbox"===n.type?n:t.closest('input[type="checkbox"].js-contact-check');if(!a)return!1;var r=a.closest(this.ui.parent),i=null==r?void 0:r.querySelector('input[type="text"], input[type="tel"], select'),o=null==r?void 0:r.querySelector("button"),s=a.classList.contains(this.modifiers.disclaimer),l=a.classList.contains(this.modifiers.checked);if("keydown"===e.type&&" "!==e.key&&"Enter"!==e.key)return!1;if("keydown"===e.type&&e.preventDefault(),l){if(a.classList.remove(this.modifiers.checked),i&&(i.required=!1,i.disabled=!0,i.classList.contains(this.modifiers.invalid)&&this.hideError(i)),o&&(o.disabled=!0),s&&a.removeAttribute("aria-labelledby"),a.classList.contains("js-contact-check")){var c=a.getAttribute("data-contact"),d=document.querySelector(".js-contact-group"),u=((null==d?void 0:d.value)||"").split(",").map(function(e){return e.trim()}
2).filter(Boolean);d.value=u.filter(function(e){return e!==c}).join(",")}}else if(a.classList.add(this.modifiers.checked),i&&(i.required=!0,i.disabled=!1),o&&(o.disabled=!1),s&&a.setAttribute("aria-labelledby",this.options.labelledbyIds.disclaimer),a.classList.contains("js-contact-check")){var f=a.getAttribute("data-contact"),h=document.querySelector(".js-contact-group"),v=((null==h?void 0:h.value)||"").split(",").map(function(e){return e.trim()}).filter(Boolean),p=new Set(v);f&&p.add(f),h.value=Array.from(p).join(",")}this.syncPreferredContactMethodWithVisibleState()}},{key:"onBlurRoundNumber",value:function(e){var t=e.currentTarget,n=t.value;t.value=Math.ceil(n)}},{key:"notifyUser",value:function(e){var t,n=this,a=document.querySelector("".concat(this.selector," ").concat(this.ui.formSubmitBtn)),r="",i="",o=new MutationObserver(function(){var e=document.querySelector(".calendar-sf-waitlist-cta__notification");e&&(e.classList.remove("is--valid"),o.disconnect())});if(o.observe(document.body,{childList:!0,subtree:!0}),this.store.notifyUser){switch(this.showRegMsgOnTransition&&(this.options.formType="transition"),this.options.formType){case"waitlist":r='\n <p class="calendar-sf-waitlist-cta__notification-text">\n '.concat(at,"\n <strong>You have successfully joined the waitlist for this event.</strong>\n </p>\n <div onclick=\"document.querySelector('.calendar-sf-waitlist-cta__notification').classList.remove('is--valid')\" class=\"calendar-sf-waitlist-cta__notification-cancel-icon\">\n ").concat(rt,"\n </div>");break;case"registration":r='\n <div id="registration-success-msg" class="calendar-sf-registration__notification__success-msg">\n <div class="calendar-sf-registration__notification-icon">\n '.concat(nt,'\n </div>\n <div id="noti-msg" class="calendar-sf-registration__notification-msg">\n Registration Complete\n </div>\n </div>\n <div onclick="document.querySelector(\'.calendar-sf-registration__notification\').classList.remove(\'is--valid\')" class="calendar-sf-registration__notification-icon">\n ').concat(rt,"\n </div>");break;case"transition":r='\n <div id="registration-success-msg" class="calendar-sf-registration__notification__success-msg">\n <div class="calendar-sf-registration__notification-icon">\n '.concat(nt,'\n </div>\n <div id="noti-msg" class="calendar-sf-registration__notification-msg">\n Registration Complete\n </div>\n </div>\n <div onclick="document.querySelector(\'.calendar-sf-waitlist-cta__notification\').classList.remove(\'is--valid\')" class="calendar-sf-registration__notification-icon">\n ').concat(rt,"\n </div>"),this.showRegMsgOnTransition=!1,this.options.formType="waitlist"}t=document.querySelector(this.ui.notification),i="is--valid",a&&a.setAttribute("aria-describedby","noti-msg")}else t=document.querySelector(this.ui.errNotification),r="\n ".concat(tt,"\n <div>An error occurred while processing the form. Please try again later.</div>"),i="is--invalid";t&&(t.innerHTML=r,t.classList.add(i),e&&this.reset(),t.style.display="flex",t.focus(),setTimeout(function(){a&&a.removeAttribute("aria-describedby"),t.style.display="none",n.store.notifyUser=!1},15e3))}},{key:"showError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.closest(this.ui.parent),a=n.querySelector("label"),r=n.querySelector(this.ui.messenger),i=r.id,o=r.dataset.errorMsg;if(t&&""!==e.value&&(o=r.dataset.errorMsg2),r.textContent=o?"Error: ".concat(o):o,e.classList.contains(this.modifiers.invalid)||e.disabled)return!1;e.classList.add(this.modifiers.invalid),e.setAttribute("aria-invalid","true");var s=(e.getAttribute("aria-describedby")||"").split(" ").filter(
2Boolean);s.includes(i)||s.unshift(i),e.setAttribute("aria-describedby",s.join(" ")),a.classList.add(this.modifiers.invalid),r.classList.add(this.modifiers.invalid)}},{key:"hideError",value:function(e){var t=e.closest(this.ui.parent),n=t.querySelector("label"),a=t.querySelector(this.ui.messenger),r=a.id;if(!e.classList.contains(this.modifiers.invalid))return!1;e.classList.remove(this.modifiers.invalid),e.removeAttribute("aria-invalid");var i=(e.getAttribute("aria-describedby")||"").split(" ").filter(function(e){return e&&e!==r});i.length>0?e.setAttribute("aria-describedby",i.join(" ")):e.removeAttribute("aria-describedby"),n.classList.remove(this.modifiers.invalid),a.classList.remove(this.modifiers.invalid)}},{key:"reset",value:function(){var e=this,t=document.querySelector(this.selector),n=t.querySelectorAll(this.ui.fields),a=t.querySelectorAll(this.ui.formCheckbox);n.forEach(function(e){""!==e.value&&(e.value="")}),a.forEach(function(t){t.classList.contains(e.modifiers.checked)&&t.click()});var r=document.querySelectorAll(".date-dropdowns select");r.length>0&&r.forEach(function(e){var t=e.querySelector("option:first-child");t&&(t.selected=!0)}),this.store.eventFormData={},document.dispatchEvent(new Event("setCsfStore"))}}],a&&ze(n.prototype,a),i&&ze(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,i,o,s}(a.uA);const ot=it;var st=["preferredContactMethod"];function lt(e){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lt(e)}function ct(){ct=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,a,r){var i=RegExp(e,a);return t.set(i,r||t.get(e)),gt(i,n.prototype)}function a(e,n){var a=t.get(n);return Object.keys(a).reduce(function(t,n){var r=a[n];if("number"==typeof r)t[n]=e[r];else{for(var i=0;void 0===e[r[i]]&&i+1<r.length;)i++;t[n]=e[r[i]]}return t},Object.create(null))}return bt(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=a(n,this);var r=n.indices;r&&(r.groups=a(r,this))}return n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var i=t.get(this);return e[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(""===n)return e;var a=i[t];return Array.isArray(a)?"$"+a.join("$"):"number"==typeof a?"$"+a:""}))}if("function"==typeof r){var o=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=lt(e[e.length-1])&&(e=[].slice.call(e)).push(a(e,o)),r.apply(this,e)})}return e[Symbol.replace].call(this,n,r)},ct.apply(this,arguments)}function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ut(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,a,r,i){var l=a&&a.prototype instanceof s?a:s,c=Object.create(l.prototype);return ft(c,"_invoke",function(n,a,r){var i,s,l,c=0,d=r||[],u=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,o}};function h(n,a){for(s=n,l=a,t=0;!u&&c&&!r&&t<d.length;t++){var r,i=d[t],h=f.p,v=i[2];n>3?(r=v===a)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,f.v=a,f.n=i[1]):h<v&&(r=n<3||i[0]>a||a>v)&&(i[4]=n,i[5]=a,f.n=v,s=0))}if(r||n>1)return o;throw u=!0,a}return function(r,d,v){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,v),s=d,l=v;(t=s<2?e:l)||!u;){i||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(u=f.n<0)?l:n.call(a,f))!==o)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,r,i),!0),c}var o={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(ft(t={},a,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ft(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,ft(u,"constructor",c),ft(c,"constructor",l),l.displayName="GeneratorFunction",ft(c,r,"GeneratorFunction"),ft(u),ft(u,r,"Generator"),ft(u,a,function(){return this}),ft(u,"toString",function(){return"[object Generator]"}),(ut=function(){return{w:i,m:f}})()}function ft(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ft=function(e,t,n,a){function i(t,n){ft(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ft(e,t,n,a)}function ht(e,t,n,a,r,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(a,r)}function vt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,kt(a.key),a)}}function pt(e,t,n){return t=yt(t),function(e,t){if(t&&("object"==lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
2(e,mt()?Reflect.construct(t,n||[],yt(e).constructor):t.apply(e,n))}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mt=function(){return!!e})()}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yt(e)}function bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&>(e,t)}function gt(e,t){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gt(e,t)}function wt(e,t,n){return(t=kt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kt(e){var t=function(e,t){if("object"!=lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=lt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lt(t)?t:t+""}var Ct='<svg class="icon icon--error" aria-hidden="true" width="20" height="20" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',_t='<svg class="calendar-sf-waitlist-cta__exclamation-icon icon icon--error" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',qt='<svg class="icon icon--check-circle" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',St='<svg class="calendar-sf-waitlist-cta__notification-icon icon icon--check-circle" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',Et='<svg class="icon icon--close" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>',Tt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),wt(n=pt(this,t,[e]),"uieName","calendar-sf-waitlist-cta-component"),wt(n,"selector",".calendar-sf-waitlist-cta"),wt(n,"modifiers",{hidden:"is--hidden",requiredTxt:"is--required",invalidTxt:"is--invalid",disabled:"is--disabled",checked:"is--checked",invalid:"is--invalid",disclaimer:"is--disclaimer"}),wt(n,"options",{}),wt(n,"showRegMsgOnTransition",!1),n.ui={fieldset:".calendar-sf-waitlist-cta__fieldset",inputGroup:".calendar-sf-waitlist-cta__group",label:".calendar-sf-waitlist-cta__label",textbox:".calendar-sf-waitlist-cta__textbox",info:".calendar-sf-wailist-cta__info",msgArea:".calendar-sf-waitlist-cta__messenger",fields:".js-field",formCheckbox:".js-checkbox-toggle",formRadio:".js-radio-toggle",formSubmitBtn:".js-submit-form-btn",messenger:".js-field-messenger",guestField:".js-guest-field",regexField:".js-regex-field",notification:".js-notification-msg",errNotification:".js-notification-error-msg",parent:"[data-form]"},n.setOptions(),n.init(),n.setup(),n}return bt(t,e),n=t,a=[{key:"setup",value:function(){if(this.shouldRender=0===this.store.selectedEvent.spotsLeft,!this.shouldRender)return!1}},{key:"setOptions",value:function(){var e=""===this.store.aemData.marketCode?"":this.store.aemData.marketCode+" ";e+=""===this.store.aemData.cdoCode?"":this.store.aemData.cdoCode+" ",e+="DMX Calendar",this.options={hasCheckboxes:!1,formType:"waitlist",payload:{zip:null,doNotContact:!0,emailOptIn:!1,phoneOptIn:!1,phoneNumber:null,directMailOptIn:!1,street:null,city:null,state:null,numberOfGuests:0,registrationType:"Waitlisted",leadSourceDetail
2:e},userInfo:{},selectedRadioBtn:null,labelledbyIds:{}}}},{key:"afterRender",value:function(){var e=this,t=document.querySelector(".calendar-sf-waitlist-cta__form");t&&(t.addEventListener("click",function(t){t.target.closest(".js-info-popup-btn")?e.showDisclaimerOnClick(t):t.target.closest(".js-cancel-top-btn")&&e.closeModalOnClick(t)}),t.addEventListener("keypress",function(t){t.target.closest(".js-info-popup-btn")?e.showDisclaimerOnClick(t):t.target.closest(".js-cancel-top-btn")&&e.closeModalOnClick(t)}),t.addEventListener("blur",function(t){t.target.matches(".js-info-popup-btn")&&e.showDisclaimerOnClick(t)},!0));var n=document.querySelector(".js-waitlist-cta-btn");n&&(n.addEventListener("click",this.showWaitlistFormOnClick.bind(this)),n.addEventListener("keypress",this.showWaitlistFormOnClick.bind(this))),this.populateStates(),this.dobSetup();var a=document.querySelector(this.selector);a&&(a.addEventListener("click",function(t){t.target.matches(e.ui.formSubmitBtn)&&e.onClickSubmitForm(t)}),this.options.hasCheckboxes&&(a.addEventListener("click",function(t){t.target.matches(e.ui.checkbox)&&e.onClickToggleCheckbox(t)}),a.addEventListener("keypress",function(t){t.target.matches(e.ui.checkbox)&&e.onClickToggleCheckbox(t)}),a.addEventListener("blur",function(t){t.target.matches(e.ui.guestField)&&e.onBlurRoundNumber(t)},!0))),this.handleA11yUniqueIdentifiers()}},{key:"populateStates",value:function(){var e=document.getElementById("state");if(e){e.innerHTML='<option value="" disabled selected>Select a state</option>';for(var t=0;t<Ie().length;t++){var n=document.createElement("option");n.value=Ie()[t].abbrv,n.textContent=Ie()[t].name,e.appendChild(n)}}}},{key:"dobSetup",value:function(){var e=document.getElementById("dob-day"),t=document.getElementById("dob-month"),n=document.getElementById("dob-year");if(e&&t&&n){for(var a=[31,28,31,30,31,30,31,31,30,31,30,31],r=["January","February","March","April","May","June","July","August","September","October","November","December"],i='<option value="">Day</option>',o=1;o<=a[0];o++){var s=("0"+o).slice(-2);i+='<option value="'+s+'">'+s+"</option>"}e.innerHTML=i,e.value="";for(var l='<option value="">Month</option>',c=1;c<=12;c++){var d=c-1;l+='<option value="'+("0"+c).slice(-2)+'">'+r[d]+"</option>"}t.innerHTML=l,t.value="";for(var u=(new Date).getFullYear(),f='<option value="">Year</option>',h=u;h>=u-120;h--)f+='<option value="'+h+'">'+h+"</option>";n.innerHTML=f,n.value=""}}},{key:"showWaitlistFormOnClick",value:function(e){var t=document.querySelector(".calendar-sf-waitlist-cta__modal-overlay");if(("keypress"!==e.type||13===e.which)&&t&&t.classList.contains(this.modifiers.hidden)){t.classList.remove(this.modifiers.hidden);var n=document.getElementById("first-name");n&&n.focus()}}},{key:"closeModalOnClick",value:function(e){var t=document.querySelector(".calendar-sf-waitlist-cta__modal-overlay"),n=null==t?void 0:t.classList.contains(this.modifiers.hidden);if(("keypress"!==e.type||13===e.which)&&!n){t&&t.classList.add(this.modifiers.hidden);var a=document.querySelector(".js-waitlist-cta-btn");a&&a.focus()}}},{key:"showDisclaimerOnClick",value:function(e){var t=document.querySelector(".calendar-sf-waitlist-cta__info-btn"),n=document.querySelector(".calendar-sf-waitlist-cta__info-container");"keypress"===e.type&&13!==e.which||("blur"!==e.type?n&&(n.classList.contains(this.modifiers.hidden)?(n.classList.remove(this.modifiers.hidden),null==t||t.focus()):n.classList.add(this.modifiers.hidden)):n&&n.classList.add(this.modifiers.hidden))}},{key:"serializeData",value:function(){return{heading:"Join the waitlist",waitlistInfo:this.store.aemData.waitlistInformation,submitBtnTxt:"Join waitlist",cancelBtnTxt:"Cancel",fieldset1:[{id:"first-name",type:"text",name:"firstName",label:"First name",placeholder:"",errorMsg:"Please enter your first name.",maxLength:300,required:!0},{id:"last-name",type:"text",name:"lastName",label:"Last name",placeholder:"",errorMsg:"Please enter your last name",maxLength:300,required:!0},{id:"email",type:"email",name:"email",label:"Email",placeholder:"[email protected]",errorMsg:"Please enter your email address",errorMsg2:"Please enter a valid email address",maxLength:300,required:!0},{id:"dob",type:"hidden",name:"dob",label:"Date of birth",placeholder:"",errorMsg:"Please enter your date of birth",required:!0,showDisclaimer:!0,dobInfoHeading:"Why do we need this?",dobInfo:"This will help us identify you in our systems so we can properly update your information."}]}}},{key:"createForm",value:function(e,t){return'<div class="calendar-sf-waitlist-cta__modal-overlay is--hidden" qa-handles="O5-Calendar-waitlist-modal-overlay">\n <div class="calendar-sf-waitlist-cta__modal" role="dailog" ariaLabeledBy="waitlist-label" aria-modal="true" qa-handles="O5-Calendar-waitlist-modal" >\n <form class="calendar-sf-waitlist-cta__form form" qa-handles="O5-Calendar-waitlist-form"> \n <div class="calendar-sf-waitlist-cta__sf-flex" qa-handles="O5-Calendar-waitlist-heading-row">\n <div class="calendar-sf-waitlist-cta__heading-content" qa-handles="O5-Calendar-waitlist-heading-content">\n <h2 id="waitlist-label" class="calendar-sf-waitlist-cta__form-heading" qa-handles="O5-Calendar-waitlist-heading">'.concat(e.heading,'</h2>\n <button class="calendar-sf-waitlist-cta__top-cancel-btn js-cancel-top-btn" type="button" tabindex="0" qa-handles="O5-Calendar-waitlist-close-button">
2\n <span>Close</span>\n </button>\n </div>\n </div>\n <div class="calendar-sf-waitlist-cta__sf-flex" qa-handles="O5-Calendar-waitlist-info-row">\n <p class="calendar-sf-waitlist-cta__form-info" qa-handles="O5-Calendar-waitlist-info">').concat(e.waitlistInfo,'</p>\n </div>\n\n <div class="calendar-sf-waitlist-cta__form-content" qa-handles="O5-Calendar-waitlist-form-content">\n <div class="').concat(t.fieldset,'" qa-handles="O5-Calendar-waitlist-fieldset">\n ').concat(this.createInputFields({fieldset:e.fieldset1,ui:t}),'\n </div> \n\n <button class="calendar-sf-waitlist-cta__submit-btn dmp-btn dmp-btn--md dmp-btn--1 js-submit-form-btn js-trigger-notification" type="submit" tabindex="0" qa-handles="O5-Calendar-waitlist-submit-button">\n ').concat(e.submitBtnTxt,"\n </button>\n </div>\n </form>\n </div>\n </div>")}},{key:"template",value:function(e){var t=(0,r.ZS)(this.ui);return'<div class="calendar-sf-waitlist-cta__content" qa-handles="O5-Calendar-waitlist-content">\n <span class="calendar-sf-waitlist-cta__capacity-text" qa-handles="O5-Calendar-waitlist-capacity-text">\n '.concat(_t,'\n Class is full\n </span>\n <button class="calendar-sf-waitlist-cta__btn dmp-btn dmp-btn--md dmp-btn--1 js-waitlist-cta-btn" type="button" qa-handles="O5-Calendar-waitlist-open-button">Join waitlist</button>\n </div>\n\n <div class="calendar-sf-waitlist-cta__notification js-notification-msg" tabindex="0" qa-handles="O5-Calendar-waitlist-notification"></div>\n\n <div class="calendar-sf-waitlist-cta__error-notification js-notification-error-msg" tabindex="0" qa-handles="O5-Calendar-waitlist-error-notification"></div> \n \n ').concat(this.createForm(e,t))}},{key:"createInputFields",value:function(e){var t=this,n=e.fieldset,a=e.ui;try{if(!n&&(0,r.n)())throw new Error("You have not passed in any fieldsets into your createInputFields method.");return n.map(function(e,n){var r="<strong>".concat(e.label,"</strong> (optional)"),i=e.id+"-error",o=e.id+"-"+n,s=void 0!==e.errorMsg2?'data-error-msg2="'.concat(e.errorMsg2,'"'):"";return(e.required||e.mandatory)&&(r="".concat(Ct,"\n <strong>").concat(e.label,"</strong>\n ").concat("guest-number"!==e.id?'<span class="'.concat(t.modifiers.requiredTxt,'">*</span>'):"")),'<div class="'.concat(a.inputGroup,'" data-form qa-handles="O5-Calendar-waitlist-field-group">\n <label id="').concat(o,'"\n\t\t\t\t\tclass="').concat(a.label,'" qa-handles="O5-Calendar-waitlist-field-label">\n ').concat(r," ").concat(e.showDisclaimer?t.createDisclaimerContent(e):"","\n </label> \n \n ").concat("state"===e.name?function(e){return'<select id="state" class="'.concat(a.textbox,' js-field js-regex-field" name="state" ').concat(e.required?"required":"",' qa-handles="O5-Calendar-waitlist-state-select"></select>')}(e):"dob"===e.name?function(e){return'<div class="date-dropdowns" role="group" aria-label="Date of Birth" qa-handles="O5-Calendar-waitlist-dob-group">\n <input id="DOB" name="DOB" type="'.concat(e.type,'" class="js-field js-dob" ').concat(e.required?"required":"",' qa-handles="O5-Calendar-waitlist-dob-input">\n <select id="dob-month" class="month" name="DOB_[month]" aria-label="Month" qa-handles="O5-Calendar-waitlist-dob-month"></select>\n <select id="dob-day" class="day" name="DOB_[day]" aria-label="Day" qa-handles="O5-Calendar-waitlist-dob-day"></select>\n <select id="dob-year" class="year" name="DOB_[year]" aria-label="Year" qa-handles="O5-Calendar-waitlist-dob-year"></select>\n </div>')}(e):function(e){return'<input type="'.concat(e.type,'" \n id="').concat(e.id,'" \n name="').concat(e.name,'"\n class="').concat(a.textbox," js-field ").concat((e.type,"js-regex-field")," ").concat("number"===e.type?"js-guest-field":"",'"\n maxlength="').concat(e.maxLength,'"\n ').concat(e.required?"required":"","\n ").concat("number"===e.type?'min = "0"':"",'\n qa-handles="O5-Calendar-waitlist-field-input"\n aria-labelledby="').concat((e.id,"".concat(o))," ").concat((e.id,"".concat(e.id,"-helper-text")),'" />')}(e),"\n\t\t\t\t").concat(""!==e.placeholder?'<p id="'.concat((e.id,"".concat(e.id,"-helper-text")),'" class="').concat(a.info,'" qa-handles="O5-Calendar-waitlist-field-placeholder">').concat(e.placeholder,"</p>"):"","\n ").concat(""!==e.errorMsg?'<div id="'.concat(i,'" class="').concat(a.msgArea,' js-field-messenger" data-error-msg="').
2concat(e.errorMsg,'" qa-handles="O5-Calendar-waitlist-field-error" ').concat(s,"></div>"):"","\n </div>")}).join("")}catch(e){console.error(e)}}},{key:"createDisclaimerContent",value:function(e){return'<div class="calendar-sf-waitlist-cta__disclaimer-info" qa-handles="O5-Calendar-waitlist-disclaimer">\n <button class="calendar-sf-waitlist-cta__info-btn js-info-popup-btn" type="button" tabindex="0" qa-handles="O5-Calendar-waitlist-disclaimer-button">\n '.concat(Ct,'\n </button>\n <div class="calendar-sf-waitlist-cta__info-container is--hidden" qa-handles="O5-Calendar-waitlist-disclaimer-content">\n <span class="calendar-sf-waitlist-cta__info-container-pointer"></span>\n <h3 class="calendar-sf-waitlist-cta__info-heading" qa-handles="O5-Calendar-waitlist-disclaimer-heading">').concat(e.dobInfoHeading,'</h3>\n <p class="calendar-sf-waitlist-cta__info-para" qa-handles="O5-Calendar-waitlist-disclaimer-copy">').concat(e.dobInfo,"</p>\n </div>\n </div>")}},{key:"handleA11yUniqueIdentifiers",value:function(){var e={disclaimer:["disclaimer"]};for(var t in e){var n=e[t];this.options.labelledbyIds[t]||(this.options.labelledbyIds[t]=""),this.options.labelledbyIds[t]=this.options.labelledbyIds[t]+=n.join(" ")}}},{key:"onClickSubmitForm",value:(o=ut().m(function e(t){var n,a,r,i,o,s,l,c,d,u,f,h,v,p,m,y,b,g,w;return ut().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.preventDefault(),n=t.target,a=document.querySelector(this.selector),r=a?a.querySelectorAll(this.ui.fields):[],i=this.validateAndGetFormData(r),o="".concat(window.location.origin,"/bin/dmp/eventRegistration"),"boolean"!=typeof i&&this.store.selectedEvent.id&&(i.eventId=this.store.selectedEvent.id,(!0===this.store.aemData.useBrokerEndpoint||"true"===this.store.aemData.useBrokerEndpoint)&&(i.recordType="012Vx0000071Puz")),!i||!i.eventId){e.n=8;break}return e.p=1,e.n=2,(0,Pe.getCsrfToken)();case 2:return l=e.v,e.n=3,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","CSRF-Token":l,Accept:"application/json"},body:JSON.stringify(i),credentials:"same-origin"});case 3:if((c=e.v).ok){e.n=4;break}throw new Error("Request failed with status ".concat(c.status));case 4:return e.n=5,c.json();case 5:d=e.v,u=d.code,f=null===(s=d.message)||void 0===s?void 0:s.myHashMap,this.store.stopScroll=!0,this.store.skipHistoryUpdate=!0,200===u&&(this.store.notifyUser=!0,this.notifyUser(u)),500===u&&"BAD_REQUEST"===(null==f?void 0:f.errorCode)&&null!=f&&null!==(h=f.message)&&void 0!==h&&h.includes("please add with status of Waitlisted")&&(this.store.notifyUser=!1),e.n=7;break;case 6:e.p=6,w=e.v,console.error("Waitlist form submission error:",w),this.store.notifyUser=!1,this.notifyUser(500);case 7:this.options.checkboxes||(p=null===(v=n.closest(".calendar-sf-waitlist-cta__form"))||void 0===v?void 0:v.querySelector(".js-cancel-top-btn"))&&p.click(),e.n=9;break;case 8:(m=document.querySelector("input."+this.modifiers.invalid))&&"hidden"!==m.type?m.focus():(y=document.querySelector("select.month"))&&y.focus(),this.options.hasCheckboxes&&(b=n.closest(this.ui.parent),(g=b?b.querySelector(this.ui.formCheckbox):null)&&g.click());case 9:return e.a(2)}},e,this,[[1,6]])}),s=function(){var e=this,t=arguments;return new Promise(function(n,a){var r=o.apply(e,t);function i(e){ht(r,n,a,i,s,"next",e)}function s(e){ht(r,n,a,i,s,"throw",e)}i(void 0)})},function(e){return s.apply(this,arguments)})},{key:"onBlurRoundNumber",value:function(e){var t=e.currentTarget,n=t.value;t.value=Math.ceil(n).toString()}},{key:"validateAndGetFormData",value:function(e){var t=this,n=[],a=!1,r={};e.forEach(function(e){var i=e.getAttribute("name"),o=e.value||"",s=e.hasAttribute("required"),l=e.classList.contains(t.ui.regexField.slice(1)),c=t.validateSpecialFields({name:i,value:o,isSpecialField:l,isRequired:s});s&&""===o||s&&""!==o&&l&&!c?(n.push(!1),l?t.showError(e,!0):t.showError(e)):""===o||!s||c&&!c||(n.push(!0),t.hideError(e)),r[i]=o,n.includes(!1)?a=!1:(a=!0,""===o||e.disabled||(t.options.payload[i]=o,t.options.userInfo[i]=o))}),this.options.payload.numberofGuests&&(this.options.payload.numberofGuests=parseInt(this.options.payload.numberofGuests,10));var i=this.options.payload,o=i.preferredContactMethod,s=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(i,st);
2if(o){s.doNotContact=!1;var l={Phone:"phoneOptIn","Direct mail":"directMailOptIn",Email:"emailOptIn"};o.split(",").forEach(function(e){s[l[e]]=!0}),document.getElementById("first-heading").style.display="block",document.getElementById("optin-error").style.display="none"}else{var c=document.getElementById("optin");c&&"true"===c.getAttribute("aria-checked")&&(a=!1,document.getElementById("first-heading").style.display="none",document.getElementById("optin-error").style.display="block")}return a?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach(function(t){wt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},s):a}},{key:"validateSpecialFields",value:function(e){var t=e.name,n=e.value,a=e.isSpecialField,r=e.isRequired,i=!0,o=null;if(!a||a&&!r)return!1;switch(t){case"firstName":case"lastName":i=""!==n;break;case"email":i=(o=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(n);break;case"phoneNumber":var s=null,l=null;if(i=(o=ct(/(\d{10})|(\d{3}-\d{3}-\d{4})/,{nodash:1,dash:2})).test(n),null!=(l=n.match(o)))for(var c in l=n.match(o).groups)if(l[c]&&""!==l[c]){s=c;break}(i&&"nodash"===s&&n.length>10||!i)&&(i=!1);break;case"zip":i=5===n.length?/^[0-9]*$/.test(n):10===n.length&&/(?:[^\d]|^)(\d{5}\-\d{4})(?:[^\d]|$)/.test(n);break;case"numberofGuests":var d=this.store.selectedEvent.spotsLeft-1;parseInt(n)>d&&(i=!1)}return i}},{key:"onClickToggleCheckbox",value:function(e){e.preventDefault();var t=e.currentTarget,n=t.closest(this.ui.parent),a=n.querySelector('input[type="text"], input[type="tel"], select'),r=n.querySelector("button"),i=t.classList.contains(this.modifiers.disclaimer),o=t.classList.contains(this.modifiers.checked);if("keypress"===e.type&&32!==e.keyCode)return!1;if(o){if(t.setAttribute("aria-checked","false"),t.classList.remove(this.modifiers.checked),a&&(a.required=!1,a.disabled=!0,a.classList.contains(this.modifiers.invalid)&&this.hideError(a)),r&&(r.disabled=!0),i&&t.removeAttribute("aria-labelledby"),t.classList.contains("js-contact-check")){var s=t.dataset.contact,l=document.querySelector(".js-contact-group"),c=l.value.split(",");l.value=c.filter(function(e){return e!==s}).join(",")}}else if(t.setAttribute("aria-checked","true"),t.classList.add(this.modifiers.checked),a&&(a.required=!0,a.disabled=!1),r&&(r.disabled=!1),i&&t.setAttribute("aria-labelledby",this.options.labelledbyIds.disclaimer),t.classList.contains("js-contact-check")){var d=t.dataset.contact,u=document.querySelector(".js-contact-group"),f=u.value;u.value=f?"".concat(f,",").concat(d):d}}},{key:"notifyUser",value:function(e){var t,n=this,a=document.querySelector(this.selector).querySelector(this.ui.formSubmitBtn),r="",i="";if(this.store.notifyUser){switch(this.showRegMsgOnTransition&&(this.options.formType="transition"),this.options.formType){case"waitlist":r='<p class="calendar-sf-waitlist-cta__notification-text">\n '.concat(St,'\n <strong>You have successfully joined the waitlist for this event.</strong>\n </p>\n <div class="calendar-sf-waitlist-cta__notification-cancel-icon" role="button" tabindex="0">\n ').concat(Et,"\n </div>");break;case"registration":r='<div id="registration-success-msg" class="calendar-sf-registration__notification__success-msg">\n <div class="calendar-sf-registration__notification-icon">\n '.concat(qt,'\n </div>\n <div id="noti-msg" class="calendar-sf-registration__notification-msg">\n Registration Complete\n </div> \n </div>\n <div class="calendar-sf-registration__notification-icon" role="button" tabindex="0">\n ').concat(Et,"\n </div>");break;case"transition":r='<div id="registration-success-msg" class="calendar-sf-registration__notification__success-msg">\n <div class="calendar-sf-registration__notification-icon">\n '.concat(qt,'\n </div>\n <div id="noti-msg" class="calendar-sf-registration__notification-msg">\n Registration Complete\n </div> \n </div>\n <div class="calendar-sf-registration__notification-icon" role="button" tabindex="0">\n ').concat(Et,"\n </div>"),this.showRegMsgOnTransition=!1,this.options.formType="waitlist"}t=document.querySelector(this.ui.notification),i="is--valid",a.setAttribute("aria-describedby","noti-msg")}else t=document.querySelector(this.ui.errNotification),r="${ICONS.error24}<div>An error occurred while processing the form. Please try again later.</div>",i="is--invalid";t.innerHTML=r,t.classList.add(i),200===e&&this.reset(),t.style.display="block",t.focus();var o=t.querySelector(".calendar-sf-waitlist-cta__notification-cancel-icon, .calendar-sf-registration__notification-icon");o&&o.addEventListener("click",function(){t.classList.remove(i),t.style.display="none"}),setTimeout(function(){a.removeAttribute("aria-describedby"),t.style.display="none",n.store.notifyUser=!1},15e3)}},{key:"hideError",value:function(e){var t=e.closest(this.ui.parent),n=t.querySelector("label"),a=t.querySelector(this.ui.messenger);if(!e.classList.contains(this.modifiers.invalid))return!1;e.classList.remove(this.modifiers.invalid),e.removeAttribute("aria-describedby"),n.classList.remove(this.modifiers.invalid),a.classList.remove(this.modifiers.invalid)}},{key:"showError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.closest(this.ui.parent),a=n.querySelector("label"),r=n.querySelector(this.ui.messenger),i=r.id,o=r.dataset.errorMsg;if(t&&""!==e.value&&(o=r.dataset.errorMsg2),r.textContent=o,e.classList.contains(this.modifiers.invalid)||e.disabled)return!1;e.classList.add(this.modifiers.invalid),e.setAttribute("aria-describedby",i),a.classList.add(this.modifiers.invalid),r.classList.add(this.modifiers.invalid)}},{key:"reset",value:function(){var e=this,t=document.querySelector(this.selector),n=t.querySelectorAll(this.ui.fields),a=t.querySelectorAll(this.ui.formCheckbox);
2n.forEach(function(e){""!==e.value&&(e.value="")}),a.forEach(function(t){t.classList.contains(e.modifiers.checked)&&t.click()});var r=document.querySelectorAll(".date-dropdowns select");r.length>0&&r.forEach(function(e){var t=e.querySelector("option:first-child");t&&(t.selected=!0)})}}],a&&vt(n.prototype,a),i&&vt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,i,o,s}(a.uA);const Ot=Tt;function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Lt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Ft(a.key),a)}}function xt(e,t,n){return t=At(t),function(e,t){if(t&&("object"==jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dt()?Reflect.construct(t,n||[],At(e).constructor):t.apply(e,n))}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dt=function(){return!!e})()}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function It(e,t){return It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},It(e,t)}function Pt(e,t,n){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){var t=function(e,t){if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=jt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jt(t)?t:t+""}var Mt='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>',Bt='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"/></svg>',Nt='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z"/></svg>',Rt='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"/></svg>',Ht='<svg class="icon" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M720-80q-50 0-85-35t-35-85q0-7 1-14.5t3-13.5L322-392q-17 15-38 23.5t-44 8.5q-50 0-85-35t-35-85q0-50 35-85t85-35q23 0 44 8.5t38 23.5l282-164q-2-6-3-13.5t-1-14.5q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35q-23 0-44-8.5T638-672L356-508q2 6 3 13.5t1 14.5q0 7-1 14.5t-3 13.5l282 164q17-15 38-23.5t44-8.5q50 0 85 35t35 85q0 50-35 85t-85 35Z"/></svg>',Zt='<svg class="icon icon--expand-more" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"/></svg>',Vt='<svg class="icon icon--expand-less" aria-hidden="true" width="24" height="24" viewBox="0 -960 960 960" fill="currentColor"><path d="m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"/></svg>';const Yt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pt(n=xt(this,t,[e]),"uieName","calendar-sf-sharebar-component"),Pt(n,"modifier",{fadeout:"fadeout",isExpanded:"is--expanded"}),n.ui={jsBack:".js-back-btn",jsSave:".js-sharebar-save",jsPrint:".js-sharebar-print",jsMenuClose:".js-menu-close",jsDropdownTrigger:".
2js-dropdown-toggle",jsCloseEsc:".js-close-esc"},n.init(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&It(e,t)}(t,e),n=t,a=[{key:"afterRender",value:function(){var e=document.querySelector(this.ui.jsBack);e&&(e.addEventListener("click",this.onClickGoBack.bind(this)),e.addEventListener("keypress",this.onClickGoBack.bind(this)));var t=document.querySelector(this.ui.jsDropdownTrigger);t&&(t.addEventListener("click",this.openAndCloseOnClick.bind(this)),t.addEventListener("keypress",this.openAndCloseOnClick.bind(this)));var n=document.querySelector(this.ui.jsSave);n&&n.addEventListener("click",this.onClickSaveOrPrint.bind(this));var a=document.querySelector(this.ui.jsPrint);a&&a.addEventListener("click",this.onClickSaveOrPrint.bind(this));var r=document.querySelector(this.ui.jsMenuClose);r&&(r.addEventListener("click",this.openAndCloseOnClick.bind(this)),r.addEventListener("keypress",this.openAndCloseOnClick.bind(this)));var i=document.querySelector(this.ui.jsCloseEsc);i&&i.addEventListener("keydown",this.closeMenuOnEsc.bind(this))}},{key:"onClickGoBack",value:function(e){var t=this;if("keypress"===e.type&&13!==e.which)return!1;this.store.selectedFilters.filter(function(e,n){e.includes("eventId")&&t.store.selectedFilters.splice(n,1)}),this.store.savedFilters=this.store.selectedFilters,document.dispatchEvent(new CustomEvent("setCsfStore")),this.store.focusFirstResult=!0,this.store.queryParamsFromFilterSource="BackToCalender",window.history.back()}},{key:"openAndCloseOnClick",value:function(e){if(e.preventDefault(),"keypress"===e.type&&13!==e.which)return!1;var t=e.currentTarget,n=document.querySelector(".calendar-sf-event-sharebar__menu"),a=document.querySelector(".calendar-sf-event-sharebar__share-btn");n.classList.contains(this.modifier.fadeout)?(n.classList.remove(this.modifier.fadeout),a.setAttribute("aria-expanded","true"),a.classList.add(this.modifier.isExpanded)):(a.setAttribute("aria-expanded","false"),a.classList.remove(this.modifier.isExpanded),t.classList.contains("calendar-sf-event-sharebar__menu-close-btn")&&a.focus(),n.classList.add(this.modifier.fadeout))}},{key:"closeMenuOnEsc",value:function(e){if("keydown"===e.type&&27===e.which){var t=document.querySelector(".calendar-sf-event-sharebar__menu"),n=document.querySelector(".calendar-sf-event-sharebar__share-btn");n.setAttribute("aria-expanded","false"),n.classList.remove(this.modifier.isExpanded),n.focus(),t.classList.add(this.modifier.fadeout)}}},{key:"onClickSaveOrPrint",value:function(e){e.preventDefault(),window.print()}},{key:"serializeData",value:function(){var e=this.store.selectedEvent,t=e.topic+(e.details?": ".concat(e.details):""),n="Please%20join%20me%20for "+encodeURIComponent(t),a=encodeURIComponent(window.location.href);return{subject:n,body:"I%20thought%20you%20might%20like%20to%20join%20me%20at%20this%20event. ".concat(a),socialLinks:[{url:"http://www.linkedin.com/sharing/share-offsite/?url=".concat(a),name:"Linkedin",iconId:"icon-linkedin",a11yText:"Share this event on linkedIn. (Opens a new window)",target:'target="_self"',showOnMobile:!0},{url:"http://www.facebook.com/sharer.php?u=".concat(a,""e=").concat(n),name:"Facebook",iconId:"icon-facebook",a11yText:"Share this event on facebook. (Opens a new window)",target:'target="_self"',showOnMobile:!0},{url:"http://www.twitter.com/share?url=".concat(a,"&text=").concat(n),name:"Twitter",iconId:"icon-twitter",a11yText:"Share this event on twitter. (Opens a new window)",target:'target="_self"',showOnMobile:!0}]}}},{key:"template",value:function(e){return'<div class="calendar-sf-event-sharebar__back-btn js-back-btn" role="button" tabindex="0" qa-handles="O5-Calendar-sharebar-back-button">\n\t\t\t'.concat(Mt,'<span class="o5-cal-share-title">Back to Calendar</span>\n\t\t</div> \n\t\t<div class="calendar-sf-event-sharebar__ctas" qa-handles="O5-Calendar-sharebar-ctas">\n\t\t<div class="calendar-sf-event-sharebar__nav" qa-handles="O5-Calendar-sharebar-nav">\n\t\t\t<button class="js-sharebar-save" qa-handles="O5-Calendar-sharebar-save-button">\n\t\t\t\t').concat(Bt,'<span class="o5-cal-share-title">Save</span>\n\t\t\t</button>\n\t\t\t<button class="js-sharebar-print" qa-handles="O5-Calendar-sharebar-print-button">\n\t\t\t\t').concat(Nt,'<span class="o5-cal-share-title">Print</span>\n\t\t\t</button>\n\t\t\t<a class="js-sharebar-mail" href="mailto:?subject=').concat(e.subject,"&body=").concat(e.body,'" qa-handles="O5-Calendar-sharebar-email-link">\n\t\t\t\t').concat(Rt,'<span class="o5-cal-share-title">Email</span>\n\t\t\t</a>\n\t\t</div>\t\t\t\n\t\t<div class="calendar-sf-event-sharebar__mobile" qa-handles="O5-Calendar-sharebar-mobile">\n\t\t\t<button class="calendar-sf-event-sharebar__share-btn js-dropdown-toggle" aria-expanded="false" qa-handles="O5-Calendar-sharebar-share-button">\n\t\t\t\t').concat(Ht,'\n\t\t\t\t<span class="o5-cal-share-title">Share</span>\n\t\t\t\t').concat(Zt,"\n\t\t\t\t").concat(Vt,'\n\t\t\t</button>\n\t\t\t\t<div class="calendar-sf-event-sharebar__menu fadeout js-close-esc" qa-handles="O5-Calendar-sharebar-menu">\n\t\t\t\t\t<ul class="calendar-sf-event-sharebar__list" qa-handles="O5-Calendar-sharebar-list">\n\t\t\t\t\t\t').concat(e.socialLinks.map(function(e){var t="Email"===e.name?"calendar-sf-event-sharebar__mobile-email":"";return'<li class="calendar-sf-event-sharebar__list-item" qa-handles="O5-Calendar-sharebar-list-item"><a href="'.concat(e.url,'" class="calendar-sf-event-sharebar__menu-link ').concat(t,'" ').concat(e.target,' qa-handles="O5-Calendar-sharebar-menu-link">\n\t\t\t\t\t\t\t\t<span class="assistText">').concat(e.a11yText,'</span>\n\t\t\t\t\t\t\t\t<span class="o5-cal-share-title" aria-hidden="true">').concat(e.name,"</span>\n\t\t\t\t\t\t\t</a></li>")}).join(""),"\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>")}}],a&&Lt(n.prototype,a),r&&Lt(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);function Gt(e){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gt(e)}function zt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Jt(a.key),a)}}function Ut(e,t,n){return t=Kt(t),function(e,t){if(t&&("object"==Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wt()?Reflect.construct(t,n||[],Kt(e).constructor):t.apply(e,n))}function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wt=function(){return!!e})()}function Kt(e){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kt(e)}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}function $t(e,t,n){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=function(e,t){if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=Gt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gt(t)?t:t+""}const Qt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$t(n=Ut(this,t,[e]),"uieName","calendar-salesforce-eventdetails"),$t(n,"selectedEventId",0),$t(n,"days",[31,28,31,30,31,30,31,31,30,31,30,31]),$t(n,"months",["January","February","March","April","May","June","July","August","September","October","November","December"]),n.componentName=e.componentName||n.uieName,n.setup(),n.init(),document.addEventListener("updateSpotsLeft",n.updateEventDetails.bind(n)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(t,e),n=t,(a=[{key:"setup",value:function(){0===this.store.allEvents.length?this.updateAllEventsData():this.updateEventDetails(),this.updateRegistration()}},{key:"updateAllEventsData",value:function(){this.store.updateSpotLeftRequest=!0,document.dispatchEvent(new CustomEvent("fetch-events"))}},{key:"updateEventDetails",value:function(){var e=this,t=this.store.allEvents.find(function(t){return t.id===e.store.selectedEventId});void 0===t&&(window.location.href=window.location.origin+window.location.pathname),t.maxParticipants?(t.totalParticipants&&t.totalParticipants>=t.maxParticipants/2&&(t.displaySpots=!0,t.spotsLeft=t.maxParticipants-t.totalParticipants),t.totalParticipants<t.maxParticipants&&(t.spotsLeft=t.maxParticipants-t.totalParticipants),t.dis
2playGuestField=!0):t.maxParticipants-t.totalParticipants<=0&&(t.spotsLeft=0,t.displayGuestField=!1),this.store.selectedEvent=t,this.shouldRender=t&&Object.keys(t).length>0,this.render()}},{key:"afterRender",value:function(){var e,t,n,a={element:this.element,selector:"",store:this.store};new De(Object.assign(a,{selector:"calendar-sf-event__sidebar"})),new Yt(Object.assign(a,{selector:"calendar-sf-event-sharebar"})),this.store.selectedEvent.allowRegistration&&(this.store.selectedEvent.IsThisVirtualEvent||this.store.selectedEvent.IsThisInPersonEvent&&this.store.selectedEvent.spotsLeft>0?(new ot(Object.assign(a,{selector:"calendar-sf-registration"})),document.querySelector('[data-optum-library-cmp="calendar-sf-waitlist-cta"]').remove()):(this.store.selectedEvent.isWelmed||new Ot(Object.assign(a,{selector:"calendar-sf-waitlist-cta"})),document.querySelector('[data-optum-library-cmp="calendar-sf-registration"]').remove())),this.dobSetup(),null===(e=document.getElementById("dob-day"))||void 0===e||e.addEventListener("change",this.onDobDayChange.bind(this)),null===(t=document.getElementById("dob-month"))||void 0===t||t.addEventListener("change",this.onDobMonthChange.bind(this)),null===(n=document.getElementById("dob-year"))||void 0===n||n.addEventListener("change",this.onDobYearChange.bind(this)),window.scrollTo({top:0,behavior:"instant"});var r=document.querySelector(".js-back-btn");r&&r.focus()}},{key:"updateRegistration",value:function(){var e=document.querySelector(".calendar-sf-registration");!1===this.store.selectedEvent.allowRegistration?null==e||e.classList.add("hidden"):null==e||e.classList.remove("hidden")}},{key:"template",value:function(){var e='<div qa-handles="O5-Calendar-details-wrapper">\n <div class="dmp-row">\n <div class="calendar-main dmp-col-12 dmp-col-md-8" qa-handles="O5-Calendar-details-leftPanel">\n\t\t\t\t\t<div class="calendar-sf-event__heading" qa-handles="O5-Calendar-details-heading">'.concat(this.getHeadingTemplate(),'</div>\n\t\t\t\t\t<p class="calendar-sf-event__description" qa-handles="O5-Calendar-details-description">').concat(this.getDescriptionTemplate(),'</p>\n <div class="calendar-sf-registration" qa-handles="calendar-sf-registration" data-optum-library-cmp="calendar-sf-registration"></div>\n <div class="calendar-sf-waitlist-cta" qa-handles="calendar-sf-waitlist-cta" data-optum-library-cmp="calendar-sf-waitlist-cta"></div>\n </div>\n \n <div class="calendar-sf-event__sidebar calendar-sidepanel dmp-col-12 dmp-col-md-4" data-optum-library-cmp="calendar-sf-event__sidebar" qa-handles="O5-Calendar-details-RightPanel"></div>\n </div>\n\t\t</div>');return'<div class="calendar-sf-event" qa-handles="O5-Calendar-event"><div class="calendar-sf-event-sharebar" qa-handles="calendar-sf-event-sharebar" data-optum-library-cmp="calendar-sf-event-sharebar"></div>'.concat(e,"</div>")}},{key:"getHeadingTemplate",value:function(){var e=this.store.selectedEvent,t="";return t=e.isWelmed?e.name?"".concat(e.topic,": ").concat(e.name):"".concat(e.topic):"".concat(e.topic).concat(e.details?": ".concat(e.details):""),'<div class="calendar-sf-event__heading-date" qa-handles="O5-Calendar-event-date-time">\n '.concat(e.startDate," | ").concat(e.startTimeDisplay," ").concat(e.timeZone,'\n </div>\n\t\t<h1 class="calendar-sf-event__heading-name" tabindex="-1" qa-handles="O5-Calendar-event-title">').concat(t,"</h1>")}},{key:"getDescriptionTemplate",value:function(){var e=this.store.selectedEvent,t='<div class="calendar-sf-event__paragraph" qa-handles="O5-Calendar-event-description-paragraph">'.concat(e.description,"</div>\n\t\t").concat(e.eventDisclaimer?'<div class="calendar-sf-event__paragraph" qa-handles="O5-Calendar-event-disclaimer">'.concat(e.eventDisclaimer,"</div>"):"");return"".concat(""!==e.description?t:"","\n\t\t").concat(e.IsThisVirtualEvent?'<h2 class="calendar-sf-event__descriptionHeading" qa-handles="O5-Calendar-event-webcast-heading">Webcast details</h2>\n\t\t<div class="calendar-sf-event__paragraph" qa-handles="O5-Calendar-event-webcast-details">'.concat(e.webcastDetails,"</div>"):"")}},{key:"decodeHtml",value:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"dobSetup",value:function(){var e=document.getElementById("dob-day"),t=document.getElementById("dob-month"),n=document.getElementById("dob-year");
2if(e||t||n){for(var a='<option value="">Day</option>',r=1;r<=this.days[0];r++){var i=("0"+r).slice(-2);a+='<option value="'+i+'">'+i+"</option>"}for(e.innerHTML=a,e.value="",a='<option value="">Month</option>',r=1;r<=12;r++){var o=r-1;a+='<option value="'+("0"+r).slice(-2)+'">'+this.months[o]+"</option>"}for(t.innerHTML=a,t.value="",a='<option value="">Year</option>',r=(new Date).getFullYear();r>=1903;r--)a+='<option value="'+r+'">'+r+"</option>";n.innerHTML=a,n.value="";var s=document.getElementById("DOB");if(null!=s&&""!=s.value){var l=s.value.split("-",3);e.value=l[2],t.value=l[1],n.value=l[0]}}}},{key:"isLeapYear",value:function(e){return(e=parseInt(e))%4==0&&(e%400==0||e%100!=0)}},{key:"onDobYearChange",value:function(){var e=document.getElementById("dob-year"),t=document.getElementById("dob-month"),n=document.getElementById("dob-day");if(this.isLeapYear(e.value)?this.days[1]=29:this.days[1]=28,"02"===t.value){var a=n.value;n.innerHTML="";for(var r='<option value="">Day</option>',i=1;i<=this.days[1];i++){var o=("0"+i).slice(-2);r+='<option value="'.concat(o,'">').concat(o,"</option>")}n.innerHTML=r,parseInt(a)>this.days[1]?n.value="01":n.value=a}this.setInputValue()}},{key:"onDobMonthChange",value:function(){var e=document.getElementById("dob-day"),t=document.getElementById("dob-month"),n=t?t.value:"",a=parseInt(n)-1,r='<option value="">Day</option>',i=e?e.value:"";if(e){e.innerHTML="";for(var o=1;o<=this.days[a];o++){var s=("0"+o).slice(-2);r+='<option value="'.concat(s,'">').concat(s,"</option>")}e.innerHTML=r,parseInt(i)>this.days[a]&&(i="01"),e.value=i}this.setInputValue()}},{key:"onDobDayChange",value:function(){this.setInputValue()}},{key:"setInputValue",value:function(){var e,t,n,a=null===(e=document.getElementById("dob-year"))||void 0===e?void 0:e.value,r=null===(t=document.getElementById("dob-month"))||void 0===t?void 0:t.value,i=null===(n=document.getElementById("dob-day"))||void 0===n?void 0:n.value;if(""!==i&&""!==r&&""!==a){var o="".concat(a,"-").concat(r,"-").concat(i),s=document.getElementById("DOB");
2s&&(s.value=o)}else{var l=document.getElementById("DOB");l&&(l.value="")}}}])&&zt(n.prototype,a),r&&zt(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,r}(a.uA);var en=n(56639);function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function nn(e){return function(e){if(Array.isArray(e))return an(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return an(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function rn(e,t,n){return t=sn(t),function(e,t){if(t&&("object"==tn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,on()?Reflect.construct(t,n||[],sn(e).constructor):t.apply(e,n))}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}function sn(e){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sn(e)}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach(function(t){bn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,a,r,i){var l=a&&a.prototype instanceof s?a:s,c=Object.create(l.prototype);return fn(c,"_invoke",function(n,a,r){var i,s,l,c=0,d=r||[],u=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,o}};function h(n,a){for(s=n,l=a,t=0;!u&&c&&!r&&t<d.length;t++){var r,i=d[t],h=f.p,v=i[2];n>3?(r=v===a)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,f.v=a,f.n=i[1]):h<v&&(r=n<3||i[0]>a||a>v)&&(i[4]=n,i[5]=a,f.n=v,s=0))}if(r||n>1)return o;throw u=!0,a}return function(r,d,v){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,v),s=d,l=v;(t=s<2?e:l)||!u;){i||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(u=f.n<0)?l:n.call(a,f))!==o)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,r,i),!0),c}var o={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(fn(t={},a,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,fn(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,fn(u,"constructor",c),fn(c,"constructor",l),l.displayName="GeneratorFunction",fn(c,r,"GeneratorFunction"),fn(u),fn(u,r,"Generator"),fn(u,a,function(){return this}),fn(u,"toString",function(){return"[object Generator]"}),(un=function(){return{w:i,m:f}})()}function fn(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}fn=function(e,t,n,a){function i(t,n){fn(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},fn(e,t,n,a)}function hn(e,t,n,a,r,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(a,r)}function vn(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){var i=e.apply(t,n);function o(e){hn(i,a,r,o,s,"next",e)}function s(e){hn(i,a,r,o,s,"throw",e)}o(void 0)})}}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mn(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,gn(a.key),a)}}function yn(e,t,n){return t&&mn(e.prototype,t),n&&mn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bn(e,t,n){return(t=gn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gn(e){var t=function(e,t){if("object"!=tn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=tn(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tn(t)?t:t+""}var wn=function(){return yn(function e(t){pn(this,e),bn(this,"dbName",void 0),bn(this,"dbVersion",1),bn(this,"storeName",void 0),bn(this,"db",null),bn(this,"storeData",{}),bn(this,"allToBeStored",void 0),bn(this,"isSupported",void 0),this.dbName="O5CalendarSalesforce",this.storeName=t.storeName,this.allToBeStored=t.allToBeStored||[],this.isSupported="undefined"!=typeof window&&"indexedDB"in window&&null!==indexedDB},[{key:"initStore",value:(a=vn(un().m(function e(t){var n=this;return un().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,t){var a=indexedDB.open(n.dbName,n.dbVersion);a.onerror=function(){console.error("Error opening IndexedDB:",a.error),t(a.error)},a.onsuccess=function(){n.db=a.result,n.loadStoredData().then(function(){return e()}).catch(t)},a.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(n.storeName)||t.createObjectStore(n.storeName,{keyPath:"id"})}}))},e)})),function(e){return a.apply(this,arguments)})},{key:"loadStoredData",value:(n=vn(un().m(function e(){var t=this;return un().w(function(e){for(;;)switch(e.n){case 0:if(this.db){e.n=1;break}return e.a(2);case 1:return e.a(2,new Promise(function(e,n){var a=t.db.transaction([t.storeName],"readonly").objectStore(t.storeName).get("storeData");a.onsuccess=function(){a.result&&a.result.data&&(t.storeData=a.result.data),e()},a.onerror=function(){console.warn("Error loading stored data from IndexedDB. Continuing with empty data. This is intentional to allow the application to function even if IndexedDB is unavailable or corrupted. Error:",a.error),e()}}))}},e,this)})),function(){return n.apply(this,arguments)})},{key:"set",value:function(e){this.storeData=dn(dn({},this.storeData),e),this.saveToIndexedDB()}},{key:"setStore",value:function(e){var t={};this.allToBeStored.forEach(function(n){void 0!==e[n]&&(t[n]=e[n])}),this.storeData=dn(dn({},this.storeData),t),this.saveToIndexedDB()}},{key:"getStored",value:function(){return this.storeData||{}}},{key:"saveToIndexedDB",value:(t=vn(un().m(function e(){var t=this;return un().w(function(e){for(;;)switch(e.n){case 0:if(this.db){e.n=1;break}return e.a(2);case 1:return e.a(2,new Promise(function(e,n){var a=t.db.transaction([t.storeName],"readwrite").objectStore(t.storeName).put({id:"storeData",data:t.storeData});a.onsuccess=function(){return e()},a.onerror=function(){console.error("Error saving to IndexedDB:",a.error),n(a.error)}}))}},e,this)})),function(){return t.apply(this,arguments)})},{key:"clearStore",value:(e=vn(un().m(function e(){var t=this;return un().w(function(e){for(;;)switch(e.n){case 0:if(this.storeData={},this.db){e.n=1;break}return e.a(2);case 1:return e.a(2,new Promise(function(e,n){var a=t.db.transaction([t.storeName],"readwrite").objectStore(t.storeName).delete("storeData");a.onsuccess=function(){return e()},a.onerror=function(){console.error("Error clearing IndexedDB:",a.error),n(a.error)}}))}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n,a}(),kn=function(e){function t(e){var n;return pn(this,t),bn(n=rn(this,t,[e]),"reload",!1),bn(n,"activeModule",null),bn(n,"cfStore",new wn({storeName:"calendarsalesforce",allToBeStored:["search","radius","sortBy","searchOptions","searchType","searchByName","currPageNum","savedFilters","allEvents","filteredResults","filterData","filterLanguages","filterEventTypes","eventsView","selectedDate","selectedEventsView","originCoords","cityStateList","zipCodesList","filterStateCode","eventFormData"],storage:!0,trackFreshness:!0})),bn(n,"storeInitialized",!1),n.cfStore.set({uri:"",listOfEventDates:[],allEvents:[],filteredResults:[],filterData:[],filterLanguages:[],filterEventTypes:[],eventsView:[],selectedDate:"upcomingEvents",selectedEventsView:"All events",eventTags:"",selectedFilters:[],filters:{},savedFilters:[],filterStateCode:"",filtersToDisplay:["radius","topic","type","language"],selectedEvent:{},notifyUser:!1,stopScroll:!1,queryParameters:{},selectedAction:"",currentResultsCount:0,numOfPages:0,resultsPerPage:24,currPageNum:1,focusFirstResult:!1,sessionRoutes:[],search:"",radius:0,originCoords:[],cityStateList:[],zipCodesList:[],refreshData:!0,filterResultOnLoad:!1,eventFormData:{}}),n.store={aemData:{},uri:"",listOfEventDates:[],allEvents:[],filteredResults:[],filterData:[],filterLanguages:[],filterEventTypes:[],eventsView:[],selectedDate:"upcomingEvents",selectedEventsView:"All events",eventTags:"",selectedFilters:[],filters:{},savedFilters:[],filterStateCode:"",filtersToDisplay:["radius","topic","type","language"],selectedEvent:{},selectedEventId:"",notifyUser:!1,stopScroll:!1,queryParameters:{},selectedAction:"",currentResultsCount:0,numOfPages:0,resultsPerPage:24,currPageNum:1,focusFirstResult:!1,sessionRoutes:[],search:"",radius:0,originCoords:[],cityStateList:[],zipCodesList:[],refreshData:!0,queryParamsFromFilterSource:"",updateSpotLeftRequest:!1,skipHistoryUpdate:!1,eventFormData:{}}
2,n.initializeStore(),window.addEventListener("routing",n.route.bind(n)),window.addEventListener("popstate",n.route.bind(n)),document.addEventListener("generateQueryParamsFromFilters",n.generateQueryParamsFromFilters.bind(n)),document.addEventListener("setCsfStore",n.setCsfStore.bind(n)),document.addEventListener("fetch-events",n.fetchEvents.bind(n)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ln(e,t)}(t,e),yn(t,[{key:"initializeStore",value:(a=vn(un().m(function e(){var t;return un().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.cfStore.initStore("calendarsalesforce");case 1:this.storeInitialized=!0,this.setup(),e.n=3;break;case 2:e.p=2,t=e.v,console.error("Error initializing IndexedDB store:",t),this.storeInitialized=!1,this.setup();case 3:return e.a(2)}},e,this,[[0,2]])})),function(){return a.apply(this,arguments)})},{key:"setup",value:(n=vn(un().m(function e(){var t,n=this;return un().w(function(e){for(;;)switch(e.n){case 0:t=this.element.getAttribute("data-aem-authoring"),(0,i.Jt)(t).then(function(e){n.store.aemData=e.parsedBody,n.fetchEvents(),n.store.stopScroll=!1}).catch(function(e){n.init(),console.error("Error: "+e)});case 1:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"buildHttpParams",value:function(){var e=this.store.aemData,t=e.marketCode,n=e.cdoCode,a=e.maxRecords,r=e.isNationalFilter,i=e.useBrokerEndpoint,o=!0===i||"true"===i,s=new URLSearchParams({market:t,cdo:n,maxRecords:a,isNational:r});return o&&s.set("isBrokerAPI","true"),"".concat(window.location.origin,"/bin/dmp/eventList?").concat(s.toString())}},{key:"fetchEvents",value:function(){var e=this,t="",n=!1;"WELLMED"===this.store.aemData.marketCode?(t="".concat(window.location.origin,"/bin/dmp/wellmedcampaigns"),n=!0):t=this.buildHttpParams();var a=(0,i.Jt)(t),r=!!this.storeInitialized&&this.cfStore.getStored();if(r&&void 0!==r.filterStateCode&&this.store.aemData.marketCode!=r.filterStateCode&&(this.reload=!0),r&&void 0!==r.eventFormData&&Object.keys(r.eventFormData).length>0&&(this.store.eventFormData=r.eventFormData),this.store.filterStateCode=this.store.aemData.marketCode,this.reload||this.store.refreshData||this.store.updateSpotLeftRequest){var o=document.getElementById("search-views");this.store.savedFilters=[];var s="All events",l=1,c="",d=24;r&&!1!==r&&("string"==typeof r.selectedEventsView&&""!==r.selectedEventsView.trim()&&(s=r.selectedEventsView),Number.isInteger(r.currPageNum)&&r.currPageNum>0&&(l=r.currPageNum),"string"==typeof r.selectedDate&&en(r.selectedDate,["MM/DD/YYYY","M/D/YYYY"],!0).isValid()&&(c=r.selectedDate),Number.isInteger(r.resultsPerPage)&&r.resultsPerPage>0&&(d=r.resultsPerPage)),o&&(o.value=s),this.store.selectedEventsView=s,this.store.currPageNum=l,this.store.resultsPerPage=d,this.store.selectedDate=c,a.then(function(t){e.store.updateSpotLeftRequest?(e.updateEventSpot(t.parsedBody,n),e.store.updateSpotLeftRequest=!1):(e.getCalendarData(t.parsedBody,n),e.route(null))}).catch(function(e){console.error("Error"+e)})}else this.getCalendarData(null,n),this.route(null)}},{key:"setCsfStore",value:function(){this.storeInitialized&&this.cfStore.setStore(dn({},this.store))}},{key:"updateEventSpot",value:function(e,t){var n=this.store.selectedEventId;if(null!==e){if(t);else{var a=e.message.calendarevents.filter(function(e){return e.EventId==n.id});a.MaximumEventParticipants?(a.TotalEventParticipants&&a.TotalEventParticipants>=a.MaximumEventParticipants/2&&(n.displaySpots=!0,n.spotsLeft=a.MaximumEventParticipants-a.TotalEventParticipants),a.TotalEventParticipants<a.MaximumEventParticipants&&(n.spotsLeft=a.MaximumEventParticipants-a.TotalEventParticipants),n.displayGuestField=!0):a.MaximumEventParticipants-a.TotalEventParticipants<=0&&(n.spotsLeft=0,n.displayGuestField=!1)}this.setCsfStore()}}},{key:"getCalendarData",value:function(e,t){var n,a=this;if(null!==e)n=t?this.transformDataForUIWelmed(e):this.transformDataForUI(e),(0===this.store.filteredResults.length||this.reload)&&(this.store.filteredResults=n);else{var i=!!this.storeInitialized&&this.cfStore.getStored();n=this.store.allEvents,i&&this.store.filteredResults.length>0&&(this.store.filteredResults=i.filteredResults)}this.store.allEvents=n,this.store.listOfEventDates=n.reduce(function(e,t){var n=(0,r.Yq)(t.date.startDate.replace(".",""));return-1===e.indexOf(n)&&e.push(n),e},[]),this.store.calendarInstance&&(this.store.calendarInstance.redraw(),setTimeout(function(){a.store.updateCalendarAlly&&a.store.updateCalendarAlly()}
2,0)),this.generateFiltersFromQueryParams(),this.setCsfStore(),this.store.selectedFilters=this.store.savedFilters,0===this.store.selectedFilters.length&&(this.store.filteredResults=this.store.allEvents)}},{key:"generateQueryParamsFromFilters",value:function(){var e,t=this,n=!1;"BackToCalender"==this.store.queryParamsFromFilterSource?e=!0:"EventDetailTag"==this.store.queryParamsFromFilterSource&&(n=!0),this.store.queryParamsFromFilterSource="";var a={};this.store.queryParameters=(0,r.vA)()?(0,r.vA)():{},this.store.filtersToDisplay.forEach(function(e){void 0!==t.store.queryParameters&&delete t.store.queryParameters[e]}),this.store.selectedFilters.forEach(function(e){var t=e.split("/"),n=t[0];t.shift(),a[n]||(a[n]=[]);try{a[n].push((0,r.lF)(t.join("/"),"encode"))}catch(e){console.error("join fails")}});var i=window.location.origin+window.location.pathname,o={};o=dn(n?{}:dn({},this.store.queryParameters),a);var s=Object.keys(o);if(s.length>0&&!e){i+="?";try{i+=s.map(function(e){var n="";return n=Array.isArray(o[e])?o[e].join("|"):o[e],t.store.queryParameters[e]=n,"".concat(e,"=").concat(n)}).join("&")}catch(e){console.error("join fails")}}history.replaceState("","",i)}},{key:"generateFiltersFromQueryParams",value:function(){var e=this;this.store.queryParameters=(0,r.vA)()?(0,r.vA)():{},this.store.filtersToDisplay.forEach(function(t){var n=e.store.queryParameters[t];n&&n.split("|").forEach(function(n){e.store.selectedFilters.push("".concat(t,"/").concat((0,r.lF)(n,"decode")))})}),this.store.selectedFilters=this.store.selectedFilters.filter(function(e,t,n){return n.indexOf(e)==t}),this.store.savedFilters=nn(this.store.selectedFilters)}},{key:"transformDataForUIWelmed",value:function(e){var t=this,n=(0,r.n)(!0);if(e){var a=[];return e.success||n?(this.store.filterData=[],this.store.filterLanguages=[],this.store.filterEventTypes=[],e.data&&e.data.length>0&&(a=e.data),this.store.eventsView=["All events"],a=a.map(function(e){try{var n=void 0!==e.Description?decodeURIComponent(e.Description):"",a="".concat(e.Event_Location_new__c.street,", ").concat(e.Event_Location_new__c.city,", ").concat(e.Event_Location_new__c.stateCode,", ").concat(e.Event_Location_new__c.postalCode),r="".concat(e.StartDate,"T").concat(e.Start_Time__c),i="".concat(e.EndDate,"T").concat(e.End_Time__c),o=en(r),s=en(i),l=o.format("dddd, MMM. DD, YYYY"),c=s.format("dddd, MMM. DD YYYY"),d=e.Event_Language_Focus__c.split(";").map(function(e){return"language/".concat(e)}),u={isWelmed:!0,id:e.Id,name:e.Event_Name__c?e.Event_Name__c:"",type:e.Type,lat:e.Geolocation_Latitude__c,lng:e.Geolocation_Longitude__c,community:"",details:e.Event_Details__c?e.Event_Details__c:"",IsThisInPersonEvent:!e.Virtual_Event_Campaign__c,IsThisVirtualEvent:e.Virtual_Event_Campaign__c,IsCommunityCenterEvent:e.IsCommunityCenterEvent__c,topic:e.Event_Topic__c,calStartDate:r,calEndDate:i,businessName:e.Event_Location__c?e.Event_Location__c:"",webcastDetails:e.WebcastDetails__c,date:{startDate:l,endDate:c},displaySpots:!1,displayGuestField:!1,totalParticipants:e.Actual_Attendees__c,maxParticipants:e.Number_of_Attendees__c,startTime:en(r).format("h:mm A"),endTime:en(i).format("h:mm A"),startTimeDisplay:t.formatTimeNoTzConversion(r),endTimeDisplay:t.formatTimeNoTzConversion(i),timeZone:e.Time_Zone__c.substring(0,3),startDate:l,endDate:c,startDateWithoutYear:o.format("dddd, MMM. DD"),address:decodeURIComponent(a.substring(a.indexOf(":")+1).trim()),street:e.Event_Location_new__c.street,city:e.Event_Location_new__c.city?e.Event_Location_new__c.city:"",state:e.Event_Location_new__c.state?e.Event_Location_new__c.state:"",postalCode:e.Event_Location_new__c.postalCode,description:t.editDescription(n),eventDisclaimer:e.Event_Disclaimer__c,allowRegistration:e.allowRegistration__c,requirePhone:e.requirePhone,language:e.Event_Language_Focus__c,tags:["topic/".concat(e.Type),"topic/".concat(e.Event_Topic__c)].concat(nn(d),["view/All events"]),spotsLeft:0},f=e.Event_Location_new__c.city.toLowerCase();return-1===t.store.cityStateList.indexOf(f)&&t.store.cityStateList.push(f),-1===t.store.zipCodesList.indexOf(e.Event_Location_new__
2c.postalCode)&&t.store.zipCodesList.push(e.Event_Location_new__c.postalCode),t.populateEventsView(u),t.createFilterTrayData(u),u.allowRegistration?(e.Actual_Attendees__c||(e.Actual_Attendees__c=0),e.Number_of_Attendees__c||(e.Number_of_Attendees__c=1e3),0==e.Number_of_Attendees__c?(u.allowRegistration=!1,u.displaySpots=!1,u.spotsLeft=0):e.Actual_Attendees__c>=e.Number_of_Attendees__c/2?(u.displaySpots=!0,u.spotsLeft=e.Number_of_Attendees__c-e.Actual_Attendees__c):e.Actual_Attendees__c<e.Number_of_Attendees__c?(u.displaySpots=!1,u.spotsLeft=e.Number_of_Attendees__c-e.Actual_Attendees__c):(u.allowRegistration=!1,u.displaySpots=!1,u.spotsLeft=0)):(u.allowRegistration=!1,u.spotsLeft=0,u.displayGuestField=!1),u}catch(t){return void console.error("Error in transforming data for UI"+JSON.stringify(e)+" due to "+t)}}).filter(function(e){return void 0!==e}),this.store.eventsView.push("Custom"),a.sort(function(e,t){return new Date(e.startDate).getTime()-new Date(t.startDate).getTime()}),this.store.listOfEventDates=a.reduce(function(e,t){var n=(0,r.Yq)(t.date.startDate.replace(".",""));return-1===e.indexOf(n)&&e.push(n),e},[]),a):[]}}},{key:"getShortTimezone",value:function(e){var t={timeZone:e,timeZoneName:"short"},n=new Intl.DateTimeFormat("en-US",t).formatToParts(new Date).find(function(e){return"timeZoneName"===e.type});return n?n.value:null}},{key:"transformDataForUI",value:function(e){var t=this,n=(0,r.n)(!0);if(e){var a=[];return 200===e.code||n?(this.store.filterData=[],this.store.filterLanguages=[],this.store.filterEventTypes=[],e.message&&e.message.calendarevents?a=e.message.calendarevents:n&&(a=e.resources),this.store.eventsView=["All events"],a=a.map(function(e){var n=e.Type,a=e.EventTopic,r=void 0!==e.EventDescription?decodeURIComponent(e.EventDescription):"",i=t.getShortTimezone(e.Timezone),o=en(e.StartTimeDisplay),s=en(e.EndTimeDisplay),l=o.format("dddd, MMM. DD, YYYY"),c=s.format("dddd, MMM. DD YYYY"),d=e.language.split(";").map(function(e){return"language/".concat(e)}),u={isWelmed:!1,id:e.EventId,name:e.eventName,type:n,lat:e.latitude,lng:e.longitude,community:e.targetCommunity,details:e.EventDetails,IsThisInPersonEvent:!e.IsThisVirtualEvent,IsThisVirtualEvent:e.IsThisVirtualEvent,IsCommunityCenterEvent:e.IsCommunityCenterEvent,topic:a,calStartDate:e.StartTime,calEndDate:e.EndTime,businessName:e.AddressBusinessName,webcastDetails:e.WebcastDetails,date:{startDate:l,endDate:c},displaySpots:!1,displayGuestField:!1,totalParticipants:e.TotalEventParticipants,maxParticipants:e.MaximumEventParticipants,startTime:en(e.StartTime).format("h:mm A"),endTime:en(e.EndTime).format("h:mm A"),startTimeDisplay:t.formatTimeNoTzConversion(e.StartTimeDisplay),endTimeDisplay:t.formatTimeNoTzConversion(e.EndTimeDisplay),timeZone:i,startDate:l,endDate:c,startDateWithoutYear:o.format("dddd, MMM. DD"),address:decodeURIComponent(e.FullAddress.substring(e.FullAddress.indexOf(":")+1).trim()),street:e.Street,city:e.City,state:e.State,postalCode:e.PostalCode,description:t.editDescription(r),eventDisclaimer:e.EventDisclaimer,showRegister:"Yes"===e.showRegister,allowRegistration:e.allowRegistration,requirePhone:e.requirePhone,language:e.language,tags:["topic/".concat(n),"topic/".concat(a)].concat(nn(d),["view/All events"]),spotsLeft:0},f=e.City.toLowerCase();return-1===t.store.cityStateList.indexOf(f)&&t.store.cityStateList.push(f),-1===t.store.zipCodesList.indexOf(e.PostalCode)&&t.store.zipCodesList.push(e.PostalCode),t.populateEventsView(u),t.createFilterTrayData(u),e.MaximumEventParticipants?(e.TotalEventParticipants&&e.TotalEventParticipants>=e.MaximumEventParticipants/2&&(u.displaySpots=!0,u.spotsLeft=e.MaximumEventParticipants-e.TotalEventParticipants),e.TotalEventParticipants<e.MaximumEventParticipants&&(u.spotsLeft=e.MaximumEventParticipants-e.TotalEventParticipants),u.displayGuestField=!0):e.MaximumEventParticipants-e.TotalEventParticipants<=0&&(u.spotsLeft=0,u.displayGuestField=!1),u}),this.store.eventsView.push("Custom"),a.sort(function(e,t){return new Date(e.startDate).getTime()-new Date(t.startDate).getTime()}),this.store.listOfEventDates=a.reduce(function(e,t){var n=(0,r.Yq)(t.date.startDate.replace(".",""));return-1===e.indexOf(n)&&e.push(n),e},[]),a):[]}}},{key:"formatTimeNoTzConversion",value:function(e){var t=e.split("T");t=t[1].split(":");var n=parseInt(t[0])%12,a=t[1];n=0===n?12:n;var r=parseInt(t[0])<12?"a.m.":"p.m.";return"00"===a?"".concat(n.toString()," ").concat(r):"".concat(n.toString(),":").concat(a," ").concat(r)}},{key:"editDescription",value:function(e){return""!==e&&("<strong>"===e.slice(0,8)&&(e=e.replace(/<strong>(.*?)<\/strong>/,"")),"</br>"===e.slice(0,5)&&(e=e.replace(/<\/br>/,"")),"\n"===e.slice(0,2)&&(e=e.replace(/\n/g,""))),e}},{key:"populateEventsView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dddd, MMMM DD, YYYY",n=en(),a=en(e.startDate,t),r=[];n.week()===a.week()&&this.addViewsToList("This week",r,a.week()),n.month()===a.month()&&this.addViewsToList("This month",r,a.month()),a.isSame(n,"day")&&this.addViewsToList("Today",r,a.month()),e.views=r}},{key:"addViewsToList",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.store.eventsView.includes(e)||this.store.eventsView.push(e),e=e.replace(/\w+\s/,""),n&&(e="".concat(e,"/").concat(n)),t.push(e)}},{key:"createFilterTrayData",value:function(e){var t=this,n=e.type,a=e.topic,r=e.language;this.store.filterData.some(function(e){return e.type===n&&e.topic===a})||this.store.filterData.push({type:n,topic:a});for(var i=r.split(";"),o=0,s=i.length;o<s;o++)this.store.filterLanguages.includes(i[o])||this.store.filterLanguages.push(i[o]);["IsCommunityCenterEvent","IsThisVirtualEvent","IsThisInPersonEvent"].forEach(function(n){var a;switch(n){case"IsThisVirtualEvent":a="Virtual event";break;case"IsThisInPersonEvent":a="In-person event";break;default:a="Community center event"}e[n]&&(t.store.filterEventTypes.includes(a)||t.store.filterEventTypes.push(a),e.tags.push("type/".concat(a)))})}},{key:"route",value:function(e){var t,n=window.location,a="",i={name:"activity",hasRendered:!1,selectedEventId:null};if(e){var o=e.detail;o&&void 0!==o.route&&(t=o.route)}this.store.queryParameters=(0,r.vA)()?(0,r.vA)():{},void 0!==this.store.queryParameters.eventId&&""!==this.store.queryParameters.eventId&&(t=this.store.queryParameters.eventId),void 0!==t&&""!==t?(i.name="EventDetail",i.selectedEventId=t,this.store.selectedEventId=t,a="?eventId="+t):this.store.selectedEventId="",this.updateHistoryState(n,a),this.handleModuleLoad(i)}},{key:"handleModuleLoad",value:function(e){(null===this.activeModule||this.activeModule!==e||e.hasRendered)&&(this.hasRendered=!1,this.activeModule=e.name),"activity"==e.name&&(this.generateQueryParamsFromFilters(),this.store.filterResultOnLoad=!0),e.hasRendered||this.init()}},{key:"updateHistoryState",value:function(e,t){var n=window.history,a=e.origin+e.pathname;this.store.skipHistoryUpdate?this.store.skipHistoryUpdate=!1:(/\/$/.test(a)&&(a=a.slice(0,-1)),""!==t&&(
2a+=t),t&&!this.store.sessionRoutes.includes(t)?(this.store.sessionRoutes.push(t),n.pushState(null,"",a)):(this.store.sessionRoutes=[],n.replaceState("","",a)))}},{key:"getCurrentLocationAndZip",value:function(){var e=this;navigator.geolocation?navigator.geolocation.getCurrentPosition(function(t){var n=t.coords,a=n.latitude,r=n.longitude;console.log("Current location:",a,r),e.store.queryParameters.latitude=a,e.store.queryParameters.longitude=r,e.getZipCode({lat:a,lng:r})},function(e){console.error("Error getting current location:",e.message)}):console.error("Browser does not support Geolocation API")}},{key:"getZipCode",value:function(e){var t=this,n=new google.maps.LatLng(e.lat,e.lng);(new google.maps.Geocoder).geocode({location:n},function(n,a){if(a===google.maps.GeocoderStatus.OK){if(n[0])for(var r=function(){var a=n[0].address_components[i];if("postal_code"===a.types[0]){var r=a.short_name;console.log("Postal Code:",r),t.store.queryParameters.search=r,t.store.search=r;var o=window.location.search.substring(1),s={},l=/^[a-zA-Z0-9_]+$/;o.split("&").forEach(function(e){var t=e.split("="),n=t[0],a=t[1];l.test(n)?s[n]=a:console.warn("Invalid parameter name: ".concat(n))}),s.search=r,s.latitude=e.lat,s.longitude=e.lng;var c="";Object.keys(s).forEach(function(e){c+="&".concat(e,"=").concat(s[e])});var d=window.location.href.slice(0,window.location.href.indexOf("html?")+5).concat(c.substring(1));return history.replaceState("","",d),1}},i=0;i<n[0].address_components.length&&!r();i++);}else console.error("Geocoder failed due to:",a)})}},{key:"afterRender",value:function(){var e={element:this.element,selector:"",store:this.store};"EventDetail"!==this.activeModule?(new ue(Object.assign(e,{selector:"calendar-sf-activity"})),document.querySelector('[data-optum-library-cmp="calendar-sf-event-detail"]').remove()):(new Qt(Object.assign(e,{selector:"calendar-sf-event-detail"})),document.querySelector('[data-optum-library-cmp="calendar-sf-activity"]').remove())}},{key:"template",value:function(){return'<div class="o5-calendar-salesforce dmp-container" qa-handles="O5-Calendar-sf-container">\n <div data-optum-library-cmp="calendar-sf-activity" class="calendar-sf-activity" qa-handles="O5-Calendar-sf-activity"></div>\n <div data-optum-library-cmp="calendar-sf-event-detail" class="calendar-sf-event-detail" qa-handles="O5-Calendar-sf-event-detail"></div>\n </div>'}}]);var n,a}(a.uA);const Cn=kn},89668(e,t,n){"use strict";n.d(t,{getCsrfToken:()=>a});function a(){return window.__dmpCsrfTokenPromise||(window.__dmpCsrfTokenPromise=function(){var e,t,n=null===(e=window.Granite)||void 0===e||null===(e=e.csrf)||void 0===e||null===(t=e.getToken)||void 0===t?void 0:t.call(e);if(n)return Promise.resolve(n);var a=document.querySelector('meta[name="csrf-token"]');return null!=a&&a.content?Promise.resolve(a.content):fetch("/libs/granite/csrf/token.json",{method:"GET",credentials:"same-origin",cache:"no-store",headers:{"Cache-Control":"no-store, no-cache",Pragma:"no-cache",Accept:"application/json"}}).then(function(e){if(!e.ok)throw new Error("CSRF token fetch failed: ".concat(e.status));return e.json()}).then(function(e){return e.token})}().catch(function(e){throw window.__dmpCsrfTokenPromise=void 0,e})),window.__dmpCsrfTokenPromise}},95166(e){e.exports=[{name:"Alabama",abbrv:"AL"},{name:"Alaska",abbrv:"AK"},{name:"Arizona",abbrv:"AZ"},{name:"Arkansas",abbrv:"AR"},{name:"California",abbrv:"CA"},{name:"Colorado",abbrv:"CO"},{name:"Connecticut",abbrv:"CT"},{name:"Delaware",abbrv:"DE"},{name:"District of Columbia",abbrv:"DC"},{name:"Florida",abbrv:"FL"},{name:"Georgia",abbrv:"GA"},{name:"Hawaii",abbrv:"HI"},{name:"Idaho",abbrv:"ID"},{name:"Illinois",abbrv:"IL"},{name:"Indiana",abbrv:"IN"},{name:"Iowa",abbrv:"IA"},{name:"Kansa",abbrv:"KS"},{name:"Kentucky",abbrv:"KY"},{name:"Lousiana",abbrv:"LA"},{name:"Maine",abbrv:"ME"},{name:"Maryland",abbrv:"MD"},{name:"Massachusetts",abbrv:"MA"},{name:"Michigan",abbrv:"MI"},{name:"Minnesota",abbrv:"MN"},{name:"Mississippi",abbrv:"MS"},{name:"Missouri",abbrv:"MO"},{name:"Montana",abbrv:"MT"},{name:"Nebraska",abbrv:"NE"},{name:"Nevada",abbrv:"NV"},{name:"New Hampshire",abbrv:"NH"},{name:"New Jersey",abbrv:"NJ"},{name:"New Mexico",abbrv:"NM"},{name:"New York",abbrv:"NY"},{name:"North Carolina",abbrv:"NC"},{name:"North Dakota",abbrv:"ND"},{name:"Ohio",abbrv:"OH"},{name:"Oklahoma",abbrv:"OK"},{name:"Oregon",abbrv:"OR"},{name:"Pennsylvania",abbrv:"PA"},{name:"Rhode Island",abbrv:"RI"},{name:"South Carolina",abbrv:"SC"},{name:"South Dakota",abbrv:"SD"},{name:"Tennessee",abbrv:"TN"},{name:"Texas",abbrv:"TX"},{name:"Utah",abbrv:"UT"},{name:"Vermont",abbrv:"VT"},{name:"Virginia",abbrv:"VA"},{name:"Washington",abbrv:"WA"},{name:"West Virginia",abbrv:"WV"},{name:"Wisconsin",abbrv:"WI"},{name:"Wyoming",abbrv:"WY"}]},35358(e,t,n){var a={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":43004,"./en-sg.js":43004,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=35358}}]);
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.