UNPKG

coveo-search-ui

Version:

Coveo JavaScript Search Framework

2 lines • 145 kB
webpackJsonpCoveo__temporary([8,3,19],{118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(93),r=n(1),s=n(0),a=n(9),l=function(){function e(){}return e.hideIfInfiniteScrollEnabled=function(t){e.isInfiniteScrollEnabled(t.searchInterface.element)?(t.disable(),r.$$(t.element).hide(),e.warnIfComponentNotNeeded(t)):(t.enable(),r.$$(t.element).unhide())},e.isInfiniteScrollEnabled=function(t){var n=e.getMainResultList(t);return!!n&&!!n.options.enableInfiniteScroll},e.scrollToTop=function(t){var n=e.getMainResultList(t);if(!n)return new a.Logger(this).warn("No active ResultList, scrolling to the top of the Window"),window.scrollTo(0,0);var o=n.searchInterface.element.getBoundingClientRect().top;o>0||window.scrollTo(0,window.pageYOffset+o)},e.getMainResultList=function(t){var n=e.getResultLists(t);return s.find(n,function(e){var t=e.searchInterface.element.classList.contains("CoveoRecommendation");return!e.disabled&&!t})},e.getResultLists=function(t){return r.$$(t).findAll("."+e.cssClass()).map(function(e){return o.Component.get(e,i.ResultList)})},e.cssClass=function(){return o.Component.computeCssClassName(i.ResultList)},e.warnIfComponentNotNeeded=function(t){var n=t.searchInterface.root;e.allResultListsUseInfiniteScroll(n)&&e.notNeededComponentWarning(t)},e.allResultListsUseInfiniteScroll=function(t){return 0===e.getResultLists(t).filter(function(e){return!e.options.enableInfiniteScroll}).length},e.notNeededComponentWarning=function(t){var n=o.Component.computeCssClassNameForType(t.type),i="The "+n+" component is not needed because all "+e.cssClass()+" components have enableInfiniteScroll set to 'true'.\n    For the best performance, remove the "+n+" component from your search page.";new a.Logger(t).warn(i)},e}();t.ResultListUtils=l},131:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(94),i=function(){function e(){}return e.shouldDrawFacetSlider=function(e,t){return o.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(t)||!this.isSmallFacetActivated(e)},e.isSmallTabsActivated=function(e){return e.hasClass(this.smallTabsClassName)},e.isSmallFacetActivated=function(e){return e.hasClass(this.smallFacetClassName)},e.isSmallRecommendationActivated=function(e){return e.hasClass(this.smallRecommendationClassName)},e.activateSmallTabs=function(e){e.addClass(this.smallTabsClassName)},e.deactivateSmallTabs=function(e){e.removeClass(this.smallTabsClassName)},e.activateSmallFacet=function(e){e.addClass(this.smallFacetClassName)},e.deactivateSmallFacet=function(e){e.removeClass(this.smallFacetClassName)},e.activateSmallRecommendation=function(e){e.addClass(this.smallRecommendationClassName)},e.deactivateSmallRecommendation=function(e){e.removeClass(this.smallRecommendationClassName)},e.smallTabsClassName="coveo-small-tabs",e.smallFacetClassName="coveo-small-facets",e.smallRecommendationClassName="coveo-small-recommendation",e}();t.ResponsiveComponentsUtils=i},142:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},r=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0}),n(224);var a=n(0),l=n(1),u=n(3),c=n(7),p=n(8),h=n(2),d=n(85),f=n(581),m=n(582),y=n(183),g=n(517),v=n(11),b=n(13),C=n(518),O=n(4),F=n(18),S=n(5),R=n(513),w=n(6),V=n(24),T=n(35),A=n(10),D=n(584),E=n(118),I=n(184),_=n(174),x=n(587),$=n(9),L=n(40),M=function(e){function t(n,o,i,r){void 0===r&&(r=t.ID);var s=e.call(this,n,r,i)||this;return s.element=n,s.listenToQueryStateChange=!0,s.moreValuesAvailable=!1,s.isDynamicFacet=!0,s.isFieldValueCompatible=!0,s.isFieldValueHierarchical=!1,s.handleQueryStateChangedIncluded=function(e){var t=s.values.selectedValues,n=e.filter(function(e){return s.values.get(e)}),o=a.difference(n,t),i=a.difference(t,n);O.Utils.isNonEmptyArray(o)&&s.selectMultipleValues(o),O.Utils.isNonEmptyArray(i)&&s.deselectMultipleValues(i)},s.options=p.ComponentOptions.initComponentOptions(n,t,o),s.initDynamicFacetQueryController(),s.initDependsOnManager(),s.initQueryEvents(),s.initQueryStateEvents(),s.initBreadCrumbEvents(),s.initComponentStateEvents(),s.initValues(),s.verifyCollapsingConfiguration(),s.isCollapsed=s.options.enableCollapse&&s.options.collapsedByDefault,f.ResponsiveDynamicFacets.init(s.root,s,s.options),s}return o(t,e),Object.defineProperty(t.prototype,"fieldName",{get:function(){return this.options.field.slice(1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facetType",{get:function(){return I.FacetType.specific},enumerable:!0,configurable:!0}),t.prototype.selectValue=function(e){S.Assert.exists(e),this.selectMultipleValues([e])},t.prototype.selectMultipleValues=function(e){var t=this;S.Assert.exists(e),this.ensureDom(),this.logger.info("Selecting facet value(s)",e),e.forEach(function(e){t.values.get(e).select()}),this.updateQueryStateModel()},t.prototype.deselectValue=function(e){S.Assert.exists(e),this.deselectMultipleValues([e])},t.prototype.hasSelectedValue=function(e){return this.values.hasSelectedValue(e)},t.prototype.deselectMultipleValues=function(e){var t=this;S.Assert.exists(e),this.ensureDom(),this.logger.info("Deselecting facet value(s)",e),e.forEach(function(e){t.values.get(e).deselect()}),this.updateQueryStateModel()},t.prototype.toggleSelectValue=function(e){S.Assert.exists(e),this.ensureDom();var t=this.values.get(e);t.toggleSelect(),this.logger.info("Toggle select facet value",t),this.updateQueryStateModel()},t.prototype.focusValueAfterRerender=function(e){S.Assert.exists(e),this.valueToFocusOnRender=e},t.prototype.getCaptionForStringValue=function(e){return L.FacetUtils.getDisplayValueFromValueCaption(e,this.options.field,this.options.valueCaption)},t.prototype.showMoreValues=function(e){var t=this;void 0===e&&(e=this.options.numberOfValues),this.ensureDom(),this.logger.info("Show more values"),this.dynamicFacetQueryController.increaseNumberOfValuesToRequest(e),this.triggerNewIsolatedQuery(function(){return t.logAnalyticsFacetShowMoreLess(A.analyticsActionCauseList.dynamicFacetShowMore)})},t.prototype.showLessValues=function(){var e=this;this.ensureDom(),this.logger.info("Show less values"),this.dynamicFacetQueryController.resetNumberOfValuesToRequest(),this.triggerNewIsolatedQuery(function(){return e.logAnalyticsFacetShowMoreLess(A.analyticsActionCauseList.dynamicFacetShowLess)})},t.prototype.reset=function(){this.ensureDom(),this.values.hasActiveValues&&(this.logger.info("Deselect all values"),this.values.clearAll(),this.values.render(),this.enablePreventAutoSelectionFlag(),this.updateAppearance(),this.updateQueryStateModel())},t.prototype.toggleCollapse=function(){this.isCollapsed?this.expand():this.collapse()},t.prototype.expand=function(){if(!this.options.enableCollapse)return this.logger.warn('Calling expand() won\'t do anything on a facet that has the option "enableCollapse" set to "false"');this.isCollapsed&&(this.ensureDom(),this.logger.info("Expand facet values"),this.isCollapsed=!1,this.updateAppearance())},t.prototype.collapse=function(){if(!this.options.enableCollapse)return this.logger.warn('Calling collapse() won\'t do anything on a facet that has the option "enableCollapse" set to "false"');this.isCollapsed||(this.ensureDom(),this.logger.info("Collapse facet values"),this.isCollapsed=!0,this.updateAppearance())},t.prototype.enableFreezeCurrentValuesFlag=function(){this.dynamicFacetQueryController.enableFreezeCurrentValuesFlag()},t.prototype.enableFreezeFacetOrderFlag=function(){this.dynamicFacetQueryController.enableFreezeFacetOrderFlag()},t.prototype.enablePreventAutoSelectionFlag=function(){this.dynamicFacetQueryController.enablePreventAutoSelectionFlag()},t.prototype.scrollToTop=function(){this.options.enableScrollToTop&&E.ResultListUtils.scrollToTop(this.root)},Object.defineProperty(t.prototype,"analyticsFacetState",{get:function(){return this.values.activeValues.map(function(e){return e.analyticsFacetState})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"basicAnalyticsFacetState",{get:function(){return{field:this.options.field.toString(),id:this.options.id,title:this.options.title,facetType:this.facetType,facetPosition:this.position}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"basicAnalyticsFacetMeta",{get:function(){return{facetField:this.options.field.toString(),facetId:this.options.id,facetTitle:this.options.title}},enumerable:!0,configurable:!0}),t.prototype.logAnalyticsEvent=function(e,t){this.usageAnalytics.logSearchEvent(e,t)},t.prototype.putStateIntoQueryBuilder=function(e){S.Assert.exists(e),this.dynamicFacetQueryController.putFacetIntoQueryBuilder(e)},t.prototype.putStateIntoAnalytics=function(){var e=this.usageAnalytics.getPendingSearchEvent();e&&e.addFacetState(this.analyticsFacetState)},t.prototype.isCurrentlyDisplayed=function(){return l.$$(this.element).isVisible()},Object.defineProperty(t.prototype,"hasActiveValues",{get:function(){return this.values.hasActiveValues},enumerable:!0,configurable:!0}),t.prototype.initQueryEvents=function(){var e=this;this.bind.onRootElement(v.QueryEvents.duringQuery,function(){return e.ensureDom()}),this.bind.onRootElement(v.QueryEvents.doneBuildingQuery,function(t){return e.handleDoneBuildingQuery(t)}),this.bind.onRootElement(v.QueryEvents.deferredQuerySuccess,function(t){return e.handleQuerySuccess(t.results)}),this.bind.onRootElement(v.QueryEvents.queryError,function(){return e.onNoValues()})},t.prototype.initQueryStateEvents=function(){this.includedAttributeId=b.QueryStateModel.getFacetId(this.options.id),this.queryStateModel.registerNewAttribute(this.includedAttributeId,[]),this.bind.onQueryState(F.MODEL_EVENTS.CHANGE,void 0,this.handleQueryStateChanged)},t.prototype.initBreadCrumbEvents=function(){var e=this;this.options.includeInBreadcrumb&&(this.bind.onRootElement(T.BreadcrumbEvents.populateBreadcrumb,function(t){return e.handlePopulateBreadcrumb(t)}),this.bind.onRootElement(T.BreadcrumbEvents.clearBreadcrumb,function(){return e.reset()}))},t.prototype.initValues=function(){this.values=new g.DynamicFacetValues(this,x.DynamicFacetValueCreator)},t.prototype.initComponentStateEvents=function(){var e=b.QueryStateModel.getFacetId(this.options.id);this.componentStateModel.registerComponent(e,this)},t.prototype.initDynamicFacetQueryController=function(){this.dynamicFacetQueryController=new C.DynamicFacetQueryController(this)},t.prototype.handleDoneBuildingQuery=function(e){this.dynamicFacetManager||(S.Assert.exists(e),S.Assert.exists(e.queryBuilder),this.putStateIntoQueryBuilder(e.queryBuilder),this.putStateIntoAnalytics())},t.prototype.handleQuerySuccess=function(e){if(!this.dynamicFacetManager)return O.Utils.isNullOrUndefined(e.facets)?this.notImplementedError():void this.handleQueryResults(e)},t.prototype.handleQueryResults=function(e){var t=this,n=a.findIndex(e.facets,{facetId:this.options.id}),o=-1!==n?e.facets[n]:null;if(this.position=o?n+1:void 0,o?this.onNewValues(o):this.onNoValues(),this.header.hideLoading(),this.updateQueryStateModel(),this.values.render(),this.updateAppearance(),this.valueToFocusOnRender&&!this.options.enableScrollToTop){var i=this.valueToFocusOnRender;this.valueToFocusOnRender=null,a.defer(function(){return t.values.focus(i)})}},t.prototype.onNewValues=function(e){this.moreValuesAvailable=e.moreValuesAvailable,this.values.createFromResponse(e),this.options.customSort&&this.values.reorderValues(this.options.customSort)},t.prototype.onNoValues=function(){this.moreValuesAvailable=!1,this.values.resetValues()},t.prototype.handleQueryStateChanged=function(e){if(this.listenToQueryStateChange){var t=e.attributes[this.includedAttributeId];t&&this.handleQueryStateChangedIncluded(t)}},t.prototype.handlePopulateBreadcrumb=function(e){if(S.Assert.exists(e),this.values.hasActiveValues){var t=new m.DynamicFacetBreadcrumbs(this,{headingLevel:e.headingLevel});e.breadcrumbs.push({element:t.element})}},t.prototype.initDependsOnManager=function(){var e=this,t={reset:function(){return e.reset()},ref:this};this.dependsOnManager=new _.DependsOnManager(t)},t.prototype.createDom=function(){this.createAndAppendContent(),this.updateAppearance()},t.prototype.createAndAppendContent=function(){this.createAndAppendHeader(),this.createAndAppendSearch(),this.createAndAppendValues()},t.prototype.createAndAppendHeader=function(){var e=this;this.header=new y.DynamicFacetHeader({id:this.options.id,title:this.options.title,enableCollapse:this.options.enableCollapse,headingLevel:this.options.headingLevel,clear:function(){return e.clear()},toggleCollapse:function(){return e.toggleCollapse()},collapse:function(){return e.collapse()},expand:function(){return e.expand()}}),this.element.appendChild(this.header.element)},t.prototype.createAndAppendSearch=function(){!1!==this.options.enableFacetSearch&&(this.search=new D.DynamicFacetSearch(this),this.element.appendChild(this.search.element))},t.prototype.createAndAppendValues=function(){this.element.appendChild(this.values.render())},t.prototype.updateQueryStateModel=function(){this.listenToQueryStateChange=!1,this.queryStateModel.set(this.includedAttributeId,this.values.selectedValues),this.listenToQueryStateChange=!0},t.prototype.updateAppearance=function(){this.header.toggleClear(this.values.hasSelectedValues),this.header.toggleCollapse(this.isCollapsed),this.toggleSearchDisplay(),l.$$(this.element).toggleClass("coveo-dynamic-facet-collapsed",this.isCollapsed),l.$$(this.element).toggleClass("coveo-active",this.values.hasSelectedValues),l.$$(this.element).toggleClass("coveo-hidden",!this.values.hasDisplayedValues)},t.prototype.toggleSearchDisplay=function(){if(!1!==this.options.enableFacetSearch)return this.isCollapsed?l.$$(this.search.element).toggleClass("coveo-hidden",!0):void l.$$(this.search.element).toggleClass("coveo-hidden",!this.options.enableFacetSearch&&!this.moreValuesAvailable)},t.prototype.triggerNewQuery=function(e){this.beforeSendingQuery();var t=e?{beforeExecuteQuery:e}:{ignoreWarningSearchEvent:!0};this.queryController.executeQuery(t)},t.prototype.triggerNewIsolatedQuery=function(e){return r(this,void 0,void 0,function(){var t,n;return s(this,function(o){switch(o.label){case 0:this.beforeSendingQuery(),e&&e(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.dynamicFacetQueryController.getQueryResults()];case 2:return t=o.sent(),this.handleQueryResults(t),[3,4];case 3:return n=o.sent(),this.header.hideLoading(),[3,4];case 4:return[2]}})})},t.prototype.beforeSendingQuery=function(){this.header.showLoading()},t.prototype.notImplementedError=function(){this.logger.error("DynamicFacets are not supported by your current search endpoint. Disabling this component."),this.disable(),this.updateAppearance()},t.prototype.verifyCollapsingConfiguration=function(){this.options.collapsedByDefault&&!this.options.enableCollapse&&this.logger.warn('The "collapsedByDefault" option is "true" while the "enableCollapse" is "false"')},t.prototype.logAnalyticsFacetShowMoreLess=function(e){this.usageAnalytics.logCustomEvent(e,this.basicAnalyticsFacetMeta,this.element)},t.prototype.clear=function(){var e=this;this.reset(),this.enableFreezeFacetOrderFlag(),this.scrollToTop(),this.triggerNewQuery(function(){return e.logClearAllToAnalytics()})},t.prototype.logClearAllToAnalytics=function(){this.logAnalyticsEvent(A.analyticsActionCauseList.dynamicFacetClearAll,this.basicAnalyticsFacetMeta)},t.ID="DynamicFacet",t.doExport=function(){return u.exportGlobally({DynamicFacet:t})},t.options=i({},d.ResponsiveFacetOptions,{id:p.ComponentOptions.buildStringOption({postProcessing:function(e,t){void 0===e&&(e="");var n=e.replace(/[^A-Za-z0-9-_@]+/g,"");return O.Utils.isNonEmptyString(n)?n.slice(0,59):t.field.slice(0,59)},section:"CommonOptions"}),title:p.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return w.l("NoTitle")},section:"CommonOptions",priority:10}),field:p.ComponentOptions.buildFieldOption({required:!0,section:"CommonOptions"}),sortCriteria:p.ComponentOptions.buildStringOption({postProcessing:function(e){if(e)return R.isFacetSortCriteria(e)?e:void new $.Logger(e).warn('sortCriteria is not of the the allowed values: "score", "alphanumeric", "occurrences"')},section:"Sorting"}),customSort:p.ComponentOptions.buildListOption({section:"Sorting"}),numberOfValues:p.ComponentOptions.buildNumberOption({min:0,defaultValue:8,section:"CommonOptions"}),enableCollapse:p.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"CommonOptions"}),enableScrollToTop:p.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"CommonOptions"}),enableMoreLess:p.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"CommonOptions"}),enableFacetSearch:p.ComponentOptions.buildBooleanOption({section:"Filtering"}),useLeadingWildcardInFacetSearch:p.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"Filtering",depend:"enableFacetSearch"}),collapsedByDefault:p.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"CommonOptions",depend:"enableCollapse"}),includeInBreadcrumb:p.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"CommonOptions"}),numberOfValuesInBreadcrumb:p.ComponentOptions.buildNumberOption({defaultFunction:function(){return V.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInBreadcrumb",section:"CommonOptions"}),valueCaption:p.ComponentOptions.buildJsonOption({defaultValue:{}}),dependsOn:p.ComponentOptions.buildStringOption({section:"CommonOptions"}),dependsOnCondition:p.ComponentOptions.buildCustomOption(function(){return null},{depend:"dependsOn",section:"CommonOptions"}),injectionDepth:p.ComponentOptions.buildNumberOption({defaultValue:1e3,min:1e3}),filterFacetCount:p.ComponentOptions.buildBooleanOption({section:"Filtering"}),headingLevel:p.ComponentOptions.buildNumberOption({defaultValue:2,min:0,max:6})}),t}(c.Component);t.DynamicFacet=M,h.Initialization.registerAutoCreateComponent(M),M.doExport()},174:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(20),r=n(47),s=n(1),a=n(17),l=function(){function e(e){var t=this;this.facet=e,s.$$(this.facet.ref.searchInterface.element).on(i.QueryEvents.buildingQuery,function(){return t.handleBuildingQuery()}),this.getDependsOn(this.facet.ref)&&this.facet.ref.bind.onRootElement(a.InitializationEvents.afterComponentsInitialization,function(){return t.setupDependentFacet()})}return e.prototype.setupDependentFacet=function(){var e=this;s.$$(this.facet.ref.element).addClass("coveo-hidden-dependant-facet"),this.parentFacetRef=this.getParentFacet(this.facet.ref),this.parentFacetRef&&s.$$(this.facet.ref.root).on("state:change",function(){return e.resetIfConditionUnfullfiled()})},e.prototype.resetIfConditionUnfullfiled=function(){this.getDependsOnCondition(this.facet.ref)(this.parentFacetRef)||this.facet.reset()},e.prototype.getId=function(e){var t=e.options.id;return t?""+t:null},e.prototype.getDependsOn=function(e){var t=e.options.dependsOn;return t?""+t:null},e.prototype.getDependsOnCondition=function(e){var t=this,n=e.options.dependsOnCondition;return n&&o.isFunction(n)?n:function(){return t.parentHasSelectedValues(e)&&t.parentIsEnabled(e)}},e.prototype.parentHasSelectedValues=function(e){var t=this.getParentFacet(e);return t&&this.valuesExistForFacetWithId(this.getId(t))},e.prototype.parentIsEnabled=function(e){var t=this.getParentFacet(e);return t&&!t.disabled},e.prototype.valuesExistForFacetWithId=function(e){var t=this.facet.ref.queryStateModel.get(i.QueryStateModel.getFacetId(e));return!!t&&!!t.length},Object.defineProperty(e.prototype,"allFacetsInInterface",{get:function(){return r.ComponentsTypes.getAllFacetsFromSearchInterface(this.facet.ref.searchInterface)},enumerable:!0,configurable:!0}),e.prototype.getParentFacet=function(e){var t=this,n=this.allFacetsInInterface.filter(function(n){return t.getId(n)===t.getDependsOn(e)});return n.length?n[0]:(e.logger.warn("DependsOn reference does not exist",this.getDependsOn(this.facet.ref)),null)},Object.defineProperty(e.prototype,"dependentFacets",{get:function(){var e=this;return this.allFacetsInInterface.filter(function(t){return e.getId(e.facet.ref)===e.getDependsOn(t)})},enumerable:!0,configurable:!0}),e.prototype.handleBuildingQuery=function(){var e=this;this.dependentFacets.forEach(function(t){if(e.getDependsOnCondition(t)(e.facet.ref))return s.$$(t.element).removeClass("coveo-hidden-dependant-facet"),t.enable();t.disable(),s.$$(t.element).addClass("coveo-hidden-dependant-facet")})},Object.defineProperty(e.prototype,"hasDependentFacets",{get:function(){return!!this.dependentFacets.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dependentFacetsHaveSelectedValues",{get:function(){var e=this;return this.dependentFacets.some(function(t){return e.valuesExistForFacetWithId(e.getId(t))})},enumerable:!0,configurable:!0}),e}();t.DependsOnManager=l},182:function(e,t,n){"use strict";function o(e){var t=e.filterFacetCount;return!!r.Utils.isUndefined(t)||t}var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),s=function(){function e(e){this.request=e}return e.prototype.buildBaseRequestForQuery=function(){return i({},this.request,{filterFacetCount:o(this.request)})},e}();t.DynamicFacetRequestBuilder=s,t.determineFilterFacetCount=o},183:function(e,t,n){"use strict";function o(e){return e+"-facet-heading"}Object.defineProperty(t,"__esModule",{value:!0}),n(568);var i=n(1),r=n(6),s=n(12),a=n(16),l=n(506),u=n(569),c=n(48);t.getDynamicFacetHeaderId=o;var p=function(){function e(e){this.options=e,this.element=i.$$("div",{className:"coveo-dynamic-facet-header"}).el,this.title=this.createTitle(),i.$$(this.element).append(this.title.el),i.$$(this.element).append(this.createWaitAnimation()),i.$$(this.element).append(this.createClearButton()),this.options.enableCollapse&&this.enableCollapse()}return e.prototype.createClearButton=function(){var e=this;return this.clearButton=new l.DynamicFacetHeaderButton({label:r.l("Clear"),ariaLabel:r.l("Clear",this.options.title),className:"coveo-dynamic-facet-header-clear",shouldDisplay:!1,action:function(){return e.options.clear()}}),this.clearButton.element},e.prototype.createCollapseToggle=function(){return this.collapseToggle=new u.DynamicFacetHeaderCollapseToggle(this.options),this.collapseToggle.element},e.prototype.enableCollapse=function(){var e=this;i.$$(this.element).append(this.createCollapseToggle()),i.$$(this.title).addClass("coveo-clickable"),i.$$(this.title).on("click",function(){return e.options.toggleCollapse()})},e.prototype.toggleCollapse=function(e){this.options.enableCollapse&&this.collapseToggle.toggleButton(e)},e.prototype.createTitle=function(){return i.$$(c.getHeadingTag(this.options.headingLevel),{className:"coveo-dynamic-facet-header-title",ariaLabel:""+r.l("FacetTitle",this.options.title),id:o(this.options.id)},i.$$("span",{ariaHidden:!0,title:this.options.title},this.options.title))},e.prototype.createWaitAnimation=function(){return this.waitAnimation=i.$$("div",{className:"coveo-dynamic-facet-header-wait-animation"},s.SVGIcons.icons.loading),a.SVGDom.addClassToSVGInContainer(this.waitAnimation.el,"coveo-dynamic-facet-header-wait-animation-svg"),this.waitAnimation.toggle(!1),this.waitAnimation.el},e.prototype.toggleClear=function(e){this.clearButton.toggle(e)},e.prototype.showLoading=function(){var t=this;clearTimeout(this.showLoadingTimeout),this.showLoadingTimeout=window.setTimeout(function(){return t.waitAnimation.toggle(!0)},e.showLoadingDelay)},e.prototype.hideLoading=function(){clearTimeout(this.showLoadingTimeout),this.waitAnimation.toggle(!1)},e.showLoadingDelay=2e3,e}();t.DynamicFacetHeader=p},184:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.specific="specific",e.numericalRange="numericalRange",e.dateRange="dateRange",e.hierarchical="hierarchical"}(t.FacetType||(t.FacetType={}))},215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(0),r=function(){function e(e,t){this.resultListOptions=e,this.autoCreateComponentsFn=t}return e.prototype.renderResults=function(e,t,n){var r=this;return void 0===t&&(t=!1),Promise.all([this.getStartFragment(e,t),this.getEndFragment(e,t)]).then(function(t){var s=t[0],a=t[1],l=document.createDocumentFragment();s&&l.appendChild(s),i.each(e,function(e){l.appendChild(e),n(o.Component.getResult(e),e)}),a&&l.appendChild(a),r.resultListOptions.resultsContainer.appendChild(l)})},e.prototype.getStartFragment=function(e,t){return Promise.resolve(document.createDocumentFragment())},e.prototype.getEndFragment=function(e,t){return Promise.resolve(document.createDocumentFragment())},e}();t.ResultListRenderer=r},216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(536);var o=n(11),i=n(9),r=n(6),s=n(1),a=n(4),l=n(7),u=n(19),c=n(55),p=n(62),h=n(131),d=n(124),f=n(94),m=n(136),y=n(0),g=n(47),v=n(537),b=n(86),C=n(538),O=function(){function e(e,t,n,o){this.coveoRoot=e,this.ID=t,this.componentsInFacetColumn=[],this.preservePositionOriginalValues=[],this.searchInterface=l.Component.get(this.coveoRoot.el,u.SearchInterface,!1),this.dropdownHeaderLabel=this.getDropdownHeaderLabel(),this.dropdown=this.buildDropdown(o),this.bindDropdownContentEvents(),this.bindFacetsMobileModeEvents(),this.registerOnCloseHandler(),this.registerQueryEvents(),this.initializeBreakpoint(n.responsiveBreakpoint)}return e.init=function(t,n,o,i,r){this.findColumn(n)&&(p.ResponsiveComponentsManager.register(e,s.$$(n),"ResponsiveFacetColumn",o,i),p.ResponsiveComponentsManager.register(t,s.$$(n),r,o,i))},e.findColumn=function(e){var t=s.$$(e).find(".coveo-facet-column");return t||this.logger.info("No element with class coveo-facet-column. Responsive facets cannot be enabled"),t},Object.defineProperty(e.prototype,"facetsMobileModeComponent",{get:function(){return this.searchInterface?this.searchInterface.getComponents(b.FacetsMobileMode.ID)[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"facetsMobileModeOptions",{get:function(){var t=this.facetsMobileModeComponent;return t?t.options:(e.logger.warn('The "FacetsMobileMode" component did not load properly, disabling the ResponsiveFacets modal.'),{isModal:!1,preventScrolling:!1,displayOverlayWhileOpen:!0})},enumerable:!0,configurable:!0}),e.prototype.registerComponent=function(e){return this.componentsInFacetColumn.push(e),this.preservePositionOriginalValues.push(e.options.preservePosition),!0},e.prototype.needDropdownWrapper=function(){return this.needSmallMode()},e.prototype.handleResizeEvent=function(){this.needSmallMode()&&!h.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)?this.changeToSmallMode():!this.needSmallMode()&&h.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)&&this.changeToLargeMode(),this.dropdown.isOpened&&this.dropdown.dropdownContent.positionDropdown()},e.prototype.dismissFacetSearches=function(){y.each(this.componentsInFacetColumn,function(e){e.facetSearch&&e.facetSearch.currentlyDisplayedResults&&e.facetSearch.dismissSearchResults()})},e.prototype.needSmallMode=function(){if(!this.searchInterface)return this.coveoRoot.width()<=(a.Utils.isNullOrUndefined(this.breakpoint)?(new c.ResponsiveComponents).getMediumScreenWidth():this.breakpoint);switch(this.searchInterface.responsiveComponents.getResponsiveMode()){case"small":case"medium":return!0;case"auto":return this.coveoRoot.width()<=(a.Utils.isNullOrUndefined(this.breakpoint)?this.searchInterface.responsiveComponents.getMediumScreenWidth():this.breakpoint);default:return!1}},e.prototype.changeToSmallMode=function(){this.dropdown.close(),this.disableFacetPreservePosition(),s.$$(this.coveoRoot.find("."+p.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS)).append(this.dropdown.dropdownHeader.element.el),h.ResponsiveComponentsUtils.activateSmallFacet(this.coveoRoot)},e.prototype.changeToLargeMode=function(){this.restoreFacetPreservePositionValue(),this.dropdown.cleanUp(),h.ResponsiveComponentsUtils.deactivateSmallFacet(this.coveoRoot)},e.prototype.buildDropdown=function(e){var t=this.buildDropdownContent(),n=this.buildDropdownHeader(),o=e||new d.ResponsiveDropdown(t,n,this.coveoRoot);return this.facetsMobileModeOptions.displayOverlayWhileOpen||o.disablePopupBackground(),this.facetsMobileModeOptions.preventScrolling&&o.enableScrollLocking(this.facetsMobileModeOptions.scrollContainer),o},e.prototype.buildDropdownContent=function(){var t=this,n=s.$$(this.coveoRoot.find(".coveo-facet-column")),o=s.$$("div",{className:"coveo-facet-header-filter-by-container",style:"display: none"}),i=s.$$("div",{className:"coveo-facet-header-filter-by"});return i.text(r.l("Filter by:")),o.append(i.el),n.prepend(o.el),this.facetsMobileModeOptions.isModal?new v.ResponsiveDropdownModalContent("facet",n,r.l("CloseFiltersDropdown"),function(){return t.dropdown.close()}):new f.ResponsiveDropdownContent("facet",n,this.coveoRoot,e.DROPDOWN_MIN_WIDTH,e.DROPDOWN_WIDTH_RATIO)},e.prototype.buildDropdownHeader=function(){var e=s.$$("a"),t=s.$$("p");return t.text(this.dropdownHeaderLabel),e.el.appendChild(t.el),new m.ResponsiveDropdownHeader("facet",e)},e.prototype.initializeBreakpoint=function(e){var t=this.facetsMobileModeOptions.breakpoint;this.breakpoint=a.Utils.isNullOrUndefined(t)?e:t},e.prototype.registerOnCloseHandler=function(){this.dropdown.registerOnCloseHandler(this.dismissFacetSearches,this)},e.prototype.registerQueryEvents=function(){var e=this;this.coveoRoot.on(o.QueryEvents.noResults,function(){return e.handleNoResults()}),this.coveoRoot.on(o.QueryEvents.querySuccess,function(t,n){return e.handleQuerySuccess(n)}),this.coveoRoot.on(o.QueryEvents.queryError,function(){return e.handleQueryError()})},e.prototype.bindDropdownContentEvents=function(){var t=this;this.dropdown.dropdownContent.element.on("scroll",y.debounce(function(){y.each(t.componentsInFacetColumn,function(e){var n=e.facetSearch;n&&n.currentlyDisplayedResults&&!t.isFacetSearchScrolledIntoView(n.search)?e.facetSearch.positionSearchResults(t.dropdown.dropdownContent.element.el):n&&e.facetSearch.currentlyDisplayedResults&&e.facetSearch.positionSearchResults()})},e.DEBOUNCE_SCROLL_WAIT))},e.prototype.bindFacetsMobileModeEvents=function(){var e=this.facetsMobileModeComponent;e&&(this.dropdown.registerOnOpenHandler(function(){return s.$$(e.element).trigger(C.FacetsMobileModeEvents.popupOpened)},e),this.dropdown.registerOnCloseHandler(function(){return s.$$(e.element).trigger(C.FacetsMobileModeEvents.popupClosed)},e))},e.prototype.restoreFacetPreservePositionValue=function(){var e=this;y.each(this.componentsInFacetColumn,function(t,n){t.options&&(t.options.preservePosition=e.preservePositionOriginalValues[n])})},e.prototype.disableFacetPreservePosition=function(){y.each(this.componentsInFacetColumn,function(e){e.options&&(e.options.preservePosition=!1)})},e.prototype.isFacetSearchScrolledIntoView=function(e){var t=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom,o=this.dropdown.dropdownContent.element.el.getBoundingClientRect().top,i=this.dropdown.dropdownContent.element.el.getBoundingClientRect().bottom;return o=o>=0?o:0,t>=o&&n<=i},e.prototype.getDropdownHeaderLabel=function(){var t;return g.ComponentsTypes.getAllFacetInstancesFromElement(this.coveoRoot.find(".coveo-facet-column")).forEach(function(e){var n=e.options;!t&&n.dropdownHeaderLabel&&(t=n.dropdownHeaderLabel)}),t||(t=r.l(e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE)),t},e.prototype.handleNoResults=function(){this.dropdown.dropdownHeader.hide()},e.prototype.handleQueryError=function(){this.dropdown.dropdownHeader.hide()},e.prototype.handleQuerySuccess=function(e){0===e.results.totalCount?this.dropdown.dropdownHeader.hide():this.dropdown.dropdownHeader.show()},e.DEBOUNCE_SCROLL_WAIT=250,e.logger=new i.Logger("ResponsiveFacets"),e.DROPDOWN_MIN_WIDTH=280,e.DROPDOWN_WIDTH_RATIO=.35,e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE="Filters",e}();t.ResponsiveFacetColumn=O},224:function(e,t){},225:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=function(){function e(e){var t=o.$$("button",{className:e.className,ariaLabel:e.ariaLabel,type:"button"},e.label);this.element=o.$$("li",{role:"none"},t).el,t.on("click",function(){return e.action()})}return e}();t.DynamicFacetValueShowMoreLessButton=i},226:function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(72),s=n(10),a=n(6),l=n(184),u=function(){function e(e,t,n){this.facet=t,this.element=null,this.value=e.value,this.start=e.start,this.end=e.end,this.endInclusive=e.endInclusive,this.state=e.state,this.numberOfResults=e.numberOfResults,this.position=e.position,this.displayValue=e.displayValue,this.renderer=new n(this,t)}return Object.defineProperty(e.prototype,"isSelected",{get:function(){return this.state===r.FacetValueState.selected},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isIdle",{get:function(){return this.state===r.FacetValueState.idle},enumerable:!0,configurable:!0}),e.prototype.toggleSelect=function(){this.state===r.FacetValueState.selected?this.deselect():this.select()},e.prototype.select=function(){this.state=r.FacetValueState.selected},e.prototype.deselect=function(){this.state=r.FacetValueState.idle},e.prototype.equals=function(e){return("string"==typeof e?e:e.value).toLowerCase()===this.value.toLowerCase()},e.prototype.focus=function(){if(this.renderedElement){var e=this.renderedElement.querySelector(".coveo-checkbox-button");e&&e.focus()}},Object.defineProperty(e.prototype,"formattedCount",{get:function(){return i.format(this.numberOfResults,"n0")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectAriaLabel",{get:function(){var e=a.l("ResultCount",this.formattedCount,this.numberOfResults);return this.displayValue+" "+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRange",{get:function(){return this.facet.facetType!==l.FacetType.specific},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"analyticsValue",{get:function(){return this.isRange?this.start+".."+this.end:this.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeFacetState",{get:function(){return this.isRange?{start:""+this.start,end:""+this.end,endInclusive:this.endInclusive}:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"analyticsFacetState",{get:function(){return o({},this.facet.basicAnalyticsFacetState,this.rangeFacetState,{value:this.analyticsValue,valuePosition:this.position,displayValue:this.displayValue,state:this.state})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeFacetMeta",{get:function(){return this.isRange?{facetRangeStart:""+this.start,facetRangeEnd:""+this.end,facetRangeEndInclusive:this.endInclusive}:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"analyticsFacetMeta",{get:function(){return o({},this.facet.basicAnalyticsFacetMeta,this.rangeFacetMeta,{facetValue:this.analyticsValue})},enumerable:!0,configurable:!0}),e.prototype.logSelectActionToAnalytics=function(){var e=this.state===r.FacetValueState.selected?s.analyticsActionCauseList.dynamicFacetSelect:s.analyticsActionCauseList.dynamicFacetDeselect;this.facet.logAnalyticsEvent(e,this.analyticsFacetMeta)},e.prototype.render=function(){return this.element=this.renderer.render(),this.element},Object.defineProperty(e.prototype,"renderedElement",{get:function(){return this.element?this.element:this.render()},enumerable:!0,configurable:!0}),e}();t.DynamicFacetValue=u},293:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0}),n(224);var s=n(2),a=n(142),l=n(526),u=n(8),c=n(3),p=n(6),h=n(184),d=n(517),f=n(694),m=n(700),y=n(20),g=n(701),v=n(9),b=function(e){function t(n,o,i){var r=e.call(this,n,u.ComponentOptions.initComponentOptions(n,t,o),i,t.ID)||this;return r.element=n,r.options=o,r.isFieldValueCompatible=!1,r.disableUnavailableOptions(),r}return o(t,e),t.prototype.initValues=function(){this.values=new d.DynamicFacetValues(this,f.DynamicFacetRangeValueCreator)},t.prototype.initDynamicFacetQueryController=function(){this.dynamicFacetQueryController=new m.DynamicFacetRangeQueryController(this)},t.prototype.disableUnavailableOptions=function(){this.options.enableFacetSearch=!1,this.options.useLeadingWildcardInFacetSearch=!1,this.options.enableMoreLess=!1,this.options.valueCaption={},this.options.sortCriteria=void 0,this.options.customSort=void 0},Object.defineProperty(t.prototype,"facetType",{get:function(){return this.options.valueFormat===l.DynamicFacetRangeValueFormat.date?h.FacetType.dateRange:h.FacetType.numericalRange},enumerable:!0,configurable:!0}),t.prototype.showMoreValues=function(){this.logger.warn('The "showMoreValues" method is not available on the "DynamicFacetRange" component')},t.prototype.showLessValues=function(){this.logger.warn('The "showLessValues" method is not available on the "DynamicFacetRange" component')},t.prototype.triggerNewIsolatedQuery=function(){return i(this,void 0,void 0,function(){return r(this,function(e){return this.logger.warn('The "triggerNewIsolatedQuery" method is not available on the "DynamicFacetRange" component'),[2]})})},t.ID="DynamicFacetRange",t.parent=a.DynamicFacet,t.doExport=function(){return c.exportGlobally({DynamicFacetRange:t})},t.options={valueSeparator:u.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return p.l("To")},section:"CommonOptions"}),field:u.ComponentOptions.buildFieldOption({required:!0,section:"CommonOptions"}),valueFormat:u.ComponentOptions.buildStringOption({postProcessing:function(e,t){return l.isFacetRangeValueFormat(e)?e:-1!==t.field.indexOf("date")?l.DynamicFacetRangeValueFormat.date:l.DynamicFacetRangeValueFormat.number},section:"CommonOptions"}),numberOfDecimals:u.ComponentOptions.buildNumberOption(),currencySymbol:u.ComponentOptions.buildStringOption({section:"CommonOptions"}),ranges:u.ComponentOptions.buildJsonOption({section:"CommonOptions",postProcessing:function(e){return y.Utils.isNonEmptyArray(e)?e:[]}}),sortOrder:u.ComponentOptions.buildStringOption({postProcessing:function(e){if(e)return g.isFacetRangeSortOrder(e)?e:void new v.Logger(e).warn('sortOrder is not of the the allowed values: "ascending", "descending"')},section:"Sorting"})},t}(a.DynamicFacet);t.DynamicFacetRange=b,s.Initialization.registerAutoCreateComponent(b),b.doExport()},40:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=n(21),r=n(121),s=n(33),a=n(4),l=n(1),u=n(0),c=n(6),p=function(){function e(){}return e.getRegexToUseForFacetSearch=function(e,t){return new RegExp(o.StringUtils.stringToRegex(e,t),"i")},e.getDisplayValueFromValueCaption=function(e,t,n){var o=this.tryToGetTranslatedCaption(t,e,!1);return n[e]||o},e.getValuesToUseForSearchInFacet=function(e,t){var n=[e],o=this.getRegexToUseForFacetSearch(e,t.options.facetSearchIgnoreAccents);return t.options.valueCaption?(u.chain(t.options.valueCaption).pairs().filter(function(e){return o.test(e[1])}).each(function(e){n.push(e[0])}),(i.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||i.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype"))&&u.each(r.FileTypes.getFileTypeCaptions(),function(e,i){i in t.options.valueCaption||!o.test(e)||n.push(i)})):i.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||i.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype")?u.each(u.filter(u.pairs(r.FileTypes.getFileTypeCaptions()),function(e){return o.test(e[1])}),function(e){n.push(e[0])}):i.QueryUtils.isStratusAgnosticField(t.options.field,"@month")&&u.each(u.range(1,13),function(e){o.test(s.DateUtils.monthToString(e-1))&&n.push(("0"+e.toString()).substr(-2))}),n},e.buildFacetSearchPattern=function(e){return e=u.map(e,function(e){return a.Utils.escapeRegexCharacter(e)}),e[0]=".*"+e[0]+".*",e.join("|")},e.needAnotherFacetSearch=function(e,t,n,o){return e<t&&e<o&&e>n},e.addNoStateCssClassToFacetValues=function(e,t){if(0!=e.values.getSelected().length){var n=l.$$(t).findAll("li:not(.coveo-selected)");u.each(n,function(e){l.$$(e).addClass("coveo-no-state")})}},e.tryToGetTranslatedCaption=function(t,n,o){void 0===o&&(o=!0);var l;if(i.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@filetype"))l=r.FileTypes.getFileType(n,o).caption;else if(i.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@objecttype"))l=r.FileTypes.getObjectType(n,o).caption;else if(e.isMonthFieldValue(t,n)){var u=parseInt(n,10);l=s.DateUtils.monthToString(u-1)}else o&&(l=c.l(n));return void 0!=l&&a.Utils.isNonEmptyString(l)?l:n},e.isMonthFieldValue=function(e,t){if(!i.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@month"))return!1;var n=parseInt(t,10);return!isNaN(n)&&!(n<1||n>12)},e}();t.FacetUtils=p},470:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),r=n(96),s=n(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultTemplate='<td><a class="CoveoResultLink"></a></td>\n                             <td><span class="CoveoExcerpt"></span></td>\n                             <td><span class="CoveoFieldValue" data-field="@date" data-helper="date"></span></td>',t.defaultRoledTemplates={"table-header":'<th style="width: 40%">Link</th>\n                     <th>Excerpt</th>\n                     <th style="width: 20%"\n                         class="CoveoSort coveo-table-header-sort"\n                         data-sort-criteria="date ascending,date descending"\n                         data-display-unselected-icon="false">Date</th>',"table-footer":"<th>Link</th>\n                     <th>Excerpt</th>\n                     <th>Date</th>"},t}return o(t,e),t.prototype.instantiateRoleToString=function(e){var t=s.find(this.templates,function(t){return t.role===e});return t?t.instantiateToString(void 0,{}):this.defaultRoledTemplates[e]},t.prototype.instantiateRoleToElement=function(e){var t=this,n=s.find(this.templates,function(t){return t.role===e});if(n)return n.instantiateToElement(void 0,{});var o=new i.Template(function(){return t.defaultRoledTemplates[e]});return o.layout="table",o.instantiateToElement(void 0)},t.prototype.getFallbackTemplate=function(){var e=this;return new i.Template(function(){return e.defaultTemplate})},t.prototype.hasTemplateWithRole=function(e){return s.find(this.templates,function(t){return t.role===e})},t}(r.TemplateList);t.TableTemplate=a},471:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=n(0),r=n(1),s=function(){function e(e,t){void 0===t&&(t={focusableSelector:"[tabindex], button"}),this.container=e,this.options=t,this.hiddenElements=[],this.enable()}return Object.defineProperty(e.prototype,"focusableElements",{get:function(){return i.chain(r.Dom.nodeListToArray(this.container.querySelectorAll(this.options.focusableSelector))).filter(function(e){return r.$$(e).isVisible()}).sortBy(function(e){return e.tabIndex}).value()},enumerable:!0,configurable:!0}),e.prototype.disable=function(){document.removeEventListener("focusin",this.focusInEvent),document.removeEventListener("focusout",this.focusOutEvent),this.showHiddenElements(),this.enabled=!1},e.prototype.enable=function(){var e=this;document.addEventListener("focusin",this.focusInEvent=function(t){return e.onFocusIn(t)}),document.addEventListener("focusout",this.focusOutEvent=function(t){return e.onFocusOut(t)}),this.hideAllExcept(this.container),this.enabled=!0},e.prototype.showHiddenElements=function(){for(;this.hiddenElements.length;)this.hiddenElements.pop().removeAttribute("aria-hidden")},e.prototype.hideElement=function(e){e.getAttribute("aria-hidden")||(this.hiddenElements.push(e),e.setAttribute("aria-hidden",""+!0))},e.prototype.hideSiblings=function(e){var t=this,n=e.parentElement;n&&i.without(r.$$(n).children(),e).forEach(function(e){t.hideElement(e)})},e.prototype.hideAllExcept=function(e){this.hideSiblings(e);var t=e.parentElement;t&&t!==document.body&&this.hideAllExcept(t)},e.prototype.getFocusableSibling=function(e,t){void 0===t&&(t=!1);var n=this.focusableElements,o=n.indexOf(e);return-1===o?null:n[(o+(t?-1:1)+n.length)%n.length]},e.prototype.focusSibling=function(e,t){void 0===t&&(t=!1);var n=this.getFocusableSibling(e,t);n&&n.focus()},e.prototype.focusFirstElement=function(){var e=this.focusableElements;e.length&&e[0].focus()},e.prototype.elementIsBefore=function(e,t){return!!t&&e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_PRECEDING},e.prototype.onLosingFocus=function(e,t){var n=this;o.Defer.defer(function(){n.enabled&&(n.enabled=!1,e&&n.focusIsAllowed(e)?n.focusSibling(e,n.elementIsBefore(e,t)):n.focusFirstElement(),n.enabled=!0)})},e.prototype.focusIsAllowed=function(e){return this.container.contains(e)},e.prototype.elementIsInPage=function(e){return e&&e!==document.body.parentElement},e.prototype.onFocusIn=function(e){if(this.enabled){var t=e.relatedTarget;if(!this.elementIsInPage(t)){var n=e.target;this.elementIsInPage(n)&&(this.focusIsAllowed(n)||this.onLosingFocus(null,n))}}},e.prototype.onFocusOut=function(e){if(this.enabled){var t=e.relatedTarget;this.elementIsInPage(t)&&(t&&this.focusIsAllowed(t)||this.onLosingFocus(e.target,t))}},e}();t.FocusTrap=s},472:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.instantiateToString=function(e){return'<div class="coveo-result-frame">\n        <div class="coveo-result-row">\n          <div class="coveo-result-cell" style="width:40px;text-align:center;vertical-align:middle;">\n            <span class="CoveoIcon" data-small="true" data-with-label="false">\n            </span>\n          </div>\n          <div class="coveo-result-cell" style="padding:0 0 3px 5px;vertical-align:middle">\n            <div class="coveo-result-row">\n              <div class="coveo-result-cell" style="font-size:10pt;">\n                <a class="CoveoResultLink" style="display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">\n                </a>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>'},t.prototype.instantiateToElement=function(e){var t=this;return new Promise(function(n,o){var i=document.createElement("div");i.innerHTML=t.instantiateToString(e),n(i)})},t}(i.Template);t.DefaultRecommendationTemplate=r},473:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),s=n(93),a=n(0),l=n(1),u=n(9),c=function(){function e(e){this.args=e}return e.prototype.buildResults=function(e,t,n){return o(this,void 0,void 0,function(){var o,r,l=this;return i(this,function(i){return o=[],r=a.map(e.results,function(e,i){return l.buildResult(e,t,n).then(function(e){return null!=e&&o.push({elem:e,idx:i}),s.ResultList.resultCurrentlyBeingRendered=null,e})}),[2,Promise.all(r).then(function(){return a.pluck(a.sortBy(o,"idx"),"elem")})]})})},e.prototype.buildResult=function(e,t,n){return o(this,void 0,void 0,function(){var o;return i(this,function(i){switch(i.label){case 0:return r.Assert.exists(e),r.QueryUtils.setStateObjectOnQueryResult(this.args.queryStateModel.get(),e),r.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.args.searchInterface,e),s.ResultList.resultCurrentlyBeingRendered=e,[4,this.createHtmlElement(e,t)];case 1:return o=i.sent(),null!=o&&r.Component.bindResultToElement(o,e),n.push(e),[4,this.autoCreateComponentsInsideResult(o,e).initResult];case 2:return i.sent(),this.verifyChildren(o),[2,o]}})})},e.prototype.autoCreateComponentsInsideResult=function(e,t){return r.Assert.exists(e),r.Initialization.automaticallyCreateComponentsInsideResult(e,t)},e.prototype.createHtmlElement=function(e,t){return this.args.resultTemplate.instantiateToElement(e,{wrapInDiv:!0,checkCondition:!0,currentLayout:t,responsiveComponents:this.args.searchInterface.responsiveComponents})},e.prototype.verifyChildren=function(e){l.$$(e).find(".CoveoResultLink")||new u.Logger(e).warn('Result does not contain a "CoveoResultLink" component, please verify the result template',this.args.resultTemplate)},e}();t.TemplateToHtml=c},474:function(e,t,n){"use strict";function o(){var e,t=w.Component.getComponentRef("ResultList");if(t&&(e=t.resultCurrentlyBeingRendered),!e){var n=w.Component.getComponentRef("Quickview");n&&(e=n.resultCurrentlyBeingRendered)}return e}function i(){var e=o();if(e)return e.termsToHighlight}function r(){var e=o();if(e)return e.phrasesToHighlight}function s(e,t){return d.Utils.isNonEmptyArray(R.keys(e))||d.Utils.isNonEmptyArray(R.keys(t))}var a=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var l=n(122),u=n(69),c=n(33),p=n(135),h=n(179),d=n(4),f=n(22),m=n(73),y=n(178),g=n(21),v=n(24),b=n(1),C=n(53),O=n(120),F=n(40),S=n(23),R=n(0),w=n(7),V=n(68),T=function(){function e(){}return e.exportAllHelpersGlobally=function(e){R.each(l.TemplateHelpers.getHelpers(),function(t,n){void 0==e[n]&&(e[n]=t)})},e}();t.CoreHelpers=T,l.TemplateHelpers.registerFieldHelper("javascriptEncode",function(e){return d.Utils.exists(e)?f.StringUtils.javascriptEncode(e):void 0});var A=function(e,t){var n=u.StringAndHoles.shortenString(e,t.length,"...");return d.Utils.exists(t.highlights)?u.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shorten",function(e,t,n,o){return A(e,{length:t,highlights:n,cssClass:o})}),l.TemplateHelpers.registerTemplateHelper("shortenv2",function(e,t){return A(e,t)});var D=function(e,t){var n=u.StringAndHoles.shortenPath(e,t.length);return d.Utils.exists(t.highlights)?u.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shortenPath",function(e,t,n,o){return D(e,{length:t,highlights:n,cssClass:o})}),l.TemplateHelpers.registerFieldHelper("shortenPathv2",function(e,t){return D(e,t)});var E=function(e,t){var n=u.StringAndHoles.shortenUri(e,t.length);return d.Utils.exists(t.highlights)?u.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shortenUri",function(e,t,n,o){return E(e,{length:t,highlights:n,cssClass:o})}),l.TemplateHelpers.registerTemplateHelper("shortenUriv2",function(e,t){return E(e,t)});var I=function(e,t){return d.Utils.exists(e)?d.Utils.exists(t.highlights)?u.HighlightUtils.highlightString(e,t.highlights,null,t.cssClass||"highlight"):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlight",function(e,t,n){return I(e,{highlights:t,cssClass:n})}),l.TemplateHelpers.registerTemplateHelper("highlightv2",function(e,t){return I(e,t)});var _=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?s(t.termsToHighlight,t.phrasesToHighlight)?O.StreamHighlightUtils.highlightStreamText(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamText",function(e,t,n,o){return void 0===t&&(t=i()),void 0===n&&(n=r()),_(e,{termsToHighlight:t,phrasesToHighlight:n,opts:o})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamTextv2",function(e,t){var n=a({termsToHighlight:i(),phrasesToHighlight:r()},t);return _(e,n)});var x=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?s(t.termsToHighlight,t.phrasesToHighlight)?O.StreamHighlightUtils.highlightStreamHTML(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamHTML",function(e,t,n,o){return void 0===t&&(t=i()),void 0===n&&(n=r()),x(e,{termsToHighlight:t,phrasesToHighlight:n,opts:o})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamHTMLv2",function(e,t){var n=a({termsToHighlight:i(),phrasesToHighlight:r()},t);return x(e,n)}),l.TemplateHelpers.registerFieldHelper("number",function(e,t){if(d.Utils.exists(e)){var n=Number(e),o=R.isString(t)?t:t&&t.format;return o?f.StringUtils.htmlEncode(S.format(n,o)):f.StringUtils.htmlEncode(n.toString())}}),l.TemplateHelpers.registerFieldHelper("date",function(e,t){return c.DateUtils.dateToString(c.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("time",function(e,t){return c.DateUtils.timeToString(c.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("dateTime",function(e,t){return c.DateUtils.dateTimeToString(c.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("emailDateTime",function(e,t){var n={};n.includeTimeIfThisWeek=!0;var o=R.extend(t,n);return e?c.DateUtils.dateTimeToString(c.DateUtils.convertFromJsonDateIfNeeded(e),o):void 0}),l.TemplateHelpers.registerFieldHelper("currency",function(e,t){return p.CurrencyUtils.currencyToString(e,t)}),l.TemplateHelpers.registerFieldHelper("timeSpan",function(e,t){return void 0===t&&(t={isMilliseconds:!1}),new m.TimeSpan(e,t.isMilliseconds).getHHMMSS()}),l.TemplateHelpers.registerFieldHelper("email",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o,i,r,s;if(R.isObject(t[0])?(o=t[0].companyDomain,i=t[0].me,r=t[0].lengthLimit,s=t[0].truncateName):(o=t[0],i=t[1],r=t[2],s=t[3]),void 0==r&&(r=2),void 0==s&&(s=!1),R.isString(e)){var a=y.EmailUtils.splitSemicolonSeparatedListOfEmailAddresses(e);return y.EmailUtils.emailAddressesToHyperlinks(a,o,i,r,s)}return R.isArray(e)?y.EmailUtils.emailAddressesToHyperlinks(e,o,i,r,s):void 0}),l.TemplateHelpers.registerTemplateHelper("excessEmailToggle",function(e){b.$$(e).removeClass("coveo-active"),b.$$(e).hasClass("coveo-emails-excess-collapsed")?R.each(b.$$(e).siblings(".coveo-emails-excess-expanded"),function(e){b.$$(e).addClass("coveo-active")}):b.$$(e).hasClass("coveo-hide-expanded")&&(b.$$(e.parentElement).addClass("coveo-inactive"),R.each(b.$$(e.parentElement).siblings(".coveo-emails-excess-collapsed"),function(e){b.$$(e).addClass("coveo-active")}))}),l.TemplateHelpers.registerFieldHelper("anchor",function(e,t){return h.AnchorUtils.buildAnchor(e,t)}),l.TemplateHelpers.registerFieldHelper("image",function(e,t,n){return void 0===n&&(n=o()),t&&t.srcTemplate?h.ImageUtils.buildImage(f.StringUtils.buildStringTemplateFromResult(t.srcTemplate,n),{alt:t.alt,height:t.height,width:t.width}):h.ImageUtils.buildImage(e,t)}),l.TemplateHelpers.registerTemplateHelper("thumbnail",function(e,t,n){if(void 0===e&&(e=o()),void 0===t&&(t="default"),g.QueryUtils.hasThumbnail(e))return h.ImageUtils.buildImageFromResult(e,C.SearchEndpoint.endpoints[t],n)}),l.TemplateHelpers.registerTemplateHelper("fromFileTypeToIcon",function(e,t){void 0===e&&(e=o()),void 0===t&&(t={});var n=w.Component.getComponentRef("Icon");if(n)return n.createIcon(e,t).outerHTML}),l.TemplateHelpers.registerTemplateHelper("attrEncode",function(e){return(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/'/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}),l.TemplateHelpers.registerTemplateHelper("loadTemplates",function(e,t){void 0===t&&(t=!0);var n,i="",r=o(),s=!1,a=e;return R.each(e,function(e,t,o){"default"==e&&(n=t)}),void 0!=n&&(a=R.omit(e,n)),R.each(a,function(e,n,o){s&&t||(s=s||e,i+=l.TemplateHelpers.getHelper("loadTemplate")(n,e,r))}),s||void 0==n||(i+=l.TemplateHelpers.getHelper("loadTemplate")(n,!0,r)),i});var $=["B","KB","MB","GB","TB","PB","EB"];l.TemplateHelpers.registerFieldHelper("size",function(e,t){for(var n=parseInt(e,10),o=null!=t&&null!=t.precision?t.precision:2,i=null!=t&&null!=t.base?t.base:0;n>1024&&i+1<$.length;)n/=1024,i++;return(n=Math.floor(n*Math.pow(10,o))/Math.pow(10,o))+" "+$[i]}),l.TemplateHelpers.registerFieldHelper("translatedCaption",function(e){return F.FacetUtils.tryToGetTranslatedCaption("@filetype",e)}),l.TemplateHelpers.registerTemplateHelper("loadTemplate",function(e,t,n){return void 0===t&&(t=!0),d.Utils.isNullOrUndefined(n)&&(n=o()),t?V.TemplateCache.getTemplate(e).instantiateToString(n,{checkCondition:!1}):""}),l.TemplateHelpers.registerTemplateHelper("encodeCarriageReturn",function(e){return d.Utils.isNullOrUndefined(e)?void 0:f.StringUtils.encodeCarriageReturn(e)}),l.TemplateHelpers.registerTemplateHelper("isMobileDevice",function(){return v.DeviceUtils.isMobileDevice()?v.DeviceUtils.getDeviceName():null}),l.TemplateHelpers.registerTemplateHelper("pluralHelper",function(e,t){return e>1?t.plural:t.singular})},506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(16),r=function(){function e(e){this.rootOptions=e,this.create()}return e.prototype.create=function(){var e=this.rootOptions.iconSVG&&this.rootOptions.iconClassName;this.button=o.$$("button",{className:("coveo-dynamic-facet-header-btn "+(this.rootOptions.className||"")).trim(),type:"button"},e?this.rootOptions.iconSVG:this.rootOptions.label),this.rootOptions.action&&this.button.on("click",this.rootOptions.action),e&&(this.button.setAttribute("aria-label",this.rootOptions.label),this.button.setAttribute("title",this.rootOptions.label),i.SVGDom.addClassToSVGInContainer(this.button.el,this.rootOptions.iconClassName)),this.rootOptions.ariaLabel&&this.button.setAttribute("aria-label",this.rootOptions.ariaLabel),void 0!==this.rootOptions.shouldDisplay&&this.toggle(this.rootOptions.shouldDisplay),this.element=this.button.el},e.prototype.toggle=function(e){this.button.toggle(e)},e}();t.DynamicFacetHeaderButton=r},512:function(e,t){},513:function(e,t,n){"use strict";function o(e){return!!i[e]}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.score="score",e.alphanumeric="alphanumeric",e.occurrences="occurrences"}(i=t.FacetSortCriteria||(t.FacetSortCriteria={})),t.isFacetSortCriteria=o},514:function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),a=n(570),l=n(0),u=n(12),c=n(16),p=n(571);n(572);var h=n(4),d=n(6),f=function(){function e(e){this.options=e,this.defaultOptions={wrapperClassName:"",clearOnBlur:!1},this.throttlingDelay=600,this.isRequestCancelled=!1,this.throttledRequest=l.throttle(this.triggerRequest,this.throttlingDelay,{leading:!0,trailing:!0}),this.options=o({},this.defaultOptions,this.options),this.id=l.uniqueId("coveo-combobox-"),this.create()}return e.prototype.create=function(){this.element=s.$$("div",{className:"coveo-combobox-wrapper "+this.options.wrapperClassName}).el,this.createAndAppendInput(),this.createAndAppendWaitAnimation(),this.createAndAppendValues()},e.prototype.createAndAppendInput=function(){this.input=new a.ComboboxInput(this),this.element.appendChild(this.input.element)},e.prototype.createAndAppendWaitAnimation=function(){this.waitAnimationElement=s.$$("div",{className:"coveo-combobox-wait-animation"},u.SVGIcons.icons.loading).el,c.SVGDom.addClassToSVGInContainer(this.waitAnimationElement,"coveo-combobox-wait-animation-svg"),this.toggleWaitAnimation(!1),this.input.element.appendChild(this.waitAnimationElement)},e.prototype.toggleWaitAnimation=function(e){s.$$(this.waitAnimationElement).toggle(e)},e.prototype.createAndAppendValues=function(){this.values=new p.ComboboxValues(this),this.element.appendChild(this.values.element)},e.prototype.clearAll=function(){this.clearValues(),this.input.clearInput()},e.prototype.clearValues=function(){this.values.clearValues(),this.cancelRequest()},e.prototype.cancelRequest=function(){this.toggleWaitAnimation(!1),this.throttledRequest.cancel(),this.isRequestCancelled=!0},e.prototype.onInputChange=function(e){var t=this;if(h.Utils.isEmptyString(e))return this.clearValues();this.throttledRequest(function(){return t.options.requestValues(e)},function(){return t.values.resetScroll()})},e.prototype.onInputBlur=function(){if(!this.values.mouseIsOverValue&&!this.values.isRenderingNewValues)return this.options.clearOnBlur?this.clearAll():void this.clearValues()},e.prototype.updateAccessibilityAttributes=function(e){this.input.updateAccessibilityAttributes(e)},e.prototype.updateAriaLive=function(){if(!this.values.hasValues())return void this.options.ariaLive.updateText(d.l("NoValuesFound"));var e=d.l("ShowingResultsWithQuery",this.values.numberOfValues,this.input.value,this.values.numberOfValues);this.options.scrollable&&this.options.scrollable.areMoreValuesAvailable()&&(e=e+" ("+d.l("MoreValuesAvailable")+")"),this.options.ariaLive.updateText(e)},e.prototype.onScrollEndReached=function(){var e=this;this.values.saveFocusedValue(),this.options.scrollable&&this.throttledRequest(function(){return e.options.scrollable.requestMoreValues()},function(){return e.values.restoreFocusedValue()})},e.prototype.triggerRequest=function(e,t){return i(this,void 0,void 0,function(){var n;return r(this,function(o){switch(o.label){case 0:return this.isRequestCancelled=!1,this.toggleWaitAnimation(!0),[4,e()];case 1:return n=o.sent(),this.toggleWaitAnimation(!1),this.isRequestCancelled||(this.values.renderFromResponse(n),t&&t()),[2]}})})},e}();t.Combobox=f},515:function(e,t){},516:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(66),i=n(1),r=function(){function e(e,t){void 0===t&&(t=function(){}),this.facetValue=e,this.checkbox=new o.Checkbox(t.bind(this),this.facetValue.displayValue,this.facetValue.selectAriaLabel,"("+this.facetValue.formattedCount+")");var n=i.$$(this.checkbox.getElement()).find(".coveo-checkbox-span-label"),r=i.$$(this.checkbox.getElement()).find(".coveo-checkbox-span-label-suffix");n&&r&&(n.setAttribute("title",this.facetValue.displayValue),n.setAttribute("aria-hidden","true"),r.setAttribute("aria-hidden","true")),this.facetValue.isSelected&&this.checkbox.select(!1),this.element=this.checkbox.getElement()}return e}();t.DynamicFacetValueCheckbox=r},517:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(583);var o=n(1),i=n(0),r=n(72),s=n(6),a=n(225),l=n(4),u=n(183),c=function(){function e(e,t){this.facet=e,this.list=o.$$("ul",{className:"coveo-dynamic-facet-values","aria-labelledby":u.getDynamicFacetHeaderId(this.facet.options.id),role:"group"}).el,this.valueCreator=new t(this.facet),this.resetValues()}return e.prototype.createFromResponse=function(e){var t=this;this.facetValues=e.values.map(function(e,n){return t.valueCreator.createFromResponse(e,n)})},e.prototype.reorderValues=function(e){this.facetValues=l.Utils.reorderValuesByKeys(this.facetValues,e,function(e){return e.value})},e.prototype.resetValues=function(){this.facetValues=this.valueCreator.getDefaultValues()},Object.defineProperty(e.prototype,"allFacetValues",{get:function(){return this.facetValues},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allValues",{get:function(){return this.facetValues.map(function(e){return e.value})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedValues",{get:function(){return this.facetValues.filter(function(e){return e.isSelected}).map(function(e){return e.value})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDisplayValues",{get:function(){return this.facetValues.filter(function(e){return e.isSelected}).map(function(e){return e.displayValue})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeValues",{get:function(){return this.facetValues.filter(function(e){return!e.isIdle})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayedValues",{get:function(){return this.facetValues.filter(function(e){return!e.isIdle||e.numberOfResults>0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSelectedValues",{get:function(){return!!i.findWhere(this.facetValues,{state:r.FacetValueState.selected})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasActiveValues",{get:function(){return!!this.activeValues.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasIdleValues",{get:function(){return!!i.findWhere(this.facetValues,{state:r.FacetValueState.idle})},enumerable:!0,configurable:!0}),e.prototype.clearAll=function(){this.facetValues.forEach(function(e){return e.deselect()})},Object.defineProperty(e.prototype,"hasValues",{get:function(){return!!this.allFacetValues.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasDisplayedValues",{get:function(){return!!this.displayedValues.length},enumerable:!0,configurable:!0}),e.prototype.hasSelectedValue=function(e){var t="string"==typeof e?e:e.value,n=i.find(this.facetValues,function(e){return e.equals(t)});return n&&n.isSelected},e.prototype.get=function(e){var t="string"==typeof e?e:e.value,n=i.find(this.facetValues,function(e){return e.equals(t)});if(n)return n;var o=this.valueCreator.createFromValue(t);return o?(this.facetValues.push(o),o):null},e.prototype.focus=function(e){var t=i.find(this.facetValues,function(t){return t.equals(e)});t&&t.focus()},e.prototype.buildShowLess=function(){var e=this;return new a.DynamicFacetValueShowMoreLessButton({className:"coveo-dynamic-facet-show-less",ariaLabel:s.l("ShowLessFacetResults",this.facet.options.title),label:s.l("ShowLess"),action:function(){e.facet.enableFreezeFacetOrderFlag(),e.facet.showLessValues()}}).element},e.prototype.buildShowMore=function(){var e=this;return new a.DynamicFacetValueShowMoreLessButton({className:"coveo-dynamic-facet-show-more",ariaLabel:s.l("ShowMoreFacetResults",this.facet.options.title),label:s.l("ShowMore"),action:function(){e.facet.enableFreezeFacetOrderFlag(),e.facet.showMoreValues()}}).element},Object.defineProperty(e.prototype,"shouldEnableShowLess",{get:function(){return this.facetValues.length>this.facet.options.numberOfValues&&this.hasIdleValues},enumerable:!0,configurable:!0}),e.prototype.appendShowMoreLess=function(e){this.facet.options.enableMoreLess&&(this.shouldEnableShowLess&&e.appendChild(this.buildShowLess()),this.facet.moreValuesAvailable&&e.appendChild(this.buildShowMore()))},e.prototype.appendSelectedCollapsedValues=function(e){if(this.hasSelectedValues){var t=this.selectedDisplayValues.join(", ");e.appendChild(o.$$("li",{className:"coveo-dynamic-facet-collapsed-values",ariaLabel:s.l("CurrentSelections")+": "+t},i.escape(t)).el)}},e.prototype.render=function(){var e=document.createDocumentFragment();return o.$$(this.list).empty(),this.displayedValues.forEach(function(t){e.appendChild(t.renderedElement)}),this.appendShowMoreLess(e),this.appendSelectedCollapsedValues(e),this.list.appendChild(e),this.list},e}();t.DynamicFacetValues=c},518:function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n(11),s=n(0),a=n(182),l=function(){function e(e){this.facet=e,this.freezeCurrentValues=!1,this.freezeFacetOrder=!1,this.preventAutoSelection=!1,this.requestBuilder=new a.DynamicFacetRequestBuilder({facetId:this.facet.options.id,field:this.facet.fieldName,type:this.facet.facetType,sortCriteria:this.facet.options.sortCriteria,injectionDepth:this.facet.options.injectionDepth,filterFacetCount:this.facet.options.filterFacetCount}),this.resetNumberOfValuesToRequest(),this.resetFlagsDuringQuery()}return e.prototype.resetFlagsDuringQuery=function(){var e=this;this.facet.bind.onRootElement(r.QueryEvents.duringQuery,function(){e.freezeCurrentValues=!1,e.freezeFacetOrder=!1,e.preventAutoSelection=!1})},e.prototype.increaseNumberOfValuesToRequest=function(e){this.numberOfValuesToRequest+=e},e.prototype.resetNumberOfValuesToRequest=function(){this.numberOfValuesToRequest=this.facet.options.numberOfValues},e.prototype.enablePreventAutoSelectionFlag=function(){this.preventAutoSelection=!0},e.prototype.enableFreezeCurrentValuesFlag=function(){this.areValuesIncorrectlyAffectedByDependsOn||(this.freezeCurrentValues=!0)},e.prototype.enableFreezeFacetOrderFlag=function(){this.freezeFacetOrder=!0},Object.defineProperty(e.prototype,"areValuesIncorrectlyAffectedByDependsOn",{get:function(){return!!this.facet.dependsOnManager.hasDependentFacets&&(!this.facet.dependsOnManager.dependentFacetsHaveSelectedValues&&this.currentValues.length<this.numberOfValuesToRequest)},enumerable:!0,configurable:!0}),e.prototype.putFacetIntoQueryBuilder=function(e){i.Assert.exists(e),e.facetRequests.push(this.buildFacetRequest()),this.freezeFacetOrder&&(e.facetOptions.freezeFacetOrder=!0)},e.prototype.buildFacetRequest=function(){return o({},this.requestBuilder.buildBaseRequestForQuery(),{currentValues:this.currentValues,numberOfValues:this.numberOfValues,freezeCurrentValues:this.freezeCurrentValues,preventAutoSelect:this.preventAutoSelection,isFieldExpanded:this.numberOfValuesToRequest>this.facet.options.numberOfValues})},e.prototype.getQueryResults=function(){var e=this.facet.queryController.getLastQuery();e.numberOfResults=0;var t=s.findIndex(e.facets,{facetId:this.facet.options.id});return-1!==t?e.facets[t]=this.buildFacetRequest():e.facets?e.facets.push(this.buildFacetRequest()):e.facets=[this.buildFacetRequest()],this.facet.queryController.getEndpoint().search(e)},Object.defineProperty(e.prototype,"currentValues",{get:function(){return this.facet.values.allFacetValues.map(function(e){return{value:e.value,state:e.state}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfValues",{get:function(){return this.freezeCurrentValues?this.currentValues.length:Math.max(this.numberOfValuesToRequest,this.facet.values.activeValues.length)},enumerable:!0,configurable:!0}),e}();t.DynamicFacetQueryController=l},519:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(516),r=function(){function e(e,t){this.facetValue=e,this.facet=t}return e.prototype.render=function(){return this.dom=o.$$("li",{className:"coveo-dynamic-facet-value",role:"none",dataValue:this.facetValue.value}),this.toggleSelectedClass(),this.renderCheckbox(),this.addFocusAndBlurEventListeners(),this.dom.el},e.prototype.toggleSelectedClass=function(){this.dom.toggleClass("coveo-selected",this.facetValue.isSelected)},e.prototype.renderCheckbox=function(){this.valueCheckbox=new i.DynamicFacetValueCheckbox(this.facetValue,this.selectAction.bind(this)),this.dom.append(this.valueCheckbox.element)},e.prototype.addFocusAndBlurEventListeners=function(){var e=this,t=o.$$(this.valueCheckbox.element).find("button");o.$$(t).on("focusin",function(){return e.onFocusIn()}),o.$$(t).on("focusout",function(){return e.onFocusOut()})},e.prototype.onFocusIn=function(){this.dom.addClass("coveo-focused")},e.prototype.onFocusOut=function(){this.dom.removeClass("coveo-focused")},e.prototype.selectAction=function(){var e=this;this.facet.toggleSelectValue(this.facetValue.value),this.toggleSelectedClass(),this.facet.enableFreezeCurrentValuesFlag(),this.facet.enableFreezeFacetOrderFlag(),this.facet.enablePreventAutoSelectionFlag(),this.facet.scrollToTop(),this.facet.focusValueAfterRerender(this.facetValue.value),this.facet.triggerNewQuery(function(){return e.facetValue.logSelectActionToAnalytics()})},e}();t.DynamicFacetValueRenderer=r},526:function(e,t,n){"use strict";function o(e){return!!i[e]}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.currency="currency",e.number="number",e.date="date"}(i=t.DynamicFacetRangeValueFormat||(t.DynamicFacetRangeValueFormat={})),t.isFacetRangeValueFormat=o},527:function(e,t,n){(function(e){function o(e,n){var o={seen:[],stylize:r};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),f(n)?o.showHidden=n:n&&t._extend(o,n),C(o.showHidden)&&(o.showHidden=!1),C(o.depth)&&(o.depth=2),C(o.colors)&&(o.colors=!1),C(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=i),a(o,e,o.depth)}function i(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function r(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function a(e,n,o){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(o,e);return v(i)||(i=a(e,i,o)),i}var r=l(e,n);if(r)return r;var f=Object.keys(n),m=s(f);if(e.showHidden&&(f=Object.getOwnPropertyNames(n)),R(n)&&(f.indexOf("message")>=0||f.indexOf("description")>=0))return u(n);if(0===f.length){if(w(n)){var y=n.name?": "+n.name:"";return e.stylize("[Function"+y+"]","special")}if(O(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(R(n))return u(n)}var g="",b=!1,C=["{","}"];if(d(n)&&(b=!0,C=["[","]"]),w(n)){g=" [Function"+(n.name?": "+n.name:"")+"]"}if(O(n)&&(g=" "+RegExp.prototype.toString.call(n)),S(n)&&(g=" "+Date.prototype.toUTCString.call(n)),R(n)&&(g=" "+u(n)),0===f.length&&(!b||0==n.length))return C[0]+g+C[1];if(o<0)return O(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var F;return F=b?c(e,n,o,m,f):f.map(function(t){return p(e,n,o,m,t,b)}),e.seen.pop(),h(F,g,C)}function l(e,t){if(C(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,o,i){for(var r=[],s=0,a=t.length;s<a;++s)E(t,String(s))?r.push(p(e,t,n,o,String(s),!0)):r.push("");return i.forEach(function(i){i.match(/^\d+$/)||r.push(p(e,t,n,o,i,!0))}),r}function p(e,t,n,o,i,r){var s,l,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?l=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(l=e.stylize("[Setter]","special")),E(o,i)||(s="["+i+"]"),l||(e.seen.indexOf(u.value)<0?(l=m(n)?a(e,u.value,null):a(e,u.value,n-1),l.indexOf("\n")>-1&&(l=r?l.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+l.split("\n").map(function(e){return"   "+e}).join("\n"))):l=e.stylize("[Circular]","special")),C(s)){if(r&&i.match(/^\d+$/))return l;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}function h(e,t,n){var o=0;return e.reduce(function(e,t){return o++,t.indexOf("\n")>=0&&o++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return null==e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function C(e){return void 0===e}function O(e){return F(e)&&"[object RegExp]"===T(e)}function F(e){return"object"==typeof e&&null!==e}function S(e){return F(e)&&"[object Date]"===T(e)}function R(e){return F(e)&&("[object Error]"===T(e)||e instanceof Error)}function w(e){return"function"==typeof e}function V(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function T(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function I(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}function _(t){function n(){for(var n=[],o=0;o<arguments.length;o++)n.push(arguments[o]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var r=this,s=function(){return i.apply(r,arguments)};t.apply(this,n).then(function(t){e.nextTick(s,null,t)},function(t){e.nextTick(I,t,s)})}if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,x(t)),n}var x=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++)n[t[o]]=Object.getOwnPropertyDescriptor(e,t[o]);return n},$=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(o(arguments[n]));return t.join(" ")}for(var n=1,i=arguments,r=i.length,s=String(e).replace($,function(e){if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}}),a=i[n];n<r;a=i[++n])m(a)||!F(a)?s+=" "+a:s+=" "+o(a);return s},t.deprecate=function(n,o){function i(){if(!r){if(e.throwDeprecation)throw new Error(o);e.traceDeprecation?console.trace(o):console.error(o),r=!0}return n.apply(this,arguments)}if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,o).apply(this,arguments)};var r=!1;return i};var L,M={};t.debuglog=function(n){if(C(L)&&(L=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!M[n])if(new RegExp("\\b"+n+"\\b","i").test(L)){var o=e.pid;M[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,o,e)}}else M[n]=function(){};return M[n]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=f,t.isNull=m,t.isNullOrUndefined=y,t.isNumber=g,t.isString=v,t.isSymbol=b,t.isUndefined=C,t.isRegExp=O,t.isObject=F,t.isDate=S,t.isError=R,t.isFunction=w,t.isPrimitive=V,t.isBuffer=n(698);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",D(),t.format.apply(t,arguments))},t.inherits=n(699),t._extend=function(e,t){if(!t||!F(t))return e;for(var n=Object.keys(t),o=n.length;o--;)e[n[o]]=t[n[o]];return e};var H="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;t.promisify=function(e){function t(){for(var t,n,o=new Promise(function(e,o){t=e,n=o}),i=[],r=0;r<arguments.length;r++)i.push(arguments[r]);i.push(function(e,o){e?n(e):t(o)});try{e.apply(this,i)}catch(e){n(e)}return o}if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(H&&e[H]){var t=e[H];if("function"!=typeof t)throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),H&&Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,x(e))},t.promisify.custom=H,t.callbackify=_}).call(t,n(203))},528:function(e,t){},529:function(e,t){},530:function(e,t){},531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(62),i=n(19),r=n(93),s=n(1),a=n(7),l=n(9),u=function(){function e(e,t,n,o){this.coveoRoot=e,this.ID=t,this.searchInterface=a.Component.get(this.coveoRoot.el,i.SearchInterface,!1),this.currentMode="large"}return e.init=function(t,n,i){if(!s.$$(t).find("."+a.Component.computeCssClassName(r.ResultList))){return void new l.Logger("ResponsiveDefaultResultTemplate").trace("No ResultLayout component found : Cannot instantiate ResponsiveResultLayout")}o.ResponsiveComponentsManager.register(e,s.$$(t),r.ResultList.ID,n,i)},e.prototype.registerComponent=function(e){return e instanceof r.ResultList&&(this.resultList=e,!0)},e.prototype.handleResizeEvent=function(){var e=this,t=this.resultList.queryController.getLastResults();this.needSmallMode()?(s.$$(this.resultList.options.resultsContainer).addClass("coveo-card-layout-container"),s.$$(this.resultList.options.resultsContainer).removeClass("coveo-list-layout-container"),"small"!=this.currentMode&&(t&&this.resultList.buildResults(t).then(function(t){e.resultList.renderResults(t)}),this.currentMode="small")):(s.$$(this.resultList.options.resultsContainer).removeClass("coveo-card-layout-container"),s.$$(this.resultList.options.resultsContainer).addClass("coveo-list-layout-container"),"large"!=this.currentMode&&(t&&this.resultList.buildResults(t).then(function(t){e.resultList.renderResults(t)}),this.currentMode="large"))},e.prototype.needSmallMode=function(){return this.coveoRoot.width()<=this.searchInterface.responsiveComponents.getSmallScreenWidth()},e}();t.ResponsiveDefaultResultTemplate=u},532:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=function(){function e(e,t){this.searchInterface=t,this.resultContainerElement=o.$$(e)}return e.prototype.empty=function(){this.searchInterface.detachComponentsInside(this.resultContainerElement.el),o.$$(this.resultContainerElement).empty()},e.prototype.addClass=function(e){this.resultContainerElement.addClass(e)},e.prototype.isEmpty=function(){return this.resultContainerElement.isEmpty()},e.prototype.hideChildren=function(){this.resultContainerElement.children().forEach(function(e){return o.$$(e).hide()})},e.prototype.getResultElements=function(){return this.resultContainerElement.findAll(".CoveoResult")},Object.defineProperty(e.prototype,"el",{get:function(){return this.resultContainerElement.el},enumerable:!0,configurable:!0}),e.resultCurrentlyBeingRendered=null,e}();t.ResultContainer=i},533:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(215),r=n(1),s=n(0),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getEndFragment=function(e){var t=this;return new Promise(function(n){if(!s.isEmpty(e)){if(t.resultListOptions.enableInfiniteScroll){var o=r.$$(t.resultListOptions.resultsContainer).findAll(".coveo-card-layout-padding");s.each(o,function(e){return r.$$(e).remove()})}var i=document.createDocumentFragment();s.times(3,function(){return i.appendChild(r.$$("div",{className:"coveo-card-layout coveo-card-layout-padding"}).el)}),n(i)}n(null)})},t}(i.ResultListRenderer);t.ResultListCardRenderer=a},534:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(215),a=n(470),l=n(1),u=n(0),c=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o.resultListOptions=t,o.autoCreateComponentsFn=n,o.shouldDisplayHeader=!0,o.shouldDisplayFooter=!1,o.resultListOptions.resultTemplate instanceof a.TableTemplate&&(o.resultListOptions.resultTemplate.hasTemplateWithRole("table-footer")&&(o.shouldDisplayFooter=!0),0===o.resultListOptions.resultTemplate.templates.length||o.resultListOptions.resultTemplate.hasTemplateWithRole("table-header")||(o.shouldDisplayHeader=!1)),o}return o(t,e),t.prototype.getStartFragment=function(e,t){if(!t&&!u.isEmpty(e)&&this.shouldDisplayHeader)return this.renderRoledTemplate("table-header")},t.prototype.getEndFragment=function(e,t){if(!t&&!u.isEmpty(e)&&this.shouldDisplayFooter)return this.renderRoledTemplate("table-footer")},t.prototype.renderRoledTemplate=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(o){switch(o.label){case 0:return[4,this.resultListOptions.resultTemplate.instantiateRoleToElement(e)];case 1:return t=o.sent(),l.$$(t).addClass("coveo-result-list-"+e),this.autoCreateComponentsFn(t,void 0),n=document.createDocumentFragment(),n.appendChild(t),[2,n]}})})},t}(s.ResultListRenderer);t.ResultListTableRenderer=c},536:function(e,t){},537:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(94),i=n(20),r=n(12),s=n(471),a=function(){function e(e,t,n,o){this.componentName=e,this.element=t,this.closeButtonLabel=n,this.close=o,this.className="coveo-"+this.componentName+"-dropdown-modal-content"}return Object.defineProperty(e.prototype,"hidden",{set:function(e){this.element.toggleClass("coveo-hidden",e)},enumerable:!0,configurable:!0}),e.prototype.positionDropdown=function(){this.element.el.classList.add(this.className,o.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role","group"),this.element.setAttribute("aria-label",i.l("FiltersDropdown")),this.hidden=!1,this.ensureCloseButton(),this.ensureFocusTrap()},e.prototype.hideDropdown=function(){this.element.el.classList.remove(this.className,o.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role",null),this.element.setAttribute("aria-label",null),this.hidden=!0,this.removeCloseButton(),this.removeFocusTrap()},e.prototype.cleanUp=function(){this.hidden=!1},e.prototype.ensureCloseButton=function(){var e=this;this.closeButton||(this.closeButton=i.$$("button",{className:"coveo-facet-modal-close-button",type:"button",ariaLabel:this.closeButtonLabel},r.SVGIcons.icons.mainClear),this.closeButton.on("click",function(){return e.close()}),this.element.prepend(this.closeButton.el))},Object.defineProperty(e.prototype,"focusableSelector",{get:function(){return["[data-field]:not(.coveo-facet-empty) [tabindex]","[data-field]:not(.coveo-hidden) button",".coveo-facet-modal-close-button"].join(" , ")},enumerable:!0,configurable:!0}),e.prototype.ensureFocusTrap=function(){this.focusTrap||(this.focusTrap=new s.FocusTrap(this.element.el,{focusableSelector:this.focusableSelector}))},e.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},e.prototype.removeFocusTrap=function(){this.focusTrap&&(this.focusTrap.disable(),this.focusTrap=null)},e}();t.ResponsiveDropdownModalContent=a},538:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.popupOpened="popupOpened",e.popupClosed="popupClosed",e}();t.FacetsMobileModeEvents=o},568:function(e,t){},569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=n(12),r=n(1),s=n(506),a=n(16),l=function(){function e(e){this.options=e,this.create()}return e.prototype.create=function(){var e=this,t=r.$$("div");this.button=new s.DynamicFacetHeaderButton({label:o.l("CollapseFacet",this.options.title),iconSVG:i.SVGIcons.icons.arrowUp,iconClassName:"coveo-dynamic-facet-collapse-toggle-svg",className:"coveo-dynamic-facet-header-collapse",shouldDisplay:!0,action:function(){return e.options.toggleCollapse()}}),t.append(this.button.element),this.element=t.el},e.prototype.toggleButton=function(e){var t=r.$$(this.button.element),n=e?o.l("ExpandFacet",this.options.title):o.l("CollapseFacet",this.options.title),s=e?i.SVGIcons.icons.arrowDown:i.SVGIcons.icons.arrowUp;t.setAttribute("aria-label",n),t.setAttribute("title",n),t.setAttribute("aria-expanded",(!e).toString()),t.toggleClass("coveo-dynamic-facet-header-expand",e),t.toggleClass("coveo-dynamic-facet-header-collapse",!e),t.setHtml(s),a.SVGDom.addClassToSVGInContainer(t.el,"coveo-dynamic-facet-collapse-toggle-svg")},e}();t.DynamicFacetHeaderCollapseToggle=l},570:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(57),i=n(1),r=n(25),s=n(4),a=function(){function e(e){this.combobox=e,this.inputOptions={usePlaceholder:!0,className:"coveo-combobox-input",triggerOnChangeAsYouType:!0,isRequired:!1,icon:"search"},this.create(),this.element=this.textInput.getElement(),this.inputElement=i.$$(this.element).find("input"),this.addEventListeners(),this.addAccessibilityAttributes()}return Object.defineProperty(e.prototype,"value",{get:function(){return this.inputElement.value},enumerable:!0,configurable:!0}),e.prototype.create=function(){var e=this;this.textInput=new o.TextInput(function(t){return e.combobox.onInputChange(t.getValue())},this.combobox.options.placeholderText,this.inputOptions)},e.prototype.addEventListeners=function(){var e=this;this.combobox.options.clearOnBlur||this.inputElement.addEventListener("focus",function(){return e.combobox.onInputChange(e.textInput.getValue())}),this.combobox.element.addEventListener("focusout",function(t){return e.handleFocusOut(t)}),this.combobox.element.addEventListener("keydown",function(t){return e.handleKeyboardDirection(t)}),this.combobox.element.addEventListener("keyup",function(t){return e.handleKeyboardEnterEscape(t)})},e.prototype.addAccessibilityAttributes=function(){var e=this.combobox.id+"-listbox";this.inputElement.setAttribute("role","combobox"),this.inputElement.setAttribute("aria-owns",e),this.inputElement.setAttribute("aria-haspopup","listbox"),this.inputElement.setAttribute("aria-autocomplete","list"),this.inputElement.setAttribute("id",this.combobox.id+"-input"),this.inputElement.setAttribute("aria-label",this.combobox.options.label),this.updateAccessibilityAttributes({activeDescendant:"",expanded:!1})},e.prototype.updateAccessibilityAttributes=function(e){this.inputElement.setAttribute("aria-expanded",e.expanded?"true":"false"),s.Utils.isEmptyString(e.activeDescendant)?this.inputElement.removeAttribute("aria-activedescendant"):this.inputElement.setAttribute("aria-activedescendant",e.activeDescendant)},e.prototype.clearInput=function(){this.textInput.reset()},e.prototype.handleFocusOut=function(e){var t=e.relatedTarget;if(!this.combobox.element.contains(t)){if(i.$$(this.combobox.element).find(".coveo-combobox-values:hover"))return void this.inputElement.focus();this.combobox.onInputBlur()}},e.prototype.handleKeyboardDirection=function(e){switch(e.which){case r.KEYBOARD.DOWN_ARROW:e.preventDefault(),this.combobox.values.focusNextValue();break;case r.KEYBOARD.UP_ARROW:e.preventDefault(),this.combobox.values.focusPreviousValue();break;case r.KEYBOARD.HOME:e.preventDefault(),this.combobox.values.focusFirstValue();break;case r.KEYBOARD.END:e.preventDefault(),this.combobox.values.focusLastValue()}},e.prototype.handleKeyboardEnterEscape=function(e){switch(e.which){case r.KEYBOARD.ENTER:this.combobox.values.selectActiveValue();break;case r.KEYBOARD.ESCAPE:s.Utils.isNonEmptyString(this.textInput.getValue())&&e.stopPropagation(),this.combobox.clearAll()}},e}();t.ComboboxInput=a},571:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(6),s=n(74),a=function(){function e(e){var t=this;this.combobox=e,this.mouseIsOverValue=!1,this.isRenderingNewValues=!1,this.values=[],this.element=o.$$("ul",{id:this.combobox.id+"-listbox",role:"listbox",className:"coveo-combobox-values",ariaLabelledby:this.combobox.id+"-input"}).el,o.$$(this.element).hide(),this.isScrollable=!!this.combobox.options.scrollable,this.isScrollable&&this.element.addEventListener("scroll",function(){return t.onScroll()})}return e.prototype.renderFromResponse=function(e){this.isRenderingNewValues=!0,this.clearValues(),this.values=this.combobox.options.createValuesFromResponse(e),this.render(),this.combobox.updateAriaLive(),this.isRenderingNewValues=!1},e.prototype.render=function(){if(o.$$(this.element).show(),!this.hasValues())return this.renderNoValuesFound();this.renderValues(),this.addEventListeners(),this.updateAccessibilityAttributes()},e.prototype.renderValues=function(){var e=this,t=document.createDocumentFragment();this.values.forEach(function(n,i){var r=o.$$("li",{id:e.combobox.id+"-value-"+i,className:"coveo-combobox-value",role:"option",tabindex:0},n.element).el;e.highlightCurrentQueryInSearchResults(n.element),n.element=r,t.appendChild(n.element)}),this.element.appendChild(t)},e.prototype.highlightCurrentQueryInSearchResults=function(e){if(this.combobox.options.highlightValueClassName){var t=this.combobox.element.querySelector("input").value,n=o.$$(e).hasClass(this.combobox.options.highlightValueClassName)?e:o.$$(e).find("."+this.combobox.options.highlightValueClassName);if(n){var i=o.$$(n).text(),r=s.HighlightUtils.highlight(i,t,"coveo-highlight");o.$$(n).empty(),r.forEach(function(e){return n.appendChild(e)})}}},e.prototype.hasValues=function(){return!!this.numberOfValues},Object.defineProperty(e.prototype,"numberOfValues",{get:function(){return this.values.length},enumerable:!0,configurable:!0}),e.prototype.renderNoValuesFound=function(){var e=o.$$("li",{role:"option",className:"coveo-combobox-value-not-found"},r.l("NoValuesFound")).el;this.element.appendChild(e)},e.prototype.addEventListeners=function(){var e=this;this.values.forEach(function(t){o.$$(t.element).on("mouseenter",function(){return e.mouseIsOverValue=!0}),o.$$(t.element).on("mouseleave",function(){return e.mouseIsOverValue=!1}),o.$$(t.element).on("click",function(t){return e.onValueClick(t)}),o.$$(t.element).on("focus",function(){return e.setKeyboardActiveValue(t)})})},e.prototype.onValueClick=function(e){var t=e.target,n=o.$$(t).hasClass("coveo-combobox-value")?t:o.$$(t).parent("coveo-combobox-value");if(n){var r=n.getAttribute("id"),s=i.find(this.values,function(e){return e.element.getAttribute("id")===r});s&&this.combobox.options.onSelectValue(s),this.combobox.clearAll()}},e.prototype.updateAccessibilityAttributes=function(){var e=this.keyboardActiveValue?this.keyboardActiveValue.element.getAttribute("id"):"";this.combobox.updateAccessibilityAttributes({activeDescendant:e,expanded:this.hasValues()})},e.prototype.clearValues=function(){this.mouseIsOverValue=!1,this.resetKeyboardActiveValue(),o.$$(this.element).empty(),o.$$(this.element).hide(),this.values=[],this.updateAccessibilityAttributes()},e.prototype.setKeyboardActiveValue=function(e){this.resetKeyboardActiveValue(),this.keyboardActiveValue=e,this.activateFocusOnValue(this.keyboardActiveValue),this.updateAccessibilityAttributes()},e.prototype.resetKeyboardActiveValue=function(){this.keyboardActiveValue&&(this.deactivateFocusOnValue(this.keyboardActiveValue),this.keyboardActiveValue=null)},e.prototype.activateFocusOnValue=function(e){var t=e.element;o.$$(t).addClass("coveo-focused"),t.setAttribute("aria-selected","true")},e.prototype.deactivateFocusOnValue=function(e){var t=e.element;o.$$(t).removeClass("coveo-focused"),t.setAttribute("aria-selected","false")},e.prototype.selectActiveValue=function(){this.keyboardActiveValue&&(this.combobox.options.onSelectValue(this.keyboardActiveValue),this.combobox.clearAll())},e.prototype.onScroll=function(){this.element.scrollTop+this.element.clientHeight>=this.element.scrollHeight&&this.combobox.options.scrollable.areMoreValuesAvailable()&&this.combobox.onScrollEndReached()},e.prototype.resetScroll=function(){this.isScrollable&&(this.element.style.maxHeight=this.combobox.options.scrollable.maxDropdownHeight+"px",this.element.scrollTop=0)},e.prototype.focusFirstValue=function(){this.hasValues()&&this.firstValue.element.focus()},e.prototype.focusLastValue=function(){this.hasValues()&&this.lastValue.element.focus()},e.prototype.focusNextValue=function(){if(this.hasValues()){this.nextOrFirstValue.element.focus()}},e.prototype.focusPreviousValue=function(){if(this.hasValues()){this.previousOrLastValue.element.focus()}},Object.defineProperty(e.prototype,"nextOrFirstValue",{get:function(){if(!this.keyboardActiveValue)return this.firstValue;var e=(this.values.indexOf(this.keyboardActiveValue)+1)%this.numberOfValues;return this.values[e]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstValue",{get:function(){return this.values[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"previousOrLastValue",{get:function(){if(!this.keyboardActiveValue)return this.lastValue;var e=this.values.indexOf(this.keyboardActiveValue)-1;return e>=0?this.values[e]:this.values[this.numberOfValues-1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastValue",{get:function(){var e=this.numberOfValues-1;return this.values[e]},enumerable:!0,configurable:!0}),e.prototype.saveFocusedValue=function(){if(!this.keyboardActiveValue)return void(this.focusedValueId=null);this.focusedValueId=this.keyboardActiveValue.element.id},e.prototype.restoreFocusedValue=function(){if(this.focusedValueId){o.$$(this.element).find("#"+this.focusedValueId).focus(),this.focusedValueId=null}},e}();t.ComboboxValues=a},572:function(e,t){},581:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(216),r=n(142),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.init=function(e,n,o){i.ResponsiveFacetColumn.init(t,e,n,o,r.DynamicFacet.ID)},t}(i.ResponsiveFacetColumn);t.ResponsiveDynamicFacets=s},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(512);var o=n(1),i=n(6),r=n(12),s=n(10),a=n(0),l=n(48),u=function(){function e(e,t){this.facet=e,this.options=t,this.create()}return e.prototype.create=function(){this.element=o.$$("ul",{className:"coveo-dynamic-facet-breadcrumb coveo-breadcrumb-item",ariaLabel:this.facet.options.title}).el,this.createAndAppendTitle();var e=this.facet.values.activeValues,t=e.slice(0,this.facet.options.numberOfValuesInBreadcrumb),n=e.slice(this.facet.options.numberOfValuesInBreadcrumb);this.createAndAppendBreadcrumbValues(t),n.length&&this.createAndAppendCollapsedBreadcrumbs(n)},e.prototype.createAndAppendTitle=function(){var e=o.$$(l.getHeadingTag(this.options&&this.options.headingLevel,"h3"),{className:"coveo-dynamic-facet-breadcrumb-title",ariaHidden:"true"},this.facet.options.title+":").el;this.element.appendChild(e)},e.prototype.createAndAppendBreadcrumbValues=function(e){var t=this;e.forEach(function(e){return t.createAndAppendBreadcrumbValue(e)})},e.prototype.createAndAppendBreadcrumbValue=function(e){var t=this,n=o.$$("li",{className:"coveo-dynamic-facet-breadcrumb-value-list-item"}).el,s=o.$$("button",{type:"button",className:"coveo-dynamic-facet-breadcrumb-value",ariaLabel:i.l("RemoveFilterOn",e.displayValue)},a.escape(e.displayValue)).el,l=o.$$("span",{className:"coveo-dynamic-facet-breadcrumb-value-clear"},r.SVGIcons.icons.mainClear).el;s.appendChild(l),o.$$(s).on("click",function(){return t.valueSelectAction(e)}),n.appendChild(s),this.element.appendChild(n)},e.prototype.valueSelectAction=function(e){var t=this;this.facet.deselectValue(e.value),this.facet.enablePreventAutoSelectionFlag(),this.facet.triggerNewQuery(function(){return t.logActionToAnalytics()})},e.prototype.logActionToAnalytics=function(){this.facet.logAnalyticsEvent(s.analyticsActionCauseList.breadcrumbFacet,this.facet.basicAnalyticsFacetMeta)},e.prototype.createAndAppendCollapsedBreadcrumbs=function(e){var t=this,n=i.l("NMore",""+e.length),r=e.map(function(e){return e.value}).join("\n"),s=o.$$("button",{className:"coveo-dynamic-facet-breadcrumb-collapse",type:"button",title:r},n).el;o.$$(s).on("click",function(){o.$$(s).remove(),t.createAndAppendBreadcrumbValues(e)}),this.element.appendChild(s)},e}();t.DynamicFacetBreadcrumbs=u},583:function(e,t){},584:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(514),i=n(6),r=n(585),s=n(226),a=n(72),l=n(586);n(515);var u=n(40),c=function(){function e(e){var t=this;this.facet=e,this.facetSearchController=new r.FacetSearchController(this.facet),this.combobox=new o.Combobox({label:i.l("SearchFacetResults",this.facet.options.title),ariaLive:this.facet.searchInterface.ariaLive,requestValues:function(e){return t.facetSearchController.search(e)},createValuesFromResponse:function(e){return t.createValuesFromResponse(e)},onSelectValue:this.onSelectValue,placeholderText:i.l("Search"),wrapperClassName:"coveo-dynamic-facet-search",clearOnBlur:!0,scrollable:{requestMoreValues:function(){return t.facetSearchController.fetchMoreResults()},areMoreValuesAvailable:function(){return t.facetSearchController.moreValuesAvailable},maxDropdownHeight:250},highlightValueClassName:"coveo-checkbox-span-label"}),this.element=this.combobox.element}return e.prototype.getDisplayValue=function(e){return u.FacetUtils.getDisplayValueFromValueCaption(e,this.facet.options.field,this.facet.options.valueCaption)},e.prototype.createValuesFromResponse=function(e){var t=this;return e.values.map(function(e,n){var o=new s.DynamicFacetValue({value:e.rawValue,displayValue:t.getDisplayValue(e.displayValue),numberOfResults:e.count,state:a.FacetValueState.idle,position:n+1},t.facet,l.DynamicFacetSearchValueRenderer);return{value:o,element:o.renderedElement}})},e.prototype.onSelectValue=function(e){e.value.renderer.selectAction()},e}();t.DynamicFacetSearch=c},585:function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(121),a=n(21),l=n(33),u=n(182),c=function(){function e(e){this.facet=e,this.terms="",this.pageCount=1,this.numberOfValuesMultiplier=3,this.moreValuesAvailable=!0}return e.prototype.getMonthsValueCaptions=function(){for(var e={},t=1;t<=12;t++){e[("0"+t).substr(-2)]=l.DateUtils.monthToString(t-1)}return e},e.prototype.addTypesCaptionsIfNecessary=function(){var e=this.facet.options.field.toLowerCase(),t=a.QueryUtils.isStratusAgnosticField(e,"@filetype"),n=a.QueryUtils.isStratusAgnosticField(e,"@objecttype"),o=a.QueryUtils.isStratusAgnosticField(e,"@month");return t||n?s.FileTypes.getFileTypeCaptions():o?this.getMonthsValueCaptions():{}},Object.defineProperty(e.prototype,"captions",{get:function(){return o({},this.addTypesCaptionsIfNecessary(),this.facet.options.valueCaption)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfValues",{get:function(){return this.facet.options.numberOfValues*this.numberOfValuesMultiplier*this.pageCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){var e=this.facet.options.useLeadingWildcardInFacetSearch?"*":"";return{field:this.facet.fieldName,filterFacetCount:u.determineFilterFacetCount(this.facet.options),numberOfValues:this.numberOfValues,ignoreValues:this.facet.values.activeValues.map(function(e){return e.value}),captions:this.captions,searchContext:this.facet.queryController.getLastQuery(),query:""+e+this.terms+"*"}},enumerable:!0,configurable:!0}),e.prototype.triggerRequest=function(){return i(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,this.facet.queryController.getEndpoint().facetSearch(this.request)];case 1:return e=t.sent(),this.moreValuesAvailable=e.moreValuesAvailable,[2,e]}})})},e.prototype.search=function(e){return this.terms=e,this.pageCount=1,this.triggerRequest()},e.prototype.fetchMoreResults=function(){return this.pageCount++,this.triggerRequest()},e}();t.FacetSearchController=c},586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(516),r=function(){function e(e,t){this.facetValue=e,this.facet=t}return e.prototype.render=function(){this.valueCheckbox=new i.DynamicFacetValueCheckbox(this.facetValue);var e=o.$$(this.valueCheckbox.element).find("button");e.setAttribute("tabindex","-1"),e.setAttribute("inert","true");var t=o.$$(this.valueCheckbox.element);return t.addClass("coveo-dynamic-facet-value"),t.setAttribute("aria-label",e.getAttribute("aria-label")),this.dom=o.$$(this.valueCheckbox.element),this.dom.el},e.prototype.selectAction=function(){var e=this;this.facet.enableFreezeFacetOrderFlag(),this.facet.toggleSelectValue(this.facetValue.value),this.facetValue.select(),this.facet.scrollToTop(),this.facet.triggerNewQuery(function(){return e.facetValue.logSelectActionToAnalytics()})},e}();t.DynamicFacetSearchValueRenderer=r},587:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),i=n(226),r=n(72),s=n(519),a=function(){function e(e){this.facet=e}return e.prototype.getDisplayValue=function(e){return o.FacetUtils.getDisplayValueFromValueCaption(e,this.facet.options.field,this.facet.options.valueCaption)},e.prototype.getDefaultValues=function(){return[]},e.prototype.createFromResponse=function(e,t){return new i.DynamicFacetValue({value:e.value,displayValue:this.getDisplayValue(e.value),numberOfResults:e.numberOfResults,state:e.state,position:t+1},this.facet,s.DynamicFacetValueRenderer)},e.prototype.createFromValue=function(e){var t=this.facet.values.allFacetValues.length+1,n=r.FacetValueState.idle,o=this.getDisplayValue(e);return new i.DynamicFacetValue({value:e,displayValue:o,state:n,numberOfResults:0,position:t},this.facet,s.DynamicFacetValueRenderer)},e}();t.DynamicFacetValueCreator=a},694:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(226),i=n(72),r=n(695),s=n(519),a=function(){function e(e){this.facet=e,this.parser=new r.DynamicFacetRangeValueParser(this.facet)}return e.prototype.getDefaultValues=function(){var e=this;return this.facet.options.ranges.map(function(t,n){return e.createFromRange(t,n)}).filter(function(e){return!!e})},e.prototype.createFromRange=function(e,t){var n=this.parser.validate(e);if(!n)return this.facet.logger.error("Unvalid range for "+this.facet.options.valueFormat+" format",e),null;var r=n.label?n.label:this.parser.formatDisplayValue(n);return new o.DynamicFacetValue({displayValue:r,value:this.parser.formatValue(n),start:n.start,end:n.end,endInclusive:!!n.endInclusive,numberOfResults:0,state:i.FacetValueState.idle,position:t+1},this.facet,s.DynamicFacetValueRenderer)},e.prototype.createFromResponse=function(e,t){var n=this.parser.formatValue(e),i=this.facet.values.get(n).displayValue;return new o.DynamicFacetValue({state:e.state,numberOfResults:e.numberOfResults,start:e.start,end:e.end,endInclusive:e.endInclusive,value:n,displayValue:i,position:t+1},this.facet,s.DynamicFacetValueRenderer)},e.prototype.createFromValue=function(e){var t=this.parser.parse(e);return t?this.createFromRange(t,this.facet.values.allFacetValues.length):(this.facet.logger.error("Facet range value invalid",e),null)},e}();t.DynamicFacetRangeValueCreator=a},695:function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(696),s=n(697),a=n(527),l=n(33),u=n(526),c=n(9),p=n(20),h=n(0),d=function(){function e(e){this.facet=e}return Object.defineProperty(e.prototype,"valueFormat",{get:function(){return this.facet.options.valueFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueSeparator",{get:function(){return this.facet.options.valueSeparator},enumerable:!0,configurable:!0}),e.prototype.parseDateFromRangeType=function(e){var t=l.DateUtils.convertToStandardDate(e);return l.DateUtils.isValid(t)?t:(new c.Logger(this).warn("Date value is not valid",e),null)},e.prototype.formatDisplayValueFromLimit=function(e){switch(this.valueFormat){case u.DynamicFacetRangeValueFormat.number:var t=h.isUndefined(this.facet.options.numberOfDecimals)?s.NumberUtils.countDecimals(""+e):this.facet.options.numberOfDecimals;return i.format(e,"n"+t);case u.DynamicFacetRangeValueFormat.currency:return p.CurrencyUtils.currencyToString(parseFloat(""+e),{symbol:this.facet.options.currencySymbol,decimals:s.NumberUtils.countDecimals(""+e)?2:0});case u.DynamicFacetRangeValueFormat.date:return l.DateUtils.dateToString(this.parseDateFromRangeType(e),{alwaysIncludeTime:!1,includeTimeIfThisWeek:!1,includeTimeIfToday:!1,omitYearIfCurrentOne:!1,useTodayYesterdayAndTomorrow:!1,useWeekdayIfThisWeek:!1});default:return""+e}},e.prototype.formatDisplayValue=function(e){var t=this.formatDisplayValueFromLimit(e.start),n=this.formatDisplayValueFromLimit(e.end);return t+" "+this.valueSeparator+" "+n},e.prototype.validateRangeLimit=function(e){switch(this.valueFormat){case u.DynamicFacetRangeValueFormat.number:case u.DynamicFacetRangeValueFormat.currency:return this.validateNumberValue(e);case u.DynamicFacetRangeValueFormat.date:return this.validateDateValue(e);default:return""+e}},e.prototype.validateNumberValue=function(e){var t=parseFloat(""+e);return isNaN(t)?null:t},e.prototype.validateDateValue=function(e){var t=l.DateUtils.dateTimeForQuery(this.parseDateFromRangeType(e));return"Invalid date"===t?null:t},e.prototype.validate=function(e){var t=this.validateRangeLimit(e.start),n=this.validateRangeLimit(e.end);return a.isNull(t)||a.isNull(n)?null:o({},e,{start:t,end:n})},e.prototype.formatValue=function(e){var t=e.endInclusive?r.RangeEndScope.Inclusive:r.RangeEndScope.Exclusive;return e.start+".."+e.end+t},e.prototype.parse=function(e){var t=new RegExp("^(.+)\\.\\.(.+)("+r.RangeEndScope.Inclusive+"|"+r.RangeEndScope.Exclusive+")$"),n=t.exec(e);if(!n)return null;var o=this.validateRangeLimit(n[1]),i=this.validateRangeLimit(n[2]);return a.isNull(o)||a.isNull(i)?null:{start:o,end:i,endInclusive:n[3]===r.RangeEndScope.Inclusive}},e}();t.DynamicFacetRangeValueParser=d},696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Inclusive="inc",e.Exclusive="exc"}(t.RangeEndScope||(t.RangeEndScope={}))},697:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(527),i=function(){function e(){}return e.countDecimals=function(e){var t=/^\d+\.?([\d]*)$/.exec(""+e);return o.isNull(t)?0:t[1].length},e}();t.NumberUtils=i},698:function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},699:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},700:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(518),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.buildFacetRequest=function(){return i({},this.requestBuilder.buildBaseRequestForQuery(),{currentValues:this.currentValues,numberOfValues:this.numberOfValues,freezeCurrentValues:!1,sortCriteria:this.facet.options.sortOrder,generateAutomaticRanges:!this.manualRangesAreDefined})},Object.defineProperty(t.prototype,"numberOfValues",{get:function(){return this.manualRangesAreDefined?this.facet.options.ranges.length:this.facet.options.numberOfValues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"manualRangesAreDefined",{get:function(){return!!this.facet.options.ranges.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentValues",{get:function(){return this.manualRangesAreDefined||this.facet.hasActiveValues?this.facet.values.allFacetValues.map(function(e){return{start:e.start,end:e.end,endInclusive:e.endInclusive,state:e.state}}):[]},enumerable:!0,configurable:!0}),t}(r.DynamicFacetQueryController);t.DynamicFacetRangeQueryController=s},701:function(e,t,n){"use strict";function o(e){return!!i[e]}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.ascending="ascending",e.descending="descending"}(i=t.FacetRangeSortOrder||(t.FacetRangeSortOrder={})),t.isFacetRangeSortOrder=o},72:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.idle="idle",e.selected="selected"}(t.FacetValueState||(t.FacetValueState={}))},85:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(8);t.ResponsiveFacetOptions={enableResponsiveMode:o.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"ResponsiveOptions"}),responsiveBreakpoint:o.ComponentOptions.buildNumberOption({deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option. Instead, use `SearchInterface.options.responsiveMediumBreakpoint` options exposed on the `SearchInterface`."}),dropdownHeaderLabel:o.ComponentOptions.buildLocalizedStringOption({section:"ResponsiveOptions"})}},86:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=n(8),s=n(3),a=n(20),l=n(2),u=function(e){function t(n,o,i){var s=e.call(this,n,t.ID,i)||this;if(s.element=n,s.options=r.ComponentOptions.initComponentOptions(n,t,o),s.options.preventScrolling){var a=s.options.scrollContainer||s.searchInterface.element;s.options.scrollContainer=r.ComponentOptions.findParentScrollLockable(a)}return s}return o(t,e),t.ID="FacetsMobileMode",t.options={breakpoint:r.ComponentOptions.buildNumberOption(),isModal:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),displayOverlayWhileOpen:r.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return a.Utils.isNullOrUndefined(e)?!t.isModal:e}}),preventScrolling:r.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return a.Utils.isNullOrUndefined(e)?t.isModal:e}}),scrollContainer:r.ComponentOptions.buildChildHtmlElementOption({depend:"preventScrolling"})},t.doExport=function(){s.exportGlobally({FacetsMobileMode:t})},t}(i.Component);t.FacetsMobileMode=u,l.Initialization.registerAutoCreateComponent(u)},93:function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}l((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){l.label=n[1];break}if(6===n[0]&&l.label<s[1]){l.label=s[1],s=n;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(n);break}s[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0}),n(528),n(529),n(530);var s=n(0),a=n(11),l=n(134),u=n(29),c=n(3),p=n(5),h=n(31),d=n(18),f=n(13),m=n(24),y=n(1),g=n(97),v=n(4),b=n(10),C=n(7),O=n(8),F=n(2),S=n(177),R=n(63),w=n(531),V=n(474),T=n(472),A=n(123),D=n(470),E=n(68),I=n(96),_=n(532),x=n(533),$=n(215),L=n(534),M=n(118),P=n(473);V.CoreHelpers.exportAllHelpersGlobally(window.Coveo);var H=function(e){function t(n,o,i,r){void 0===r&&(r=t.ID);var s=e.call(this,n,r,i)||this;return s.element=n,s.options=o,s.bindings=i,s.currentlyDisplayedResults=[],s.reachedTheEndOfResults=!1,s.disableLayoutChange=!1,s.successiveScrollCount=0,s.options=O.ComponentOptions.initComponentOptions(n,t,o),p.Assert.exists(n),p.Assert.exists(s.options),p.Assert.exists(s.options.resultTemplate),p.Assert.exists(s.options.infiniteScrollContainer),s.showOrHideElementsDependingOnState(!1,!1),s.addListeners(),s.resultContainer=s.initResultContainer(),p.Assert.exists(s.options.resultsContainer),s.initWaitAnimationContainer(),p.Assert.exists(s.options.waitAnimationContainer),s.setupTemplatesVersusLayouts(),y.$$(s.root).on(l.ResultLayoutEvents.populateResultLayout,function(e,t){return t.layouts.push(s.options.layout)}),s.setupRenderer(),s.makeElementFocusable(),s.ensureHasId(),s}return o(t,e),t.getDefaultTemplate=function(e){var n=t.loadTemplatesFromCache();if(null!=n)return n;var o=C.Component.get(e);return Coveo.Recommendation&&o.searchInterface instanceof Coveo.Recommendation?new T.DefaultRecommendationTemplate:new A.DefaultResultTemplate},t.loadTemplatesFromCache=function(){var e=E.TemplateCache.getResultListTemplateNames();return e.length>0?new I.TemplateList(s.compact(s.map(e,function(e){return E.TemplateCache.getTemplate(e)}))):null},t.prototype.addListeners=function(){var e=this;this.bind.onRootElement(a.QueryEvents.newQuery,function(t){return e.handleNewQuery()}),this.bind.onRootElement(a.QueryEvents.buildingQuery,function(t){return e.handleBuildingQuery(t)}),this.bind.onRootElement(a.QueryEvents.querySuccess,function(t){return e.handleQuerySuccess(t)}),this.bind.onRootElement(a.QueryEvents.fetchMoreSuccess,function(t){return e.handleFetchMoreSuccess(t)}),this.bind.onRootElement(a.QueryEvents.duringQuery,function(t){return e.handleDuringQuery()}),this.bind.onRootElement(a.QueryEvents.queryError,function(t){return e.handleQueryError()}),y.$$(this.root).on(u.ResultListEvents.changeLayout,function(t,n){return e.handleChangeLayout(n)}),this.options.enableInfiniteScroll?this.addInfiniteScrollListeners():this.addPagerListeners()},t.prototype.addInfiniteScrollListeners=function(){var e=this;this.bind.on(this.options.infiniteScrollContainer,"scroll",function(){e.successiveScrollCount=0,e.handleScrollOfResultList()}),this.bind.onRootElement(a.QueryEvents.deferredQuerySuccess,function(){setTimeout(function(){e.scrollToTopIfEnabled()},0)})},t.prototype.addPagerListeners=function(){var e=this;this.bind.onQueryState(d.MODEL_EVENTS.CHANGE_ONE,f.QUERY_STATE_ATTRIBUTES.FIRST,function(){e.bind.oneRootElement(a.QueryEvents.deferredQuerySuccess,function(){setTimeout(function(){e.scrollToTopIfEnabled()},0)})})},t.prototype.getAutoSelectedFieldsToInclude=function(){return s.chain(this.options.resultTemplate.getFields()).concat(this.getMinimalFieldsToInclude()).compact().unique().value()},t.prototype.setupTemplatesVersusLayouts=function(){var e=this,t="coveo-"+this.options.layout+"-layout-container";this.resultContainer.addClass(t),"table"===this.options.layout&&(this.options.resultTemplate=new D.TableTemplate(this.options.resultTemplate.templates||[])),this.options.resultTemplate instanceof I.TemplateList?s.each(this.options.resultTemplate.templates,function(t){t.layout||(t.layout=e.options.layout)}):this.options.resultTemplate instanceof A.DefaultResultTemplate&&"list"==this.options.layout&&w.ResponsiveDefaultResultTemplate.init(this.root,this,{})},t.prototype.renderResults=function(e,t){var n=this;return void 0===t&&(t=!1),t||this.resultContainer.empty(),this.renderer.renderResults(e,t,this.triggerNewResultDisplayed.bind(this)).then(function(){return n.triggerNewResultsDisplayed()})},t.prototype.buildResults=function(e){var t=this.options.layout;return this.templateToHtml.buildResults(e,t,this.currentlyDisplayedResults)},t.prototype.buildResult=function(e){var t=this.options.layout;return this.templateToHtml.buildResult(e,t,this.currentlyDisplayedResults)},t.prototype.displayMoreResults=function(e){return p.Assert.isLargerOrEqualsThan(1,e),this.isCurrentlyFetchingMoreResults()?void this.logger.warn("Ignoring request to display more results since we're already doing so"):this.hasPotentiallyMoreResultsToDisplay()?(this.options.enableInfiniteScrollWaitingAnimation&&this.showWaitingAnimationForInfiniteScrolling(),this.fetchAndRenderMoreResults(e)):void this.logger.warn("Ignoring request to display more results since we know there aren't more to display")},Object.defineProperty(t.prototype,"templateToHtml",{get:function(){var e={resultTemplate:this.options.resultTemplate,searchInterface:this.searchInterface,queryStateModel:this.queryStateModel};return new P.TemplateToHtml(e)},enumerable:!0,configurable:!0}),t.prototype.getDisplayedResults=function(){return this.currentlyDisplayedResults},t.prototype.getDisplayedResultsElements=function(){return this.resultContainer.getResultElements()},t.prototype.enable=function(){this.disableLayoutChange=!1,this.resultLayoutSelectors.length>0?this.enableBasedOnActiveLayouts():(e.prototype.enable.call(this),y.$$(this.element).removeClass("coveo-hidden"))},t.prototype.disable=function(){var t=this;e.prototype.disable.call(this);var n=s.map(this.otherResultLists,function(e){return e.options.layout});s.contains(n,this.options.layout)||this.disableLayoutChange||s.each(this.resultLayoutSelectors,function(e){e.disableLayouts([t.options.layout])}),this.disableLayoutChange=!1,y.$$(this.element).addClass("coveo-hidden")},t.prototype.autoCreateComponentsInsideResult=function(e,t){return this.templateToHtml.autoCreateComponentsInsideResult(e,t)},t.prototype.triggerNewResultDisplayed=function(e,t){var n={result:e,item:t};y.$$(this.element).trigger(u.ResultListEvents.newResultDisplayed,n)},t.prototype.triggerNewResultsDisplayed=function(){var e={isInfiniteScrollEnabled:this.options.enableInfiniteScroll};y.$$(this.element).trigger(u.ResultListEvents.newResultsDisplayed,e)},t.prototype.fetchAndRenderMoreResults=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(o){switch(o.label){case 0:this.fetchingMoreResults=this.queryController.fetchMore(e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.fetchingMoreResults];case 2:return t=o.sent(),p.Assert.exists(t),this.usageAnalytics.logCustomEvent(b.analyticsActionCauseList.pagerScrolling,{},this.element),this.renderNewResults(t),this.resetStateAfterFetchingMoreResults(),[2,t];case 3:return n=o.sent(),this.resetStateAfterFetchingMoreResults(),[2,Promise.reject(n)];case 4:return[2]}})})},t.prototype.renderNewResults=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(o){switch(o.label){case 0:return[4,this.buildResults(e)];case 1:return t=o.sent(),this.renderResults(t,!0),(n=this.currentlyDisplayedResults).push.apply(n,e.results),[2]}})})},t.prototype.resetStateAfterFetchingMoreResults=function(){var e=this;this.hideWaitingAnimationForInfiniteScrolling(),this.fetchingMoreResults=void 0,h.Defer.defer(function(){e.successiveScrollCount++,e.successiveScrollCount<=t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS?e.handleScrollOfResultList():e.logger.info("Result list has triggered 5 consecutive queries to try and fill up the scrolling container, but it is still unable to do so.\n          Try explicitly setting the 'data-infinite-scroll-container-selector' option on the result list. See: https://coveo.github.io/search-ui/components/resultlist.html#options.infinitescrollcontainer")})},t.prototype.handleDuringQuery=function(){this.logger.trace("Emptying the result container"),this.cancelFetchingMoreResultsIfNeeded(),this.showWaitingAnimation(),this.showOrHideElementsDependingOnState(!1,!1)},t.prototype.handleQueryError=function(){this.hideWaitingAnimation(),this.resultContainer.empty(),this.currentlyDisplayedResults=[],this.reachedTheEndOfResults=!0},t.prototype.handleQuerySuccess=function(e){var n=this;p.Assert.exists(e),p.Assert.exists(e.results);var o=e.results;this.logger.trace("Received query results from new query",o),this.hideWaitingAnimation(),t.resultCurrentlyBeingRendered=void 0,this.currentlyDisplayedResults=[],this.buildResults(e.results).then(function(t){return i(n,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,this.renderResults(t)];case 1:return n.sent(),this.showOrHideElementsDependingOnState(!0,0!=this.currentlyDisplayedResults.length),m.DeviceUtils.isMobileDevice()&&void 0!=this.options.mobileScrollContainer&&(this.options.mobileScrollContainer.scrollTop=0),this.options.enableInfiniteScroll&&o.results.length==e.queryBuilder.numberOfResults&&(this.scrollToTopIfEnabled(),this.handleScrollOfResultList()),[2]}})})}),this.handleQueryOrFetchMoreSuccess(e.query,o)},t.prototype.handleFetchMoreSuccess=function(e){this.handleQueryOrFetchMoreSuccess(e.query,e.results)},t.prototype.handleQueryOrFetchMoreSuccess=function(e,t){var n=(e.firstResult||0)+t.results.length;this.reachedTheEndOfResults=n>=t.totalCountFiltered},t.prototype.handleScrollOfResultList=function(){!this.isCurrentlyFetchingMoreResults()&&this.options.enableInfiniteScroll&&this.isScrollingOfResultListAlmostAtTheBottom()&&this.hasPotentiallyMoreResultsToDisplay()&&this.displayMoreResults(this.options.infiniteScrollPageSize)},t.prototype.scrollToTopIfEnabled=function(){this.options.enableScrollToTop&&M.ResultListUtils.scrollToTop(this.root)},t.prototype.handleNewQuery=function(){y.$$(this.element).removeClass("coveo-hidden"),t.resultCurrentlyBeingRendered=void 0},Object.defineProperty(t.prototype,"otherResultLists",{get:function(){var e=this.searchInterface.getComponents(t.ID);return s.without(e,this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resultLayoutSelectors",{get:function(){return this.searchInterface.getComponents("ResultLayoutSelector")},enumerable:!0,configurable:!0}),t.prototype.handleBuildingQuery=function(e){if(e.queryBuilder.addFieldsToInclude(this.getMinimalFieldsToInclude()),null!=this.options.fieldsToInclude&&e.queryBuilder.addFieldsToInclude(s.map(this.options.fieldsToInclude,function(e){return e.substr(1)})),this.options.autoSelectFieldsToInclude){var t=s.flatten(s.map(this.otherResultLists,function(e){return e.getAutoSelectedFieldsToInclude()}));e.queryBuilder.addRequiredFields(s.unique(t.concat(this.getAutoSelectedFieldsToInclude()))),e.queryBuilder.includeRequiredFields=!0}},t.prototype.handleChangeLayout=function(e){var t=this;e.layout===this.options.layout?(this.disableLayoutChange=!1,this.enable(),this.options.resultTemplate.layout=this.options.layout,e.results&&(this.resultContainer.isEmpty()&&new S.InitializationPlaceholder(this.root).withVisibleRootElement().withPlaceholderForResultList(),h.Defer.defer(function(){return i(t,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return[4,this.buildResults(e.results)];case 1:return t=n.sent(),this.renderResults(t),this.showOrHideElementsDependingOnState(!0,0!==this.currentlyDisplayedResults.length),[2]}})})}))):(this.disableLayoutChange=!0,this.disable(),this.resultContainer.empty())},t.prototype.isCurrentlyFetchingMoreResults=function(){return v.Utils.exists(this.fetchingMoreResults)},t.prototype.getMinimalFieldsToInclude=function(){return["author","language","urihash","objecttype","collection","source","language","permanentid"]},t.prototype.isScrollingOfResultListAlmostAtTheBottom=function(){var e;try{e=this.options.infiniteScrollContainer instanceof Window}catch(t){e=!1}return e?this.isScrollAtBottomForWindowElement():this.isScrollAtBottomForHtmlElement()},t.prototype.isScrollAtBottomForWindowElement=function(){var e=new y.Win(window),t=e.height(),n=e.scrollY();return new y.Doc(document).height()-(t+n)<t/2},t.prototype.isScrollAtBottomForHtmlElement=function(){var e=this.options.infiniteScrollContainer,t=e.clientHeight;return e.scrollHeight-(e.scrollTop+t)<t/2},t.prototype.hasPotentiallyMoreResultsToDisplay=function(){return this.currentlyDisplayedResults.length>0&&!this.reachedTheEndOfResults},t.prototype.cancelFetchingMoreResultsIfNeeded=function(){this.isCurrentlyFetchingMoreResults()&&(this.logger.trace("Cancelling fetching more results"),Promise.reject(this.fetchingMoreResults),this.fetchingMoreResults=void 0)},t.prototype.showOrHideElementsDependingOnState=function(e,t){var n=y.$$(this.element).findAll(".coveo-show-if-query"),o=y.$$(this.element).findAll(".coveo-show-if-no-query"),i=y.$$(this.element).findAll(".coveo-show-if-results"),r=y.$$(this.element).findAll(".coveo-show-if-no-results");s.each(n,function(t){y.$$(t).toggle(e)}),s.each(o,function(t){y.$$(t).toggle(!e)}),s.each(i,function(n){y.$$(n).toggle(e&&t)}),s.each(r,function(n){y.$$(n).toggle(e&&!t)})},Object.defineProperty(t.prototype,"waitAnimation",{get:function(){return this.options.waitAnimation.toLowerCase()},enumerable:!0,configurable:!0}),t.prototype.showWaitingAnimation=function(){switch(this.waitAnimation){case"fade":y.$$(this.options.waitAnimationContainer).addClass("coveo-fade-out");break;case"spinner":this.resultContainer.hideChildren(),void 0==y.$$(this.options.waitAnimationContainer).find(".coveo-wait-animation")&&this.options.waitAnimationContainer.appendChild(g.DomUtils.getBasicLoadingAnimation())}},t.prototype.hideWaitingAnimation=function(){switch(this.waitAnimation){case"fade":y.$$(this.options.waitAnimationContainer).removeClass("coveo-fade-out");break;case"spinner":var e=y.$$(this.options.waitAnimationContainer).find(".coveo-loading-spinner");e&&y.$$(e).detach()}},t.prototype.showWaitingAnimationForInfiniteScrolling=function(){var e=g.DomUtils.getLoadingSpinner();if("card"==this.options.layout&&this.options.enableInfiniteScroll){var t=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");s.each(t,function(e){return y.$$(e).remove()});var n=y.$$("div",{className:"coveo-loading-spinner-container"});n.append(e),this.options.waitAnimationContainer.appendChild(n.el)}else this.options.waitAnimationContainer.appendChild(g.DomUtils.getLoadingSpinner())},t.prototype.hideWaitingAnimationForInfiniteScrolling=function(){var e=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner"),t=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");s.each(e,function(e){return y.$$(e).remove()}),s.each(t,function(e){return y.$$(e).remove()})},t.prototype.initResultContainer=function(){if(!this.options.resultsContainer){var e="table"===this.options.layout?"table":"div";this.options.resultsContainer=y.$$(e,{className:"coveo-result-list-container"}).el,this.initResultContainerAddToDom()}return new _.ResultContainer(this.options.resultsContainer,this.searchInterface)},t.prototype.initResultContainerAddToDom=function(){this.element.appendChild(this.options.resultsContainer)},t.prototype.initWaitAnimationContainer=function(){this.options.waitAnimationContainer||(this.options.waitAnimationContainer=this.resultContainer.el)},t.prototype.setupRenderer=function(){var e={options:this.searchInterface.options.originalOptionsObject,bindings:this.bindings},t=function(t){return F.Initialization.automaticallyCreateComponentsInside(t,e)};switch(this.options.layout){case"card":this.renderer=new x.ResultListCardRenderer(this.options,t);break;case"table":this.renderer=new L.ResultListTableRenderer(this.options,t);break;case"list":default:this.renderer=new $.ResultListRenderer(this.options,t)}},t.prototype.makeElementFocusable=function(){y.$$(this.element).setAttribute("tabindex","-1")},t.prototype.ensureHasId=function(){""===this.element.id&&(this.element.id=s.uniqueId("coveo-result-list"))},t.prototype.enableBasedOnActiveLayouts=function(){var t=this;s.each(this.resultLayoutSelectors,function(n){s.find(n.activeLayouts,function(e,n){return n==t.options.layout})&&(e.prototype.enable.call(t),n.enableLayouts([t.options.layout]),y.$$(t.element).removeClass("coveo-hidden"))})},t.ID="ResultList",t.doExport=function(){c.exportGlobally({ResultList:t})},t.options={resultsContainer:O.ComponentOptions.buildChildHtmlElementOption({alias:"resultContainerSelector"}),resultTemplate:R.TemplateComponentOptions.buildTemplateOption({defaultFunction:t.getDefaultTemplate}),waitAnimation:O.ComponentOptions.buildStringOption({defaultValue:"none"}),waitAnimationContainer:O.ComponentOptions.buildChildHtmlElementOption({postProcessing:function(e,t){return e||t.resultsContainer}}),enableInfiniteScroll:O.ComponentOptions.buildBooleanOption({defaultValue:!1}),infiniteScrollPageSize:O.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableInfiniteScroll"}),infiniteScrollContainer:O.ComponentOptions.buildChildHtmlElementOption({depend:"enableInfiniteScroll",defaultFunction:function(e){return O.ComponentOptions.findParentScrolling(e)}}),enableInfiniteScrollWaitingAnimation:O.ComponentOptions.buildBooleanOption({depend:"enableInfiniteScroll",defaultValue:!0}),mobileScrollContainer:O.ComponentOptions.buildSelectorOption({defaultFunction:function(){return document.querySelector(".coveo-results-column")}}),autoSelectFieldsToInclude:O.ComponentOptions.buildBooleanOption({defaultValue:!1}),fieldsToInclude:O.ComponentOptions.buildFieldsOption({includeInResults:!0}),layout:O.ComponentOptions.buildStringOption({defaultValue:"list",required:!0}),enableScrollToTop:O.ComponentOptions.buildBooleanOption({defaultValue:!0})},t.resultCurrentlyBeingRendered=null,t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS=5,t}(C.Component);t.ResultList=H,F.Initialization.registerAutoCreateComponent(H)}});
//# sourceMappingURL=DynamicFacetRange.min__68495910d636fb25ab11.js.map