UNPKG

coveo-search-ui

Version:

Coveo JavaScript Search Framework

1 lines • 240 kB
webpackJsonpCoveo__temporary([7,1,3,19],{118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),o=n(93),s=n(1),r=n(0),a=n(9),l=function(){function e(){}return e.hideIfInfiniteScrollEnabled=function(t){e.isInfiniteScrollEnabled(t.searchInterface.element)?(t.disable(),s.$$(t.element).hide(),e.warnIfComponentNotNeeded(t)):(t.enable(),s.$$(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 i=n.searchInterface.element.getBoundingClientRect().top;i>0||window.scrollTo(0,window.pageYOffset+i)},e.getMainResultList=function(t){var n=e.getResultLists(t);return r.find(n,function(e){var t=e.searchInterface.element.classList.contains("CoveoRecommendation");return!e.disabled&&!t})},e.getResultLists=function(t){return s.$$(t).findAll("."+e.cssClass()).map(function(e){return i.Component.get(e,o.ResultList)})},e.cssClass=function(){return i.Component.computeCssClassName(o.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=i.Component.computeCssClassNameForType(t.type),o="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(o)},e}();t.ResultListUtils=l},119:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(4),s=n(23),r=n(0),a=function(){function e(){this.selected=!1,this.excluded=!1,this.waitingForDelta=!1}return e.prototype.reset=function(){this.selected=!1,this.excluded=!1},e.prototype.updateCountsFromNewValue=function(e){i.Assert.exists(e),this.occurrences=e.occurrences,this.delta=e.delta,this.computedField=e.computedField},e.prototype.clone=function(){return this.computedField=void 0,this.delta=void 0,this},e.prototype.cloneWithZeroOccurrences=function(){return this.occurrences=0,this.clone()},e.prototype.cloneWithDelta=function(e,t){i.Assert.isLargerOrEqualsThan(0,e);var n=this.cloneWithZeroOccurrences();return n.delta=t,n.occurrences=e,n},e.prototype.getFormattedCount=function(){var e=void 0;return o.Utils.exists(this.delta)&&this.delta>0?e="+"+s.format(this.delta,"n0"):this.occurrences>0&&(e=s.format(this.occurrences,"n0")),e},e.prototype.getFormattedComputedField=function(e){return 0!=this.computedField?s.format(this.computedField,e):void 0},e.create=function(t){if(r.isString(t))return e.createFromValue(t);if(r.isObject(t))return"computedFieldResults"in t?e.createFromGroupByValue(t):e.createFromFieldValue(t);throw new Error("Can't create value from "+t)},e.createFromValue=function(t){i.Assert.isNonEmptyString(t);var n=new e;return n.value=t,n.lookupValue=t,n},e.createFromGroupByValue=function(t){i.Assert.exists(t),i.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=o.Utils.exists(t.lookupValue)?t.lookupValue:t.value,n.occurrences=t.numberOfResults,n.computedField=o.Utils.isNonEmptyArray(t.computedFieldResults)?t.computedFieldResults[0]:void 0,n.score=t.score,n},e.createFromFieldValue=function(t){i.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=t.lookupValue,n.occurrences=t.numberOfResults,n},e}();t.FacetValue=a},131:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(94),o=function(){function e(){}return e.shouldDrawFacetSlider=function(e,t){return i.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=o},132:function(e,t,n){"use strict";var i=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(477),s=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.facet=t,o.facetValue=n,o.keepDisplayedValueNextTime=i,o}return i(t,e),t.prototype.bindEvent=function(){e.prototype.bindEvent.call(this,{displayNextTime:this.keepDisplayedValueNextTime,pinFacet:this.facet.options.preservePosition})},t}(o.ValueElement);t.FacetValueElement=s},173:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(40),s=n(49),r=n(1),a=n(0),l=n(476),c=function(){function e(e){this.facet=e,this.valueToSearch="",this.alwaysInclude=[],this.alwaysExclude=[],this.sortCriteria="occurrences",this.fetchMore=!1,this.completeFacetWithStandardValues=!0,this.nbResults=e.options.numberOfValuesInFacetSearch,this.ignoreAccents=e.options.facetSearchIgnoreAccents}return e.prototype.setValueToSearch=function(e){return this.valueToSearch=e,i.Utils.isNonEmptyString(e)&&(this.valueToSearch=this.valueToSearch.trim(),this.alwaysInclude=this.alwaysInclude.concat(o.FacetUtils.getValuesToUseForSearchInFacet(this.valueToSearch,this.facet))),this},e.prototype.excludeCurrentlyDisplayedValuesInSearch=function(e){var t=this;a.each(this.getCurrentlyShowedValueInSearch(e),function(e){var n=o.FacetUtils.getValuesToUseForSearchInFacet(e,t.facet);a.each(n,function(e){t.alwaysExclude.push(e)})}),a.each(this.facet.getDisplayedFacetValues(),function(e){t.alwaysExclude.push(e.value)})},e.prototype.getGroupByRequest=function(){this.lowerCaseAll();var e=this.nbResults;e+=this.alwaysExclude.length;var t=[];this.valueToSearch&&(t=["*"+this.valueToSearch+"*"]);var n;n=this.valueToSearch?t.concat(this.alwaysInclude).concat(this.alwaysExclude):a.compact(t.concat(this.alwaysInclude).concat(this.facet.options.allowedValues));var i=this.completeFacetWithStandardValues;null!=this.facet.options.lookupField&&(i=!1);var o={allowedValues:n,allowedValuesPatternType:this.facet.options.useWildcardsInFacetSearch?l.AllowedValuesPatternType.Wildcards:l.AllowedValuesPatternType.Legacy,maximumNumberOfValues:e,completeFacetWithStandardValues:i,field:this.facet.options.field,sortCriteria:this.facet.options.sortCriteria||this.sortCriteria,injectionDepth:this.facet.options.injectionDepth};return this.facet.options.lookupField&&(o.lookupField=this.facet.options.lookupField),this.facet.options.computedField&&(o.computedFields=[{field:this.facet.options.computedField,operation:this.facet.options.computedFieldOperation}]),o},e.prototype.getQuery=function(){var e=a.clone(this.facet.queryController.getLastQuery());return e||(e=(new s.QueryBuilder).build()),e.enableQuerySyntax?e.q=this.facet.facetQueryController.basicExpressionToUseForFacetSearch:i.Utils.isNonEmptyString(this.facet.facetQueryController.basicExpressionToUseForFacetSearch)?e.q="<@- "+this.facet.facetQueryController.basicExpressionToUseForFacetSearch+" -@>":e.q="",e.enableQuerySyntax=!0,e.cq=this.facet.facetQueryController.constantExpressionToUseForFacetSearch,e.aq=this.facet.facetQueryController.advancedExpressionToUseForFacetSearch,e.enableDidYouMean=!1,e.firstResult=0,e.numberOfResults=0,e.fieldsToInclude=[],e.groupBy=[this.getGroupByRequest()],e},e.prototype.getCurrentlyShowedValueInSearch=function(e){return a.map(r.$$(e).findAll(".coveo-facet-value-caption"),function(e){return r.$$(e).getAttribute("data-original-value")||r.$$(e).text()})},e.prototype.lowerCaseAll=function(){this.alwaysExclude=a.chain(this.alwaysExclude).map(function(e){return e.toLowerCase()}).uniq().value(),this.alwaysInclude=a.chain(this.alwaysInclude).map(function(e){return e.toLowerCase()}).uniq().value()},e}();t.FacetSearchParameters=c},174:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(20),s=n(47),r=n(1),a=n(17),l=function(){function e(e){var t=this;this.facet=e,r.$$(this.facet.ref.searchInterface.element).on(o.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;r.$$(this.facet.ref.element).addClass("coveo-hidden-dependant-facet"),this.parentFacetRef=this.getParentFacet(this.facet.ref),this.parentFacetRef&&r.$$(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&&i.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(o.QueryStateModel.getFacetId(e));return!!t&&!!t.length},Object.defineProperty(e.prototype,"allFacetsInInterface",{get:function(){return s.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 r.$$(t.element).removeClass("coveo-hidden-dependant-facet"),t.enable();t.disable(),r.$$(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},175:function(e,t,n){"use strict";var i=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(216),s=n(70),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.init=function(e,n,i){o.ResponsiveFacetColumn.init(t,e,n,i,s.Facet.ID)},t}(o.ResponsiveFacetColumn);t.ResponsiveFacets=r},190:function(e,t,n){"use strict";var i=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(70),r=n(8),a=n(122),l=n(573),c=n(2),u=n(23),h=n(3),p=n(85),d=n(175),f=n(0),m=function(e){function t(n,i,o){var s=e.call(this,n,r.ComponentOptions.initComponentOptions(n,t,i),o,t.ID)||this;return s.element=n,s.isFieldValueCompatible=!1,s.options.enableFacetSearch=!1,s.options.enableSettings=!1,s.options.includeInOmnibox=!1,s.options.enableMoreLess=!1,d.ResponsiveFacets.init(s.root,s,s.options),s}return i(t,e),t.prototype.getValueCaption=function(t){return this.options.valueCaption||this.isLabelSpecifiedForValue(t)?e.prototype.getValueCaption.call(this,t):this.translateValuesFromFormat(t)},t.prototype.isLabelSpecifiedForValue=function(e){return this.options.ranges&&!!f.find(this.options.ranges,function(t){return!f.isUndefined(t.label)&&t.label===e.lookupValue})},t.prototype.initFacetQueryController=function(){this.facetQueryController=new l.FacetRangeQueryController(this)},t.prototype.processNewGroupByResults=function(t){var n=this;null!=t&&null==this.options.ranges&&t.values.sort(function(e,t){return n.sortRangeGroupByResults(e.value,t.value)}),e.prototype.processNewGroupByResults.call(this,t)},t.prototype.sortRangeGroupByResults=function(e,t){var n,i,o=this.extractStartAndEndValue(e),s=this.extractStartAndEndValue(t);return n=o?o.start:e,i=s?s.start:t,this.options.dateField?Date.parse(n)-Date.parse(i):Number(n)-Number(i)},t.prototype.translateValuesFromFormat=function(e){var t=this.extractStartAndEndValue(e.lookupValue||e.value);return t?this.formatValue(t.start)+" - "+this.formatValue(t.end):null},t.prototype.extractStartAndEndValue=function(e){var t=/^(.*)\.\.(.*)$/.exec(e);return null==t?null:{start:t[1],end:t[2]}},t.prototype.formatValue=function(e){var t=!!e.match(/^[\+\-]?[0-9]+(\.[0-9]+)?$/);return this.options.dateField||!t?this.formatDateValue(e):this.formatNumberValue(Number(e))},t.prototype.formatDateValue=function(e){return a.TemplateHelpers.getHelper("dateTime")(e,{alwaysIncludeTime:!1,includeTimeIfThisWeek:!1,includeTimeIfToday:!1,omitYearIfCurrentOne:!1,useTodayYesterdayAndTomorrow:!1,useWeekdayIfThisWeek:!1})},t.prototype.formatNumberValue=function(e){return u.format(e,this.options.valueFormat)},t.ID="FacetRange",t.parent=s.Facet,t.doExport=function(){h.exportGlobally({FacetRange:t})},t.options=o({dateField:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),ranges:r.ComponentOptions.buildJsonOption(),valueFormat:r.ComponentOptions.buildStringOption({defaultValue:"n0"})},p.ResponsiveFacetOptions),t}(s.Facet);t.FacetRange=m,c.Initialization.registerAutoCreateComponent(m)},215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),o=n(0),s=function(){function e(e,t){this.resultListOptions=e,this.autoCreateComponentsFn=t}return e.prototype.renderResults=function(e,t,n){var s=this;return void 0===t&&(t=!1),Promise.all([this.getStartFragment(e,t),this.getEndFragment(e,t)]).then(function(t){var r=t[0],a=t[1],l=document.createDocumentFragment();r&&l.appendChild(r),o.each(e,function(e){l.appendChild(e),n(i.Component.getResult(e),e)}),a&&l.appendChild(a),s.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=s},216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(536);var i=n(11),o=n(9),s=n(6),r=n(1),a=n(4),l=n(7),c=n(19),u=n(55),h=n(62),p=n(131),d=n(124),f=n(94),m=n(136),y=n(0),g=n(47),v=n(537),b=n(86),S=n(538),C=function(){function e(e,t,n,i){this.coveoRoot=e,this.ID=t,this.componentsInFacetColumn=[],this.preservePositionOriginalValues=[],this.searchInterface=l.Component.get(this.coveoRoot.el,c.SearchInterface,!1),this.dropdownHeaderLabel=this.getDropdownHeaderLabel(),this.dropdown=this.buildDropdown(i),this.bindDropdownContentEvents(),this.bindFacetsMobileModeEvents(),this.registerOnCloseHandler(),this.registerQueryEvents(),this.initializeBreakpoint(n.responsiveBreakpoint)}return e.init=function(t,n,i,o,s){this.findColumn(n)&&(h.ResponsiveComponentsManager.register(e,r.$$(n),"ResponsiveFacetColumn",i,o),h.ResponsiveComponentsManager.register(t,r.$$(n),s,i,o))},e.findColumn=function(e){var t=r.$$(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()&&!p.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)?this.changeToSmallMode():!this.needSmallMode()&&p.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 u.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(),r.$$(this.coveoRoot.find("."+h.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS)).append(this.dropdown.dropdownHeader.element.el),p.ResponsiveComponentsUtils.activateSmallFacet(this.coveoRoot)},e.prototype.changeToLargeMode=function(){this.restoreFacetPreservePositionValue(),this.dropdown.cleanUp(),p.ResponsiveComponentsUtils.deactivateSmallFacet(this.coveoRoot)},e.prototype.buildDropdown=function(e){var t=this.buildDropdownContent(),n=this.buildDropdownHeader(),i=e||new d.ResponsiveDropdown(t,n,this.coveoRoot);return this.facetsMobileModeOptions.displayOverlayWhileOpen||i.disablePopupBackground(),this.facetsMobileModeOptions.preventScrolling&&i.enableScrollLocking(this.facetsMobileModeOptions.scrollContainer),i},e.prototype.buildDropdownContent=function(){var t=this,n=r.$$(this.coveoRoot.find(".coveo-facet-column")),i=r.$$("div",{className:"coveo-facet-header-filter-by-container",style:"display: none"}),o=r.$$("div",{className:"coveo-facet-header-filter-by"});return o.text(s.l("Filter by:")),i.append(o.el),n.prepend(i.el),this.facetsMobileModeOptions.isModal?new v.ResponsiveDropdownModalContent("facet",n,s.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=r.$$("a"),t=r.$$("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(i.QueryEvents.noResults,function(){return e.handleNoResults()}),this.coveoRoot.on(i.QueryEvents.querySuccess,function(t,n){return e.handleQuerySuccess(n)}),this.coveoRoot.on(i.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 r.$$(e.element).trigger(S.FacetsMobileModeEvents.popupOpened)},e),this.dropdown.registerOnCloseHandler(function(){return r.$$(e.element).trigger(S.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,i=this.dropdown.dropdownContent.element.el.getBoundingClientRect().top,o=this.dropdown.dropdownContent.element.el.getBoundingClientRect().bottom;return i=i>=0?i:0,t>=i&&n<=o},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=s.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 o.Logger("ResponsiveFacets"),e.DROPDOWN_MIN_WIDTH=280,e.DROPDOWN_WIDTH_RATIO=.35,e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE="Filters",e}();t.ResponsiveFacetColumn=C},217:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(75),o=n(4),s=n(173),r=n(5),a=n(40),l=n(0),c=n(185),u=function(){function e(e,t){void 0===t&&(t=!0),this.facet=e,this.shouldEscapeValueInFieldExpression=t}return e.prototype.prepareForNewQuery=function(){this.lastGroupByRequestIndex=void 0,this.expressionToUseForFacetSearch=void 0,this.constantExpressionToUseForFacetSearch=void 0},e.prototype.computeOurFilterExpression=function(){var e=this,t=new i.ExpressionBuilder,n=this.facet.values.getSelected();n.length>0&&(this.facet.options.useAnd?l.each(n,function(n){t.addFieldExpression(e.facet.options.field,"==",[n.value],e.shouldEscapeValueInFieldExpression)}):t.addFieldExpression(this.facet.options.field,"==",l.map(n,function(e){return e.value}),this.shouldEscapeValueInFieldExpression));var s=this.facet.values.getExcluded();return s.length>0&&t.addFieldNotEqualExpression(this.facet.options.field,l.map(s,function(e){return e.value}),!0),o.Utils.isNonEmptyString(this.facet.options.additionalFilter)&&t.add(this.facet.options.additionalFilter),t.build()},e.prototype.putGroupByIntoQueryBuilder=function(e){r.Assert.exists(e);var t=this.createGroupByAllowedValues(),n=this.createBasicGroupByRequest(t),i=this.createGroupByQueryOverride(e);if(o.Utils.isNullOrUndefined(i)&&c.QueryBuilderExpression.isEmpty(i)){var s=e.computeCompleteExpressionParts();this.expressionToUseForFacetSearch=null==s.withoutConstant?"":s.withoutConstant,this.basicExpressionToUseForFacetSearch=null==s.basic?"":s.basic,this.advancedExpressionToUseForFacetSearch=s.advanced,this.constantExpressionToUseForFacetSearch=s.constant}else n.queryOverride=i.basic,n.advancedQueryOverride=i.advanced,n.constantQueryOverride=i.constant,this.expressionToUseForFacetSearch=i.withoutConstant,this.basicExpressionToUseForFacetSearch=i.basic,this.advancedExpressionToUseForFacetSearch=i.advanced,this.constantExpressionToUseForFacetSearch=i.constant;this.lastGroupByRequestIndex=e.groupByRequests.length,this.lastGroupByRequest=n,e.groupByRequests.push(n)},e.prototype.search=function(e,t){var n=this;return void 0===t&&(t=e.nbResults),e.completeFacetWithStandardValues=!1,new Promise(function(i,o){var s=function(o){var s=o.length;if(o=n.checkForFacetSearchValuesToRemove(o,e.valueToSearch),a.FacetUtils.needAnotherFacetSearch(o.length,s,t,5))return e.nbResults+=5,n.search(e,o.length);i(o)},r=n.facet.getEndpoint().search(e.getQuery());n.currentSearchPromise=r,r.then(function(t){if(n.currentSearchPromise==r){var i=[];t.groupByResults&&t.groupByResults[0]&&l.each(t.groupByResults[0].values,function(t){t.lookupValue?l.contains(e.alwaysExclude,t.lookupValue.toLowerCase())||i.push(t):l.contains(e.alwaysExclude,t.value.toLowerCase())||i.push(t)}),s(l.first(i,e.nbResults))}else o()}).catch(function(e){o(e)})})},e.prototype.fetchMore=function(e){var t=this,n=new s.FacetSearchParameters(this.facet);return n.alwaysInclude=this.facet.options.allowedValues||l.pluck(this.facet.values.getAll(),"value"),n.nbResults=e,this.facet.getEndpoint().search(n.getQuery()).then(function(e){return t.facet.options.allowedValues&&e&&e.groupByResults&&e.groupByResults[0]&&(e.groupByResults[0].values=t.filterByAllowedValueOption(e.groupByResults[0].values)),e})},e.prototype.searchInFacetToUpdateDelta=function(e){var t=new s.FacetSearchParameters(this.facet),n=t.getQuery();return n.aq=(n.aq?n.aq:"")+" "+this.computeOurFilterExpression(),l.each(e,function(e){e.waitingForDelta=!0}),n.groupBy=[this.createBasicGroupByRequest(l.map(e,function(e){return e.value}))],n.groupBy[0].completeFacetWithStandardValues=!1,this.facet.getEndpoint().search(n)},e.prototype.createGroupByAllowedValues=function(){return void 0!=this.facet.options.allowedValues?this.facet.options.allowedValues:void 0!=this.facet.options.customSort?this.getUnionWithCustomSortLowercase(this.facet.options.customSort,this.getAllowedValuesFromSelected()):l.map(this.getAllowedValuesFromSelected(),function(e){return e.value})},e.prototype.createBasicGroupByRequest=function(e,t){void 0===t&&(t=!0);var n=this.facet.numberOfValues;if(null!=this.facet.options.customSort){var i=this.getUnionWithCustomSortLowercase(this.facet.options.customSort,this.facet.values.getSelected().concat(this.facet.values.getExcluded()));n=Math.max(n,i.length)}var s={field:this.facet.options.field,maximumNumberOfValues:n+(this.facet.options.enableMoreLess?1:0),sortCriteria:this.facet.options.sortCriteria,injectionDepth:this.facet.options.injectionDepth,completeFacetWithStandardValues:void 0==this.facet.options.allowedValues};return this.facet.options.lookupField&&(s.lookupField=this.facet.options.lookupField),null!=e&&(s.allowedValues=e),t&&o.Utils.isNonEmptyString(this.facet.options.computedField)&&(s.computedFields=[{field:this.facet.options.computedField,operation:this.facet.options.computedFieldOperation}]),s},e.prototype.getAllowedValuesFromSelected=function(){var e=[];if(this.facet.options.useAnd||!this.facet.keepDisplayedValuesNextTime){if(0==this.facet.values.getSelected().length)return;e=this.facet.values.getSelected()}else e=this.facet.values.getAll();return e},Object.defineProperty(e.prototype,"additionalFilter",{get:function(){return this.facet.options.additionalFilter?this.facet.options.additionalFilter:""},enumerable:!0,configurable:!0}),e.prototype.getUnionWithCustomSortLowercase=function(e,t){var n=l.map(e,function(e){return e.toLowerCase()}),i=l.chain(t).filter(function(e){return!l.contains(n,e.value.toLowerCase())}).map(function(e){return e.value}).value();return l.compact(e.concat(i))},e.prototype.createGroupByQueryOverride=function(e){var t=e.computeCompleteExpressionParts();return this.queryOverrideIsNeededForMultiSelection()?t=this.processQueryOverrideForMultiSelection(e,t):t.reset(),this.queryOverrideIsNeededForAdditionalFilter()&&(t=this.processQueryOverrideForAdditionalFilter(e,t)),t=this.processQueryOverrideForEmptyValues(e,t),c.QueryBuilderExpression.isEmpty(t)?null:t},e.prototype.queryOverrideIsNeededForMultiSelection=function(){return!this.facet.options.useAnd&&!!this.facet.values.hasSelectedOrExcludedValues()},e.prototype.queryOverrideIsNeededForAdditionalFilter=function(){return o.Utils.isNonEmptyString(this.additionalFilter)},e.prototype.processQueryOverrideForMultiSelection=function(e,t){if(this.facet.values.hasSelectedOrExcludedValues()){var n=this.computeOurFilterExpression();t=e.computeCompleteExpressionPartsExcept(n),c.QueryBuilderExpression.isEmpty(t)&&(t.advanced="@uri")}return t},e.prototype.processQueryOverrideForAdditionalFilter=function(e,t){if(o.Utils.isEmptyString(t.basic)&&(t.basic=e.expression.build()),o.Utils.isEmptyString(t.constant)){var n=e.constantExpression.isEmpty()?"":e.constantExpression.build()+" ";t.constant=""+n+this.additionalFilter}else t.constant=t.constant+" "+this.additionalFilter;return t.advanced||(t.advanced=this.getFilterExpressionWithoutOurFilterExpression(e)),t},e.prototype.getFilterExpressionWithoutOurFilterExpression=function(e){var t=new i.ExpressionBuilder;e.advancedExpression.getParts().forEach(function(e){return t.add(e)});var n=this.computeOurFilterExpression();return t.remove(n),t.build()},e.prototype.processQueryOverrideForEmptyValues=function(e,t){var n=l.chain(t).keys().each(function(e){(o.Utils.isEmptyString(t[e])||o.Utils.isNullOrUndefined(t[e]))&&delete t[e]}).value();return 0==l.keys(n).length&&(t=void 0),t},e.prototype.checkForFacetSearchValuesToRemove=function(e,t){var n=this,i=a.FacetUtils.getRegexToUseForFacetSearch(t,this.facet.options.facetSearchIgnoreAccents);return l.filter(e,function(e){var t=l.isEmpty(n.facet.options.allowedValues)||n.isValueAllowedByAllowedValueOption(e.value),o=n.facet.getValueCaption(e);return t&&i.test(o)})},e.prototype.filterByAllowedValueOption=function(e){var t=this;return l.filter(e,function(e){return t.isValueAllowedByAllowedValueOption(e.value)})},e.prototype.isValueAllowedByAllowedValueOption=function(e){var t=this;return l.some(this.facet.options.allowedValues,function(n){var i=t.replaceWildcardsWithRegexEquivalent(t.escapeMostRegexCharacters(n));return new RegExp("^"+i+"$","gi").test(e)})},e.prototype.escapeMostRegexCharacters=function(e){return e.replace(/[.+^${}()|[\]\\]/g,"\\$&")},e.prototype.replaceWildcardsWithRegexEquivalent=function(e){return e.replace(/\*/g,".*").replace(/\?/g,".")},e}();t.FacetQueryController=u},40:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(21),s=n(121),r=n(33),a=n(4),l=n(1),c=n(0),u=n(6),h=function(){function e(){}return e.getRegexToUseForFacetSearch=function(e,t){return new RegExp(i.StringUtils.stringToRegex(e,t),"i")},e.getDisplayValueFromValueCaption=function(e,t,n){var i=this.tryToGetTranslatedCaption(t,e,!1);return n[e]||i},e.getValuesToUseForSearchInFacet=function(e,t){var n=[e],i=this.getRegexToUseForFacetSearch(e,t.options.facetSearchIgnoreAccents);return t.options.valueCaption?(c.chain(t.options.valueCaption).pairs().filter(function(e){return i.test(e[1])}).each(function(e){n.push(e[0])}),(o.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||o.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype"))&&c.each(s.FileTypes.getFileTypeCaptions(),function(e,o){o in t.options.valueCaption||!i.test(e)||n.push(o)})):o.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||o.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype")?c.each(c.filter(c.pairs(s.FileTypes.getFileTypeCaptions()),function(e){return i.test(e[1])}),function(e){n.push(e[0])}):o.QueryUtils.isStratusAgnosticField(t.options.field,"@month")&&c.each(c.range(1,13),function(e){i.test(r.DateUtils.monthToString(e-1))&&n.push(("0"+e.toString()).substr(-2))}),n},e.buildFacetSearchPattern=function(e){return e=c.map(e,function(e){return a.Utils.escapeRegexCharacter(e)}),e[0]=".*"+e[0]+".*",e.join("|")},e.needAnotherFacetSearch=function(e,t,n,i){return e<t&&e<i&&e>n},e.addNoStateCssClassToFacetValues=function(e,t){if(0!=e.values.getSelected().length){var n=l.$$(t).findAll("li:not(.coveo-selected)");c.each(n,function(e){l.$$(e).addClass("coveo-no-state")})}},e.tryToGetTranslatedCaption=function(t,n,i){void 0===i&&(i=!0);var l;if(o.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@filetype"))l=s.FileTypes.getFileType(n,i).caption;else if(o.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@objecttype"))l=s.FileTypes.getObjectType(n,i).caption;else if(e.isMonthFieldValue(t,n)){var c=parseInt(n,10);l=r.DateUtils.monthToString(c-1)}else i&&(l=u.l(n));return void 0!=l&&a.Utils.isNonEmptyString(l)?l:n},e.isMonthFieldValue=function(e,t){if(!o.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@month"))return!1;var n=parseInt(t,10);return!isNaN(n)&&!(n<1||n>12)},e}();t.FacetUtils=h},470:function(e,t,n){"use strict";var i=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),s=n(96),r=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 i(t,e),t.prototype.instantiateRoleToString=function(e){var t=r.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=r.find(this.templates,function(t){return t.role===e});if(n)return n.instantiateToElement(void 0,{});var i=new o.Template(function(){return t.defaultRoledTemplates[e]});return i.layout="table",i.instantiateToElement(void 0)},t.prototype.getFallbackTemplate=function(){var e=this;return new o.Template(function(){return e.defaultTemplate})},t.prototype.hasTemplateWithRole=function(e){return r.find(this.templates,function(t){return t.role===e})},t}(s.TemplateList);t.TableTemplate=a},471:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),o=n(0),s=n(1),r=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 o.chain(s.Dom.nodeListToArray(this.container.querySelectorAll(this.options.focusableSelector))).filter(function(e){return s.$$(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&&o.without(s.$$(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,i=n.indexOf(e);return-1===i?null:n[(i+(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;i.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=r},472:function(e,t,n){"use strict";var i=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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,i){var o=document.createElement("div");o.innerHTML=t.instantiateToString(e),n(o)})},t}(o.Template);t.DefaultRecommendationTemplate=s},473:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(r,a)}l((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(r=s[2&n[0]?"return":n[0]?"throw":"next"])&&!(r=r.call(s,n[1])).done)return r;switch(s=0,r&&(n=[0,r.value]),n[0]){case 0:case 1:r=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,s=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(r=l.trys,!(r=r.length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){l.label=n[1];break}if(6===n[0]&&l.label<r[1]){l.label=r[1],r=n;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(n);break}r[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],s=0}finally{o=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,s,r,a,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[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(20),r=n(93),a=n(0),l=n(1),c=n(9),u=function(){function e(e){this.args=e}return e.prototype.buildResults=function(e,t,n){return i(this,void 0,void 0,function(){var i,s,l=this;return o(this,function(o){return i=[],s=a.map(e.results,function(e,o){return l.buildResult(e,t,n).then(function(e){return null!=e&&i.push({elem:e,idx:o}),r.ResultList.resultCurrentlyBeingRendered=null,e})}),[2,Promise.all(s).then(function(){return a.pluck(a.sortBy(i,"idx"),"elem")})]})})},e.prototype.buildResult=function(e,t,n){return i(this,void 0,void 0,function(){var i;return o(this,function(o){switch(o.label){case 0:return s.Assert.exists(e),s.QueryUtils.setStateObjectOnQueryResult(this.args.queryStateModel.get(),e),s.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.args.searchInterface,e),r.ResultList.resultCurrentlyBeingRendered=e,[4,this.createHtmlElement(e,t)];case 1:return i=o.sent(),null!=i&&s.Component.bindResultToElement(i,e),n.push(e),[4,this.autoCreateComponentsInsideResult(i,e).initResult];case 2:return o.sent(),this.verifyChildren(i),[2,i]}})})},e.prototype.autoCreateComponentsInsideResult=function(e,t){return s.Assert.exists(e),s.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 c.Logger(e).warn('Result does not contain a "CoveoResultLink" component, please verify the result template',this.args.resultTemplate)},e}();t.TemplateToHtml=u},474:function(e,t,n){"use strict";function i(){var e,t=A.Component.getComponentRef("ResultList");if(t&&(e=t.resultCurrentlyBeingRendered),!e){var n=A.Component.getComponentRef("Quickview");n&&(e=n.resultCurrentlyBeingRendered)}return e}function o(){var e=i();if(e)return e.termsToHighlight}function s(){var e=i();if(e)return e.phrasesToHighlight}function r(e,t){return d.Utils.isNonEmptyArray(V.keys(e))||d.Utils.isNonEmptyArray(V.keys(t))}var a=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var l=n(122),c=n(69),u=n(33),h=n(135),p=n(179),d=n(4),f=n(22),m=n(73),y=n(178),g=n(21),v=n(24),b=n(1),S=n(53),C=n(120),F=n(40),E=n(23),V=n(0),A=n(7),O=n(68),w=function(){function e(){}return e.exportAllHelpersGlobally=function(e){V.each(l.TemplateHelpers.getHelpers(),function(t,n){void 0==e[n]&&(e[n]=t)})},e}();t.CoreHelpers=w,l.TemplateHelpers.registerFieldHelper("javascriptEncode",function(e){return d.Utils.exists(e)?f.StringUtils.javascriptEncode(e):void 0});var R=function(e,t){var n=c.StringAndHoles.shortenString(e,t.length,"...");return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shorten",function(e,t,n,i){return R(e,{length:t,highlights:n,cssClass:i})}),l.TemplateHelpers.registerTemplateHelper("shortenv2",function(e,t){return R(e,t)});var $=function(e,t){var n=c.StringAndHoles.shortenPath(e,t.length);return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shortenPath",function(e,t,n,i){return $(e,{length:t,highlights:n,cssClass:i})}),l.TemplateHelpers.registerFieldHelper("shortenPathv2",function(e,t){return $(e,t)});var x=function(e,t){var n=c.StringAndHoles.shortenUri(e,t.length);return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(n.value,t.highlights,n.holes,t.cssClass||"highlight"):n.value};l.TemplateHelpers.registerTemplateHelper("shortenUri",function(e,t,n,i){return x(e,{length:t,highlights:n,cssClass:i})}),l.TemplateHelpers.registerTemplateHelper("shortenUriv2",function(e,t){return x(e,t)});var T=function(e,t){return d.Utils.exists(e)?d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(e,t.highlights,null,t.cssClass||"highlight"):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlight",function(e,t,n){return T(e,{highlights:t,cssClass:n})}),l.TemplateHelpers.registerTemplateHelper("highlightv2",function(e,t){return T(e,t)});var I=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?r(t.termsToHighlight,t.phrasesToHighlight)?C.StreamHighlightUtils.highlightStreamText(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamText",function(e,t,n,i){return void 0===t&&(t=o()),void 0===n&&(n=s()),I(e,{termsToHighlight:t,phrasesToHighlight:n,opts:i})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamTextv2",function(e,t){var n=a({termsToHighlight:o(),phrasesToHighlight:s()},t);return I(e,n)});var D=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?r(t.termsToHighlight,t.phrasesToHighlight)?C.StreamHighlightUtils.highlightStreamHTML(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamHTML",function(e,t,n,i){return void 0===t&&(t=o()),void 0===n&&(n=s()),D(e,{termsToHighlight:t,phrasesToHighlight:n,opts:i})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamHTMLv2",function(e,t){var n=a({termsToHighlight:o(),phrasesToHighlight:s()},t);return D(e,n)}),l.TemplateHelpers.registerFieldHelper("number",function(e,t){if(d.Utils.exists(e)){var n=Number(e),i=V.isString(t)?t:t&&t.format;return i?f.StringUtils.htmlEncode(E.format(n,i)):f.StringUtils.htmlEncode(n.toString())}}),l.TemplateHelpers.registerFieldHelper("date",function(e,t){return u.DateUtils.dateToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("time",function(e,t){return u.DateUtils.timeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("dateTime",function(e,t){return u.DateUtils.dateTimeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("emailDateTime",function(e,t){var n={};n.includeTimeIfThisWeek=!0;var i=V.extend(t,n);return e?u.DateUtils.dateTimeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),i):void 0}),l.TemplateHelpers.registerFieldHelper("currency",function(e,t){return h.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 i,o,s,r;if(V.isObject(t[0])?(i=t[0].companyDomain,o=t[0].me,s=t[0].lengthLimit,r=t[0].truncateName):(i=t[0],o=t[1],s=t[2],r=t[3]),void 0==s&&(s=2),void 0==r&&(r=!1),V.isString(e)){var a=y.EmailUtils.splitSemicolonSeparatedListOfEmailAddresses(e);return y.EmailUtils.emailAddressesToHyperlinks(a,i,o,s,r)}return V.isArray(e)?y.EmailUtils.emailAddressesToHyperlinks(e,i,o,s,r):void 0}),l.TemplateHelpers.registerTemplateHelper("excessEmailToggle",function(e){b.$$(e).removeClass("coveo-active"),b.$$(e).hasClass("coveo-emails-excess-collapsed")?V.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"),V.each(b.$$(e.parentElement).siblings(".coveo-emails-excess-collapsed"),function(e){b.$$(e).addClass("coveo-active")}))}),l.TemplateHelpers.registerFieldHelper("anchor",function(e,t){return p.AnchorUtils.buildAnchor(e,t)}),l.TemplateHelpers.registerFieldHelper("image",function