PageSourceSearch

https://www.townsquareinns.com/dist/scripts/ExperienceBuilder.bc7cf11988ff533e001b.min.js

js townsquareinns.com collected 2026-10-05 10:47:52 UTC 10,025 bytes, 1 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[229,422],{493:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return c}});var n=i(4575),a=i.n(n),s=i(3913),r=i.n(s),o=i(9713),l=i.n(o),c=function(){function t(e){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=n.tabListSelector,r=void 0===s?"[data-tab-group]":s,o=n.tabSelector,c=void 0===o?"[data-tab]":o,h=n.panelSelector,d=void 0===h?"[data-tab-panel]":h,u=n.tabChangeCallback,b=void 0===u?function(t){}:u;a()(this,t),l()(this,"tabs",void 0),l()(this,"panels",void 0),l()(this,"isReady",!1),l()(this,"selectedIndex",null),l()(this,"tabChangeCallback",void 0),this.tabChangeCallback=b;var v=e.querySelector(r);this.tabs=v.querySelectorAll(c),this.panels=e.querySelectorAll(d),this.tabs.length||console.error("No tabs were found.",e),this.tabs.length!==this.panels.length&&console.error("There should be the same number of tabs and panels.",e),this.isReady=!0;var p=this.panels[0].hasAttribute("hidden");v.setAttribute("role","tablist"),this.tabs.forEac
1h((function(t,e){t.setAttribute("role","tab"),t.setAttribute("tabindex","-1"),t.parentNode.setAttribute("role","presentation"),t.addEventListener("click",(function(e){e.preventDefault(),i.selectTab(t)})),t.addEventListener("keydown",(function(t){var n=Array.prototype.indexOf.call(i.tabs,t.currentTarget),a=37===t.which?n-1:39===t.which?n+1:40===t.which?"down":null;if(null!==a)if(t.preventDefault(),"down"===a){i.panels[e].focus()}else{var s=i.tabs[a];s&&i.selectTab(s)}}))})),this.panels.forEach((function(t,e){t.setAttribute("role","tabpanel"),t.setAttribute("tabindex","-1");var n=i.tabs[e];n&&n.hasAttribute("id")&&t.setAttribute("aria-labelledby",i.tabs[e].id)})),p||this.selectIndex(0,!1)}return r()(t,[{key:"deselectAll",value:function(){this.tabs.forEach((function(t){t.removeAttribute("aria-selected"),t.setAttribute("tabindex","-1")})),this.panels.forEach((function(t){t.hidden=!0}))}},{key:"selectIndex",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isReady&&this.selectedIndex!==t){this.deselectAll();var i=this.tabs[t];i.removeAttribute("tabindex"),i.setAttribute("aria-selected","true"),e&&i.focus();var n=this.panels[t];n.hidden=!1,this.selectedIndex=t,this.onChangeTab()}}},{key:"selectTab",value:function(t){if(this.isReady){var e=Array.prototype.indexOf.call(this.tabs,t);this.selectIndex(e)}}},{key:"onChangeTab",value:function(){this.tabChangeCallback&&"function"==typeof this.tabChangeCallback&&this.tabChangeCallback(this.selectedIndex)}},{key:"getTabs",value:function(){return this.tabs}},{key:"getPanels",value:function(){return this.panels}}]),t}()},3484:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return b}});var n=i(4575),a=i.n(n),s=i(3913),r=i.n(s),o=i(9713),l=i.n(o),c=i(9669),h=i.n(c),d=i(493),u=i(1548),b=function(){function t(e){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
1,s=n.contentAreaSelector,r=void 0===s?"[data-experience-builder-content]":s,o=n.tabSwitchersAttribute,c=void 0===o?"data-experience-switch-tab":o,h=n.interestOptionsSelector,d=void 0===h?"[data-experience-builder-interest]":h,b=n.scenarioOptionsSelector,v=void 0===b?"[data-experience-builder-scenario]":b,p=n.recommendationsContainerSelector,g=void 0===p?"[data-experience-builder-recommendations]":p,f=n.apiRecommendUrl,S=void 0===f?"/ajax/experience-builder-api/":f,y=n.htmlUrl,m=void 0===y?"/ajax/experience-builder-ui/":y,E=n.localStorageKey,k=void 0===E?"ExperienceBuilder":E;a()(this,t),l()(this,"debugEnabled",!1),l()(this,"uiAlreadyRequested",!1),l()(this,"lastSearchParams",void 0),l()(this,"currentTab",0),l()(this,"lastTabIndex",0),l()(this,"tabs",void 0),l()(this,"hasSelectedInterests",!1),l()(this,"mainEl",void 0),l()(this,"contentEl",void 0),l()(this,"recommendationsContainerEl",void 0),l()(this,"tabEls",void 0),l()(this,"lastTabEl",void 0),l()(this,"lastTabSwitchers",void 0),l()(this,"recommendationsContainerSelector",void 0),l()(this,"interestOptionsSelector",void 0),l()(this,"scenarioOptionsSelector",void 0),l()(this,"tabSwitchersAttribute",void 0),l()(this,"cityInputSelector","#eb-city"),l()(this,"startDateInputSelector","#eb-date-start"),l()(this,"endDateInputSelector","#eb-date-end"),l()(this,"apiRecommendUrl",void 0),l()(this,"htmlUrl",void 0),l()(this,"localStorageKey",void 0),l()(this,"isLoadingClass","is-loading"),l()(this,"debug",(function(t){i.debugEnabled&&console.log("experience builder debug",t)})),this.mainEl=e,this.contentEl=this.mainEl.querySelector(r),this.interestOptionsSelector=d,this.scenarioOptionsSelector=v,this.recommendationsContainerSelector=g,this.tabSwitchersAttribute=c,this.apiRecommendUrl=S,this.htmlUrl=m,this.localStorageKey=k,new u.Z({el:e,name:"experience-builder",onOpen:function(){i.open()}})}return r()(t,[{key:"open",value:function(){this.loadUi()}},{key:"loadUi",value:function(){var t=this;this.uiAlreadyRequested||(this.uiAlreadyRequested=!0,this.contentEl.classList.add(this.isLoadingClass),this.contentEl.innerHTML=this.wrapMessage("<p>Loading the experience builder&hellip;</p>"),h().get(this.htmlUrl).then((function(e){t.contentEl.innerHTML=e.data,t.setUpUi()})).catch((function(e){console.error(e),t.contentEl.innerHTML=t.wrapMessage("<p>Sorry, there was a problem loading the experience builder.</p>")})).then((function(){t.contentEl.classList.remove(t.isLoadingClass)})))}},{key:"setUpUi",value:function(){var t=this;this.recommendationsContainerEl=this.mainEl.querySelector(this.recommendationsContainerSelector);var e=this.mainEl.querySelector("[data-a11y-tabs]");this.tabs=new d.default(e,{tabChangeCallback:function(e){t.currentTab=e,t.updateButtonStates(),2===e&&(t.save(),t.getRecommendations())}}),this.mainEl.querySelectorAll("[".concat(this.tabSwitchersAttribute,"]")).forEach((function(e){e.addEventListener("click",(function(i){i.preventDefault();var n=parseInt(e.getAttribute(t.tabSwitchersAttribute));t.tabs.selectIndex(n)}))})),this.tabEls=this.tabs.getTabs(),this.lastTabIndex=this.tabEls.length-1,this.lastTabEl=this.tabEls[this.lastTabIndex],this.lastTabSwitchers=this.mainEl.querySelectorAll("[".concat(this.tabSwitchersAttribute,'="').concat(this.lastTabIndex,'"]')),this.contentEl.querySelectorAll(this.interestOptionsSelector).forEach((function(e){e.addEventListener("change",(function(){t.updateButtonStates()}))})),this.init()}},{key:"updateButtonStates",value:function(){var t=this;this.tabEls&&(this.hasSelectedInterests=this.getInterests().length>0,this.lastTabEl.disabled=!this.hasSelectedInterests,this.lastTabSwitchers.forEach((function(e){e.disabled=!t.hasSelectedInterests})))}},{key:"getRecommendations",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<p>Loading your custom recommendations.</p>";this.debug("refresh recommendations called");var i=this.getInterests(),n=this.getScenario(),a=this.getCity(),s=this.getStartDate(),r=this.getEndDate(),o={interest:i.join(", "),scenario:n.join(", "),city:a,startDate:s,endDate:r},l=JSON.stringify(o);l!==this.lastSearchParams&&(this.lastSearchParams=l,this.recommendationsContainerEl.innerHTML=this.wrapMessage(e),this.recommendationsContainerEl.classList.add(this.isLoadingClass),h().get(this.apiRecommendUrl,{params:o}).then((function(e){t.recommendationsContainerEl.innerHTML=e.data,t.recommendationsContainerEl.querySelectorAll("[data-aos]").forEach((function(t){t.removeAttribute("data-aos")}))})).catch((function(e){console.error(e),t.recommendationsContainerEl.innerHTML=t.wrapMessage("<p>
1Sorry, there was a problem loading your recommendations.</p>")})).then((function(){t.recommendationsContainerEl.classList.remove(t.isLoadingClass)})))}},{key:"getCity",value:function(){var t=this.contentEl.querySelector(this.cityInputSelector);return t?t.value:""}},{key:"getStartDate",value:function(){var t=this.contentEl.querySelector(this.startDateInputSelector);return t?t.value:""}},{key:"getEndDate",value:function(){var t=this.contentEl.querySelector(this.endDateInputSelector);return t?t.value:""}},{key:"getInterests",value:function(){var t=[],e=this.contentEl.querySelectorAll(this.interestOptionsSelector+":checked");return e.length&&e.forEach((function(e){t.push(e.value)})),t}},{key:"getScenario",value:function(){var t=[],e=this.contentEl.querySelectorAll(this.scenarioOptionsSelector+":checked");return e.length&&e.forEach((function(e){t.push(e.value)})),t}},{key:"save",value:function(){var t={updated:Date.now(),interests:this.getInterests(),scenarios:this.getScenario(),city:this.getCity(),startDate:this.getStartDate(),endDate:this.getEndDate()};this.debug("saving"),this.debug(t),localStorage.setItem(this.localStorageKey,JSON.stringify(t))}},{key:"restore",value:function(t){var e=this;this.debug("restoring"),this.debug(t);var i=!1;if(void 0!==t.city&&t.city.length){var n=this.contentEl.querySelector(this.cityInputSelector);n&&(n.value=t.city)}if(void 0!==t.startDate&&t.startDate.length){var a=this.contentEl.querySelector(this.startDateInputSelector);a&&(a.value=t.startDate)}if(void 0!==t.endDate&&t.endDate.length){var s=this.contentEl.querySelector(this.endDateInputSelector);s&&(s.value=t.endDate)}void 0!==t.interests&&t.interests.length&&t.interests.forEach((function(t){var n=e.contentEl.querySelector(e.interestOptionsSelector+'[value="'+t+'"]');n&&(i=!0,n.checked=!0)})),void 0!==t.scenarios&&t.scenarios.length&&t.scenarios.forEach((function(t){var i=e.contentEl.querySelector(e.scenarioOptionsSelector+'[value="'+t+'"]');i&&(i.checked=!0)})),i?(this.getRecommendations("<p>Loading your previous recommendations.</p>"),this.tabs.selectIndex(2)):this.tabs.selectIndex(0)}},{key:"init",value:function(){localStorage&&localStorage.getItem(this.localStorageKey)?this.restore(JSON.parse(localStorage.getItem(this.localStorageKey))):this.tabs.selectIndex(0)}},{key:"wrapMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t?'<div class="experience-builder__message text--content">'.concat(t,"</div>"):""}}]),t}()}}]);

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.