/* Fri Dec 20 2024 06:47:57 GMT+0000 (Coordinated Universal Time) */ (function(){ var mainCssEl = document.createElement("link") mainCssEl.rel = "stylesheet" mainCssEl.href = "https://ipx.thomsonreuters.com/emcm-ui/ipx-help-center/v16.16.5/static/css/main.0bb22bce.chunk.css" document.head.appendChild(mainCssEl) })(); // static/js/runtime-main.c2cd2db9.js !function(e){function t(t){for(var n,i,p=t[0],l=t[1],c=t[2],f=0,s=[];f=0&&n<=i.b}}function D(e){return function(t){return null==t?void 0:t[e]}}var N=D("byteLength"),L=M(N),V=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,$=i.r?function(e){return i.l?Object(i.l)(e)&&!O(e):L(e)&&V.test(i.t.call(e))}:I(!1),j=D("length");function B(e,t){t=function(e){for(var t={},n=e.length,o=0;o":">",'"':""","'":"'","`":"`"},Be=$e(je),Ue=$e(de(je)),Qe=q.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},He=/(.)^/,qe={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ze=/\\|'|\r|\n|\u2028|\u2029/g;function We(e){return"\\"+qe[e]}var Ge=/^\s*(\w|\$)+\s*$/;function Ye(e,t,n){!t&&n&&(t=n),t=ve({},t,q.templateSettings);var o=RegExp([(t.escape||He).source,(t.interpolate||He).source,(t.evaluate||He).source].join("|")+"|$","g"),i=0,r="__p+='";e.replace(o,(function(t,n,o,a,s){return r+=e.slice(i,s).replace(ze,We),i=s+t.length,n?r+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":o?r+="'+\n((__t=("+o+"))==null?'':__t)+\n'":a&&(r+="';\n"+a+"\n__p+='"),t})),r+="';\n";var a,s=t.variable;if(s){if(!Ge.test(s))throw new Error("variable is not a bare identifier: "+s)}else r="with(obj||{}){\n"+r+"}\n",s="obj";r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{a=new Function(s,"_",r)}catch(c){throw c.source=r,c}var l=function(e){return a.call(this,e,q)};return l.source="function("+s+"){\n"+r+"}",l}function Ke(e,t,n){var o=(t=Se(t)).length;if(!o)return x(n)?n.call(e):n;for(var i=0;i1)rt(s,t-1,n,o),i=o.length;else for(var l=0,c=s.length;lt?(o&&(clearTimeout(o),o=null),s=c,a=e.apply(i,r),o||(i=r=null)):o||!1===n.trailing||(o=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(o),s=0,o=i=r=null},c}function dt(e,t,n){var o,i,a,s,l,c=function r(){var c=Ve()-i;t>c?o=setTimeout(r,t-c):(o=null,n||(s=e.apply(l,a)),o||(a=l=null))},u=r((function(r){return l=this,a=r,i=Ve(),o||(o=setTimeout(c,t),n&&(s=e.apply(l,a))),s}));return u.cancel=function(){clearTimeout(o),o=a=l=null},u}function pt(e,t){return nt(t,e)}function ft(e){return function(){return!e.apply(this,arguments)}}function ht(){var e=arguments,t=e.length-1;return function(){for(var n=t,o=e[t].apply(this,arguments);n--;)o=e[n].call(this,o);return o}}function mt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function vt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var yt=nt(vt,2);function gt(e,t,n){t=Fe(t,n);for(var o,i=U(e),r=0,a=i.length;r0?0:i-1;r>=0&&r0?s=a>=0?a:Math.max(a+l,s):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return o[a=n(o,r)]===r?a:-1;if(r!==r)return(a=t(i.q.call(o,s,l),F))>=0?a+s:-1;for(a=e>0?s:l-1;a>=0&&a0?0:a-1;for(i||(o=t[r?r[s]:s],s+=e);s>=0&&s=3;return t(e,ke(n,i,4),o,r)}}var Pt=Rt(1),Ft=Rt(-1);function It(e,t,n){var o=[];return t=Fe(t,n),Tt(e,(function(e,n,i){t(e,n,i)&&o.push(e)})),o}function Mt(e,t,n){return It(e,ft(Fe(t)),n)}function Dt(e,t,n){t=Fe(t,n);for(var o=!it(e)&&U(e),i=(o||e).length,r=0;r=0}var Vt=r((function(e,t,n){var o,i;return x(t)?i=t:(t=Se(t),o=t.slice(0,-1),t=t[t.length-1]),kt(e,(function(e){var r=i;if(!r){if(o&&o.length&&(e=Ce(e,o)),null==e)return;r=e[t]}return null==r?r:r.apply(e,n)}))}));function $t(e,t){return kt(e,Te(t))}function jt(e,t){return It(e,Ae(t))}function Bt(e,t,n){var o,i,r=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=it(e)?e:ce(e)).length;sr&&(r=o);else t=Fe(t,n),Tt(e,(function(e,n,o){((i=t(e,n,o))>a||i===-1/0&&r===-1/0)&&(r=e,a=i)}));return r}function Ut(e,t,n){var o,i,r=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=it(e)?e:ce(e)).length;so||void 0===n)return 1;if(n1&&(o=ke(o,t[1])),t=J(e)):(o=en,t=rt(t,!1,!1),e=Object(e));for(var i=0,r=t.length;i1&&(n=t[1])):(t=kt(rt(t,!1,!1),String),o=function(e,n){return!Lt(t,n)}),tn(e,o,n)}));function on(e,t,n){return i.q.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function rn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:on(e,e.length-t)}function an(e,t,n){return i.q.call(e,null==t||n?1:t)}function sn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:an(e,Math.max(0,e.length-t))}function ln(e){return It(e,Boolean)}function cn(e,t){return rt(e,t,!1)}var un=r((function(e,t){return t=rt(t,!0,!0),It(e,(function(e){return!Lt(t,e)}))})),dn=r((function(e,t){return un(e,t)}));function pn(e,t,n,o){c(t)||(o=n,n=t,t=!1),null!=n&&(n=Fe(n,o));for(var i=[],r=[],a=0,s=j(e);a0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0?function(e,t){return i(a,void 0,void 0,(function(){var n,o=this;return r(this,(function(i){try{return n=t.map((function(t){return t.catch((function(t){return o.logger.warn('An error occurred when trying to defer the "'+e+'" event. The defer will be ignored.',"Error: "+t)}))})),[2,Promise.all(n)]}catch(r){this.logger.error('An unexpected error occurred when trying to defer the "'+event+'" event. All defers will be ignored.',"Error: "+r)}return[2]}))}))}(e,n.defer):Promise.resolve()};e.performInitFunctionsOption(n,l.InitializationEvents.beforeInitialization),h.$$(t).trigger(l.InitializationEvents.beforeInitialization);var d=function(){return i(a,void 0,void 0,(function(){var o,i,a;return r(this,(function(r){switch(r.label){case 0:return[4,e.initExternalComponents(t,n)];case 1:return o=r.sent(),e.performInitFunctionsOption(n,l.InitializationEvents.afterComponentsInitialization),[4,u(l.InitializationEvents.afterComponentsInitialization)];case 2:return r.sent(),h.$$(t).trigger(l.InitializationEvents.restoreHistoryState),e.performInitFunctionsOption(n,l.InitializationEvents.afterInitialization),[4,u(l.InitializationEvents.afterInitialization)];case 3:return r.sent(),i=b.Component.get(t,w.SearchInterface),e.shouldExecuteFirstQueryAutomatically(i)&&(e.logFirstQueryCause(i),a=!0,Coveo.Recommendation&&(a=!(i instanceof Coveo.Recommendation)),b.Component.get(t,s.QueryController).executeQuery({logInActionsHistory:a,isFirstQuery:!0})),[2,o]}}))}))},p=o(t,n);return p.isLazyInit?p.initResult.then(d).then((function(){return{elem:t}})):d().then((function(){return{elem:t}}))},e.initSearchInterface=function(t,n){void 0===n&&(n={}),n=e.resolveDefaultOptions(t,n);var o=new w.SearchInterface(t,n.SearchInterface,n.Analytics);o.options.originalOptionsObject=n;var i={options:n,bindings:o.getBindings()};return e.automaticallyCreateComponentsInside(t,i,["Recommendation"])},e.initStandaloneSearchInterface=function(t,n){void 0===n&&(n={}),(n=e.resolveDefaultOptions(t,n)).Querybox||(n.Querybox={}),n.Omnibox||(n.Omnibox={}),n.Searchbox||(n.Searchbox={}),n.Querybox.triggerQueryOnClear&&n.Omnibox.triggerQueryOnClear&&n.Searchbox.triggerOnQueryClear||(n.Querybox.triggerQueryOnClear=!1,n.Omnibox.triggerQueryOnClear=!1,n.Searchbox.triggerQueryOnClear=!1);var o=new w.StandaloneSearchInterface(t,n.StandaloneSearchInterface,n.Analytics);o.options.originalOptionsObject=n;var i={options:n,bindings:o.getBindings()};return e.automaticallyCreateComponentsInside(t,i)},e.initRecommendationInterface=function(t,n){void 0===n&&(n={}),n=e.resolveDefaultOptions(t,n);var o=a.extend({},n.SearchInterface,n.Recommendation);o.mainSearchInterface&&(o.firstLoadingAnimation=h.$$("span").el);var i=new window.Coveo.Recommendation(t,o,n.Analytics);i.options.originalOptionsObject=n;var r={options:n,bindings:i.getBindings()};return e.automaticallyCreateComponentsInside(t,r)},e.automaticallyCreateComponentsInsideResult=function(t,n,i){void 0===i&&(i={});var r={options:o({initOptions:i},n.searchInterface.options.originalOptionsObject),bindings:o({},n.searchInterface.getBindings(),{resultElement:t}),result:n};return e.automaticallyCreateComponentsInside(t,r)},e.automaticallyCreateComponentsInside=function(e,t,n){var o=this;void 0===n&&(n=[]),c.Assert.exists(e);var i,r=x.InitializationHelper.findDOMElementsToIgnore(e,n),s=x.InitializationHelper.findDOMElementsToInitialize(e,r),l=a.chain(s).map((function(e){var n=o.componentsFactory(e.htmlElements,e.componentClassId,t);return i=n.isLazyInit,n.factory})).map((function(e){var t=e();return t?Promise.all(t).then((function(){return!0})):Promise.resolve(!0)})).value();return{initResult:Promise.all(l).then((function(){return!0})).catch((function(e){return o.logger.error(e),o.logger.warn("Skipping initialization of previous component in error ... "),!0})),isLazyInit:i}},e.registerNamedMethod=function(t,n){c.Assert.isNonEmptyString(t),c.Assert.doesNotExists(E.eagerlyLoadedComponents[t]),c.Assert.doesNotExists(e.namedMethods[t]),c.Assert.exists(n),e.namedMethods[t]=n},e.isNamedMethodRegistered=function(t){return y.Utils.exists(e.namedMethods[t])},e.monkeyPatchComponentMethod=function(e,t,n){var o;if(c.Assert.isNonEmptyString(e),c.Assert.exists(n),e.indexOf(".")>0){var i=e.split(".");c.Assert.check(2==i.length,"Invalid method name, correct syntax is CoveoComponent.methodName."),o=i[0],e=i[1]}var r=b.Component.get(t,o);c.Assert.exists(r),c.Assert.exists(r[e]);var a="__"+e;y.Utils.exists(r[a])||(r[a]=r[e]),r[e]=n},e.initBoxInterface=function(t,n,o,i){void 0===n&&(n={}),void 0===o&&(o="Standard"),void 0===i&&(i=!0),n=e.resolveDefaultOptions(t,n);var r="Box";"Standard"!=o&&(r+="For"+o);var a=b.Component.getComponentRef(r);if(a){new u.Logger(t).info("Initializing box of type "+r);var s=i?a.getInjection:function(){},l=new a(t,n[r],n.Analytics,s,n);l.options.originalOptionsObject=n;var d={options:n,bindings:l.getBindings()};return e.automaticallyCreateComponentsInside(t,d)}return{initResult:new Promise((function(e,n){new u.Logger(t).error("Trying to initialize box of type : "+r+" but not found in code (not compiled)!"),c.Assert.fail("Cannot initialize unknown type of box"),n(!1)})),isLazyInit:!1}},e.dispatchNamedMethodCall=function(t,n,o){c.Assert.isNonEmptyString(t),c.Assert.exists(n);var i=e.namedMethods[t];return c.Assert.exists(i),e.logger.trace("Dispatching named method call of "+t,n,o),0!=o.length?i.apply(null,[n].concat(o)):i.apply(null,[n])},e.dispatchNamedMethodCallOrComponentCreation=function(t,n,o){return c.Assert.isNonEmptyString(t),c.Assert.exists(n),e.isNamedMethodRegistered(t)?e.dispatchNamedMethodCall(t,n,o):e.isThereASingleComponentBoundToThisElement(n)?e.dispatchMethodCallOnBoundComponent(t,n,o):void c.Assert.fail("No method or component named "+t+" are registered.")},e.isSearchFromLink=function(e){return y.Utils.isNonEmptyString(e.getBindings().queryStateModel.get("q"))},e.isThereASingleComponentBoundToThisElement=function(e){return c.Assert.exists(e),y.Utils.exists(b.Component.get(e,null,!0))},e.isThereANonSearchInterfaceComponentBoundToThisElement=function(t){return!!h.$$(t).hasClass("CoveoRecommendation")||e.isThereASingleComponentBoundToThisElement(t)&&!S.get(t,w.SearchInterface,!0)&&!h.$$(t).hasClass("CoveoRecommendation")},e.dispatchMethodCallOnBoundComponent=function(e,t,n){c.Assert.isNonEmptyString(e),c.Assert.exists(t);var o=b.Component.get(t);c.Assert.exists(o);var i=o[e];if(y.Utils.exists(i))return i.apply(o,n);c.Assert.fail("No method named "+e+" exist on component "+o.type)},e.logFirstQueryCause=function(t){var n=m.HashUtils.getValue("firstQueryCause",m.HashUtils.getHash());if(null!=n){var o=m.HashUtils.getValue("firstQueryMeta",m.HashUtils.getHash())||{};t.usageAnalytics.logSearchEvent(g.analyticsActionCauseList[n],o)}else e.isSearchFromLink(t)?t.usageAnalytics.logSearchEvent(g.analyticsActionCauseList.searchFromLink,{}):t.usageAnalytics.logSearchEvent(g.analyticsActionCauseList.interfaceLoad,{})},e.performInitFunctionsOption=function(t,n){y.Utils.exists(t)&&e.performFunctions(t[n])},e.performFunctions=function(e){y.Utils.exists(e)&&a.each(e,(function(e){"function"==typeof e&&e()}))},e.initExternalComponents=function(t,n){var o=this;if(n&&n.externalComponents){var i=b.Component.get(t,w.SearchInterface),r=b.Component.get(t,f.QueryStateModel),l=b.Component.get(t,p.ComponentStateModel),u=b.Component.get(t,s.QueryController),h=b.Component.get(t,d.ComponentOptionsModel),m=i.usageAnalytics;c.Assert.exists(i),c.Assert.exists(r),c.Assert.exists(u),c.Assert.exists(l),c.Assert.exists(m);var g={options:n,bindings:{searchInterface:i,queryStateModel:r,queryController:u,usageAnalytics:m,componentStateModel:l,componentOptionsModel:h,root:t}},x=a.map(n.externalComponents,(function(t){var n=t;return y.Utils.isHtmlElement(n)?e.automaticallyCreateComponentsInside(n,g).initResult:v.JQueryUtils.isInstanceOfJQuery(n)?e.automaticallyCreateComponentsInside(n.get(0),g).initResult:void 0}));return Promise.all(x).then((function(e){return a.first(e)})).catch((function(e){return o.logger.error(e),!1}))}return Promise.resolve(!1)},e.shouldExecuteFirstQueryAutomatically=function(e){var t=e.options;return!t||!1!==t.autoTriggerQuery&&(!0===t.allowQueriesWithoutKeywords||""!=S.state(e.element).get("q"))},e.logger=new u.Logger("Initialization"),e.registeredComponents=[],e.componentAliases={},e.namedMethods={},e.fieldsNeededForQuery=[],e.fieldsNeededForQueryByComponent={},e}();t.Initialization=C;var _=function(){function e(){}return e.getLazyRegisteredComponent=function(t){return e.lazyLoadedComponents[t]()},e.getLazyRegisteredModule=function(t){return e.lazyLoadedModule[t]()},e.registerLazyComponent=function(t,n,o){null==e.lazyLoadedComponents[t]?(c.Assert.exists(n),a.contains(C.registeredComponents,t)||C.registeredComponents.push(t),e.lazyLoadedComponents[t]=n,o&&(C.componentAliases[t]=o)):this.logger.warn("Component being registered twice",t)},e.buildErrorCallback=function(t,n){return function(o){e.logger.warn("Cannot load chunk for "+t+". You may need to add the coveo-script class on the script tag that includes the Coveo framework. More details [here](https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues).\n "+o),n((function(){}))}},e.registerLazyModule=function(t,n){null==e.lazyLoadedModule[t]?(c.Assert.exists(n),e.lazyLoadedModule[t]=n):this.logger.warn("Module being registered twice",t)},e.componentsFactory=function(t,n,o){return{factory:function(){var i=[];return a.each(t,(function(t){if(null==b.Component.get(t,n)){var r=void 0;if(y.Utils.exists(o.options)){var s=o.options[n],l=o.options[t.id],c=o.options.initOptions?o.options.initOptions[n]:{};r=y.Utils.extendDeep(l,c),r=y.Utils.extendDeep(s,r)}var u=a.extend({},o,{options:r});i.push(e.createComponentOfThisClassOnElement(n,t,u))}})),i},isLazyInit:!0}},e.createComponentOfThisClassOnElement=function(t,n,o){return c.Assert.isNonEmptyString(t),c.Assert.exists(n),C.isThereANonSearchInterfaceComponentBoundToThisElement(n)?null:e.getLazyRegisteredComponent(t).then((function(i){if(c.Assert.exists(i),C.isThereANonSearchInterfaceComponentBoundToThisElement(n))return null;var r,s={},l={};return void 0!=o&&(a.each(o.bindings,(function(e,t){s[t]=e})),l=o.options,r=o.result),e.logger.trace("Creating component of class "+t,n,l),new i(n,l,s,r)}))},e.logger=new u.Logger("LazyInitialization"),e.lazyLoadedComponents={},e.lazyLoadedModule={},e}();t.LazyInitialization=_;var E=function(){function e(){}return e.componentsFactory=function(t,n,o){return{factory:function(){a.each(t,(function(t){if(null==b.Component.get(t,n)){var i=void 0;if(y.Utils.exists(o.options)){var r=o.options[n],s=o.options[t.id],l=o.options.initOptions?o.options.initOptions[n]:{};i=y.Utils.extendDeep(s,l),i=y.Utils.extendDeep(r,i)}var c=a.extend({},o,{options:i});e.createComponentOfThisClassOnElement(n,t,c)}}))},isLazyInit:!1}},e.createComponentOfThisClassOnElement=function(t,n,o){c.Assert.isNonEmptyString(t),c.Assert.exists(n);var i,r=C.getRegisteredComponent(t),s={},l={};return void 0!=o&&(a.each(o.bindings,(function(e,t){s[t]=e})),l=o.options,i=o.result),C.isThereANonSearchInterfaceComponentBoundToThisElement(n)?null:(e.logger.trace("Creating component of class "+t,n,l),null==r?(_.getLazyRegisteredComponent(t).then((function(o){e.logger.warn("Component of class "+t+' was not found in "Eager" mode. Using lazy mode as a fallback.'),new o(n,l,s,i)})).catch((function(){e.logger.error("Component of class "+t+' was not found in "Eager" mode nor "Lazy" mode. It will not be initialized properly...')})),null):new r(n,l,s,i))},e.logger=new u.Logger("EagerInitialization"),e.eagerlyLoadedComponents={},e}();t.EagerInitialization=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(9),r=n(2);t.exportGlobally=function(e){void 0==window.Coveo&&(window.Coveo={}),o.each(o.keys(e),(function(t){null==window.Coveo[t]&&(window.Coveo[t]=e[t])}))},t.lazyExport=function(e,t){e.doExport?e.doExport():new i.Logger(this).error("Component "+e+" has no export function !"),r.Initialization.registerAutoCreateComponent(e),t(e)},t.lazyExportModule=function(e,t){e.doExport&&e.doExport(),t(e)}},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n0},e.isEmptyArray=function(t){return!e.isNonEmptyArray(t)},e.isHtmlElement=function(e){return void 0!=window.HTMLElement?e instanceof HTMLElement:e&&e.nodeType&&1==e.nodeType},e.parseIntIfNotUndefined=function(t){return e.isNonEmptyString(t)?parseInt(t,10):void 0},e.parseFloatIfNotUndefined=function(t){return HTMLDocument,e.isNonEmptyString(t)?parseFloat(t):void 0},e.round=function(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)},e.parseBooleanIfNotUndefined=function(t){if(e.isNonEmptyString(t))switch(t.toLowerCase()){case"true":case"1":case"yes":return!0;case"false":case"0":case"no":return!1;default:return}},e.trim=function(e){return null==e?null:e.replace(/^\s+|\s+$/g,"")},e.encodeHTMLEntities=function(e){for(var t=[],n=e.length-1;n>=0;n--)/^[a-z0-9]/i.test(e[n])?t.unshift(e[n]):t.unshift(["&#",e.charCodeAt(n),";"].join(""));return t.join("")},e.decodeHTMLEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)}))},e.safeEncodeURIComponent=function(e){return i.isString(e)?encodeURIComponent(e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g,"").split("").reverse().join("").replace(/[\uDC00-\uDFFF](?![\uD800-\uDBFF])/g,"").split("").reverse().join("")):encodeURIComponent(e)},e.arrayEqual=function(e,t,n){if(void 0===n&&(n=!0),n)return i.isEqual(e,t);var o=[e,t];return i.all(o,(function(e){return e.length==o[0].length&&0==i.difference(e,o[0]).length}))},e.objectEqual=function(e,t){return i.isEqual(e,t)},e.isCoveoField=function(e){return r.test(e)},e.escapeRegexCharacter=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},e.getCaseInsensitiveProperty=function(e,t){var n=e[t];if(null==n){var o=t.toLowerCase();if(null==(n=e[o])){var r=i.find(i.keys(e),(function(e){return e.toLowerCase()==o}));null!=r&&(n=e[r])}}return n},e.getFirstAvailableFieldValue=function(t,n){for(var o=0;o1;)if(i=e.getCaseInsensitiveProperty(i,o.pop()),e.isUndefined(i))return;var r=e.getCaseInsensitiveProperty(i,o[0]);return null==r&&(r=e.getCaseInsensitiveProperty(t,n)),r}},e.throttle=function(e,t,n,o,i){var r;void 0===n&&(n={});var a=null,s=0,l=function(){s=!1===n.leading?0:(new Date).getTime(),a=null,r=e.apply(o,i)};return function(){var c=(new Date).getTime();s||!1!==n.leading||(s=c);var u=t-(c-s);return o=this,i=arguments,u<=0?(clearTimeout(a),a=null,s=c,r=e.apply(o,i)):a||!1===n.trailing||(a=window.setTimeout(l,u)),r}},e.extendDeep=function(t,n){t||(t={});var o=i.isArray(n),r=o&&[]||{};return o?(t=t||[],r=r.concat(t),i.each(n,(function(n,o,a){"undefined"===typeof t[o]?r[o]=n:"object"!==typeof n||i.isElement(n)?-1===t.indexOf(n)&&r.push(n):r[o]=e.extendDeep(t[o],n)}))):(t&&"object"===typeof t&&!i.isElement(t)&&i.each(i.keys(t),(function(e){r[e]=t[e]})),i.each(i.keys(n),(function(o){"object"===typeof n[o]&&n[o]&&t[o]?r[o]=e.extendDeep(t[o],n[o]):r[o]=n[o]}))),r},e.getQueryStringValue=function(e,t){return void 0===t&&(t=window.location.search),t.replace(new RegExp("^(?:.*[&\\?]"+e.replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1")},e.isValidUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)},e.debounce=function(e,t){var n,o;return function(){for(var i=this,r=[],a=0;a0&&(e=e.concat(n)),e},e.differenceBetweenObjects=function(e,t){var n={},o=function(e,t){for(var o in e)e[o]!==t[o]&&null==n[o]&&(n[o]=e[o])};return o(e,t),o(t,e),n},e.resolveAfter=function(e,t){return new Promise((function(n){return setTimeout((function(){return void 0!==t?n(t):n()}),e)}))},e.reorderValuesByKeys=function(e,t,n){var r=e.reduce((function(e,t){return o({},e,((i={})[n(t)]=t,i));var i}),{}),a=[];return t.forEach((function(e){r[e]&&a.push(r[e])})),a.concat(i.without.apply(i,[e].concat(a)))},e}();t.Utils=a},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(9),r=n(4),a=n(0),s=function(){function e(){}return e.fail=function(t){e.failureHandler(t)},e.check=function(t,n){t||e.fail(n)},e.isUndefined=function(t){e.check(r.Utils.isUndefined(t),"Value should be undefined.")},e.isNotUndefined=function(t){e.check(!r.Utils.isUndefined(t),"Value should not be undefined.")},e.isNull=function(t){e.check(r.Utils.isNull(t),"Value should be null.")},e.isNotNull=function(t){e.check(!r.Utils.isNull(t),"Value should not be null.")},e.exists=function(t){e.check(!r.Utils.isNullOrUndefined(t),"Value should not be null or undefined")},e.doesNotExists=function(t){e.check(r.Utils.isNullOrUndefined(t),"Value should be null or undefined")},e.isString=function(t){e.check(a.isString(t),"Value should be a string.")},e.stringStartsWith=function(t,n){e.isNonEmptyString(t),e.isNonEmptyString(n),e.check(0==t.indexOf(n),"Value should start with "+n)},e.isNonEmptyString=function(t){e.check(r.Utils.isNonEmptyString(t),"Value should be a non-empty string.")},e.isNumber=function(t){e.check(a.isNumber(t),"Value should be a number.")},e.isLargerThan=function(t,n){e.check(n>t,"Value "+n+" should be larger than "+t)},e.isLargerOrEqualsThan=function(t,n){e.check(n>=t,"Value "+n+" should be larger or equal than "+t)},e.isSmallerThan=function(t,n){e.check(na&&(new r.Logger(t).info("Value for option "+n+" is less than the possible minimum (Value is "+a+", minimum is "+o.min+"). It has been forced to its minimum value.",o),a=o.min),null!=o.max&&o.max1){var i=t[0],r=t[1];return o=s.extend({customAttribute:!0},t[2]),a.Assert.isNonEmptyString(i),e.set(i,r,o)}}},function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return o})),n.d(t,"p",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"o",(function(){return l})),n.d(t,"q",(function(){return c})),n.d(t,"t",(function(){return u})),n.d(t,"i",(function(){return d})),n.d(t,"r",(function(){return p})),n.d(t,"s",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"m",(function(){return m})),n.d(t,"j",(function(){return v})),n.d(t,"l",(function(){return y})),n.d(t,"g",(function(){return g})),n.d(t,"f",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"n",(function(){return x})),n.d(t,"b",(function(){return S}));var o="1.13.1",i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||Function("return this")()||{},r=Array.prototype,a=Object.prototype,s="undefined"!==typeof Symbol?Symbol.prototype:null,l=r.push,c=r.slice,u=a.toString,d=a.hasOwnProperty,p="undefined"!==typeof ArrayBuffer,f="undefined"!==typeof DataView,h=Array.isArray,m=Object.keys,v=Object.create,y=p&&ArrayBuffer.isView,g=isNaN,b=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],S=Math.pow(2,53)-1}).call(t,n(75))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(9),r=n(25),a=n(1);n(453),function(e){e[e.UP=0]="UP",e[e.RIGHT=1]="RIGHT",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT"}(o=t.ArrowDirection||(t.ArrowDirection={}));var s=function(){function e(){this.labelOrTitleRequired=!0,this.logger=new i.Logger(this)}return e.prototype.withOwner=function(e){return this.eventOwner=e,this},e.prototype.withElement=function(e){return e instanceof HTMLElement?this.element=a.$$(e):this.element=e,this},e.prototype.withLabel=function(e){return this.label=e,this},e.prototype.withoutLabelOrTitle=function(){return this.labelOrTitleRequired=!1,this},e.prototype.withTitle=function(e){return this.title=e,this},e.prototype.withSelectAction=function(e){return this.clickAction=e,this.enterKeyboardAction=e,this},e.prototype.withClickAction=function(e){return this.clickAction=e,this},e.prototype.withEnterKeyboardAction=function(e){return this.enterKeyboardAction=e,this},e.prototype.withFocusAndMouseEnterAction=function(e){return this.focusAction=e,this.mouseenterAction=e,this},e.prototype.withFocusAction=function(e){return this.focusAction=e,this},e.prototype.withMouseEnterAction=function(e){return this.mouseenterAction=e,this},e.prototype.withBlurAndMouseLeaveAction=function(e){return this.mouseleaveAction=e,this.blurAction=e,this},e.prototype.withMouseLeaveAction=function(e){return this.mouseleaveAction=e,this},e.prototype.withBlurAction=function(e){return this.blurAction=e,this},e.prototype.withArrowsAction=function(e){return this.arrowsAction=e,this},e.prototype.withRole=function(e){return this.role=e,this},e.prototype.build=function(){return this.element||(this.element=a.$$("div")),this.ensureCorrectRole(),this.ensureCorrectLabelOrTitle(),this.ensureSelectAction(),this.ensureUnselectAction(),this.ensureMouseenterAndFocusAction(),this.ensureMouseleaveAndBlurAction(),this.ensureArrowsAction(),this.ensureDifferentiationBetweenKeyboardAndMouseFocus(),this},e.prototype.ensureDifferentiationBetweenKeyboardAndMouseFocus=function(){var e=this,t="coveo-accessible-button-pressed";a.$$(this.element).addClass("coveo-accessible-button"),a.$$(this.element).on("mouseup",(function(){return a.$$(e.element).addClass(t)})),a.$$(this.element).on("focus",(function(){a.$$(e.element).removeClass(t)}))},e.prototype.ensureCorrectRole=function(){this.element.getAttribute("role")||this.element.setAttribute("role",this.role||"button")},e.prototype.ensureCorrectLabelOrTitle=function(){this.labelOrTitleRequired&&(this.label||this.title?this.title?this.element.setAttribute("title",this.title):this.element.setAttribute("aria-label",this.label):this.logger.error("Missing a label or title to create an accessible button!"))},e.prototype.ensureTabIndex=function(){this.element.setAttribute("tabindex","0")},e.prototype.ensureSelectAction=function(){var e=this;this.enterKeyboardAction&&(this.ensureTabIndex(),this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.ENTER,(function(t){return e.enterKeyboardAction(t)}))),this.bindEvent("keydown",r.KeyboardUtils.keypressAction(r.KEYBOARD.SPACEBAR,(function(e){e.target instanceof HTMLInputElement||e.preventDefault()}))),this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.SPACEBAR,(function(t){t.target instanceof HTMLInputElement||e.enterKeyboardAction(t)})))),this.clickAction&&this.bindEvent("click",this.clickAction)},e.prototype.ensureUnselectAction=function(){this.blurAction&&this.bindEvent("blur",this.blurAction),this.mouseleaveAction&&this.bindEvent("mouseleave",this.mouseleaveAction)},e.prototype.ensureMouseenterAndFocusAction=function(){this.mouseenterAction&&this.bindEvent("mouseenter",this.mouseenterAction),this.focusAction&&this.bindEvent("focus",this.focusAction)},e.prototype.ensureMouseleaveAndBlurAction=function(){this.mouseleaveAction&&this.bindEvent("mouseleave",this.mouseleaveAction),this.blurAction&&this.bindEvent("blur",this.blurAction)},e.prototype.ensureArrowsAction=function(){var e=this;this.arrowsAction&&(this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.UP_ARROW,(function(t){return e.arrowsAction(o.UP,t)}))),this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.RIGHT_ARROW,(function(t){return e.arrowsAction(o.RIGHT,t)}))),this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.DOWN_ARROW,(function(t){return e.arrowsAction(o.DOWN,t)}))),this.bindEvent("keyup",r.KeyboardUtils.keypressAction(r.KEYBOARD.LEFT_ARROW,(function(t){return e.arrowsAction(o.LEFT,t)}))))},e.prototype.bindEvent=function(e,t){this.eventOwner?this.eventOwner.on(this.element,e,t):a.$$(this.element).on(e,t)},e}();t.AccessibleButton=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=function(){function e(){}return e.addClassToSVGInContainer=function(t,n){var o=t.querySelector("svg");o.setAttribute("class",""+e.getClass(o)+n)},e.removeClassFromSVGInContainer=function(t,n){var o=t.querySelector("svg");o.setAttribute("class",e.getClass(o).replace(n,""))},e.addStyleToSVGInContainer=function(e,t){var n=e.querySelector("svg");o.each(t,(function(e,t){n.style[t]=e}))},e.addAttributesToSVGInContainer=function(e,t){var n=e.querySelector("svg");o.each(t,(function(e,t){n.setAttribute(t,e)}))},e.getClass=function(e){var t=e.getAttribute("class");return t?t+" ":""},e}();t.SVGDom=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.beforeInitialization="beforeInitialization",e.afterComponentsInitialization="afterComponentsInitialization",e.restoreHistoryState="restoreHistoryState",e.afterInitialization="afterInitialization",e.nuke="nuke",e}();t.InitializationEvents=o},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(1),r=n(5),a=n(4),s=n(36),l=n(0);t.MODEL_EVENTS={PREPROCESS:"preprocess",CHANGE_ONE:"change:",CHANGE:"change",RESET:"reset",ALL:"all"};var c=function(e){function t(t,n,o){var i=e.call(this,t,n)||this;return i.eventNameSpace=n,i.defaultAttributes=a.Utils.extendDeep(i.defaultAttributes,o),i.attributes=o,i.logger.debug("Creating model"),i}return o(t,e),t.prototype.set=function(e,t,n){var o={};o[e]=t,this.setMultiple(o,n)},t.prototype.getAttributes=function(){var e=this,t={};return l.each(this.attributes,(function(n,o){l.isObject(n)?a.Utils.objectEqual(n,e.defaultAttributes[o])||(t[o]=a.Utils.extendDeep({},n)):n!=e.defaultAttributes[o]&&(t[o]=n)})),t},t.prototype.setMultiple=function(e,t){var n=this,o=!1;this.preprocessEvent(e),l.each(e,(function(e,i){t&&t.customAttribute||n.checkIfAttributeExists(i),e=n.parseToCorrectType(i,e),(t&&!t.validateType||n.typeIsValid(i,e))&&n.checkIfAttributeChanged(i,e)&&(n.attributes[i]=e,o=!0,null!=t&&t.silent||n.attributeHasChangedEvent(i))})),!o||null!=t&&t.silent||(this.attributesHasChangedEvent(),this.anyEvent())},t.prototype.setNewDefault=function(e,t,n){n&&n.customAttribute||this.checkIfAttributeExists(e),this.defaultAttributes[e]=t},t.prototype.setDefault=function(e){this.set(e,this.defaultAttributes[e])},t.prototype.get=function(e){return void 0==e?this.attributes:this.attributes[e]},t.prototype.getDefault=function(e){return void 0==e?this.defaultAttributes:this.defaultAttributes[e]},t.prototype.reset=function(){this.setMultiple(this.defaultAttributes),this.modelWasResetEvent()},t.prototype.registerNewAttribute=function(e,t){this.defaultAttributes[e]=t,this.attributes[e]=t},t.prototype.getEventName=function(e){return this.eventNameSpace+":"+e},t.prototype.attributesHasChangedEvent=function(){i.$$(this.element).trigger(this.getEventName(t.eventTypes.change),this.createAttributesChangedArgument())},t.prototype.attributeHasChangedEvent=function(e){i.$$(this.element).trigger(this.getEventName(t.eventTypes.changeOne)+e,this.createAttributeChangedArgument(e))},t.prototype.preprocessEvent=function(e){i.$$(this.element).trigger(this.getEventName(t.eventTypes.preprocess),e)},t.prototype.modelWasResetEvent=function(){i.$$(this.element).trigger(this.getEventName(t.eventTypes.reset),this.createModelChangedArgument())},t.prototype.anyEvent=function(){i.$$(this.element).trigger(this.getEventName(t.eventTypes.all),this.createModelChangedArgument())},t.prototype.createAttributeChangedArgument=function(e){return{attribute:e,value:this.attributes[e]}},t.prototype.createAttributesChangedArgument=function(){return{attributes:this.attributes}},t.prototype.createModelChangedArgument=function(){return{model:this}},t.prototype.checkIfAttributeExists=function(e){r.Assert.check(l.has(this.attributes,e),"The attribute "+e+" is not registered.")},t.prototype.typeIsValid=function(e,t){return!(!a.Utils.isNullOrUndefined(this.attributes[e])&&!a.Utils.isUndefined(t))||(l.isNumber(this.attributes[e])?this.validateNumber(e,t):l.isBoolean(this.attributes[e])?this.validateBoolean(e,t):this.validateOther(e,t))},t.prototype.validateNumber=function(e,t){return!(!l.isNumber(t)||isNaN(t))||(this.logger.error("Non-matching type for "+e+". Expected number and got "+t),!1)},t.prototype.validateBoolean=function(e,t){return!(!l.isBoolean(t)&&void 0!==!a.Utils.parseBooleanIfNotUndefined(t))||(this.logger.error("Non matching type for "+e+". Expected boolean and got "+t),!1)},t.prototype.validateOther=function(e,t){if(!a.Utils.isNullOrUndefined(this.defaultAttributes[e])){var n=typeof t,o=typeof this.defaultAttributes[e];if(n!==o)return this.logger.error("Non-matching type for "+e+". Expected "+o+" and got "+n),!1}return!0},t.prototype.parseToCorrectType=function(e,t){return l.isNumber(this.attributes[e])?parseInt(t,10):l.isBoolean(this.attributes[e])?l.isBoolean(t)?t:a.Utils.parseBooleanIfNotUndefined(t):t},t.prototype.checkIfAttributeChanged=function(e,t){var n=this.attributes[e];return l.isNumber(n)||l.isString(n)||l.isBoolean(n)?n!==t:l.isArray(n)?!a.Utils.arrayEqual(n,t):!l.isObject(n)||!a.Utils.objectEqual(n,t)},t.prototype.debugInfo=function(){return null},t.eventTypes={preprocess:"preprocess",changeOne:"change:",change:"change",reset:"reset",all:"all"},t}(s.BaseComponent);t.Model=c},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;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]-1&&n.splice(o,1)},t.prototype.getBindings=function(){return{root:this.root,queryStateModel:this.queryStateModel,queryController:this.queryController,searchInterface:this,componentStateModel:this.componentStateModel,componentOptionsModel:this.componentOptionsModel,usageAnalytics:this.usageAnalytics}},t.prototype.getQueryContext=function(){var e,t=this.queryController.getLastQuery();if(t.context)e=t.context;else{var n=this.getComponents("PipelineContext");if(n&&!l.isEmpty(n)){var o=l.chain(n).map((function(e){return e.getContext()})).reduce((function(e,t){return i({},e,t)}),{}).value();l.isEmpty(o)||(e=o)}}return e},t.prototype.getComponents=function(e){return null==this.attachedComponents&&(this.attachedComponents={}),e in this.attachedComponents||(this.attachedComponents[e]=[]),this.attachedComponents[e]},t.prototype.detachComponentsInside=function(e){var t=this;l.each(this.attachedComponents,(function(n,o){n.filter((function(t){return e!=t.element&&e.contains(t.element)})).forEach((function(e){return t.detachComponent(o,e)}))}))},t.prototype.initializeAnalytics=function(){var e=T.BaseComponent.getComponentRef("Analytics");return e?e.create(this.element,this.analyticsOptions,this.getBindings()):new O.NoopAnalyticsClient},t.prototype.setupHistoryManager=function(e,t){var n=this;if(!this.options.enableHistory)return this.historyManager=new d.NoopHistoryController,void S.$$(this.element).on(f.InitializationEvents.restoreHistoryState,(function(){return n.queryStateModel.setMultiple(i({},n.queryStateModel.defaultAttributes))}));this.options.useLocalStorageForHistory?this.historyManager=new u.LocalStorageHistoryController(e,t,this.queryStateModel,this.queryController):this.historyManager=new c.HistoryController(e,t,this.queryStateModel,this.queryController)},t.prototype.setupQueryMode=function(){this.options.allowQueriesWithoutKeywords?this.initializeEmptyQueryAllowed():this.initializeEmptyQueryNotAllowed()},t.prototype.setupEventsHandlers=function(){var e=this,t=this.queryStateModel.getEventName(b.Model.eventTypes.preprocess);S.$$(this.element).on(t,(function(t,n){return e.handlePreprocessQueryStateModel(n)})),S.$$(this.element).on(h.QueryEvents.buildingQuery,(function(t,n){return e.handleBuildingQuery(n)})),S.$$(this.element).on(h.QueryEvents.querySuccess,(function(t,n){return e.handleQuerySuccess(n)})),S.$$(this.element).on(h.QueryEvents.queryError,(function(t,n){return e.handleQueryError(n)})),S.$$(this.element).on(f.InitializationEvents.afterComponentsInitialization,(function(){return e.handleAfterComponentsInitialization()}));var n=this.queryStateModel.getEventName(b.Model.eventTypes.changeOne+w.QueryStateModel.attributesEnum.debug);S.$$(this.element).on(n,(function(t,n){return e.handleDebugModeChange(n)})),this.queryStateModel.registerNewAttribute(w.QueryStateModel.attributesEnum.fv,{});var o=this.queryStateModel.getEventName(b.Model.eventTypes.changeOne+w.QueryStateModel.attributesEnum.quickview);S.$$(this.element).on(o,(function(t,n){return e.handleQuickviewChanged(n)}))},t.prototype.setupDebugInfo=function(){var e=this;this.options.enableDebugInfo&&setTimeout((function(){return new F.Debug(e.element,e.getBindings())}))},t.prototype.setupScrollRestorer=function(e,t,n){this.options.enableScrollRestoration&&(this.scrollRestorer=new $.ScrollRestorer(e,n))},t.prototype.setupResponsiveComponents=function(){this.responsiveComponents=new D.ResponsiveComponents,this.responsiveComponents.setMediumScreenWidth(this.options.responsiveMediumBreakpoint),this.responsiveComponents.setSmallScreenWidth(this.options.responsiveSmallBreakpoint),this.responsiveComponents.setResponsiveMode(this.options.responsiveMode),this.ensureFacetsMobileMode()},t.prototype.ensureFacetsMobileMode=function(){var e=this;this.root.querySelector(".CoveoFacetsMobileMode")||n.e(3).then(function(){var t=n(85).FacetsMobileMode,o=S.$$("div");S.$$(e.element).prepend(o.el);var i=e.options.originalOptionsObject.FacetsMobileMode||{};new t(o.el,i,e.getBindings())}.bind(null,n)).catch(null)},t.prototype.handleDebugModeChange=function(e){var t=this;e.value&&!this.relevanceInspector&&this.options.enableDebugInfo&&n.e(0).then(function(){var e=n(235).RelevanceInspector,o=S.$$("btn");S.$$(t.element).prepend(o.el),t.relevanceInspector=new e(o.el,t.getBindings())}.bind(null,n)).catch(null)},t.prototype.handlePreprocessQueryStateModel=function(e){var t=this.queryStateModel.get(w.QueryStateModel.attributesEnum.tg),n=this.queryStateModel.get(w.QueryStateModel.attributesEnum.t);e&&void 0!==e.tg&&(e.tg=this.getTabGroupId(e.tg),t!=e.tg&&(e.t=e.t||w.QueryStateModel.defaultAttributes.t,e.sort=e.sort||w.QueryStateModel.defaultAttributes.sort,t=e.tg)),e&&void 0!==e.t&&(e.t=this.getTabId(t,e.t),n!=e.t&&(e.sort=e.sort||w.QueryStateModel.defaultAttributes.sort,n=e.t)),e&&void 0!==e.sort&&(e.sort=this.getSort(n,e.sort)),e&&void 0!==e.quickview&&(e.quickview=this.getQuickview(e.quickview)),!e||!e.fv||this instanceof B||this.facetValueStateHandler.handleFacetValueState(e)},t.prototype.getTabGroupId=function(e){var t=T.BaseComponent.getComponentRef("TabGroup");if(t){var n=this.getComponents(t.ID);if(e!=w.QueryStateModel.defaultAttributes.tg&&l.any(n,(function(t){return!t.disabled&&e==t.options.id})))return e;if(n.length>0)return n[0].options.id}return w.QueryStateModel.defaultAttributes.tg},t.prototype.getTabId=function(e,t){var n=T.BaseComponent.getComponentRef("Tab"),o=T.BaseComponent.getComponentRef("TabGroup");if(n){var i=this.getComponents(n.ID);if(o&&e!=w.QueryStateModel.defaultAttributes.tg){var r=this.getComponents(o.ID),a=l.find(r,(function(t){return e==t.options.id}));if(t!=w.QueryStateModel.defaultAttributes.t&&l.any(i,(function(e){return t==e.options.id&&a.isElementIncludedInTabGroup(e.element)})))return t;var s=l.find(i,(function(e){return a.isElementIncludedInTabGroup(e.element)}));return null!=s?s.options.id:w.QueryStateModel.defaultAttributes.t}if(t!=w.QueryStateModel.defaultAttributes.t&&l.any(i,(function(e){return t==e.options.id})))return t;if(i.length>0)return i[0].options.id}return w.QueryStateModel.defaultAttributes.t},t.prototype.getSort=function(e,t){var n=T.BaseComponent.getComponentRef("Sort");if(n){var o=this.getComponents(n.ID),i=T.BaseComponent.getComponentRef("Tab");if(i&&e!=w.QueryStateModel.defaultAttributes.t){var r=this.getComponents(i.ID),a=l.find(r,(function(t){return e==t.options.id})),s=a.options.sort;if(t!=w.QueryStateModel.defaultAttributes.sort&&l.any(o,(function(e){return a.isElementIncludedInTab(e.element)&&e.match(t)})))return t;if(null!=s)return s.toString();var c=l.find(o,(function(e){return a.isElementIncludedInTab(e.element)}));return null!=c?c.options.sortCriteria[0].toString():w.QueryStateModel.defaultAttributes.sort}if(t!=w.QueryStateModel.defaultAttributes.sort&&l.any(o,(function(e){return e.match(t)})))return t;if(o.length>0)return o[0].options.sortCriteria[0].toString()}return w.QueryStateModel.defaultAttributes.sort},t.prototype.getQuickview=function(e){var t=T.BaseComponent.getComponentRef("Quickview");if(t){var n=this.getComponents(t.ID);if(l.any(n,(function(t){return t.getHashId()==e})))return e}return w.QueryStateModel.defaultAttributes.quickview},t.prototype.handleQuickviewChanged=function(e){var t=T.BaseComponent.getComponentRef("Quickview");if(t){var n=this.getComponents(t.ID);if(""!=e.value){var o=l.partition(n,(function(t){return t.getHashId()==e.value}));0!=o[0].length&&(l.first(o[0]).open(),l.each(l.tail(o[0]),(function(e){return e.close()}))),l.each(o[1],(function(e){return e.close()}))}else l.each(n,(function(e){e.close()}))}},t.prototype.handleBuildingQuery=function(e){this.options.enableDuplicateFiltering&&(e.queryBuilder.enableDuplicateFiltering=!0),_.Utils.isNullOrUndefined(this.options.pipeline)||(e.queryBuilder.pipeline=this.options.pipeline),_.Utils.isNullOrUndefined(this.options.maximumAge)||(e.queryBuilder.maximumAge=this.options.maximumAge),_.Utils.isNullOrUndefined(this.options.resultsPerPage)||(e.queryBuilder.numberOfResults=this.options.resultsPerPage),_.Utils.isNullOrUndefined(this.options.excerptLength)||(e.queryBuilder.excerptLength=this.options.excerptLength),_.Utils.isNonEmptyString(this.options.expression)&&e.queryBuilder.constantExpression.add(this.options.expression),_.Utils.isNonEmptyString(this.options.filterField)&&(e.queryBuilder.filterField=this.options.filterField),_.Utils.isNonEmptyString(this.options.timezone)&&(e.queryBuilder.timezone=this.options.timezone),e.queryBuilder.enableCollaborativeRating=this.options.enableCollaborativeRating,e.queryBuilder.enableDuplicateFiltering=this.options.enableDuplicateFiltering,e.queryBuilder.allowQueriesWithoutKeywords=this.options.allowQueriesWithoutKeywords;var t=this.queryController.getEndpoint();null!=t&&t.options&&this.queryStateModel.get(w.QueryStateModel.attributesEnum.debug)&&(e.queryBuilder.maximumAge=0,e.queryBuilder.enableDebug=!0,e.queryBuilder.fieldsToExclude=["allmetadatavalues"],e.queryBuilder.fieldsToInclude=null)},t.prototype.handleQuerySuccess=function(e){var t=0==e.results.results.length;this.toggleSectionState("coveo-no-results",t),this.handlePossiblyModifiedNumberOfResultsInQueryPipeline(e);var n=S.$$(this.element).find(".coveo-results-header");n&&S.$$(n).removeClass("coveo-query-error")},t.prototype.handlePossiblyModifiedNumberOfResultsInQueryPipeline=function(e){if(e&&e.query&&e.results){var t=e.query.numberOfResults,n=e.results.results.length,o=!(e.results.totalCountFiltered-e.query.firstResult===n)&&e.results.totalCountFiltered>n;t!=n&&o?(this.isResultsPerPageModifiedByPipeline=!0,this.queryPipelineConfigurationForResultsPerPage=n):(this.isResultsPerPageModifiedByPipeline=!1,this.queryPipelineConfigurationForResultsPerPage=null)}},t.prototype.handleQueryError=function(e){this.toggleSectionState("coveo-no-results");var t=S.$$(this.element).find(".coveo-results-header");t&&S.$$(t).addClass("coveo-query-error")},t.prototype.handleAfterComponentsInitialization=function(){var e=this;l.each(this.attachedComponents,(function(t){t.forEach((function(t){N.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(t)&&N.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(e.element,t)}))})),this.duplicatesFacets.length&&this.logger.warn("The following facets have duplicate id/field:",this.duplicatesFacets,"Ensure that each facet in your search interface has a unique id.")},Object.defineProperty(t.prototype,"duplicatesFacets",{get:function(){var e=[],t=V.ComponentsTypes.getAllFacetsFromSearchInterface(this);return t.forEach((function(n){t.forEach((function(t){n!=t&&(n.options.id!==t.options.id||e.push(n))}))})),e},enumerable:!0,configurable:!0}),t.prototype.toggleSectionState=function(e,t){var n=this;void 0===t&&(t=!0);var o=S.$$(this.element).find(".coveo-facet-column"),i=S.$$(this.element).find(".coveo-results-column"),r=S.$$(this.element).find(".coveo-results-header"),a=S.$$(this.element).findAll(".coveo-facet-search-results"),s=S.$$(this.element).find(".coveo-recommendation-main-section");o&&S.$$(o).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),i&&S.$$(i).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),r&&S.$$(r).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),s&&S.$$(s).toggleClass(e,t),a&&a.length>0&&l.each(a,(function(o){S.$$(o).toggleClass(e,t&&!n.queryStateModel.atLeastOneFacetIsActive())}))},t.prototype.initializeEmptyQueryAllowed=function(){new R.InitializationPlaceholder(this.element).withFullInitializationStyling().withAllPlaceholders()},t.prototype.initializeEmptyQueryNotAllowed=function(){var e=this,t=new R.InitializationPlaceholder(this.element).withEventToRemovePlaceholder(h.QueryEvents.newQuery).withFullInitializationStyling().withHiddenRootElement().withPlaceholderForFacets().withPlaceholderForResultList();S.$$(this.root).on(f.InitializationEvents.restoreHistoryState,(function(){t.withVisibleRootElement(),""==e.queryStateModel.get("q")&&t.withWaitingForFirstQueryMode()})),S.$$(this.element).on(h.QueryEvents.doneBuildingQuery,(function(t,n){if(!n.queryBuilder.containsEndUserKeywords()){var o=e.queryController.getLastQuery().q;_.Utils.isNonEmptyString(o)?(e.queryStateModel.set(w.QUERY_STATE_ATTRIBUTES.Q,o),n.queryBuilder.expression.add(o)):(e.logger.info("Query cancelled by the Search Interface","Configuration does not allow empty query",e,e.options),n.cancel=!0,e.queryStateModel.reset(),new R.InitializationPlaceholder(e.element).withEventToRemovePlaceholder(h.QueryEvents.newQuery).withFullInitializationStyling().withVisibleRootElement().withPlaceholderForFacets().withPlaceholderForResultList().withWaitingForFirstQueryMode())}}))},t.ID="SearchInterface",t.options={enableHistory:k.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableAutomaticResponsiveMode:k.ComponentOptions.buildBooleanOption({defaultValue:!0}),useLocalStorageForHistory:k.ComponentOptions.buildBooleanOption({defaultValue:!1}),resultsPerPage:k.ComponentOptions.buildNumberOption({defaultValue:10,min:0}),excerptLength:k.ComponentOptions.buildNumberOption({defaultValue:200,min:0}),expression:k.ComponentOptions.buildQueryExpressionOption({defaultValue:""}),filterField:k.ComponentOptions.buildFieldOption({defaultValue:""}),hideUntilFirstQuery:k.ComponentOptions.buildBooleanOption({deprecated:"Exposed for legacy reasons. The loading animation is now composed of placeholders, and this option is obsolete."}),firstLoadingAnimation:k.ComponentOptions.buildChildHtmlElementOption({deprecated:"Exposed for legacy reasons. The loading animation is now composed of placeholder, and this options is obsolete."}),autoTriggerQuery:k.ComponentOptions.buildBooleanOption({defaultValue:!0}),allowQueriesWithoutKeywords:k.ComponentOptions.buildBooleanOption({defaultValue:!0}),endpoint:k.ComponentOptions.buildCustomOption((function(e){return null!=e&&e in x.SearchEndpoint.endpoints?x.SearchEndpoint.endpoints[e]:null}),{defaultFunction:function(){return x.SearchEndpoint.endpoints.default}}),timezone:k.ComponentOptions.buildStringOption({defaultFunction:function(){return s.determine().name()}}),enableDebugInfo:k.ComponentOptions.buildBooleanOption({defaultValue:!0}),enableCollaborativeRating:k.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableDuplicateFiltering:k.ComponentOptions.buildBooleanOption({defaultValue:!1}),pipeline:k.ComponentOptions.buildStringOption(),maximumAge:k.ComponentOptions.buildNumberOption(),searchPageUri:k.ComponentOptions.buildStringOption(),responsiveMediumBreakpoint:k.ComponentOptions.buildNumberOption({defaultValue:D.MEDIUM_SCREEN_WIDTH,depend:"enableAutomaticResponsiveMode"}),responsiveSmallBreakpoint:k.ComponentOptions.buildNumberOption({defaultValue:D.SMALL_SCREEN_WIDTH,depend:"enableAutomaticResponsiveMode"}),responsiveMode:k.ComponentOptions.buildCustomOption((function(e){return"auto"===e||"small"===e||"medium"===e||"large"===e?e:(console.warn(e+" is not a proper value for responsiveMode, auto has been used instead."),"auto")}),{defaultValue:"auto"}),enableScrollRestoration:k.ComponentOptions.buildBooleanOption({defaultValue:!1}),modalContainer:k.ComponentOptions.buildSelectorOption({defaultFunction:function(e){return e.ownerDocument.body}})},t.SMALL_INTERFACE_CLASS_NAME="coveo-small-search-interface",t}(P.RootComponent);t.SearchInterface=j;var B=function(e){function t(n,o,i,r){void 0===r&&(r=window);var a=e.call(this,n,k.ComponentOptions.initComponentOptions(n,t,o),i,r)||this;return a.element=n,a.options=o,a.analyticsOptions=i,a._window=r,S.$$(a.root).on(h.QueryEvents.newQuery,(function(e,t){return a.handleRedirect(e,t)})),a}return o(t,e),t.prototype.handleRedirect=function(e,t){if(!1!==t.shouldRedirectStandaloneSearchbox){var n={searchPageUri:this.options.searchPageUri,cancel:!1};S.$$(this.root).trigger(m.StandaloneSearchInterfaceEvents.beforeRedirect,n),n.cancel||(t.cancel=!0,this.searchboxIsEmpty()&&!this.options.redirectIfEmpty||this.doRedirect(n.searchPageUri))}},t.prototype.doRedirect=function(e){return r(this,void 0,void 0,(function(){var t,n,o;return a(this,(function(i){switch(i.label){case 0:return t=this.encodedHashValues,[4,this.queryController.fetchQueryExecutionPlan()];case 1:return n=i.sent(),(o=n&&n.redirectionURL)?(this.redirectToURL(o),[2]):[2,this.redirectToSearchPage(e,t)]}}))}))},t.prototype.redirectToURL=function(e){this.usageAnalytics.logCustomEvent(E.analyticsActionCauseList.triggerRedirect,{redirectedTo:e,query:this.queryStateModel.get(w.QueryStateModel.attributesEnum.q)},this.element),this._window.location.assign(e)},t.prototype.redirectToSearchPage=function(e,t){var n=this,o=document.createElement("a");o.href=e,o.href=o.href;var i=0==o.pathname.indexOf("/")?o.pathname:"/"+o.pathname,r=o.hash?o.hash+"&":"#",a=t||this.encodedHashValues;setTimeout((function(){n._window.location.href=o.protocol+"//"+o.host+i+o.search+r+a}),0)},Object.defineProperty(t.prototype,"encodedHashValues",{get:function(){var e=i({},this.modelAttributesToIncludeInUrl,this.uaCausedByAttribute,this.uaMetadataAttribute);return C.HashUtils.encodeValues(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modelAttributesToIncludeInUrl",{get:function(){return this.historyManager instanceof u.LocalStorageHistoryController?{}:this.queryStateModel.getAttributes()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uaCausedByAttribute",{get:function(){var e=this.uaCausedBy;return e?{firstQueryCause:e}:{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uaCausedBy",{get:function(){var e=this.usageAnalytics.getCurrentEventCause();return e===E.analyticsActionCauseList.searchboxSubmit.name?E.analyticsActionCauseList.searchFromLink.name:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uaMetadataAttribute",{get:function(){var e=this.usageAnalytics.getCurrentEventMeta();return e&&!l.isEmpty(e)?{firstQueryMeta:e}:{}},enumerable:!0,configurable:!0}),t.prototype.searchboxIsEmpty=function(){return _.Utils.isEmptyString(this.queryStateModel.get(w.QueryStateModel.attributesEnum.q))},t.ID="StandaloneSearchInterface",t.options={redirectIfEmpty:k.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(j);t.StandaloneSearchInterface=B},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),window.Promise instanceof Function||n(300);var i=n(210);t._=i.underscoreInstance,o(n(302)),o(n(66)),o(n(329)),o(n(101)),o(n(154)),o(n(204)),o(n(332)),o(n(457)),o(n(73))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(4),r=n(0),a=function(){function e(){}return e.createGuid=function(){var t,n=!1;if("undefined"!=typeof crypto&&"undefined"!=typeof crypto.getRandomValues)try{t=e.generateWithCrypto(),n=!0}catch(o){n=!1}return n||(t=e.generateWithRandom()),t},e.generateWithRandom=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},e.generateWithCrypto=function(){var e=new Uint16Array(8);crypto.getRandomValues(e);var t=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return t(e[0])+t(e[1])+"-"+t(e[2])+"-"+(4+t(e[3]).slice(1)+"-")+t(e[4])+"-"+t(e[5])+t(e[6])+t(e[7])},e.setStateObjectOnQueryResults=function(t,n){e.setPropertyOnResults(n,"state",t)},e.setStateObjectOnQueryResult=function(t,n){e.setPropertyOnResult(n,"state",t)},e.setSearchInterfaceObjectOnQueryResult=function(t,n){e.setPropertyOnResult(n,"searchInterface",t)},e.setIndexAndUidOnQueryResults=function(t,n,i,r,a){o.Assert.exists(t),o.Assert.exists(n);var s=t.firstResult;e.setPropertyOnResults(n,"queryUid",i),e.setPropertyOnResults(n,"pipeline",r),e.setPropertyOnResults(n,"splitTestRun",a),e.setPropertyOnResults(n,"index",s,(function(){return++s}))},e.setTermsToHighlightOnQueryResults=function(t,n){e.setPropertyOnResults(n,"termsToHighlight",n.termsToHighlight),e.setPropertyOnResults(n,"phrasesToHighlight",n.phrasesToHighlight)},e.splitFlags=function(e,t){return void 0===t&&(t=";"),o.Assert.exists(e),e.split(t)},e.isAttachment=function(t){return r.contains(e.splitFlags(t.flags),"IsAttachment")},e.containsAttachment=function(t){return r.contains(e.splitFlags(t.flags),"ContainsAttachment")},e.hasHTMLVersion=function(t){return r.contains(e.splitFlags(t.flags),"HasHtmlVersion")},e.hasThumbnail=function(t){return r.contains(e.splitFlags(t.flags),"HasThumbnail")},e.hasExcerpt=function(e){return void 0!=e.excerpt&&""!=e.excerpt},e.getAuthor=function(e){return e.raw.author},e.getUriHash=function(e){return e.raw.urihash},e.getObjectType=function(e){return e.raw.objecttype},e.getCollection=function(e){return e.raw.collection||"default"},e.getSource=function(e){return e.raw.source},e.getLanguage=function(e){return e.raw.language},e.getPermanentId=function(e){var t,n,o=i.Utils.getFieldValue(e,"permanentid");return o?(n="permanentid",t=o):(n="urihash",t=i.Utils.getFieldValue(e,"urihash")),{fieldValue:t,fieldUsed:n}},e.quoteAndEscapeIfNeeded=function(t,n){return void 0===n&&(n=!1),o.Assert.isString(t),!n&&(e.isAtomicString(t)||e.isRangeString(t)||e.isRangeWithoutOuterBoundsString(t))?t:e.quoteAndEscape(t)},e.quoteAndEscape=function(t){return o.Assert.isString(t),'"'+e.escapeString(t)+'"'},e.escapeString=function(e){return o.Assert.isString(e),e.replace(/"/g," ")},e.isAtomicString=function(e){return o.Assert.isString(e),/^\d+(\.\d+)?$|^[\d\w]+$/.test(e)},e.isRangeString=function(e){return o.Assert.isString(e),/^\d+(\.\d+)?\.\.\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}\.\.\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(e)},e.isRangeWithoutOuterBoundsString=function(e){return o.Assert.isString(e),/^\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(e)},e.buildFieldExpression=function(t,n,i,a){return void 0===a&&(a=!1),o.Assert.isNonEmptyString(t),o.Assert.stringStartsWith(t,"@"),o.Assert.isNonEmptyString(n),o.Assert.isLargerOrEqualsThan(1,i.length),1==i.length?t+n+e.quoteAndEscapeIfNeeded(i[0],a):t+n+"("+r.map(i,(function(t){return e.quoteAndEscapeIfNeeded(t,a)})).join(",")+")"},e.buildFieldNotEqualExpression=function(t,n,i){return void 0===i&&(i=!1),o.Assert.isNonEmptyString(t),o.Assert.stringStartsWith(t,"@"),o.Assert.isLargerOrEqualsThan(1,n.length),"(NOT "+(1==n.length?t+"=="+e.quoteAndEscapeIfNeeded(n[0],i):t+"==("+r.map(n,(function(t){return e.quoteAndEscapeIfNeeded(t,i)})).join(",")+")")+")"},e.setPropertyOnResults=function(t,n,o,i){r.each(t.results,(function(t){e.setPropertyOnResult(t,n,o),o=i?i():o}))},e.setPropertyOnResult=function(e,t,n){e[t]=n,r.each(e.childResults,(function(e){e[t]=n})),i.Utils.isNullOrUndefined(e.parentResult)||(e.parentResult[t]=n)},e.isStratusAgnosticField=function(e,t){var n=/^(@?)(sys)?(.*)/i,o=n.exec(e),i=n.exec(t);return!(!o||!i)&&(o[1]+o[3]).toLowerCase()==(i[1]+i[3]).toLowerCase()},e}();t.QueryUtils=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(1),r=n(9),a=n(387),s=n(0),l=function(){function e(){}return e.javascriptEncode=function(e){return o.Assert.isString(e),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/'/g,"\\'")).replace(/"/g,'\\"')},e.htmlEncode=function(e){o.Assert.isString(e);var t=i.$$("div");return t.text(e),t.el.innerHTML},e.splice=function(e,t,n,o){return e.slice(0,t)+o+e.slice(t+Math.abs(n))},e.removeMiddle=function(t,n,o){if(t.length")},e.equalsCaseInsensitive=function(e,t){return e.toLowerCase()==t.toLowerCase()},e.match=function(e,t){for(var n,o=[];null!==(n=t.exec(e));)o.push(n);return o},e.hashCode=function(e){for(var t=0,n=e.length,o=0;o2},e.isSmallScreenWidth=function(){return(new o.ResponsiveComponents).isSmallScreenWidth()},e}();t.DeviceUtils=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(4),r=n(0);!function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.TAB=9]="TAB",e[e.ENTER=13]="ENTER",e[e.SHIFT=16]="SHIFT",e[e.CTRL=17]="CTRL",e[e.ALT=18]="ALT",e[e.ESCAPE=27]="ESCAPE",e[e.SPACEBAR=32]="SPACEBAR",e[e.PAGE_UP=33]="PAGE_UP",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.END=35]="END",e[e.HOME=36]="HOME",e[e.LEFT_ARROW=37]="LEFT_ARROW",e[e.UP_ARROW=38]="UP_ARROW",e[e.RIGHT_ARROW=39]="RIGHT_ARROW",e[e.DOWN_ARROW=40]="DOWN_ARROW",e[e.INSERT=45]="INSERT",e[e.DELETE=46]="DELETE"}(o=t.KEYBOARD||(t.KEYBOARD={}));var a=function(){function e(){}return e.keysEqual=function(e,t){return i.Utils.isNullOrUndefined(e.keyCode)?!i.Utils.isNullOrUndefined(e.which)&&e.which==t:e.keyCode==t},e.isAllowedKeyForOmnibox=function(t){var n=t.keyCode;return e.isNumberKeyPushed(n)||32==n||13==n||e.isLetterKeyPushed(n)||n>95&&n<112||n>185&&n<193||n>218&&n<223||n==o.BACKSPACE||n==o.DELETE||e.isArrowKeyPushed(n)},e.isAllowedKeyForSearchAsYouType=function(t){return e.isAllowedKeyForOmnibox(t)&&!e.isArrowKeyPushed(t.keyCode)},e.isDeleteOrBackspace=function(t){return e.keysEqual(t,o.BACKSPACE)||e.keysEqual(t,o.DELETE)},e.isArrowKeyPushed=function(e){return e==o.LEFT_ARROW||e==o.UP_ARROW||e==o.RIGHT_ARROW||e==o.DOWN_ARROW},e.isNumberKeyPushed=function(e){return e>47&&e<58},e.isLetterKeyPushed=function(e){return e>64&&e<91},e.keypressAction=function(e,t){return function(n){for(var o=[],i=1;i0){var t=e.functions[0];return e.functions=o.rest(e.functions),t(),e.functions.length>0}return!1},e.functions=[],e}();t.Defer=i},function(e,t,n){"use strict";var o=function(e,t){return et?1:e>=t?0:NaN},i=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return o(t(e),n)}),{left:function(t,n,o,i){for(null==o&&(o=0),null==i&&(i=t.length);o>>1;e(t[r],n)<0?o=r+1:i=r}return o},right:function(t,n,o,i){for(null==o&&(o=0),null==i&&(i=t.length);o>>1;e(t[r],n)>0?i=r:o=r+1}return o}}},r=i(o),a=r.right,s=r.left,l=a,c=function(e,t){null==t&&(t=u);for(var n=0,o=e.length-1,i=e[0],r=new Array(o<0?0:o);ne?1:t>=e?0:NaN},f=function(e){return null===e?NaN:+e},h=function(e,t){var n,o,i=e.length,r=0,a=-1,s=0,l=0;if(null==t)for(;++a1)return l/(r-1)},m=function(e,t){var n=h(e,t);return n?Math.sqrt(n):n},v=function(e,t){var n,o,i,r=e.length,a=-1;if(null==t){for(;++a=n)for(o=i=n;++an&&(o=n),i=n)for(o=i=n;++an&&(o=n),i0)return[e];if((o=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),r=new Array(i=Math.ceil(t-e+1));++s=0?(r>=C?10:r>=_?5:r>=E?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(r>=C?10:r>=_?5:r>=E?2:1)}function T(e,t,n){var o=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),r=o/i;return r>=C?i*=10:r>=_?i*=5:r>=E&&(i*=2),td;)p.pop(),--f;var h,m=new Array(f+1);for(i=0;i<=f;++i)(h=m[i]=[]).x0=i>0?p[i-1]:u,h.x1=i=1)return+n(e[o-1],o-1,e);var o,i=(o-1)*t,r=Math.floor(i),a=+n(e[r],r,e);return a+(+n(e[r+1],r+1,e)-a)*(i-r)}},F=function(e,t,n){return e=b.call(e,f).sort(o),Math.ceil((n-t)/(2*(P(e,.75)-P(e,.25))*Math.pow(e.length,-1/3)))},I=function(e,t,n){return Math.ceil((n-t)/(3.5*m(e)*Math.pow(e.length,-1/3)))},M=function(e,t){var n,o,i=e.length,r=-1;if(null==t){for(;++r=n)for(o=n;++ro&&(o=n)}else for(;++r=n)for(o=n;++ro&&(o=n);return o},D=function(e,t){var n,o=e.length,i=o,r=-1,a=0;if(null==t)for(;++r=0;)for(t=(o=e[i]).length;--t>=0;)n[--a]=o[t];return n},V=function(e,t){var n,o,i=e.length,r=-1;if(null==t){for(;++r=n)for(o=n;++rn&&(o=n)}else for(;++r=n)for(o=n;++rn&&(o=n);return o},$=function(e,t){for(var n=t.length,o=new Array(n);n--;)o[n]=e[t[n]];return o},j=function(e,t){if(n=e.length){var n,i,r=0,a=0,s=e[a];for(null==t&&(t=o);++ri.valueOf()?a.l("NextDay",a.l(o.format("dddd"))):o.valueOf()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,o){var l;if(void 0===o&&(o=!0),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 c=parseInt(n,10);l=a.DateUtils.monthToString(c-1)}else o&&(l=u.l(n));return void 0!=l&&s.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=d},function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});try{o=window.localStorage}catch(a){console.warn("Unable to access localStorage. Certain features like analytics will not work. If this is unintended, consider adjusting your browser settings to allow third-party cookies and data.\n\n",a),o=null}t.localStorageExists=!!o;var i=function(){function e(e){this.id=e}return e.prototype.save=function(e){try{null!=o&&o.setItem(this.getLocalStorageKey(),JSON.stringify(e))}catch(a){}},e.prototype.load=function(){try{if(null==o)return null;var e=o.getItem(this.getLocalStorageKey());return e&&JSON.parse(e)}catch(a){return null}},e.prototype.remove=function(e){try{if(null!=o)if(void 0==e)o.removeItem(this.getLocalStorageKey());else{var t=this.load();delete t[e],this.save(t)}}catch(a){}},e.prototype.getLocalStorageKey=function(){return"coveo-"+this.id},e}();t.LocalStorageUtils=i;var r=function(){function e(){}return e.prototype.getItem=function(e){try{return o.getItem(e)}catch(t){return null}},e.prototype.removeItem=function(e){try{o.removeItem(e)}catch(t){}},e.prototype.setItem=function(e,t){try{o.setItem(e,t)}catch(n){}},e.prototype.clear=function(){try{o.clear()}catch(e){}},e.prototype.key=function(e){try{return o.key(e)}catch(t){return null}},Object.defineProperty(e.prototype,"length",{get:function(){try{return o.length}catch(e){return 0}},enumerable:!0,configurable:!0}),e}();t.SafeLocalStorage=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(4),r=n(0),a=n(66),s=function(){function e(){}return e.getHash=function(t){void 0===t&&(t=window),o.Assert.exists(t);var n="#"+(t.location.href.split("#")[1]||"");return e.getAjaxcrawlableHash(n)},e.getValue=function(t,n){o.Assert.isNonEmptyString(t),o.Assert.exists(n),n=e.getAjaxcrawlableHash(n);var i=e.getRawValue(t,n);return void 0!=i&&(i=e.getValueDependingOnType(t,i)),i},e.encodeValues=function(t){var n=[];return r.each(t,(function(t,o,a){var s="";i.Utils.isNonEmptyArray(t)?s=e.encodeArray(t):r.isObject(t)&&i.Utils.isNonEmptyArray(r.keys(t))?s=e.encodeObject(t):i.Utils.isNullOrUndefined(t)||(s=i.Utils.safeEncodeURIComponent(t.toString())),""!=s&&n.push(o+"="+s)})),n.join("&")},e.getAjaxcrawlableHash=function(e){return void 0!=e[1]&&"!"==e[1]?e.substring(0,1)+e.substring(2):e},e.getRawValue=function(e,t){o.Assert.exists(e),o.Assert.exists(t),o.Assert.check(0==t.indexOf("#")||""==t);for(var n=t.substr(1).split("&"),i=0,r=!0,a=void 0;r;){var s=n[i].split("=");s[0]==e?(r=!1,a=s[1]):++i>=n.length&&(i=void 0,r=!1)}return a},e.getValueDependingOnType=function(t,n){var o,i=e.getValueType(t,n);if("object"==i)o=e.decodeObject(n);else if("array"==i)o=e.decodeArray(n);else try{o=decodeURIComponent(n)}catch(r){new a.Logger(e).warn("Error while decoding a value from the URL as a standard value",r,t,n)}return o},e.getValueType=function(t,n){return"q"==t?"other":e.isObject(n)?"object":e.startsOrEndsWithSquareBracket(n)?"array":"other"},e.startsWithLeftSquareBracket=function(t){return e.DELIMITER.arrayStartRegExp.test(t)},e.startsWithEncodedLeftSquareBracket=function(t){return 0==t.indexOf(i.Utils.safeEncodeURIComponent(e.DELIMITER.arrayStart))},e.endsWithRightSquareBracket=function(t){return e.DELIMITER.arrayEndRegExp.test(t)},e.endsWithEncodedRightSquareBracket=function(t){var n=i.Utils.safeEncodeURIComponent(e.DELIMITER.arrayEnd),o=t.indexOf(n);return-1!==o&&o==t.length-n.length},e.isObjectStartNotEncoded=function(t){return t.substr(0,1)==e.DELIMITER.objectStart},e.isObjectStartEncoded=function(t){return 0==t.indexOf(i.Utils.safeEncodeURIComponent(e.DELIMITER.objectStart))},e.isObjectEndNotEncoded=function(t){return t.substr(t.length-1)==e.DELIMITER.objectEnd},e.isObjectEndEncoded=function(t){return t.indexOf(i.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd))==t.length-i.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd).length},e.isObject=function(t){var n=e.isObjectStartNotEncoded(t)||e.isObjectStartEncoded(t),o=e.isObjectEndNotEncoded(t)||e.isObjectEndEncoded(t);return n&&o},e.startsOrEndsWithSquareBracket=function(t){var n=e.startsWithLeftSquareBracket(t)||e.startsWithEncodedLeftSquareBracket(t),o=e.endsWithRightSquareBracket(t)||e.endsWithEncodedRightSquareBracket(t);return n||o},e.encodeArray=function(t){var n=r.map(t,(function(e){return i.Utils.safeEncodeURIComponent(e)}));return e.DELIMITER.arrayStart+n.join(",")+e.DELIMITER.arrayEnd},e.encodeObject=function(t){var n=this,o=r.map(t,(function(e,t,o){return'"'+i.Utils.safeEncodeURIComponent(t)+'":'+n.encodeValue(e)}));return e.DELIMITER.objectStart+o.join(" , ")+e.DELIMITER.objectEnd},e.encodeValue=function(t){return r.isArray(t)?e.encodeArray(t):r.isObject(t)?JSON.stringify(t):r.isNumber(t)||r.isBoolean(t)?i.Utils.safeEncodeURIComponent(t.toString()):'"'+i.Utils.safeEncodeURIComponent(t)+'"'},e.decodeObject=function(t){e.isObjectStartEncoded(t)&&e.isObjectEndEncoded(t)&&(t=(t=t.replace(/encodeURIComponent(HashUtils.Delimiter.objectStart)/,e.DELIMITER.objectStart)).replace(i.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd),e.DELIMITER.objectEnd));try{var n=/(\[.*\])/.exec(t);n&&(t=t.replace(/(\[.*\])/,"["+this.decodeArray(n[1]).map((function(e){return'"'+e+'"'})).join(",")+"]"));var o=decodeURIComponent(t);return JSON.parse(o)}catch(r){return new a.Logger(e).warn("Error while decoding a value from the URL as an object",r,t),{}}},e.decodeArray=function(t){var n=e.removeSquareBrackets(t).split(",");return r.chain(n).map((function(n){try{return decodeURIComponent(n)}catch(o){return new a.Logger(e).warn("Error while decoding a value from the URL as an array",o,n,t),null}})).compact().value()},e.removeSquareBrackets=function(t){return e.startsWithEncodedLeftSquareBracket(t)&&(t=t.replace(i.Utils.safeEncodeURIComponent(e.DELIMITER.arrayStart),"")),e.endsWithEncodedRightSquareBracket(t)&&(t=t.replace(i.Utils.safeEncodeURIComponent(e.DELIMITER.arrayEnd),"")),e.startsWithLeftSquareBracket(t)&&(t=t.replace(e.DELIMITER.arrayStart,"")),e.endsWithRightSquareBracket(t)&&(t=t.replace(e.DELIMITER.arrayEnd,"")),t},e.DELIMITER={objectStart:"{",objectEnd:"}",arrayStart:"[",arrayEnd:"]",arrayStartRegExp:/^\[/,arrayEndRegExp:/\]$/},e}();t.HashUtils=s},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]6?t:"h"+e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(4),r=n(74),a=n(184),s=function(){function e(){this.expression=new r.ExpressionBuilder,this.advancedExpression=new r.ExpressionBuilder,this.constantExpression=new r.ExpressionBuilder,this.longQueryExpression=new r.ExpressionBuilder,this.disjunctionExpression=new r.ExpressionBuilder,this.enableQuerySyntax=!1,this.firstResult=0,this.numberOfResults=10,this.requiredFields=[],this.includeRequiredFields=!1,this.enableDidYouMean=!1,this.enableDebug=!1,this.sortCriteria="relevancy",this.retrieveFirstSentences=!0,this.queryFunctions=[],this.rankingFunctions=[],this.groupByRequests=[],this.facetRequests=[],this.facetOptions={},this.categoryFacets=[],this.enableDuplicateFiltering=!1}return e.prototype.build=function(){return{q:this.expression.build(),aq:this.advancedExpression.build(),cq:this.constantExpression.build(),lq:this.longQueryExpression.build(),dq:this.disjunctionExpression.build(),searchHub:this.searchHub,tab:this.tab,locale:this.locale,pipeline:this.pipeline,maximumAge:this.maximumAge,wildcards:this.enableWildcards,questionMark:this.enableQuestionMarks,lowercaseOperators:this.enableLowercaseOperators,partialMatch:this.enablePartialMatch,partialMatchKeywords:this.partialMatchKeywords,partialMatchThreshold:this.partialMatchThreshold,firstResult:this.firstResult,numberOfResults:this.numberOfResults,excerptLength:this.excerptLength,filterField:this.filterField,filterFieldRange:this.filterFieldRange,parentField:this.parentField,childField:this.childField,fieldsToInclude:this.computeFieldsToInclude(),fieldsToExclude:this.fieldsToExclude,enableDidYouMean:this.enableDidYouMean,sortCriteria:this.sortCriteria,sortField:this.sortField,queryFunctions:this.queryFunctions,rankingFunctions:this.rankingFunctions,groupBy:this.groupBy,facets:this.facets,facetOptions:this.facetOptions,categoryFacets:this.categoryFacets,retrieveFirstSentences:this.retrieveFirstSentences,timezone:this.timezone,enableQuerySyntax:this.enableQuerySyntax,enableDuplicateFiltering:this.enableDuplicateFiltering,enableCollaborativeRating:this.enableCollaborativeRating,debug:this.enableDebug,context:this.context,actionsHistory:this.actionsHistory,recommendation:this.recommendation,allowQueriesWithoutKeywords:this.allowQueriesWithoutKeywords,userActions:this.userActions,commerce:this.commerce}},e.prototype.computeCompleteExpression=function(){return this.computeCompleteExpressionParts().full},e.prototype.computeCompleteExpressionParts=function(){return new a.QueryBuilderExpression(this.expression.build(),this.advancedExpression.build(),this.constantExpression.build(),this.disjunctionExpression.build())},e.prototype.computeCompleteExpressionExcept=function(e){return this.computeCompleteExpressionPartsExcept(e).full},e.prototype.computeCompleteExpressionPartsExcept=function(e){r.ExpressionBuilder.merge(this.expression,this.advancedExpression).remove(e);var t=new r.ExpressionBuilder;t.fromExpressionBuilder(this.expression),t.remove(e);var n=new r.ExpressionBuilder;n.fromExpressionBuilder(this.advancedExpression),n.remove(e);var o=new r.ExpressionBuilder;o.fromExpressionBuilder(this.constantExpression),o.remove(e);var i=new r.ExpressionBuilder;return i.fromExpressionBuilder(this.disjunctionExpression),i.remove(e),new a.QueryBuilderExpression(t.build(),n.build(),o.build(),i.build())},e.prototype.addFieldsToInclude=function(e){this.fieldsToInclude=o.uniq((this.fieldsToInclude||[]).concat(e))},e.prototype.addRequiredFields=function(e){this.requiredFields=o.uniq(this.requiredFields.concat(e))},e.prototype.addFieldsToExclude=function(e){this.fieldsToExclude=o.uniq((this.fieldsToInclude||[]).concat(e))},e.prototype.computeFieldsToInclude=function(){return this.includeRequiredFields||null!=this.fieldsToInclude?o.uniq(this.requiredFields.concat(this.fieldsToInclude||[])):null},e.prototype.addContextValue=function(e,t){null==this.context&&(this.context={}),this.context[e]=t},e.prototype.addContext=function(e){null==this.context&&(this.context={}),o.extend(this.context,e)},e.prototype.containsEndUserKeywords=function(){var e=this.build();return i.Utils.isNonEmptyString(e.q)||i.Utils.isNonEmptyString(e.lq)},Object.defineProperty(e.prototype,"groupBy",{get:function(){if(!i.Utils.isEmptyArray(this.groupByRequests))return this.groupByRequests},set:function(e){this.groupByRequests=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"facets",{get:function(){if(!i.Utils.isEmptyArray(this.facetRequests))return this.facetRequests},set:function(e){this.facetRequests=e},enumerable:!0,configurable:!0}),e}();t.QueryBuilder=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(20),r=n(325),a=n(91),s=n(88),l=function(){function e(){this.visitorIdKey="visitorId",this.clientIdKey="clientId",this.storage=new r.CookieAndLocalStorage}return Object.defineProperty(e.prototype,"clientId",{get:function(){return this.storage.getItem(this.visitorIdKey)||null},set:function(e){this.storage.setItem(this.visitorIdKey,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastPageId",{get:function(){var e=s.buildHistoryStore().getHistory(),t=o.findLastIndex(e,(function(e){return"PageView"===e.name}));return-1===t?null:e[t].value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return document.location.href},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"referrer",{get:function(){return document.referrer},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.clearVisitorId(),this.clearClientId()},e.prototype.clearVisitorId=function(){this.storage.removeItem(this.visitorIdKey)},e.prototype.clearClientId=function(){new i.LocalStorageUtils(this.clientIdKey).remove(),a.ScopedCookie.erase(this.clientIdKey)},e}();t.AnalyticsInformation=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.BOOLEAN=0]="BOOLEAN",e[e.NUMBER=1]="NUMBER",e[e.STRING=2]="STRING",e[e.LOCALIZED_STRING=3]="LOCALIZED_STRING",e[e.LIST=4]="LIST",e[e.SELECTOR=5]="SELECTOR",e[e.CHILD_HTML_ELEMENT=6]="CHILD_HTML_ELEMENT",e[e.TEMPLATE=7]="TEMPLATE",e[e.FIELD=8]="FIELD",e[e.FIELDS=9]="FIELDS",e[e.ICON=10]="ICON",e[e.COLOR=11]="COLOR",e[e.OBJECT=12]="OBJECT",e[e.QUERY=13]="QUERY",e[e.HELPER=14]="HELPER",e[e.LONG_STRING=15]="LONG_STRING",e[e.JSON=16]="JSON",e[e.JAVASCRIPT=17]="JAVASCRIPT",e[e.NONE=18]="NONE",e[e.QUERY_EXPRESSION=19]="QUERY_EXPRESSION"}(t.ComponentOptionsType||(t.ComponentOptionsType={}))},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(217),r=n(218),a=n(0),s=function(){function e(e,t,n){var o=this;this.expression=t,this.input=n,a.isString(e)?this.value=e:a.isArray(e)&&(this.subResults=e,a.forEach(this.subResults,(function(e){e.parent=o})))}return e.prototype.isSuccess=function(){return null!=this.value||null!=this.subResults&&a.all(this.subResults,(function(e){return e.isSuccess()}))},e.prototype.path=function(e){var t=null!=this.parent&&this.parent!=e?this.parent.path(e):[];return t.push(this),t},e.prototype.findParent=function(e){for(var t=this,n=a.isString(e)?function(t){return e==t.expression.id}:e;null!=t&&!n(t);)t=t.parent;return t},e.prototype.find=function(e){var t=a.isString(e)?function(t){return e==t.expression.id}:e;if(t(this))return this;if(this.subResults)for(var n=0;nthis.getLength())return[];if(null!=t){if(a.isString(t)){if(t==this.expression.id)return[this]}else if(t(this))return[this]}else if(null!=(null==this.value&&null==this.subResults?this.input:this.value))return[this];if(null!=this.subResults){for(var n=[],o=0;o0?a.last(e).input:"";return"Expected "+a.map(e,(function(e){return e.getHumanReadable()})).join(" or ")+" but "+(t.length>0?JSON.stringify(t[0]):"end of input")+" found."},e.prototype.before=function(){if(null==this.parent)return"";var e=a.indexOf(this.parent.subResults,this);return this.parent.before()+a.chain(this.parent.subResults).first(e).map((function(e){return e.toString()})).join("").value()},e.prototype.after=function(){if(null==this.parent)return"";var e=a.indexOf(this.parent.subResults,this);return a.chain(this.parent.subResults).last(this.parent.subResults.length-e-1).map((function(e){return e.toString()})).join("").value()+this.parent.after()},e.prototype.getLength=function(){return null!=this.value?this.value.length:null!=this.subResults?a.reduce(this.subResults,(function(e,t){return e+t.getLength()}),0):this.input.length},e.prototype.toHtmlElement=function(){var e=document.createElement("span"),t=null!=this.expression?this.expression.id:null;return null!=t&&e.setAttribute("data-id",t),e.setAttribute("data-success",this.isSuccess().toString()),null!=this.value?(e.appendChild(document.createTextNode(this.value)),e.setAttribute("data-value",this.value)):null!=this.subResults?a.each(this.subResults,(function(t){e.appendChild(t.toHtmlElement())})):(e.appendChild(document.createTextNode(this.input)),e.setAttribute("data-input",this.input),e.className="magic-box-error"+(this.input.length>0?"":" magic-box-error-empty")),e.result=this,e},e.prototype.clean=function(t){if(null!=t||!this.isSuccess()){t=t||a.last(this.getBestExpect()).path(this);var n=a.first(t);if(null!=n){var o=a.indexOf(this.subResults,n),i=-1==o?[]:a.map(a.first(this.subResults,o),(function(e){return e.clean()}));return i.push(n.clean(a.rest(t))),new e(i,this.expression,this.input)}return new e(null,this.expression,this.input)}return null!=this.value?new e(this.value,this.expression,this.input):null!=this.subResults?new e(a.map(this.subResults,(function(e){return e.clean()})),this.expression,this.input):void 0},e.prototype.clone=function(){return null!=this.value?new e(this.value,this.expression,this.input):null!=this.subResults?new e(a.map(this.subResults,(function(e){return e.clone()})),this.expression,this.input):new e(null,this.expression,this.input)},e.prototype.toString=function(){return null!=this.value?this.value:null!=this.subResults?a.map(this.subResults,(function(e){return e.toString()})).join(""):this.input},e.prototype.getHumanReadable=function(){return this.expression instanceof r.ExpressionConstant?JSON.stringify(this.expression.value):this.expression.id},e}();t.Result=s;var l=function(e){function t(t){var n=e.call(this,[t],i.ExpressionEndOfInput,t.input)||this,o=new s(null,i.ExpressionEndOfInput,t.input.substr(t.getLength()));return o.parent=n,n.subResults.push(o),n}return o(t,e),t}(s);t.EndOfInputResult=l},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}l((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[0,i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]this.getSmallScreenWidth(),"Cannot set medium screen width ("+e+") smaller or equal to the current small screen width ("+this.getSmallScreenWidth()+")"),this.mediumScreenWidth=e},e.prototype.setResponsiveMode=function(e){this.responsiveMode=e},e.prototype.getSmallScreenWidth=function(){return"small"===this.responsiveMode?Number.POSITIVE_INFINITY:"auto"!==this.responsiveMode?0:null==this.smallScreenWidth?t.SMALL_SCREEN_WIDTH:this.smallScreenWidth},e.prototype.getMediumScreenWidth=function(){return"medium"===this.responsiveMode?Number.POSITIVE_INFINITY:"auto"!==this.responsiveMode?0:null==this.mediumScreenWidth?t.MEDIUM_SCREEN_WIDTH:this.mediumScreenWidth},e.prototype.getResponsiveMode=function(){return this.responsiveMode},e.prototype.isSmallScreenWidth=function(){return null!=this.windoh.clientWidth?this.windoh.clientWidth<=this.getSmallScreenWidth():document.body.clientWidth<=this.getSmallScreenWidth()},e.prototype.isMediumScreenWidth=function(){return!this.isSmallScreenWidth()&&(null!=this.windoh.clientWidth?this.windoh.clientWidth<=this.getMediumScreenWidth():document.body.clientWidth<=this.getMediumScreenWidth())},e.prototype.isLargeScreenWidth=function(){return!this.isSmallScreenWidth()&&!this.isMediumScreenWidth()},e}();t.ResponsiveComponents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.settingsPopulateMenu="settingsPopulateMenu",e}();t.SettingsEvents=o},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?new l.TemplateList(o.compact(i.map((function(t){return e.createResultTemplateFromElement(t)})))):null},e}();t.TemplateComponentOptions=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(6),r=n(0),a=n(3),s=function(){function e(e,t,n,o){void 0===e&&(e=function(e){}),void 0===n&&(n=i.l),this.onChange=e,this.listOfValues=t,this.getDisplayValue=n,this.label=o,this.optionsElement=[],this.buildContent(),this.select(0,!1),this.bindEvents()}return e.doExport=function(){a.exportGlobally({Dropdown:e})},e.prototype.reset=function(){this.select(0,!1)},e.prototype.setId=function(e){o.$$(this.element).setAttribute("id",e)},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.selectElement.value},e.prototype.select=function(e,t){void 0===t&&(t=!0),this.selectOption(this.optionsElement[e],t)},e.prototype.build=function(){return this.element},e.prototype.setValue=function(e){var t=this;r.each(this.optionsElement,(function(n){o.$$(n).getAttribute("data-value")==e&&t.selectOption(n)}))},e.prototype.selectOption=function(e,t){void 0===t&&(t=!0),this.selectElement.value=e.value,t&&this.onChange(this)},e.prototype.buildContent=function(){var e=this;this.selectElement=o.$$("select",{className:"coveo-dropdown"}).el,this.label&&this.selectElement.setAttribute("aria-label",i.l(this.label));var t=this.buildOptions();r.each(t,(function(t){o.$$(e.selectElement).append(t)})),this.element=this.selectElement},e.prototype.buildOptions=function(){var e=this,t=[];return r.each(this.listOfValues,(function(n){t.push(e.buildOption(n))})),t},e.prototype.buildOption=function(e){var t=o.$$("option");return t.setAttribute("data-value",e),t.setAttribute("value",e),t.text(this.getDisplayValue(e)),this.optionsElement.push(t.el),t.el},e.prototype.bindEvents=function(){var e=this;o.$$(this.selectElement).on("change",(function(){return e.onChange(e)}))},e}();t.Dropdown=s},function(e,t,n){"use strict";var o=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function i(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function r(){}var a=.7,s=1/a,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,p=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),f=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),h=new RegExp("^rgba\\("+[l,l,l,c]+"\\)$"),m=new RegExp("^rgba\\("+[u,u,u,c]+"\\)$"),v=new RegExp("^hsl\\("+[c,u,u]+"\\)$"),y=new RegExp("^hsla\\("+[c,u,u,c]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(){return this.rgb().formatHex()}function w(){return this.rgb().formatRgb()}function x(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?S(t):3===n?new O(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?C(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?C(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=p.exec(e))?new O(t[1],t[2],t[3],1):(t=f.exec(e))?new O(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h.exec(e))?C(t[1],t[2],t[3],t[4]):(t=m.exec(e))?C(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=v.exec(e))?R(t[1],t[2]/100,t[3]/100,1):(t=y.exec(e))?R(t[1],t[2]/100,t[3]/100,t[4]):g.hasOwnProperty(e)?S(g[e]):"transparent"===e?new O(NaN,NaN,NaN,0):null}function S(e){return new O(e>>16&255,e>>8&255,255&e,1)}function C(e,t,n,o){return o<=0&&(e=t=n=NaN),new O(e,t,n,o)}function _(e){return e instanceof r||(e=x(e)),e?new O((e=e.rgb()).r,e.g,e.b,e.opacity):new O}function E(e,t,n,o){return 1===arguments.length?_(e):new O(e,t,n,null==o?1:o)}function O(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function A(){return"#"+k(this.r)+k(this.g)+k(this.b)}function T(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function k(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function R(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new I(e,t,n,o)}function P(e){if(e instanceof I)return new I(e.h,e.s,e.l,e.opacity);if(e instanceof r||(e=x(e)),!e)return new I;if(e instanceof I)return e;var t=(e=e.rgb()).r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),s=NaN,l=a-i,c=(a+i)/2;return l?(s=t===a?(n-o)/l+6*(n0&&c<1?0:s,new I(s,l,c,e.opacity)}function F(e,t,n,o){return 1===arguments.length?P(e):new I(e,t,n,null==o?1:o)}function I(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function M(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}o(r,x,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHsl:function(){return P(this).formatHsl()},formatRgb:w,toString:w}),o(O,E,i(r,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new O(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?a:Math.pow(a,e),new O(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatRgb:T,toString:T})),o(I,F,i(r,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new I(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?a:Math.pow(a,e),new I(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new O(M(e>=240?e-240:e+120,i,o),M(e,i,o),M(e<120?e+240:e-120,i,o),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var D=Math.PI/180,N=180/Math.PI,L=.96422,V=.82521,$=4/29,j=6/29,B=3*j*j;function U(e){if(e instanceof H)return new H(e.l,e.a,e.b,e.opacity);if(e instanceof J)return X(e);e instanceof O||(e=_(e));var t,n,o=G(e.r),i=G(e.g),r=G(e.b),a=q((.2225045*o+.7168786*i+.0606169*r)/1);return o===i&&i===r?t=n=a:(t=q((.4360747*o+.3850649*i+.1430804*r)/L),n=q((.0139322*o+.0971045*i+.7141733*r)/V)),new H(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Q(e,t,n,o){return 1===arguments.length?U(e):new H(e,t,n,null==o?1:o)}function H(e,t,n,o){this.l=+e,this.a=+t,this.b=+n,this.opacity=+o}function q(e){return e>.008856451679035631?Math.pow(e,1/3):e/B+$}function z(e){return e>j?e*e*e:B*(e-$)}function W(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function G(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Y(e){if(e instanceof J)return new J(e.h,e.c,e.l,e.opacity);if(e instanceof H||(e=U(e)),0===e.a&&0===e.b)return new J(NaN,0=1?(n=1,t-1):Math.floor(n*t),i=e[o],r=e[o+1],a=o>0?e[o-1]:2*i-r,s=o180||n<-180?n-360*Math.round(n/360):n):fe(isNaN(e)?t:e)}function ve(e){return 1===(e=+e)?ye:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}(t,n,e):fe(isNaN(t)?n:t)}}function ye(e,t){var n=t-e;return n?he(e,n):fe(isNaN(e)?t:e)}var ge=function e(t){var n=ve(t);function o(e,t){var o=n((e=E(e)).r,(t=E(t)).r),i=n(e.g,t.g),r=n(e.b,t.b),a=ye(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=i(t),e.b=r(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function be(e){return function(t){var n,o,i=t.length,r=new Array(i),a=new Array(i),s=new Array(i);for(n=0;nr&&(i=t.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Pe(n,o)})),r=Me.lastIndex;return r180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(i(n)+"rotate(",null,o)-2,x:Pe(e,t)})):t&&n.push(i(n)+"rotate("+t+o)}(r.rotate,a.rotate,s,l),function(e,t,n,r){e!==t?r.push({i:n.push(i(n)+"skewX(",null,o)-2,x:Pe(e,t)}):t&&n.push(i(n)+"skewX("+t+o)}(r.skewX,a.skewX,s,l),function(e,t,n,o,r,a){if(e!==n||t!==o){var s=r.push(i(r)+"scale(",null,",",null,")");a.push({i:s-4,x:Pe(e,n)},{i:s-2,x:Pe(t,o)})}else 1===n&&1===o||r.push(i(r)+"scale("+n+","+o+")")}(r.scaleX,r.scaleY,a.scaleX,a.scaleY,s,l),r=a=null,function(e){for(var t,n=-1,o=l.length;++n=0;){var l={begin:a,size:n.length,replacementSize:i.length};s.push(l),a=(t=t.slice(0,a)+i+t.slice(a+n.length)).lastIndexOf(n)}return r.holes=s,r.value=t,r},e.shortenPath=function(t,n){var i=new e,r=t;if(o.Utils.isNullOrEmptyString(r)||r.length<=n)return i.value=r,i;var a=[],s=-1;if(-1!==(s=o.Utils.stringStartsWith(r,"\\\\")?r.indexOf("\\",s+2):r.indexOf("\\"))){for(var l=0,c=r.indexOf("\\",s+1);-1!==c&&r.length-l+e.SHORTEN_END.length>n;)l=c-s-1,c=r.indexOf("\\",c+1);if(l>0){r=r.slice(0,s+1)+e.SHORTEN_END+r.slice(l);var u={begin:s+1,size:l-e.SHORTEN_END.length,replacementSize:e.SHORTEN_END.length};a.push(u)}}if(r.length>n){var d=r.length-n+e.SHORTEN_END.length,p=r.length-d;r=r.slice(0,p)+e.SHORTEN_END,u={begin:p,size:d,replacementSize:e.SHORTEN_END.length},a.push(u)}return i.holes=a,i.value=r,i},e.shortenString=function(t,n,i){void 0===n&&(n=200);var r=t;i=o.Utils.toNotNullString(i);var a=new e;if(o.Utils.isNullOrEmptyString(r)||n<=i.length)return a.value=r,a;if(r.length<=n)return a.value=r,a;var s=r;if(n-=i.length,s=s.slice(0,n)," "!==r.charAt(s.length)){var l=s.lastIndexOf(" ");-1!==l&&s.length-ln;)s=l-a-1,l=t.indexOf("/",l+1);if(s>0){t=t.slice(0,a+1)+e.SHORTEN_END+t.slice(a+1+s);var c={begin:a+1,size:s,replacementSize:e.SHORTEN_END.length};r.push(c)}}if(t.length>n){var u=t.length-n+e.SHORTEN_END.length,d=t.length-u;t=t.slice(0,d)+e.SHORTEN_END,c={begin:d,size:u,replacementSize:e.SHORTEN_END.length},r.push(c)}return i.holes=r,i.value=t,i},e.SHORTEN_END="...",e.WORD_SHORTER=10,e}();t.StringAndHoles=s;var l=function(){function e(){}return e.highlightString=function(e,t,n,a){if(i.Assert.isNotUndefined(t),i.Assert.isNotNull(t),i.Assert.isNonEmptyString(a),o.Utils.isNullOrEmptyString(e))return e;for(var s=e.length,l="",c=0,u=0;u=y&&f=y&&f=y&&p=g)p=y+v.replacementSize,f-=v.size-v.replacementSize;else if(p=g)f-=v.size-v.replacementSize;else if(p>=g){var b=v.size-v.replacementSize;p-=b,f-=b}}}if(h||p===f)continue}if(f>s)break;c<=p&&(l+=r.escape(e.slice(c,p)),l+='"),c=f}return c!=s&&(l+=r.escape(e.slice(c))),l},e.highlight=function(e,t,n){var o=[],i=RegExp(t,"i"),r=e.split(i),a=r.pop(),s=0;if(r.forEach((function(i){if(i){var r=c(i);o.push(r.el),s+=i.length}var a=c(e.substring(s,s+t.length));a.addClass(n),o.push(a.el),s+=t.length})),a){var l=c(a);o.push(l.el)}return o},e}();function c(e){var t=a.$$("span");return t.text(e),t}t.HighlightUtils=l},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=this.numberOfValues||!this.canFetchMore?this.rebuildValueElements():this.triggerMoreQuery()},t.prototype.showLess=function(){x.$$(this.lessElement).removeClass("coveo-active"),this.currentPage=0,this.updateNumberOfValues(),x.$$(this.moreElement).addClass("coveo-active"),this.values.sortValuesDependingOnStatus(this.numberOfValues),this.rebuildValueElements(),this.logAnalyticsFacetShowMoreLess(E.analyticsActionCauseList.facetShowLess)},t.prototype.collapse=function(){this.ensureDom(),this.facetHeader&&this.facetHeader.collapseFacet()},t.prototype.expand=function(){this.ensureDom(),this.facetHeader&&this.facetHeader.expandFacet()},t.prototype.triggerNewQuery=function(e){e?this.queryController.executeQuery({beforeExecuteQuery:e}):this.queryController.executeQuery({ignoreWarningSearchEvent:!0}),this.showWaitingAnimation()},t.prototype.handleDeferredQuerySuccess=function(e){p.Assert.exists(e),this.unfadeInactiveValuesInMainList(),this.hideWaitingAnimation();var t=e.results.groupByResults[this.facetQueryController.lastGroupByRequestIndex];this.facetQueryController.lastGroupByResult=t,t||(this.keepDisplayedValuesNextTime=!1),1==this.values.getAll().length&&(this.keepDisplayedValuesNextTime=!1),this.processNewGroupByResults(t)},t.prototype.handleQueryError=function(){this.updateValues(new U.FacetValues),this.updateAppearanceDependingOnState(),this.hideWaitingAnimation()},t.prototype.handlePopulateBreadcrumb=function(e){if(p.Assert.exists(e),this.values.hasSelectedOrExcludedValues()){var t=new F.BreadcrumbValueList(this,this.values.getSelected().concat(this.values.getExcluded()),P.BreadcrumbValueElement,{headingLevel:e.headingLevel}).build();e.breadcrumbs.push({element:t})}},t.prototype.handlePopulateSearchAlerts=function(e){if(this.values.hasSelectedOrExcludedValues()){var t=this.values.getExcluded(),n=this.values.getSelected();r.isEmpty(t)||e.text.push({value:new F.BreadcrumbValueList(this,t,P.BreadcrumbValueElement).buildAsString(),lineThrough:!0}),r.isEmpty(n)||e.text.push({value:new F.BreadcrumbValueList(this,n,P.BreadcrumbValueElement).buildAsString(),lineThrough:!1})}},t.prototype.initFacetQueryController=function(){this.facetQueryController=new a.FacetQueryController(this)},t.prototype.initFacetValuesList=function(){this.facetValuesList=new Q.FacetValuesList(this,j.FacetValueElement),this.element.appendChild(this.facetValuesList.build())},t.prototype.initFacetSearch=function(){this.facetSearch=new M.FacetSearch(this,N.FacetSearchValuesList,this.root),this.element.appendChild(this.facetSearch.build())},t.prototype.facetValueHasChanged=function(){var e=this;this.updateQueryStateModel(),this.rebuildValueElements(),f.Defer.defer((function(){e.updateAppearanceDependingOnState()}))},t.prototype.updateAppearanceDependingOnState=function(){x.$$(this.element).toggleClass("coveo-active",this.values.hasSelectedOrExcludedValues()),x.$$(this.element).toggleClass("coveo-facet-empty",!this.isAnyValueCurrentlyDisplayed()),x.$$(this.facetHeader.eraserElement).toggleClass("coveo-facet-header-eraser-visible",this.values.hasSelectedOrExcludedValues())},t.prototype.initQueryEvents=function(){var e=this;this.bind.onRootElement(c.QueryEvents.duringQuery,(function(){return e.handleDuringQuery()})),this.bind.onRootElement(c.QueryEvents.buildingQuery,(function(t){return e.handleBuildingQuery(t)})),this.bind.onRootElement(c.QueryEvents.doneBuildingQuery,(function(t){return e.handleDoneBuildingQuery(t)})),this.bind.onRootElement(c.QueryEvents.deferredQuerySuccess,(function(t){return e.handleDeferredQuerySuccess(t)})),this.bind.onRootElement(c.QueryEvents.queryError,(function(){return e.handleQueryError()}))},t.prototype.initQueryStateEvents=function(){var e=this;this.includedAttributeId=m.QueryStateModel.getFacetId(this.options.id),this.excludedAttributeId=m.QueryStateModel.getFacetId(this.options.id,!1),this.operatorAttributeId=m.QueryStateModel.getFacetOperator(this.options.id),this.lookupValueAttributeId=m.QueryStateModel.getFacetLookupValue(this.options.id),this.queryStateModel.registerNewAttribute(this.includedAttributeId,[]),this.queryStateModel.registerNewAttribute(this.excludedAttributeId,[]),this.queryStateModel.registerNewAttribute(this.operatorAttributeId,""),this.queryStateModel.registerNewAttribute(this.lookupValueAttributeId,{}),this.bind.onQueryState(h.MODEL_EVENTS.CHANGE,void 0,(function(t){return e.handleQueryStateChanged(t)}))},t.prototype.initComponentStateEvents=function(){this.componentStateId=m.QueryStateModel.getFacetId(this.options.id),this.componentStateModel.registerComponent(this.componentStateId,this)},t.prototype.initOmniboxEvents=function(){var e=this;this.options.includeInOmnibox&&this.bind.onRootElement(l.OmniboxEvents.populateOmnibox,(function(t){return e.handlePopulateOmnibox(t)}))},t.prototype.initBreadCrumbEvents=function(){var e=this;this.options.includeInBreadcrumb&&(this.bind.onRootElement(s.BreadcrumbEvents.populateBreadcrumb,(function(t){return e.handlePopulateBreadcrumb(t)})),this.bind.onRootElement(s.BreadcrumbEvents.clearBreadcrumb,(function(t){return e.handleClearBreadcrumb()})))},t.prototype.initSearchAlertEvents=function(){var e=this;this.bind.onRootElement(u.SearchAlertsEvents.searchAlertsPopulateMessage,(function(t){return e.handlePopulateSearchAlerts(t)}))},t.prototype.handleOmniboxWithStaticValue=function(e){var t=this,n=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),o=r.first(r.filter(this.getDisplayedValues(),(function(e){var o=t.getValueCaption(t.facetValuesList.get(e).facetValue);return n.test(o)})),this.options.numberOfValuesInOmnibox),i=r.map(o,(function(e){return t.facetValuesList.get(e).facetValue})),a=new z.OmniboxValuesList(this,i,e,q.OmniboxValueElement).build();e.rows.push({element:a,zIndex:this.omniboxZIndex})},t.prototype.processNewGroupByResults=function(e){this.logger.trace("Displaying group by results",e),void 0!=e&&void 0!=e.values&&(this.nbAvailableValues=e.values.length);var t=new U.FacetValues(e);this.updateValues(t),this.canFetchMore=this.numberOfValues0&&!this.options.useAnd&&this.values.updateDeltaWithFilteredFacetValues(new U.FacetValues,this.options.isMultiValueField),this.values.hasSelectedOrExcludedValues()&&!this.options.useAnd&&this.options.isMultiValueField||(this.rebuildValueElements(),this.updateAppearanceDependingOnState(),this.ensurePinnedFacetHasntMoved()),this.keepDisplayedValuesNextTime=!1},t.prototype.updateQueryStateModel=function(){this.listenToQueryStateChange=!1,this.updateExcludedQueryStateModel(),this.updateIncludedQueryStateModel(),this.facetHeader.updateOperatorQueryStateModel(),this.updateLookupValueQueryStateModel(),this.listenToQueryStateChange=!0},t.prototype.rebuildValueElements=function(){this.updateNumberOfValues(),this.facetValuesList.rebuild(this.numberOfValues),this.shouldRenderMoreLess()?(this.updateMoreLess(),this.shouldRenderFacetSearch()&&this.updateSearchElement(this.nbAvailableValues>this.numberOfValues)):this.shouldRenderFacetSearch()&&this.updateSearchElement()},t.prototype.updateSearchElement=function(e){var t=this;if(void 0===e&&(e=!0),e){var n=new W.ValueElementRenderer(this,B.FacetValue.create(v.l("Search")));this.searchContainer=n.build().withNo([n.excludeIcon,n.icon]),x.$$(this.searchContainer.listItem).addClass("coveo-facet-search-button"),(new y.AccessibleButton).withElement(this.searchContainer.accessibleElement).withLabel(v.l("SearchFacetResults",this.options.title)).withEnterKeyboardAction((function(e){return t.toggleSearchMenu(e)})).build(),this.setCollapsedFacetSearchAccessibilityAttributes(),w.DeviceUtils.isMobileDevice()&&x.$$(this.searchContainer.label).on("click",(function(e){return t.toggleSearchMenu(e)})),x.$$(this.searchContainer.checkbox).on("change",(function(){x.$$(t.element).addClass("coveo-facet-searching"),t.facetSearch.focus()})),this.facetValuesList.valueContainer.appendChild(this.searchContainer.listItem)}},t.prototype.updateMoreLess=function(e,t){void 0===e&&(e=this.getMinimumNumberOfValuesToDisplay()this.numberOfValues),e?x.$$(this.lessElement).addClass("coveo-active"):x.$$(this.lessElement).removeClass("coveo-active"),t?x.$$(this.moreElement).addClass("coveo-active"):x.$$(this.moreElement).removeClass("coveo-active"),e||t?x.$$(this.footerElement).removeClass("coveo-facet-empty"):x.$$(this.footerElement).addClass("coveo-facet-empty")},t.prototype.handleClickMore=function(){this.showMore()},t.prototype.handleClickLess=function(){this.showLess()},t.prototype.toggleSearchMenu=function(e){var t=this.searchContainer;t.checkbox.getAttribute("checked")?t.checkbox.removeAttribute("checked"):t.checkbox.setAttribute("checked","checked"),x.$$(t.checkbox).trigger("change"),e.stopPropagation(),e.preventDefault()},t.prototype.checkForComputedFieldAndSort=function(){-1!=this.options.sortCriteria.toLowerCase().indexOf("computedfield")&&_.Utils.isNullOrUndefined(this.options.computedField)&&this.logger.warn("Sort criteria is specified as ComputedField, but the facet uses no computed field. Facet will always be empty !",this)},t.prototype.checkForValueCaptionType=function(){this.options.valueCaption&&"function"==typeof this.options.valueCaption&&(this.options.enableFacetSearch=!1,this.options.includeInOmnibox=!1,this.logger.warn("Using a function as valueCaption is now deprecated. Use a json key value pair instead. Facet search and omnibox has been disabled for this facet",this))},t.prototype.checkForCustomSort=function(){void 0==this.options.customSort||r.contains(this.options.availableSorts,"custom")||this.options.availableSorts.unshift("custom"),"custom"==this.options.availableSorts[0]&&(this.options.sortCriteria="nosort")},t.prototype.initDependsOnManager=function(){var e=this,t={reset:function(){return e.reset()},ref:this};this.dependsOnManager=new b.DependsOnManager(t)},t.prototype.dependsOnUpdateParentDisplayValue=function(){var e=this;if(this.options.dependsOn){var n=g.ComponentsTypes.getAllFacetInstancesFromElement(this.root).filter((function(n){return n instanceof t&&n.options.id===e.options.dependsOn}));n.length?n.length>1?this.logger.warn('Multiple facets with id "'+this.options.dependsOn+'" found.',"A given facet may only depend on a single other facet.","Ensure that each facet in your search interface has a unique id.","The master facet cannot be updated.",n):n[0].keepDisplayedValuesNextTime=!1:this.logger.warn('Unable to find a Facet with the id or field "'+this.options.dependsOn+'".',"The master facet values can't be updated.")}},t.prototype.initBottomAndTopSpacer=function(){var e=this,t=x.$$(this.options.paddingContainer).find(".coveo-bottomSpace"),n=x.$$(this.options.paddingContainer).find(".coveo-topSpace");this.options.preservePosition&&(x.$$(this.options.paddingContainer).on("mouseleave",(function(){return e.unpinFacetPosition()})),this.pinnedTopSpace=n,this.pinnedBottomSpace=t,this.pinnedTopSpace||(this.pinnedTopSpace=document.createElement("div"),x.$$(this.pinnedTopSpace).addClass("coveo-topSpace"),x.$$(this.pinnedTopSpace).insertBefore(this.options.paddingContainer.firstChild)),this.pinnedBottomSpace||(this.pinnedBottomSpace=document.createElement("div"),x.$$(this.pinnedBottomSpace).addClass("coveo-bottomSpace"),this.options.paddingContainer.appendChild(this.pinnedBottomSpace)))},t.prototype.updateIncludedQueryStateModel=function(){var e={included:this.getSelectedValues(),title:this.includedAttributeId};this.queryStateModel.set(this.includedAttributeId,e.included)},t.prototype.updateExcludedQueryStateModel=function(){var e={title:this.excludedAttributeId,excluded:this.getExcludedValues()};this.queryStateModel.set(this.excludedAttributeId,e.excluded)},t.prototype.updateLookupValueQueryStateModel=function(){if(this.options.lookupField){var e={};r.each(this.values.getSelected().concat(this.values.getExcluded()),(function(t){e[t.value]=t.lookupValue})),this.queryStateModel.set(this.lookupValueAttributeId,e)}},t.prototype.handleQueryStateChangedOperator=function(e){"and"==e?this.switchToAnd():"or"==e&&this.switchToOr()},t.prototype.handleQueryStateChangedIncluded=function(e){var t=r.difference(this.getSelectedValues(),e);_.Utils.isNonEmptyArray(t)&&this.deselectMultipleValues(t),_.Utils.arrayEqual(this.getSelectedValues(),e,!1)||this.selectMultipleValues(e)},t.prototype.handleQueryStateChangedExcluded=function(e){var t=r.difference(this.getExcludedValues(),e);_.Utils.isNonEmptyArray(t)&&this.unexcludeMultipleValues(t),_.Utils.arrayEqual(this.getExcludedValues(),e,!1)||this.excludeMultipleValues(e)},t.prototype.handleLookupvalueChanged=function(e){var t=this;r.each(e,(function(e,n){t.facetValuesList.get(decodeURIComponent(n)).facetValue.lookupValue=decodeURIComponent(e)}))},t.prototype.handleQueryStateChanged=function(e){p.Assert.exists(e),this.ensureDom(),this.dependsOnUpdateParentDisplayValue();var t=function(e){return e&&(e=r.map(e,(function(e){return e.trim()}))),e},n=e.attributes,o=t(n[this.includedAttributeId]),i=t(n[this.excludedAttributeId]),a=n[this.operatorAttributeId],s=n[this.lookupValueAttributeId];this.listenToQueryStateChange&&(_.Utils.isNullOrEmptyString(a)||this.handleQueryStateChangedOperator(a),_.Utils.isNullOrUndefined(o)||this.handleQueryStateChangedIncluded(o),_.Utils.isNullOrUndefined(i)||this.handleQueryStateChangedExcluded(i),_.Utils.isNullOrUndefined(s)||this.handleLookupvalueChanged(s))},t.prototype.handlePopulateOmnibox=function(e){p.Assert.exists(e),p.Assert.exists(e.completeQueryExpression),this.queryController.ensureCreatedQueryBuilder(),this.canFetchMore?this.handleOmniboxWithSearchInFacet(e):this.handleOmniboxWithStaticValue(e)},t.prototype.handleOmniboxWithSearchInFacet=function(e){var t=this,n=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),o=new Promise((function(o,i){var a=new D.FacetSearchParameters(t);a.setValueToSearch(e.completeQueryExpression.word),a.nbResults=t.options.numberOfValuesInOmnibox,t.facetQueryController.search(a).then((function(i){var a=r.map(r.filter(i,(function(e){return n.test(e.lookupValue)})),(function(e){return t.values.get(e.lookupValue)||B.FacetValue.create(e)})),s=new z.OmniboxValuesList(t,a,e,q.OmniboxValueElement).build();o({element:s,zIndex:t.omniboxZIndex})})).catch((function(){o({element:void 0})}))}));e.rows.push({deferred:o})},t.prototype.handleDuringQuery=function(){this.ensureDom(),this.keepDisplayedValuesNextTime||this.fadeInactiveValuesInMainList(this.options.facetSearchDelay)},t.prototype.handleBuildingQuery=function(e){if(p.Assert.exists(e),p.Assert.exists(e.queryBuilder),this.facetQueryController.prepareForNewQuery(),this.values.hasSelectedOrExcludedValues()){var t=this.facetQueryController.computeOurFilterExpression();this.logger.trace("Putting filter in query",t),e.queryBuilder.advancedExpression.add(t)}},t.prototype.handleDoneBuildingQuery=function(e){p.Assert.exists(e),p.Assert.exists(e.queryBuilder);var t=e.queryBuilder;this.facetQueryController.putGroupByIntoQueryBuilder(t)},t.prototype.handleClearBreadcrumb=function(){this.reset()},t.prototype.updateValues=function(e){p.Assert.exists(e),this.keepDisplayedValuesNextTime?this.values.updateCountsFromNewValues(e):this.values=this.consolidateAndSortNewFacetValues(e),this.updateNumberOfValues()},t.prototype.consolidateAndSortNewFacetValues=function(e){return e.importActiveValuesFromOtherList(this.values),e.sort(this.optionsToSortFacetValues),e},Object.defineProperty(t.prototype,"optionsToSortFacetValues",{get:function(){return{facetValuesOrder:this.facetValuesOrder,numberOfValues:this.numberOfValues}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facetValuesOrder",{get:function(){return new H.FacetValuesOrder(this,this.facetSort)},enumerable:!0,configurable:!0}),t.prototype.ensureFacetValueIsInList=function(e){p.Assert.exists(e),this.values.contains(e.value)||this.values.add(e)},t.prototype.isAnyValueCurrentlyDisplayed=function(){return!this.values.isEmpty()},t.prototype.buildFacetContent=function(){this.headerElement=this.buildHeader(),this.element.appendChild(this.headerElement),this.initFacetValuesList(),this.shouldRenderFacetSearch()&&this.initFacetSearch(),this.shouldRenderMoreLess()&&(this.moreElement=this.buildMore(),this.lessElement=this.buildLess()),this.footerElement=this.buildFooter(),this.element.appendChild(this.footerElement),this.lessElement&&this.moreElement&&(this.footerElement.appendChild(this.lessElement),this.footerElement.appendChild(this.moreElement))},t.prototype.buildHeader=function(){var e=this.options.headerIcon;this.options.headerIcon==this.options.field&&(e=void 0),this.facetHeader=new I.FacetHeader({facetElement:this.element,title:this.options.title,icon:e,field:this.options.field,enableClearElement:!0,enableCollapseElement:this.options.enableCollapse,facet:this,settingsKlass:this.options.enableSettings?L.FacetSettings:void 0,sortKlass:V.FacetSort,availableSorts:this.options.availableSorts});var t=this.facetHeader.build();return this.facetSettings=this.facetHeader.settings,this.facetSort=this.facetHeader.sort,t},t.prototype.unpinFacetPosition=function(){this.shouldFacetUnpin()&&this.options.preservePosition&&(x.$$(this.pinnedTopSpace).addClass("coveo-with-animation"),x.$$(this.pinnedBottomSpace).addClass("coveo-with-animation"),this.pinnedTopSpace.style.height="0px",this.pinnedBottomSpace.style.height="0px"),this.unpinnedViewportPosition=void 0,this.pinnedViewportPosition=void 0},t.prototype.isFacetPinned=function(){return _.Utils.exists(this.pinnedViewportPosition)},t.prototype.shouldFacetUnpin=function(){return _.Utils.exists(this.unpinnedViewportPosition)},t.prototype.ensurePinnedFacetHasntMoved=function(){if(this.isFacetPinned()){p.Assert.exists(this.pinnedViewportPosition),x.$$(this.pinnedTopSpace).removeClass("coveo-with-animation"),x.$$(this.pinnedBottomSpace).removeClass("coveo-with-animation"),this.pinnedTopSpace.style.height="0px",this.pinnedBottomSpace.style.height="0px";var e=this.options.scrollContainer==document.body?window:this.options.scrollContainer,t=this.element.getBoundingClientRect().top,n=t-this.pinnedViewportPosition;e instanceof Window?window.scrollTo(0,new x.Win(e).scrollY()+n):e.scrollTop=e.scrollTop+n,t=this.element.getBoundingClientRect().top,(n=t-this.pinnedViewportPosition)<0&&(this.pinnedTopSpace.style.height=-1*n+"px"),this.unpinnedViewportPosition=this.pinnedViewportPosition,this.pinnedViewportPosition=null}},t.prototype.buildFooter=function(){return x.$$("div",{className:"coveo-facet-footer"}).el},t.prototype.buildMore=function(){var e=this,t=x.$$("span",{className:"coveo-facet-more-icon"},C.SVGIcons.icons.arrowDown).el;S.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var n=x.$$("div",{className:"coveo-facet-more",tabindex:0},t).el;return(new y.AccessibleButton).withElement(n).withLabel(v.l("ShowMoreFacetResults",this.options.title)).withSelectAction((function(){return e.handleClickMore()})).build(),n},t.prototype.buildLess=function(){var e=this,t=x.$$("span",{className:"coveo-facet-less-icon"},C.SVGIcons.icons.arrowUp).el;S.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var n=x.$$("div",{className:"coveo-facet-less",tabindex:0},t).el;return(new y.AccessibleButton).withElement(n).withLabel(v.l("ShowLessFacetResults",this.options.title)).withSelectAction((function(){return e.handleClickLess()})).build(),n},t.prototype.triggerMoreQuery=function(){var e=this;this.logger.info("Triggering new facet more query"),this.showWaitingAnimation(),this.facetQueryController.fetchMore(this.numberOfValues+1).then((function(t){e.logAnalyticsFacetShowMoreLess(E.analyticsActionCauseList.facetShowMore);var n=new U.FacetValues(t.groupByResults[0]);e.values=e.consolidateAndSortNewFacetValues(n),e.nbAvailableValues=e.values.size(),e.updateNumberOfValues(),e.canFetchMore=e.numberOfValues0){var t=-1;new H.FacetValuesOrder(this,this.facetSort).reorderValues(this.values.getAll()).forEach((function(e,n){e.selected&&(t=n)})),e=t+1}return Math.max(e,this.options.numberOfValues)},t.prototype.cleanupDeltaValuesForMultiValueField=function(){var e=this;this.options.isMultiValueField&&(r.each(this.values.getAll(),(function(t){0!=t.occurrences||t.selected||t.excluded||e.values.remove(t.value)})),this.nbAvailableValues=this.values.getAll().length)},t.prototype.shouldRenderFacetSearch=function(){return this.options.enableFacetSearch},t.prototype.shouldRenderMoreLess=function(){return this.options.enableMoreLess},t.prototype.debugInfo=function(){var e={};return e[this.constructor.ID]={component:this,groupByRequest:this.facetQueryController.lastGroupByRequest,groupByResult:this.facetQueryController.lastGroupByResult},e},t.prototype.logAnalyticsFacetShowMoreLess=function(e){this.usageAnalytics.logCustomEvent(e,{facetId:this.options.id,facetField:this.options.field.toString(),facetTitle:this.options.title},this.element)},t.ID="Facet",t.omniboxIndex=50,t.doExport=function(){d.exportGlobally({Facet:t,FacetHeader:I.FacetHeader,FacetSearchValuesList:N.FacetSearchValuesList,FacetSettings:L.FacetSettings,FacetSort:V.FacetSort,FacetUtils:$.FacetUtils,FacetValueElement:j.FacetValueElement,FacetValue:B.FacetValue})},t.options=i({title:A.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return v.l("NoTitle")},section:"CommonOptions",priority:10}),field:A.ComponentOptions.buildFieldOption({required:!0,groupByField:!0,section:"CommonOptions"}),headerIcon:A.ComponentOptions.buildStringOption({deprecated:"This option is exposed for legacy reasons, and the recommendation is to not use this option."}),id:A.ComponentOptions.buildStringOption({postProcessing:function(e,t){if(e){var n=e.replace(/[^a-zA-Z0-9-@$_.+!*'(),,]+/g,"");return _.Utils.isNullOrEmptyString(n)?t.field:n}return t.field}}),isMultiValueField:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"CommonOptions"}),lookupField:A.ComponentOptions.buildFieldOption({deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),enableSettings:A.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"Sorting",priority:9}),enableSettingsFacetState:A.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableSettings"}),availableSorts:A.ComponentOptions.buildListOption({defaultValue:["occurrences","score","alphaascending","alphadescending"],section:"Sorting",depend:"enableSettings",values:["occurrences","score","alphaascending","alphadescending","computedfieldascending","computedfielddescending","chisquare","nosort"]}),sortCriteria:A.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||(t.availableSorts.length>0?t.availableSorts[0]:"occurrences")},section:"Sorting"}),customSort:A.ComponentOptions.buildListOption({section:"Sorting"}),numberOfValues:A.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),injectionDepth:A.ComponentOptions.buildNumberOption({defaultValue:1e3,min:1e3}),showIcon:A.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),useAnd:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Filtering"}),enableTogglingOperator:A.ComponentOptions.buildBooleanOption({defaultValue:!1,alias:"allowTogglingOperator"}),enableFacetSearch:A.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"FacetSearch",priority:8}),facetSearchDelay:A.ComponentOptions.buildNumberOption({defaultValue:100,min:0,depend:"enableFacetSearch"}),facetSearchIgnoreAccents:A.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableFacetSearch"}),numberOfValuesInFacetSearch:A.ComponentOptions.buildNumberOption({defaultValue:15,min:1,section:"FacetSearch"}),useWildcardsInFacetSearch:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"FacetSearch"}),includeInBreadcrumb:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),numberOfValuesInBreadcrumb:A.ComponentOptions.buildNumberOption({defaultFunction:function(){return w.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInBreadcrumb"}),includeInOmnibox:A.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),numberOfValuesInOmnibox:A.ComponentOptions.buildNumberOption({defaultFunction:function(){return w.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInOmnibox",deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),computedField:A.ComponentOptions.buildFieldOption({priority:7}),computedFieldOperation:A.ComponentOptions.buildStringOption({defaultValue:"sum",section:"ComputedField"}),computedFieldFormat:A.ComponentOptions.buildStringOption({defaultValue:"c0",section:"ComputedField"}),computedFieldCaption:A.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return v.l("ComputedField")},section:"ComputedField"}),preservePosition:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),paddingContainer:A.ComponentOptions.buildSelectorOption({defaultFunction:function(e){var t=x.$$(e).parent("coveo-facet-column");return null!=t?t:e.parentElement}}),scrollContainer:A.ComponentOptions.buildSelectorOption({defaultFunction:function(e){return document.body}}),enableMoreLess:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:A.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),enableCollapse:A.ComponentOptions.buildBooleanOption({defaultValue:!0,depend:"enableSettings"}),allowedValues:A.ComponentOptions.buildListOption(),additionalFilter:A.ComponentOptions.buildQueryExpressionOption(),dependsOn:A.ComponentOptions.buildStringOption(),dependsOnCondition:A.ComponentOptions.buildCustomOption((function(){return null}),{depend:"dependsOn",section:"CommonOptions"}),valueCaption:A.ComponentOptions.buildJsonOption()},k.ResponsiveFacetOptions),t}(O.Component);t.Facet=G,T.Initialization.registerAutoCreateComponent(G),G.doExport()},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;n1){var a=r.map(o,(function(e){return e.build()}));i.add("("+a.join(") OR (")+")")}return i},e}();t.ExpressionBuilder=a},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(o){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.getJQuery=function(){return!!(window&&window.Coveo&&window.Coveo.$)&&window.Coveo.$},e.isInstanceOfJQuery=function(e){var t=this.getJQuery();return!!t&&e instanceof t},e.isInstanceOfJqueryEvent=function(e){var t=this.getJQuery();return!!t&&e instanceof t.Event},e}();t.JQueryUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=n(0),r=function(){function e(){}return e.prototype.merge=function(e){return i.extend({},this,e)},e.prototype.mergeDeep=function(e){return i.extend({},o.Utils.extendDeep(this,e))},e}();t.Options=r},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=function(e){function t(n){return e.call(this,n,t.ID,{})||this}return o(t,e),t.prototype.registerComponent=function(e,t){void 0==this.attributes[e]?this.attributes[e]=[t]:this.attributes[e].push(t)},t.ID="ComponentState",t}(n(18).Model);t.ComponentStateModel=i},function(e,t,n){var o=n(109);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(110)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports={}},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"})}},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),a=n(3),s=n(20),l=n(2),c=function(e){function t(n,o,i){var a=e.call(this,n,t.ID,i)||this;if(a.element=n,a.options=r.ComponentOptions.initComponentOptions(n,t,o),a.options.preventScrolling){var s=a.options.scrollContainer||a.searchInterface.element;a.options.scrollContainer=r.ComponentOptions.findParentScrollLockable(s)}return a}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 s.Utils.isNullOrUndefined(e)?!t.isModal:e}}),preventScrolling:r.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return s.Utils.isNullOrUndefined(e)?t.isModal:e}}),scrollContainer:r.ComponentOptions.buildChildHtmlElementOption({depend:"preventScrolling"})},t.doExport=function(){a.exportGlobally({FacetsMobileMode:t})},t}(i.Component);t.FacetsMobileMode=c,l.Initialization.registerAutoCreateComponent(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.searchAlertsCreated="searchAlertsCreated",e.searchAlertsDeleted="searchAlertsDeleted",e.searchAlertsFail="searchAlertsFail",e.searchAlertsPopulateMessage="searchAlertsPopulateMessage",e}();t.SearchAlertsEvents=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.buildingAdvancedSearch="buildingAdvancedSearch",e.executeAdvancedSearch="executeAdvancedSearch",e}();t.AdvancedSearchEvents=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(309),i=n(104);function r(){var e=new i.CookieStorage;return new o.history.HistoryStore(e)}t.buildHistoryStore=function(){var e=r();return e.store=i.getAvailableStorage(),e},t.buildNullHistoryStore=function(){var e=r();return e.store=new i.NullStorage,e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(33),r=n(3),a=n(6),s=n(5),l=n(23),c=n(456),u=function(){function e(e){void 0===e&&(e=function(){}),this.onChange=e,this.wasReset=!0,s.Assert.exists(e),this.buildContent()}return e.prototype.reset=function(){this.picker.setDate(void 0),this.wasReset=!0,this.onChange(this)},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.wasReset?"":this.picker.getDate()?i.DateUtils.dateForQuery(this.picker.getDate()):""},e.prototype.getDateValue=function(){return this.wasReset?null:this.picker.getDate()},e.prototype.setValue=function(e){s.Assert.exists(e),this.picker.setDate(e),this.wasReset=!1},e.prototype.build=function(){return this.element},e.prototype.buildContent=function(){var e=this;this.element=o.$$("input",{className:"coveo-button","aria-label":a.l("Date")}).el,this.element.readOnly=!0,this.picker=new c({field:this.element,onSelect:function(){e.wasReset=!1,e.onChange.call(e,e)},i18n:{previousMonth:a.l("PreviousMonth"),nextMonth:a.l("NextMonth"),months:l.culture().calendar.months.names,weekdays:l.culture().calendar.days.names,weekdaysShort:l.culture().calendar.days.namesAbbr}})},e.doExport=function(){r.exportGlobally({DatePicker:e})},e}();t.DatePicker=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(9),r=n(5),a=n(72),s=n(24),l=n(4),c=n(76),u=n(0),d=n(43);!function(e){e[e.OPENED=XMLHttpRequest.OPENED||1]="OPENED",e[e.HEADERS_RECEIVED=XMLHttpRequest.HEADERS_RECEIVED||2]="HEADERS_RECEIVED",e[e.DONE=XMLHttpRequest.DONE||4]="DONE"}(o||(o={}));var p=function(){function e(e){void 0===e&&(e={}),this.options=e,this.useJsonp=!1,this.logger=new i.Logger(this)}return e.convertJsonToQueryString=function(e){return r.Assert.exists(e),u.chain(e).map((function(e,t){if(null!=e){var n=u.isObject(e)?JSON.stringify(e):e.toString();return t+"="+l.Utils.safeEncodeURIComponent(n)}return null})).compact().value()},e.convertJsonToFormBody=function(e){return this.convertJsonToQueryString(e).join("&")},e.prototype.call=function(e){var t={url:e.url,queryString:e.errorsAsSuccess?e.queryString.concat(["errorsAsSuccess=1"]):e.queryString,requestData:e.requestData,requestDataType:e.requestDataType||"application/x-www-form-urlencoded; charset=UTF-8",begun:new Date,method:e.method};t.headers=this.buildRequestHeaders(t),u.isFunction(this.options.requestModifier)&&(t=this.options.requestModifier(t)),this.logger.trace("Performing REST request",t);var n=this.parseURL(t.url),o=window.location.hostname===n.hostname||""===n.hostname,i=(""!=window.location.port?window.location.port:"https:"==window.location.protocol?"443":"80")==n.port,r=!(o&&i);return this.useJsonp?this.callUsingAjaxJsonP(t):this.isCORSSupported()||!r?this.callUsingXMLHttpRequest(t,e.responseType):this.isXDomainRequestSupported()?this.callUsingXDomainRequest(t):this.callUsingAjaxJsonP(t)},e.prototype.callUsingXMLHttpRequest=function(t,n){var i=this;return void 0===n&&(n="text"),new Promise((function(r,a){var l=i.getXmlHttpRequest(),c=!1;l.onreadystatechange=function(d){if(l.readyState!=o.OPENED||c){if(l.readyState==o.HEADERS_RECEIVED){var p=l.status;i.isSuccessHttpStatus(p)?l.responseType=n:l.responseType="text"}else if(l.readyState==o.DONE){var f=l.status,h=void 0;switch(n){case"json":if(h=l.response,"json"==n&&"IE"==s.DeviceUtils.getDeviceName())try{h=JSON.parse(h)}catch(m){}break;case"text":h=i.tryParseResponseText(l.responseText,l.getResponseHeader("Content-Type"));break;default:h=l.response}void 0==h&&(h=i.tryParseResponseText(l.responseText,l.getResponseHeader("Content-Type"))),i.isSuccessHttpStatus(f)?i.handleSuccessfulResponseThatMightBeAnError(t,h,r,a):i.handleError(t,l.status,h,a)}}else c=!0,l.withCredentials=!i.options.anonymous,u.each(t.headers,(function(e,t){l.setRequestHeader(t,e)})),"GET"==t.method?l.send():0===t.requestDataType.indexOf("application/json")?l.send(JSON.stringify(t.requestData)):l.send(e.convertJsonToFormBody(t.requestData))};var d=t.queryString;"GET"==t.method&&(d=d.concat(e.convertJsonToQueryString(t.requestData))),l.open(t.method,i.combineUrlAndQueryString(t.url,d))}))},e.prototype.callUsingXDomainRequest=function(t){var n=this;return new Promise((function(o,i){var r=t.queryString.concat([]);n.options.accessToken&&r.push("access_token="+l.Utils.safeEncodeURIComponent(n.options.accessToken));var a=new XDomainRequest;"GET"==t.method&&(r=r.concat(e.convertJsonToQueryString(t.requestData))),a.open(t.method,n.combineUrlAndQueryString(t.url,r)),a.onload=function(){var e=n.tryParseResponseText(a.responseText,a.contentType);n.handleSuccessfulResponseThatMightBeAnError(t,e,o,i)},a.onerror=function(){var e=n.tryParseResponseText(a.responseText,a.contentType);n.handleError(t,0,e,i)},a.ontimeout=function(){return n.logger.error("Request timeout",a,t.requestData)},a.onprogress=function(){return n.logger.trace("Request progress",a,t.requestData)},u.defer((function(){"GET"==t.method?a.send():a.send(e.convertJsonToFormBody(t.requestData))}))}))},e.prototype.callUsingAjaxJsonP=function(t){var n=this,o=c.JQueryUtils.getJQuery();return r.Assert.check(o,"Using jsonp without having included jQuery is not supported."),new Promise((function(i,r){var a=t.queryString.concat(e.convertJsonToQueryString(t.requestData));n.options.accessToken&&a.push("access_token="+l.Utils.safeEncodeURIComponent(n.options.accessToken)),a.push("callback=?"),o.ajax({url:n.combineUrlAndQueryString(t.url,a),dataType:"jsonp",success:function(e){return n.handleSuccessfulResponseThatMightBeAnError(t,e,i,r)},timeout:e.JSONP_ERROR_TIMEOUT,error:function(){return n.handleError(t,0,void 0,r)}})}))},e.prototype.parseURL=function(e){var t=document.createElement("a");return t.href=e,t},e.prototype.getXmlHttpRequest=function(){return new(this.options.xmlHttpRequest||XMLHttpRequest)},e.prototype.handleSuccessfulResponseThatMightBeAnError=function(e,t,n,o){this.isErrorResponseBody(t)?this.handleError(e,t.statusCode,t,o):this.handleSuccess(e,t,n)},e.prototype.handleSuccess=function(e,t,n){var o={duration:a.TimeSpan.fromDates(e.begun,new Date).getMilliseconds(),data:t};this.logger.trace("REST request successful",t,e),n(o)},e.prototype.handleError=function(e,t,n,o){var i={statusCode:t,data:n};this.logger.error("REST request failed",t,n,e),o(i)},e.prototype.combineUrlAndQueryString=function(e,t){return d.UrlUtils.normalizeAsString({paths:[e],queryAsString:t})},e.prototype.isXDomainRequestSupported=function(){return"XDomainRequest"in window},e.prototype.isCORSSupported=function(){return"withCredentials"in this.getXmlHttpRequest()},e.prototype.isSuccessHttpStatus=function(e){return e>=200&&e<300||304===e},e.prototype.tryParseResponseText=function(e,t){if(null==t||-1==t.indexOf("application/json"))return e;if(l.Utils.isNonEmptyString(e))try{return JSON.parse(e)}catch(n){return}},e.prototype.isErrorResponseBody=function(e){return!(!e||!e.statusCode)&&!this.isSuccessHttpStatus(e.statusCode)},e.prototype.buildRequestHeaders=function(e){var t={};return this.options.accessToken?t.Authorization="Bearer "+this.options.accessToken:this.options.username&&this.options.password&&(t.Authorization="Basic "+btoa(this.options.username+":"+this.options.password)),"GET"==e.method||(0===e.requestDataType.indexOf("application/json")?t["Content-Type"]="application/json; charset=UTF-8":t["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),t},e.JSONP_ERROR_TIMEOUT=1e4,e}();t.EndpointCaller=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.getHostname=function(){return location.hostname},e}();t.CookieContext=o;var i=function(){function e(){}return e.set=function(e,t,n){var i,a;n&&(i=new Date).setTime(i.getTime()+n),-1===o.getHostname().indexOf(".")?r(e,t,i):r(e,t,i,(a=o.getHostname().split("."))[a.length-2]+"."+a[a.length-1])},e.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0?new P.TemplateList(a.compact(a.map(e,(function(e){return R.TemplateCache.getTemplate(e)})))):null},t.prototype.addListeners=function(){var e=this;this.bind.onRootElement(s.QueryEvents.newQuery,(function(t){return e.handleNewQuery()})),this.bind.onRootElement(s.QueryEvents.buildingQuery,(function(t){return e.handleBuildingQuery(t)})),this.bind.onRootElement(s.QueryEvents.querySuccess,(function(t){return e.handleQuerySuccess(t)})),this.bind.onRootElement(s.QueryEvents.fetchMoreSuccess,(function(t){return e.handleFetchMoreSuccess(t)})),this.bind.onRootElement(s.QueryEvents.duringQuery,(function(t){return e.handleDuringQuery()})),this.bind.onRootElement(s.QueryEvents.queryError,(function(t){return e.handleQueryError()})),v.$$(this.root).on(c.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(s.QueryEvents.deferredQuerySuccess,(function(){setTimeout((function(){e.scrollToTopIfEnabled()}),0)}))},t.prototype.addPagerListeners=function(){var e=this;this.bind.onQueryState(f.MODEL_EVENTS.CHANGE_ONE,h.QUERY_STATE_ATTRIBUTES.FIRST,(function(){e.bind.oneRootElement(s.QueryEvents.deferredQuerySuccess,(function(){setTimeout((function(){e.scrollToTopIfEnabled()}),0)}))}))},t.prototype.getAutoSelectedFieldsToInclude=function(){return a.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 k.TableTemplate(this.options.resultTemplate.templates||[])),this.options.resultTemplate instanceof P.TemplateList?a.each(this.options.resultTemplate.templates,(function(t){t.layout||(t.layout=e.options.layout)})):this.options.resultTemplate instanceof T.DefaultResultTemplate&&"list"==this.options.layout&&E.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){if(d.Assert.isLargerOrEqualsThan(1,e),this.isCurrentlyFetchingMoreResults())this.logger.warn("Ignoring request to display more results since we're already doing so");else{if(this.hasPotentiallyMoreResultsToDisplay())return this.options.enableInfiniteScrollWaitingAnimation&&this.showWaitingAnimationForInfiniteScrolling(),this.fetchAndRenderMoreResults(e);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 L.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),v.$$(this.element).removeClass("coveo-hidden"))},t.prototype.disable=function(){var t=this;e.prototype.disable.call(this);var n=a.map(this.otherResultLists,(function(e){return e.options.layout}));a.contains(n,this.options.layout)||this.disableLayoutChange||a.each(this.resultLayoutSelectors,(function(e){e.disableLayouts([t.options.layout])})),this.disableLayoutChange=!1,v.$$(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};v.$$(this.element).trigger(c.ResultListEvents.newResultDisplayed,n)},t.prototype.triggerNewResultsDisplayed=function(){var e={isInfiniteScrollEnabled:this.options.enableInfiniteScroll};v.$$(this.element).trigger(c.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(),d.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,p.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;d.Assert.exists(e),d.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&&N.ResultListUtils.scrollToTop(this.root)},t.prototype.handleNewQuery=function(){v.$$(this.element).removeClass("coveo-hidden"),t.resultCurrentlyBeingRendered=void 0},Object.defineProperty(t.prototype,"otherResultLists",{get:function(){var e=this.searchInterface.getComponents(t.ID);return a.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(a.map(this.options.fieldsToInclude,(function(e){return e.substr(1)}))),this.options.autoSelectFieldsToInclude){var t=a.flatten(a.map(this.otherResultLists,(function(e){return e.getAutoSelectedFieldsToInclude()})));e.queryBuilder.addRequiredFields(a.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 C.InitializationPlaceholder(this.root).withVisibleRootElement().withPlaceholderForResultList(),p.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 g.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 v.Win(window),t=e.height(),n=e.scrollY();return new v.Doc(document).height()-(t+n)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=v.$$(this.element).findAll(".coveo-show-if-query"),o=v.$$(this.element).findAll(".coveo-show-if-no-query"),i=v.$$(this.element).findAll(".coveo-show-if-results"),r=v.$$(this.element).findAll(".coveo-show-if-no-results");a.each(n,(function(t){v.$$(t).toggle(e)})),a.each(o,(function(t){v.$$(t).toggle(!e)})),a.each(i,(function(n){v.$$(n).toggle(e&&t)})),a.each(r,(function(n){v.$$(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":v.$$(this.options.waitAnimationContainer).addClass("coveo-fade-out");break;case"spinner":this.resultContainer.hideChildren(),void 0==v.$$(this.options.waitAnimationContainer).find(".coveo-wait-animation")&&this.options.waitAnimationContainer.appendChild(y.DomUtils.getBasicLoadingAnimation())}},t.prototype.hideWaitingAnimation=function(){switch(this.waitAnimation){case"fade":v.$$(this.options.waitAnimationContainer).removeClass("coveo-fade-out");break;case"spinner":var e=v.$$(this.options.waitAnimationContainer).find(".coveo-loading-spinner");e&&v.$$(e).detach()}},t.prototype.showWaitingAnimationForInfiniteScrolling=function(){var e=y.DomUtils.getLoadingSpinner();if("card"==this.options.layout&&this.options.enableInfiniteScroll){var t=v.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");a.each(t,(function(e){return v.$$(e).remove()}));var n=v.$$("div",{className:"coveo-loading-spinner-container"});n.append(e),this.options.waitAnimationContainer.appendChild(n.el)}else this.options.waitAnimationContainer.appendChild(y.DomUtils.getLoadingSpinner())},t.prototype.hideWaitingAnimationForInfiniteScrolling=function(){var e=v.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner"),t=v.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");a.each(e,(function(e){return v.$$(e).remove()})),a.each(t,(function(e){return v.$$(e).remove()}))},t.prototype.initResultContainer=function(){if(!this.options.resultsContainer){var e="table"===this.options.layout?"table":"div";this.options.resultsContainer=v.$$(e,{className:"coveo-result-list-container"}).el,this.initResultContainerAddToDom()}return new F.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 S.Initialization.automaticallyCreateComponentsInside(t,e)};switch(this.options.layout){case"card":this.renderer=new I.ResultListCardRenderer(this.options,t);break;case"table":this.renderer=new D.ResultListTableRenderer(this.options,t);break;case"list":default:this.renderer=new M.ResultListRenderer(this.options,t)}},t.prototype.makeElementFocusable=function(){v.$$(this.element).setAttribute("tabindex","-1")},t.prototype.ensureHasId=function(){""===this.element.id&&(this.element.id=a.uniqueId("coveo-result-list"))},t.prototype.enableBasedOnActiveLayouts=function(){var t=this;a.each(this.resultLayoutSelectors,(function(n){a.find(n.activeLayouts,(function(e,n){return n==t.options.layout}))&&(e.prototype.enable.call(t),n.enableLayouts([t.options.layout]),v.$$(t.element).removeClass("coveo-hidden"))}))},t.ID="ResultList",t.doExport=function(){u.exportGlobally({ResultList:t})},t.options={resultsContainer:x.ComponentOptions.buildChildHtmlElementOption({alias:"resultContainerSelector"}),resultTemplate:_.TemplateComponentOptions.buildTemplateOption({defaultFunction:t.getDefaultTemplate}),waitAnimation:x.ComponentOptions.buildStringOption({defaultValue:"none"}),waitAnimationContainer:x.ComponentOptions.buildChildHtmlElementOption({postProcessing:function(e,t){return e||t.resultsContainer}}),enableInfiniteScroll:x.ComponentOptions.buildBooleanOption({defaultValue:!1}),infiniteScrollPageSize:x.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableInfiniteScroll"}),infiniteScrollContainer:x.ComponentOptions.buildChildHtmlElementOption({depend:"enableInfiniteScroll",defaultFunction:function(e){return x.ComponentOptions.findParentScrolling(e)}}),enableInfiniteScrollWaitingAnimation:x.ComponentOptions.buildBooleanOption({depend:"enableInfiniteScroll",defaultValue:!0}),mobileScrollContainer:x.ComponentOptions.buildSelectorOption({defaultFunction:function(){return document.querySelector(".coveo-results-column")}}),autoSelectFieldsToInclude:x.ComponentOptions.buildBooleanOption({defaultValue:!1}),fieldsToInclude:x.ComponentOptions.buildFieldsOption({includeInResults:!0}),layout:x.ComponentOptions.buildStringOption({defaultValue:"list",required:!0}),enableScrollToTop:x.ComponentOptions.buildBooleanOption({defaultValue:!0})},t.resultCurrentlyBeingRendered=null,t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS=5,t}(w.Component);t.ResultList=V,S.Initialization.registerAutoCreateComponent(V)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(97),r=n(61),a=n(5),s=n(6),l=n(8),c=function(){function e(e,t,n,o,i){this.element=t,a.Assert.isString(e),a.Assert.exists(t),a.Assert.exists(n),a.Assert.isLargerOrEqualsThan(0,o),a.Assert.isLargerOrEqualsThan(0,i),a.Assert.isSmallerOrEqualsThan(1,i),this.cssClassName="coveo-"+e+"-dropdown-content",this.coveoRoot=n,this.widthRatio=i,this.minWidth=o}return e.isTargetInsideOpenedDropdown=function(t){a.Assert.exists(t);var n=t.parent(e.DEFAULT_CSS_CLASS_NAME);return!!n&&"none"!=n.style.display},e.prototype.positionDropdown=function(){this.setElementAttributes(),this.createPopper()},e.prototype.hideDropdown=function(){this.popperReference&&(this.unbindPopperEvents(),this.popperReference.destroy()),this.unsetElementAttributes()},e.prototype.cleanUp=function(){this.element.el.removeAttribute("style")},e.prototype.setElementAttributes=function(){this.element.show(),this.element.addClass(this.cssClassName),this.element.addClass(e.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role","group"),this.element.setAttribute("aria-label",s.l("FiltersDropdown")),this.setElementWidth()},e.prototype.setElementWidth=function(){var e=this.widthRatio*this.coveoRoot.width();e<=this.minWidth&&(e=this.minWidth),this.element.el.style.width=e.toString()+"px"},e.prototype.unsetElementAttributes=function(){this.element.hide(),this.element.removeClass(this.cssClassName),this.element.removeClass(e.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role",null),this.element.setAttribute("aria-label",null)},Object.defineProperty(e.prototype,"popperReferenceElement",{get:function(){return this.coveoRoot.find("."+r.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS)},enumerable:!0,configurable:!0}),e.prototype.createPopper=function(){this.popperReference=new i.default(this.popperReferenceElement,this.element.el,{placement:"bottom-end",positionFixed:!0,modifiers:{preventOverflow:{boundariesElement:this.coveoRoot.el},computeStyle:{gpuAcceleration:!1}},eventsEnabled:!1}),this.bindPopperEvents()},Object.defineProperty(e.prototype,"scrollableParent",{get:function(){return l.ComponentOptions.findParentScrolling(this.popperReferenceElement)},enumerable:!0,configurable:!0}),e.prototype.bindPopperEvents=function(){var e=this;o.$$(this.scrollableParent).on(["scroll","resize"],(function(){e.popperReference.update()}))},e.prototype.unbindPopperEvents=function(){var e=this;o.$$(this.scrollableParent).off(["scroll","resize"],(function(){e.popperReference.update()}))},e.DEFAULT_CSS_CLASS_NAME="coveo-dropdown-content",e}();t.ResponsiveDropdownContent=c},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;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0&&(this.currentPage--,this.numberOfValues=this.options.numberOfValues+this.currentPage*this.options.pageSize,this.reload(),this.logAnalyticsFacetShowMoreLess(A.analyticsActionCauseList.facetShowLess))},t.prototype.getAvailableValues=function(){return this.activeCategoryValue?this.activeCategoryValue.children.map((function(e){return{value:e.categoryValueDescriptor.value,count:e.categoryValueDescriptor.count,path:e.path}})):[]},t.prototype.selectValue=function(e){S.Assert.check(x.contains(x.pluck(this.getAvailableValues(),"value"),e),"Failed while trying to select a value that is not available.");var t=this.activePath.slice(0);t.push(e),this.changeActivePath(t),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetSelect),this.executeQuery()},t.prototype.deselectCurrentValue=function(){if(0!=this.activePath.length){var e=this.activePath.slice(0);e.pop(),this.changeActivePath(e),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetSelect),this.executeQuery()}},t.prototype.resetPath=function(){this.changeActivePath(this.options.basePath)},t.prototype.reset=function(){this.resetPath(),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetClear),this.executeQuery()},t.prototype.hide=function(){u.$$(this.element).addClass("coveo-hidden")},t.prototype.show=function(){u.$$(this.element).removeClass("coveo-hidden")},t.prototype.enable=function(){e.prototype.enable.call(this),this.updateAppearance()},t.prototype.disable=function(){e.prototype.disable.call(this),this.updateAppearance()},t.prototype.debugValue=function(e){return r(this,void 0,void 0,(function(){var t,n;return a(this,(function(o){switch(o.label){case 0:return t=new k.QueryBuilder,this.categoryFacetQueryController.addDebugGroupBy(t,e),[4,this.queryController.getEndpoint().search(t.build())];case 1:return n=o.sent(),T.CategoryFacetDebug.analyzeResults(n.groupByResults[0],this.options.delimitingCharacter),[2]}}))}))},t.prototype.getCaption=function(e){var t=this.options.valueCaption[e];return t||e},t.prototype.showWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation||(u.$$(this.headerElement).find(".coveo-category-facet-header-wait-animation").style.visibility="visible",this.showingWaitAnimation=!0)},t.prototype.hideWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation&&(u.$$(this.headerElement).find(".coveo-category-facet-header-wait-animation").style.visibility="hidden",this.showingWaitAnimation=!1)},t.prototype.logAnalyticsEvent=function(e,t){void 0===t&&(t=this.activePath),this.usageAnalytics.logSearchEvent(e,{categoryFacetId:this.options.id,categoryFacetField:this.options.field.toString(),categoryFacetPath:t,categoryFacetTitle:this.options.title})},t.prototype.getEndpoint=function(){return this.queryController.getEndpoint()},Object.defineProperty(t.prototype,"children",{get:function(){return this.categoryValueRoot.children},enumerable:!0,configurable:!0}),t.prototype.renderValues=function(e,n){this.categoryFacetValuesTree.storeNewValues(e);var o,i=this.sortParentValues(e.parentValues),r=this.categoryValueRoot,a=!1,s=Math.floor(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2),l=Math.ceil(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2);i=this.hideBasePathInParentValues(i),this.shouldTruncate(i)&&(o=this.findPathOfLastTruncatedParentValue(i,l),a=!0,i=x.first(i,s).concat(x.last(i,l))),this.isPristine()||this.addAllCategoriesButton();for(var c=0;ct.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING},t.prototype.addEllipsis=function(){this.categoryValueRoot.listRoot.append(this.categoryFacetTemplates.buildEllipsis().el)},t.prototype.findPathOfLastTruncatedParentValue=function(e,t){var n=e.length-t-1;return x.reduce(x.first(e,n+1),(function(e,t){return e.concat([t.value])}),[])},t.prototype.addAllCategoriesButton=function(){var e=this,t=this.categoryFacetTemplates.buildAllCategoriesButton();(new I.AccessibleButton).withLabel(l.l("AllCategories")).withElement(t).withSelectAction((function(){e.reset(),e.scrollToTop()})).build(),this.categoryValueRoot.listRoot.append(t.el)},t.prototype.isPristine=function(){return w.Utils.arrayEqual(this.activePath,this.options.basePath)},t.prototype.buildFacetHeader=function(){var e=new F.CategoryFacetHeader({categoryFacet:this,title:this.options.title});this.headerElement=e.build(),u.$$(this.element).prepend(this.headerElement)},t.prototype.handleQueryStateChanged=function(e){if(this.listenToQueryStateChange){var t=e.attributes[this.queryStateAttribute];!w.Utils.isNullOrUndefined(t)&&x.isArray(t)&&0!=t.length&&(this.activePath=t)}},t.prototype.initQueryStateEvents=function(){var e=this;this.queryStateModel.registerNewAttribute(this.queryStateAttribute,this.options.basePath),this.bind.onQueryState(b.MODEL_EVENTS.CHANGE,void 0,(function(t){return e.handleQueryStateChanged(t)}))},t.prototype.initDependsOnManager=function(){var e=this,t={reset:function(){return e.dependsOnReset()},ref:this};this.dependsOnManager=new M.DependsOnManager(t)},t.prototype.dependsOnReset=function(){this.changeActivePath(this.options.basePath),this.clear()},t.prototype.addFading=function(){u.$$(this.element).addClass("coveo-category-facet-values-fade")},t.prototype.handleDeferredQuerySuccess=function(){this.updateAppearance(),this.removeFading()},t.prototype.removeFading=function(){u.$$(this.element).removeClass("coveo-category-facet-values-fade")},t.prototype.notImplementedError=function(){this.logger.error("Category Facets are not supported by your current search endpoint. Disabling this component."),this.disable()},t.prototype.sortParentValues=function(e){if(this.activePath.length!=e.length)return this.logger.warn("Inconsistent CategoryFacet results: Number of parent values results does not equal length of active path"),e;for(var t=[],n=function(n){var i=x.find(e,(function(e){return e.value.toLowerCase()==n.toLowerCase()}));if(!i)return o.logger.warn("Inconsistent CategoryFacet results: path not consistent with parent values results"),{value:e};t.push(i)},o=this,i=0,r=this.activePath;ithis.options.numberOfValues&&this.moreLessContainer.append(this.buildLessButton()),this.moreValuesToFetch&&this.moreLessContainer.append(this.buildMoreButton())},t.prototype.clear=function(){this.categoryValueRoot.clear(),this.isFacetSearchAvailable&&this.categoryFacetSearch.clear(),this.moreLessContainer&&this.moreLessContainer.detach(),u.$$(this.element).removeClass("coveo-category-facet-non-empty-path")},t.prototype.buildMoreButton=function(){var e=this,t=u.$$("span",{className:"coveo-facet-more-icon"},y.SVGIcons.icons.arrowDown).el;v.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var n=u.$$("div",{className:"coveo-category-facet-more"},t);return(new I.AccessibleButton).withElement(n).withSelectAction((function(){return e.showMore()})).withLabel(l.l("ShowMoreFacetResults",this.options.title)).build(),n.el},t.prototype.buildLessButton=function(){var e=this,t=u.$$("span",{className:"coveo-facet-less-icon"},y.SVGIcons.icons.arrowUp).el;v.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var n=u.$$("div",{className:"coveo-category-facet-less"},t);return(new I.AccessibleButton).withElement(n).withSelectAction((function(){return e.showLess()})).withLabel(l.l("ShowLessFacetResults",this.options.title)).build(),n.el},t.prototype.handlePopulateBreadCrumb=function(e){var t=this;if(!this.isPristine()){var n=this.categoryFacetValuesTree.getValueForLastPartInPath(this.activePath),o={path:this.activePath,count:n.numberOfResults,value:n.value},i=new O.CategoryFacetBreadcrumb(this,(function(){t.logAnalyticsEvent(A.analyticsActionCauseList.breadcrumbFacet),t.reset()}),o,{headingLevel:e.headingLevel});e.breadcrumbs.push({element:i.build()})}},t.prototype.handleClearBreadcrumb=function(){this.changeActivePath(this.options.basePath)},t.prototype.logAnalyticsFacetShowMoreLess=function(e){this.usageAnalytics.logCustomEvent(e,{facetId:this.options.id,facetField:this.options.field.toString(),facetTitle:this.options.title},this.element)},t.doExport=function(){p.exportGlobally({CategoryFacet:t})},t.ID="CategoryFacet",t.options=i({field:c.ComponentOptions.buildFieldOption({required:!0}),title:c.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return l.l("NoTitle")}}),numberOfValues:c.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),enableFacetSearch:c.ComponentOptions.buildBooleanOption({defaultValue:!0}),id:c.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}}),injectionDepth:c.ComponentOptions.buildNumberOption({defaultValue:1e3,min:1e3}),numberOfResultsInFacetSearch:c.ComponentOptions.buildNumberOption({defaultValue:15,min:1}),facetSearchDelay:c.ComponentOptions.buildNumberOption({defaultValue:100,min:0}),enableMoreLess:c.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:c.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),delimitingCharacter:c.ComponentOptions.buildStringOption({defaultValue:"|"}),basePath:c.ComponentOptions.buildListOption({defaultValue:[]}),maximumDepth:c.ComponentOptions.buildNumberOption({min:1,defaultValue:Number.MAX_VALUE}),debug:c.ComponentOptions.buildBooleanOption({defaultValue:!1}),valueCaption:c.ComponentOptions.buildJsonOption({defaultValue:{}}),dependsOn:c.ComponentOptions.buildStringOption(),dependsOnCondition:c.ComponentOptions.buildCustomOption((function(){return null}),{depend:"dependsOn",section:"CommonOptions"}),displaySearchOnTop:c.ComponentOptions.buildBooleanOption({defaultValue:!1}),displaySearchButton:c.ComponentOptions.buildBooleanOption({defaultValue:!0})},P.ResponsiveFacetOptions),t.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING=15,t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING=10,t.WAIT_ELEMENT_CLASS="coveo-category-facet-header-wait-animation",t}(s.Component);t.CategoryFacet=L,d.Initialization.registerAutoCreateComponent(L),L.doExport()},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(122),a=n(5),s=n(0),l=function(e){function t(t){var n=e.call(this)||this;return n.templates=t,a.Assert.exists(t),n}return o(t,e),t.prototype.instantiateToString=function(e,t){void 0===t&&(t={});for(var n=(new i.DefaultInstantiateTemplateOptions).merge(t),o=s.reject(this.templates,(function(e){return null!=e.role})),r=0;r0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]\n
\n
\n
\n
\n
\n
",t},e.highlight=function(e,t,n){void 0===t&&(t="coveo-highlight"),void 0===n&&(n=!0);var o=null!==t?t.trim():null;return null!==o&&m.Assert.check(/^([^\s\-][a-z\s\-]*[^\s\-])?$/i.test(o),"Invalid class"),"0?" class='"+o+"'":"")+">"+(n?u.StringUtils.htmlEncode(e):e)+"
"},e.highlightElement=function(e,t,n){void 0===n&&(n="coveo-highlight");var o=new RegExp(c.Utils.escapeRegexCharacter(u.StringUtils.latinize(t)),"i"),i=u.StringUtils.latinize(e).search(o);if(i>=0){var r=i+t.length;return u.StringUtils.htmlEncode(e.slice(0,i))+this.highlight(e.slice(i,r),n,!0)+u.StringUtils.htmlEncode(e.slice(r))}return e},e.getLoadingSpinner=function(){return a.$$("div",{className:"coveo-loading-spinner"}).el},e.getModalBoxHeader=function(e){var t=a.$$("div");return t.el.innerHTML="
\n \n \n \n
\n
\n "+(e||"")+"\n
",t},e.getQuickviewHeader=function(t,n,i){var r="";if(n.showDate){var u=c.Utils.getFieldValue(t,"date");u&&(r=s.DateUtils.dateTimeToString(new Date(u)))}var d=l.FileTypes.get(t),p=a.$$("div");p.el.innerHTML="
\n "+r+"\n \n \n \n
\n
\n \n
";var f=a.$$("a",{className:"coveo-quickview-pop-up-reminder"}),h=Coveo.Salesforce?"SalesforceResultLink":"ResultLink",m=o({},t);return n.title&&(m.title=n.title),e.loadResultLink(h,f,p,m,n),p},e.loadResultLink=function(e,t,n,o,s){return i(this,void 0,void 0,(function(){var i,l;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,p.load(e)];case 1:return r.sent(),t.addClass("Coveo"+e),h.Initialization.automaticallyCreateComponentsInsideResult(t.el,o),[3,3];case 2:return i=r.sent(),(l=new f.Logger(this)).error("Failed to load module "+e+" : "+i),l.info("Fallback on displaying a non clickable header"),t.text(s.title),[3,3];case 3:return a.$$(n.find(".coveo-quickview-left-header")).append(t.el),[2]}}))}))},e}();t.DomUtils=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n="undefined"!==typeof window&&"undefined"!==typeof document,o=["Edge","Trident","Firefox"],i=0,r=0;r=0){i=1;break}var a=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),i))}};function s(e){return e&&"[object Function]"==={}.toString.call(e)}function l(e,t){if(1!==e.nodeType)return[];var n=getComputedStyle(e,null);return t?n[t]:n}function c(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=l(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+o)?e:u(c(e))}var d=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?d:10===e?p:d||p}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===l(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function m(e){return null!==e.parentNode?m(e.parentNode):e}function v(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,i=n?t:e,r=document.createRange();r.setStart(o,0),r.setEnd(i,0);var a=r.commonAncestorContainer;if(e!==a&&t!==a||o.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=m(e);return s.host?v(s.host,t):v(e,m(t).host)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=y(t,"top"),i=y(t,"left"),r=n?-1:1;return e.top+=o*r,e.bottom+=o*r,e.left+=i*r,e.right+=i*r,e}function b(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function w(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function x(){var e=document.body,t=document.documentElement,n=f(10)&&getComputedStyle(t);return{height:w("Height",e,t,n),width:w("Width",e,t,n)}}var S=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},C=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],o=f(10),i="HTML"===t.nodeName,r=A(e),a=A(t),s=u(e),c=l(t),d=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);n&&"HTML"===t.nodeName&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=O({top:r.top-a.top-d,left:r.left-a.left-p,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!o&&i){var m=parseFloat(c.marginTop,10),v=parseFloat(c.marginLeft,10);h.top-=d-m,h.bottom-=d-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(o&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(h=g(h,t)),h}function k(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=T(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:y(n),s=t?0:y(n,"left"),l={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:i,height:r};return O(l)}function R(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===l(e,"position")||R(c(e)))}function P(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===l(t,"transform");)t=t.parentElement;return t||document.documentElement}function F(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=i?P(e):v(e,t);if("viewport"===o)r=k(a,i);else{var s=void 0;"scrollParent"===o?"BODY"===(s=u(c(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===o?e.ownerDocument.documentElement:o;var l=T(s,a,i);if("HTML"!==s.nodeName||R(a))r=l;else{var d=x(),p=d.height,f=d.width;r.top+=l.top-l.marginTop,r.bottom=p+l.top,r.left+=l.left-l.marginLeft,r.right=f+l.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function I(e){return e.width*e.height}function M(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=F(n,o,r,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return E({key:e},s[e],{area:I(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function D(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=o?P(t):v(t,n);return T(n,i,o)}function N(e){var t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function L(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function V(e,t,n){n=n.split("-")[0];var o=N(e),i={width:o.width,height:o.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return i[a]=t[a]+t[l]/2-o[l]/2,i[s]=n===s?t[s]-o[c]:t[L(s)],i}function $(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function j(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=$(e,(function(e){return e[t]===n}));return e.indexOf(o)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&s(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function B(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=D(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=V(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=j(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function U(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function Q(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),o=ee.slice(n+1).concat(ee.slice(0,n));return t?o.reverse():o}var ne="flip",oe="clockwise",ie="counterclockwise";function re(e,t,n,o){var i=[0,0],r=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf($(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,o){var i=(1===o?!r:r)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,o){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],a=i[2];if(!r)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return O(s)[t]/100*r}return"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,o){K(n)&&(i[t]+=n*("-"===e[o-1]?-1:1))}))})),i}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var i=e.offsets,r=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:_({},l,r[l]),end:_({},l,r[l]+r[c]-a[c])};e.offsets.popper=E({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,o=e.placement,i=e.offsets,r=i.popper,a=i.reference,s=o.split("-")[0],l=void 0;return l=K(+n)?[+n,0]:re(n,r,a,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var o=Q("transform"),i=e.instance.popper.style,r=i.top,a=i.left,s=i[o];i.top="",i.left="",i[o]="";var l=F(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=r,i.left=a,i[o]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]l[e]&&!t.escapeWithReference&&(o=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),_({},n,o)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=E({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,i=e.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]r(o[s])&&(e.offsets.popper[l]=r(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!X(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"===typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=e.offsets,a=r.popper,s=r.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",d=c?"Top":"Left",p=d.toLowerCase(),f=c?"left":"top",h=c?"bottom":"right",m=N(o)[u];s[h]-ma[h]&&(e.offsets.popper[p]+=s[p]+m-a[h]),e.offsets.popper=O(e.offsets.popper);var v=s[p]+s[u]/2-m/2,y=l(e.instance.popper),g=parseFloat(y["margin"+d],10),b=parseFloat(y["border"+d+"Width"],10),w=v-e.offsets.popper[p]-g-b;return w=Math.max(Math.min(a[u]-m,w),0),e.arrowElement=o,e.offsets.arrow=(_(n={},p,Math.round(w)),_(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(U(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=F(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],i=L(o),r=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[o,i];break;case oe:a=te(o);break;case ie:a=te(o,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return e;o=e.placement.split("-")[0],i=L(o);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===o&&d(c.right)>d(u.left)||"right"===o&&d(c.left)d(u.top)||"bottom"===o&&d(c.top)d(n.right),m=d(c.top)d(n.bottom),y="left"===o&&f||"right"===o&&h||"top"===o&&m||"bottom"===o&&v,g=-1!==["top","bottom"].indexOf(o),b=!!t.flipVariations&&(g&&"start"===r&&f||g&&"end"===r&&h||!g&&"start"===r&&m||!g&&"end"===r&&v);(p||y||b)&&(e.flipped=!0,(p||y)&&(o=a[l+1]),b&&(r=function(e){return"end"===e?"start":"start"===e?"end":e}(r)),e.placement=o+(r?"-"+r:""),e.offsets.popper=E({},e.offsets.popper,V(e.instance.popper,e.offsets.reference,e.placement)),e=j(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,i=o.popper,r=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=r[n]-(s?i[a?"width":"height"]:0),e.placement=L(t),e.offsets.popper=O(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!X(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=$(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};S(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=a(this.update.bind(this)),this.options=E({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(E({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){o.options.modifiers[t]=E({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return E({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&s(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return C(e,[{key:"update",value:function(){return B.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return G.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),e}();se.Utils=("undefined"!==typeof window?window:e).PopperUtils,se.placements=Z,se.Defaults=ae,t.default=se}.call(t,n(75))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);n(560);var i=n(3),r=function(){function e(e,t,n,o){void 0===e&&(e=function(e){}),void 0===o&&(o=t),this.onChange=e,this.label=t,this.name=n,this.id=o,this.buildContent()}return e.doExport=function(){i.exportGlobally({RadioButton:e})},e.prototype.reset=function(){var e=this.isSelected();this.getRadio().checked=!1,e&&this.onChange(this)},e.prototype.select=function(e){void 0===e&&(e=!0);var t=this.isSelected();this.getRadio().checked=!0,!t&&e&&this.onChange(this)},e.prototype.build=function(){return this.element},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.label},e.prototype.isSelected=function(){return this.getRadio().checked},e.prototype.getRadio=function(){return o.$$(this.element).find("input")},e.prototype.getLabel=function(){return o.$$(this.element).find("label")},e.prototype.buildContent=function(){var e=this,t=o.$$("div",{className:"coveo-radio"}),n=o.$$("input",{type:"radio",name:this.name,id:this.id}),i=o.$$("label",{className:"coveo-radio-input-label",for:this.id});i.text(this.label),n.on("change",(function(){e.onChange(e)})),t.append(n.el),t.append(i.el),this.element=t.el},e}();t.RadioButton=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.beforeRedirect="beforeRedirect",e}();t.StandaloneSearchInterfaceEvents=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.savePreferences="savePreferences",e.exitPreferencesWithoutSave="exitPreferencesWithoutSave",e}();t.PreferencesPanelEvents=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(87);t.AdvancedSearchEvents=o.AdvancedSearchEvents;var i=n(57);t.AnalyticsEvents=i.AnalyticsEvents;var r=n(35);t.BreadcrumbEvents=r.BreadcrumbEvents;var a=n(105);t.DebugEvents=a.DebugEvents;var s=n(203);t.DistanceEvents=s.DistanceEvents;var l=n(17);t.InitializationEvents=l.InitializationEvents;var c=n(34);t.OmniboxEvents=c.OmniboxEvents;var u=n(100);t.PreferencesPanelEvents=u.PreferencesPanelEvents;var d=n(11);t.QueryEvents=d.QueryEvents;var p=n(29);t.ResultListEvents=p.ResultListEvents;var f=n(133);t.ResultLayoutEvents=f.ResultLayoutEvents;var h=n(86);t.SearchAlertsEvents=h.SearchAlertsEvents;var m=n(55);t.SettingsEvents=m.SettingsEvents;var v=n(142);t.SliderEvents=v.SliderEvents;var y=n(99);t.StandaloneSearchInterfaceEvents=y.StandaloneSearchInterfaceEvents},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,n;function o(){return t.apply(null,arguments)}function i(e){t=e}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,o=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},$={};function j(e,t,n,o){var i=o;"string"===typeof o&&(i=function(){return this[o]()}),e&&($[e]=i),t&&($[t[0]]=function(){return D(i.apply(this,arguments),t[1],t[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,n,o=e.match(N);for(t=0,n=o.length;t=0&&L.test(e);)e=e.replace(L,o),L.lastIndex=0,n-=1;return e}var q={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function z(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var W="Invalid date";function G(){return this._invalidDate}var Y="%d",K=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Z(e,t,n,o){var i=this._relativeTime[n];return k(i)?i(e,t,n,o):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function oe(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,o={};for(n in e)s(e,n)&&(t=oe(n))&&(o[t]=e[n]);return o}var re={};function ae(e,t){re[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:re[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),o.updateOffset(this,t),this):pe(this,e)}}function pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ze(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function he(e){return k(this[e=oe(e)])?this[e]():this}function me(e,t){if("object"===typeof e){var n,o=se(e=ie(e)),i=o.length;for(n=0;n68?1900:2e3)};var vt=de("FullYear",!0);function yt(){return le(this.year())}function gt(e,t,n,o,i,r,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,o,i,r,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,o,i,r,a),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var o=7+t-n;return-(7+bt(e,0,o).getUTCDay()-t)%7+o-1}function xt(e,t,n,o,i){var r,a,s=1+7*(t-1)+(7+n-o)%7+wt(e,o,i);return s<=0?a=mt(r=e-1)+s:s>mt(e)?(r=e+1,a=s-mt(e)):(r=e,a=s),{year:r,dayOfYear:a}}function St(e,t,n){var o,i,r=wt(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?o=a+Ct(i=e.year()-1,t,n):a>Ct(e.year(),t,n)?(o=a-Ct(e.year(),t,n),i=e.year()+1):(i=e.year(),o=a),{week:o,year:i}}function Ct(e,t,n){var o=wt(e,t,n),i=wt(e+1,t,n);return(mt(e)-o+i)/7}function _t(e){return St(e,this._week.dow,this._week.doy).week}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ae("week",5),ae("isoWeek",5),Me("w",Se),Me("ww",Se,ge),Me("W",Se),Me("WW",Se,ge),je(["w","ww","W","WW"],(function(e,t,n,o){t[o.substr(0,1)]=ue(e)}));var Et={dow:0,doy:6};function Ot(){return this._week.dow}function At(){return this._week.doy}function Tt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function kt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Rt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Pt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ft(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Me("d",Se),Me("e",Se),Me("E",Se),Me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Me("dddd",(function(e,t){return t.weekdaysRegex(e)})),je(["dd","ddd","dddd"],(function(e,t,n,o){var i=n._locale.weekdaysParse(e,o,n._strict);null!=i?t.d=i:v(n).invalidWeekday=e})),je(["d","e","E"],(function(e,t,n,o){t[o]=ue(e)}));var It="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Dt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Nt=Ie,Lt=Ie,Vt=Ie;function $t(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ft(n,this._week.dow):e?n[e.day()]:n}function jt(e){return!0===e?Ft(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Bt(e){return!0===e?Ft(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,n){var o,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)r=h([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null}function Qt(e,t,n){var o,i,r;if(this._weekdaysParseExact)return Ut.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=h([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[o].test(e))return o;if(n&&"ddd"===t&&this._shortWeekdaysParse[o].test(e))return o;if(n&&"dd"===t&&this._minWeekdaysParse[o].test(e))return o;if(!n&&this._weekdaysParse[o].test(e))return o}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Rt(e,this.localeData()),this.add(e-t,"d")):t}function qt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function zt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Pt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Nt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Lt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,o,i,r,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),o=Le(this.weekdaysMin(n,"")),i=Le(this.weekdaysShort(n,"")),r=Le(this.weekdays(n,"")),a.push(o),s.push(i),l.push(r),c.push(o),c.push(i),c.push(r);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Jt(){return this.hours()%12||12}function Xt(){return this.hours()||24}function Zt(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Jt),j("k",["kk",2],0,Xt),j("hmm",0,0,(function(){return""+Jt.apply(this)+D(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Jt.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+D(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),ne("hour","h"),ae("hour",13),Me("a",en),Me("A",en),Me("H",Se),Me("h",Se),Me("k",Se),Me("HH",Se,ge),Me("hh",Se,ge),Me("kk",Se,ge),Me("hmm",Ce),Me("hmmss",_e),Me("Hmm",Ce),Me("Hmmss",_e),$e(["H","HH"],ze),$e(["k","kk"],(function(e,t,n){var o=ue(e);t[ze]=24===o?0:o})),$e(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),$e(["h","hh"],(function(e,t,n){t[ze]=ue(e),v(n).bigHour=!0})),$e("hmm",(function(e,t,n){var o=e.length-2;t[ze]=ue(e.substr(0,o)),t[We]=ue(e.substr(o)),v(n).bigHour=!0})),$e("hmmss",(function(e,t,n){var o=e.length-4,i=e.length-2;t[ze]=ue(e.substr(0,o)),t[We]=ue(e.substr(o,2)),t[Ge]=ue(e.substr(i)),v(n).bigHour=!0})),$e("Hmm",(function(e,t,n){var o=e.length-2;t[ze]=ue(e.substr(0,o)),t[We]=ue(e.substr(o))})),$e("Hmmss",(function(e,t,n){var o=e.length-4,i=e.length-2;t[ze]=ue(e.substr(0,o)),t[We]=ue(e.substr(o,2)),t[Ge]=ue(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,on=de("Hours",!0);function rn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:I,longDateFormat:q,invalidDate:W,ordinal:Y,dayOfMonthOrdinalParse:K,relativeTime:X,months:et,monthsShort:tt,week:Et,weekdays:It,weekdaysMin:Dt,weekdaysShort:Mt,meridiemParse:nn},ln={},cn={};function un(e,t){var n,o=Math.min(e.length,t.length);for(n=0;n0;){if(o=hn(i.slice(0,t).join("-")))return o;if(n&&n.length>=t&&un(i,n)>=t-1)break;t--}r++}return an}function fn(e){return null!=e.match("^[^/\\\\]*$")}function hn(t){var n=null;if(void 0===ln[t]&&"undefined"!==typeof e&&e&&e.exports&&fn(t))try{n=an._abbr,function(){var e=new Error('Cannot find module "./locale"');throw e.code="MODULE_NOT_FOUND",e}(),mn(n)}catch(o){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=c(t)?gn(e):vn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function vn(e,t){if(null!==t){var n,o=sn;if(t.abbr=e,null!=ln[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])o=ln[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;o=n._config}return ln[e]=new F(P(o,t)),cn[e]&&cn[e].forEach((function(e){vn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function yn(e,t){if(null!=t){var n,o,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(P(ln[e]._config,t)):(null!=(o=hn(e))&&(i=o._config),t=P(i,t),null==o&&(t.abbr=e),(n=new F(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function gn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!r(e)){if(t=hn(e))return t;e=[e]}return pn(e)}function bn(){return O(ln)}function wn(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[He]<0||n[He]>11?He:n[qe]<1||n[qe]>Ze(n[Qe],n[He])?qe:n[ze]<0||n[ze]>24||24===n[ze]&&(0!==n[We]||0!==n[Ge]||0!==n[Ye])?ze:n[We]<0||n[We]>59?We:n[Ge]<0||n[Ge]>59?Ge:n[Ye]<0||n[Ye]>999?Ye:-1,v(e)._overflowDayOfYear&&(tqe)&&(t=qe),v(e)._overflowWeeks&&-1===t&&(t=Ke),v(e)._overflowWeekday&&-1===t&&(t=Je),v(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,_n=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],En=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],On=/^\/?Date\((-?\d+)/i,An=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kn(e){var t,n,o,i,r,a,s=e._i,l=xn.exec(s)||Sn.exec(s),c=_n.length,u=En.length;if(l){for(v(e).iso=!0,t=0,n=c;tmt(r)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=bt(r,0,e._dayOfYear),e._a[He]=n.getUTCMonth(),e._a[qe]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=o[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ze]&&0===e._a[We]&&0===e._a[Ge]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?bt:gt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(v(e).weekdayMismatch=!0)}}function jn(e){var t,n,o,i,r,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=Ln(t.GG,e._a[Qe],St(Yn(),1,4).year),o=Ln(t.W,1),((i=Ln(t.E,1))<1||i>7)&&(l=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,c=St(Yn(),r,a),n=Ln(t.gg,e._a[Qe],c.year),o=Ln(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(l=!0)):i=r),o<1||o>Ct(n,r,a)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(s=xt(n,o,i,r,a),e._a[Qe]=s.year,e._dayOfYear=s.dayOfYear)}function Bn(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],v(e).empty=!0;var t,n,i,r,a,s,l,c=""+e._i,u=c.length,d=0;for(l=(i=H(e._f,e._locale).match(N)||[]).length,t=0;t0&&v(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),d+=n.length),$[r]?(n?v(e).empty=!1:v(e).unusedTokens.push(r),Be(r,n,e)):e._strict&&!n&&v(e).unusedTokens.push(r);v(e).charsLeftOver=u-d,c.length>0&&v(e).unusedInput.push(c),e._a[ze]<=12&&!0===v(e).bigHour&&e._a[ze]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[ze]=Un(e._locale,e._a[ze],e._meridiem),null!==(s=v(e).era)&&(e._a[Qe]=e._locale.erasConvertYear(s,e._a[Qe])),$n(e),wn(e)}else Dn(e);else kn(e)}function Un(e,t,n){var o;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((o=e.isPM(n))&&t<12&&(t+=12),o||12!==t||(t=0),t):t}function Qn(e){var t,n,o,i,r,a,s=!1,l=e._f.length;if(0===l)return v(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:g()}));function Xn(e,t){var n,o;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Yn();for(n=t[0],o=1;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Co(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=zn(t))._a?(e=t._isUTC?h(t._a):Yn(t._a),this._isDSTShifted=this.isValid()&&co(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function _o(){return!!this.isValid()&&!this._isUTC}function Eo(){return!!this.isValid()&&this._isUTC}function Oo(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ao=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,To=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ko(e,t){var n,o,i,r=e,a=null;return so(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=Ao.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:ue(a[qe])*n,h:ue(a[ze])*n,m:ue(a[We])*n,s:ue(a[Ge])*n,ms:ue(lo(1e3*a[Ye]))*n}):(a=To.exec(e))?(n="-"===a[1]?-1:1,r={y:Ro(a[2],n),M:Ro(a[3],n),w:Ro(a[4],n),d:Ro(a[5],n),h:Ro(a[6],n),m:Ro(a[7],n),s:Ro(a[8],n)}):null==r?r={}:"object"===typeof r&&("from"in r||"to"in r)&&(i=Fo(Yn(r.from),Yn(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),o=new ao(r),so(e)&&s(e,"_locale")&&(o._locale=e._locale),so(e)&&s(e,"_isValid")&&(o._isValid=e._isValid),o}function Ro(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Po(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Fo(e,t){var n;return e.isValid()&&t.isValid()?(t=ho(t,e),e.isBefore(t)?n=Po(e,t):((n=Po(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Io(e,t){return function(n,o){var i;return null===o||isNaN(+o)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=o,o=i),Mo(this,ko(n,o),e),this}}function Mo(e,t,n,i){var r=t._milliseconds,a=lo(t._days),s=lo(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,pe(e,"Month")+s*n),a&&fe(e,"Date",pe(e,"Date")+a*n),r&&e._d.setTime(e._d.valueOf()+r*n),i&&o.updateOffset(e,a||s))}ko.fn=ao.prototype,ko.invalid=ro;var Do=Io(1,"add"),No=Io(-1,"subtract");function Lo(e){return"string"===typeof e||e instanceof String}function Vo(e){return C(e)||d(e)||Lo(e)||u(e)||jo(e)||$o(e)||null===e||void 0===e}function $o(e){var t,n,o=a(e)&&!l(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=r.length;for(t=0;tn.valueOf():n.valueOf()9999?Q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Q(n,"Z")):Q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,o,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",o=r+'[")]',this.format(e+t+n+o)}function ni(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Q(this,e);return this.localeData().postformat(t)}function oi(e,t){return this.isValid()&&(C(e)&&e.isValid()||Yn(e).isValid())?ko({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.from(Yn(),e)}function ri(e,t){return this.isValid()&&(C(e)&&e.isValid()||Yn(e).isValid())?ko({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Yn(),e)}function si(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gn(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var li=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ci(){return this._locale}var ui=1e3,di=60*ui,pi=60*di,fi=3506328*pi;function hi(e,t){return(e%t+t)%t}function mi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function vi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function yi(e){var t,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?vi:mi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*di),pi);break;case"minute":t=this._d.valueOf(),t-=hi(t,di);break;case"second":t=this._d.valueOf(),t-=hi(t,ui)}return this._d.setTime(t),o.updateOffset(this,!0),this}function gi(e){var t,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?vi:mi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=pi-hi(t+(this._isUTC?0:this.utcOffset()*di),pi)-1;break;case"minute":t=this._d.valueOf(),t+=di-hi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ui-hi(t,ui)-1}return this._d.setTime(t),o.updateOffset(this,!0),this}function bi(){return this._d.valueOf()-6e4*(this._offset||0)}function wi(){return Math.floor(this.valueOf()/1e3)}function xi(){return new Date(this.valueOf())}function Si(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ci(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function _i(){return this.isValid()?this.toISOString():null}function Ei(){return y(this)}function Oi(){return f({},v(this))}function Ai(){return v(this).overflow}function Ti(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function ki(e,t){var n,i,r,a=this._eras||gn("en")._eras;for(n=0,i=a.length;n=0)return l[o]}function Pi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n}function Fi(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e(r=Ct(e,o,i))&&(t=r),Xi.call(this,e,t,n,o,i))}function Xi(e,t,n,o,i){var r=xt(e,t,n,o,i),a=bt(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),Me("N",$i),Me("NN",$i),Me("NNN",$i),Me("NNNN",ji),Me("NNNNN",Bi),$e(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,o){var i=n._locale.erasParse(e,o,n._strict);i?v(n).era=i:v(n).invalidEra=e})),Me("y",Te),Me("yy",Te),Me("yyy",Te),Me("yyyy",Te),Me("yo",Ui),$e(["y","yy","yyy","yyyy"],Qe),$e(["yo"],(function(e,t,n,o){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Qe]=n._locale.eraYearOrdinalParse(e,i):t[Qe]=parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Hi("gggg","weekYear"),Hi("ggggg","weekYear"),Hi("GGGG","isoWeekYear"),Hi("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Me("G",ke),Me("g",ke),Me("GG",Se,ge),Me("gg",Se,ge),Me("GGGG",Oe,we),Me("gggg",Oe,we),Me("GGGGG",Ae,xe),Me("ggggg",Ae,xe),je(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,o){t[o.substr(0,2)]=ue(e)})),je(["gg","GG"],(function(e,t,n,i){t[i]=o.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),ne("quarter","Q"),ae("quarter",7),Me("Q",ye),$e("Q",(function(e,t){t[He]=3*(ue(e)-1)})),j("D",["DD",2],"Do","date"),ne("date","D"),ae("date",9),Me("D",Se),Me("DD",Se,ge),Me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),$e(["D","DD"],qe),$e("Do",(function(e,t){t[qe]=ue(e.match(Se)[0])}));var er=de("Date",!0);function tr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}j("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ae("dayOfYear",4),Me("DDD",Ee),Me("DDDD",be),$e(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),j("m",["mm",2],0,"minute"),ne("minute","m"),ae("minute",14),Me("m",Se),Me("mm",Se,ge),$e(["m","mm"],We);var nr=de("Minutes",!1);j("s",["ss",2],0,"second"),ne("second","s"),ae("second",15),Me("s",Se),Me("ss",Se,ge),$e(["s","ss"],Ge);var or,ir,rr=de("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ae("millisecond",16),Me("S",Ee,ye),Me("SS",Ee,ge),Me("SSS",Ee,be),or="SSSS";or.length<=9;or+="S")Me(or,Te);function ar(e,t){t[Ye]=ue(1e3*("0."+e))}for(or="S";or.length<=9;or+="S")$e(or,ar);function sr(){return this._isUTC?"UTC":""}function lr(){return this._isUTC?"Coordinated Universal Time":""}ir=de("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var cr=S.prototype;function ur(e){return Yn(1e3*e)}function dr(){return Yn.apply(null,arguments).parseZone()}function pr(e){return e}cr.add=Do,cr.calendar=Qo,cr.clone=Ho,cr.diff=Jo,cr.endOf=gi,cr.format=ni,cr.from=oi,cr.fromNow=ii,cr.to=ri,cr.toNow=ai,cr.get=he,cr.invalidAt=Ai,cr.isAfter=qo,cr.isBefore=zo,cr.isBetween=Wo,cr.isSame=Go,cr.isSameOrAfter=Yo,cr.isSameOrBefore=Ko,cr.isValid=Ei,cr.lang=li,cr.locale=si,cr.localeData=ci,cr.max=Jn,cr.min=Kn,cr.parsingFlags=Oi,cr.set=me,cr.startOf=yi,cr.subtract=No,cr.toArray=Si,cr.toObject=Ci,cr.toDate=xi,cr.toISOString=ei,cr.inspect=ti,"undefined"!==typeof Symbol&&null!=Symbol.for&&(cr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cr.toJSON=_i,cr.toString=Zo,cr.unix=wi,cr.valueOf=bi,cr.creationData=Ti,cr.eraName=Fi,cr.eraNarrow=Ii,cr.eraAbbr=Mi,cr.eraYear=Di,cr.year=vt,cr.isLeapYear=yt,cr.weekYear=qi,cr.isoWeekYear=zi,cr.quarter=cr.quarters=Zi,cr.month=ut,cr.daysInMonth=dt,cr.week=cr.weeks=Tt,cr.isoWeek=cr.isoWeeks=kt,cr.weeksInYear=Yi,cr.weeksInWeekYear=Ki,cr.isoWeeksInYear=Wi,cr.isoWeeksInISOWeekYear=Gi,cr.date=er,cr.day=cr.days=Ht,cr.weekday=qt,cr.isoWeekday=zt,cr.dayOfYear=tr,cr.hour=cr.hours=on,cr.minute=cr.minutes=nr,cr.second=cr.seconds=rr,cr.millisecond=cr.milliseconds=ir,cr.utcOffset=vo,cr.utc=go,cr.local=bo,cr.parseZone=wo,cr.hasAlignedHourOffset=xo,cr.isDST=So,cr.isLocal=_o,cr.isUtcOffset=Eo,cr.isUtc=Oo,cr.isUTC=Oo,cr.zoneAbbr=sr,cr.zoneName=lr,cr.dates=E("dates accessor is deprecated. Use date instead.",er),cr.months=E("months accessor is deprecated. Use month instead",ut),cr.years=E("years accessor is deprecated. Use year instead",vt),cr.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yo),cr.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Co);var fr=F.prototype;function hr(e,t,n,o){var i=gn(),r=h().set(o,t);return i[n](r,e)}function mr(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return hr(e,t,n,"month");var o,i=[];for(o=0;o<12;o++)i[o]=hr(e,o,n,"month");return i}function vr(e,t,n,o){"boolean"===typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,r=gn(),a=e?r._week.dow:0,s=[];if(null!=n)return hr(t,(n+a)%7,o,"day");for(i=0;i<7;i++)s[i]=hr(t,(i+a)%7,o,"day");return s}function yr(e,t){return mr(e,t,"months")}function gr(e,t){return mr(e,t,"monthsShort")}function br(e,t,n){return vr(e,t,n,"weekdays")}function wr(e,t,n){return vr(e,t,n,"weekdaysShort")}function xr(e,t,n){return vr(e,t,n,"weekdaysMin")}fr.calendar=M,fr.longDateFormat=z,fr.invalidDate=G,fr.ordinal=J,fr.preparse=pr,fr.postformat=pr,fr.relativeTime=Z,fr.pastFuture=ee,fr.set=R,fr.eras=ki,fr.erasParse=Ri,fr.erasConvertYear=Pi,fr.erasAbbrRegex=Li,fr.erasNameRegex=Ni,fr.erasNarrowRegex=Vi,fr.months=rt,fr.monthsShort=at,fr.monthsParse=lt,fr.monthsRegex=ft,fr.monthsShortRegex=pt,fr.week=_t,fr.firstDayOfYear=At,fr.firstDayOfWeek=Ot,fr.weekdays=$t,fr.weekdaysMin=Bt,fr.weekdaysShort=jt,fr.weekdaysParse=Qt,fr.weekdaysRegex=Wt,fr.weekdaysShortRegex=Gt,fr.weekdaysMinRegex=Yt,fr.isPM=tn,fr.meridiem=rn,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=E("moment.lang is deprecated. Use moment.locale instead.",mn),o.langData=E("moment.langData is deprecated. Use moment.localeData instead.",gn);var Sr=Math.abs;function Cr(){var e=this._data;return this._milliseconds=Sr(this._milliseconds),this._days=Sr(this._days),this._months=Sr(this._months),e.milliseconds=Sr(e.milliseconds),e.seconds=Sr(e.seconds),e.minutes=Sr(e.minutes),e.hours=Sr(e.hours),e.months=Sr(e.months),e.years=Sr(e.years),this}function _r(e,t,n,o){var i=ko(t,n);return e._milliseconds+=o*i._milliseconds,e._days+=o*i._days,e._months+=o*i._months,e._bubble()}function Er(e,t){return _r(this,e,t,1)}function Or(e,t){return _r(this,e,t,-1)}function Ar(e){return e<0?Math.floor(e):Math.ceil(e)}function Tr(){var e,t,n,o,i,r=this._milliseconds,a=this._days,s=this._months,l=this._data;return r>=0&&a>=0&&s>=0||r<=0&&a<=0&&s<=0||(r+=864e5*Ar(Rr(s)+a),a=0,s=0),l.milliseconds=r%1e3,e=ce(r/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,a+=ce(n/24),s+=i=ce(kr(a)),a-=Ar(Rr(i)),o=ce(s/12),s%=12,l.days=a,l.months=s,l.years=o,this}function kr(e){return 4800*e/146097}function Rr(e){return 146097*e/4800}function Pr(e){if(!this.isValid())return NaN;var t,n,o=this._milliseconds;if("month"===(e=oe(e))||"quarter"===e||"year"===e)switch(t=this._days+o/864e5,n=this._months+kr(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Rr(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}}function Fr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Ir(e){return function(){return this.as(e)}}var Mr=Ir("ms"),Dr=Ir("s"),Nr=Ir("m"),Lr=Ir("h"),Vr=Ir("d"),$r=Ir("w"),jr=Ir("M"),Br=Ir("Q"),Ur=Ir("y");function Qr(){return ko(this)}function Hr(e){return e=oe(e),this.isValid()?this[e+"s"]():NaN}function qr(e){return function(){return this.isValid()?this._data[e]:NaN}}var zr=qr("milliseconds"),Wr=qr("seconds"),Gr=qr("minutes"),Yr=qr("hours"),Kr=qr("days"),Jr=qr("months"),Xr=qr("years");function Zr(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,o,i){return i.relativeTime(t||1,!!n,e,o)}function oa(e,t,n,o){var i=ko(e).abs(),r=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),d=ea(i.as("y")),p=r<=n.ss&&["s",r]||r0,p[4]=o,na.apply(null,p)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function ra(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,o,i=!1,r=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(r=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),o=oa(this,!i,r,n=this.localeData()),i&&(o=n.pastFuture(+this,o)),n.postformat(o)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,o,i,r,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,o=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(u?r+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+o+"S":"")):"P0D"}var ua=ao.prototype;return ua.isValid=io,ua.abs=Cr,ua.add=Er,ua.subtract=Or,ua.as=Pr,ua.asMilliseconds=Mr,ua.asSeconds=Dr,ua.asMinutes=Nr,ua.asHours=Lr,ua.asDays=Vr,ua.asWeeks=$r,ua.asMonths=jr,ua.asQuarters=Br,ua.asYears=Ur,ua.valueOf=Fr,ua._bubble=Tr,ua.clone=Qr,ua.get=Hr,ua.milliseconds=zr,ua.seconds=Wr,ua.minutes=Gr,ua.hours=Yr,ua.days=Kr,ua.weeks=Zr,ua.months=Jr,ua.years=Xr,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=si,ua.localeData=ci,ua.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=li,j("X",0,0,"unix"),j("x",0,0,"valueOf"),Me("x",ke),Me("X",Fe),$e("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),$e("x",(function(e,t,n){n._d=new Date(ue(e))})),o.version="2.29.4",i(Yn),o.fn=cr,o.min=Zn,o.max=eo,o.now=to,o.utc=h,o.unix=ur,o.months=yr,o.isDate=d,o.locale=mn,o.invalid=g,o.duration=ko,o.isMoment=C,o.weekdays=br,o.parseZone=dr,o.localeData=gn,o.isDuration=so,o.monthsShort=gr,o.weekdaysMin=xr,o.defineLocale=vn,o.updateLocale=yn,o.locales=bn,o.weekdaysShort=wr,o.normalizeUnits=oe,o.relativeTimeRounding=ia,o.relativeTimeThreshold=ra,o.calendarFormat=Uo,o.prototype=cr,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(t,n(452)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version={lib:"2.10120.0",product:"2.10120.0",supportedApiVersion:2}},function(e,t,n){"use strict";var o=n(147),i=n(310);t.preferredStorage=null,t.getAvailableStorage=function(){return t.preferredStorage?t.preferredStorage:o.hasLocalStorage()?localStorage:o.hasCookieStorage()?new r:o.hasSessionStorage()?sessionStorage:new a};var r=function(){function e(){}return e.prototype.getItem=function(e){return i.Cookie.get(e)},e.prototype.removeItem=function(e){i.Cookie.erase(e)},e.prototype.setItem=function(e,t){i.Cookie.set(e,t)},e}();t.CookieStorage=r;var a=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}();t.NullStorage=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.showDebugPanel="showDebugPanel",e}();t.DebugEvents=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.isContextual=!1,this.endpoint=null}return e.prototype.isActivated=function(){return!1},e.prototype.getCurrentEventCause=function(){return this.currentEventCause},e.prototype.getCurrentEventMeta=function(){return this.currentEventMeta},e.prototype.logSearchEvent=function(e,t){this.setNoopCauseAndMeta(e.name,t)},e.prototype.logSearchAsYouType=function(e,t){this.setNoopCauseAndMeta(e.name,t)},e.prototype.logClickEvent=function(e,t,n,o){return this.setNoopCauseAndMeta(e.name,t),Promise.resolve(null)},e.prototype.logCustomEvent=function(e,t,n){return this.setNoopCauseAndMeta(e.name,t),Promise.resolve(null)},e.prototype.getTopQueries=function(e){return new Promise((function(e,t){e([])}))},e.prototype.getCurrentVisitIdPromise=function(){return new Promise((function(e,t){e(null)}))},e.prototype.getCurrentVisitId=function(){return null},e.prototype.sendAllPendingEvents=function(){},e.prototype.cancelAllPendingEvents=function(){},e.prototype.warnAboutSearchEvent=function(){},e.prototype.getPendingSearchEvent=function(){return null},e.prototype.setOriginContext=function(e){},e.prototype.getOriginContext=function(){return""},e.prototype.getUserDisplayName=function(){return""},e.prototype.setNoopCauseAndMeta=function(e,t){this.currentEventCause=e,this.currentEventMeta=t},e}();t.NoopAnalyticsClient=o},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(5),a=n(158),s=function(e){function t(t){var n=e.call(this,(function(){return t.innerHTML}))||this;return n.element=t,n.templateFromAScriptTag=new a.TemplateFromAScriptTag(n,n.element),n}return o(t,e),t.prototype.toHtmlElement=function(){return this.templateFromAScriptTag.toHtmlElement()},t.prototype.getType=function(){return"HtmlTemplate"},t.create=function(e){return r.Assert.exists(e),new t(e)},t.fromString=function(e,n){return new t(a.TemplateFromAScriptTag.fromString(e,n))},t.prototype.getTemplateInfo=function(){return this.element},t.mimeTypes=["text/html","text/HTML"],t}(i.Template);t.HtmlTemplate=s},function(e,t,n){var o=n(79),i=n(400),r=n(401),a=Object.defineProperty;t.f=n(80)?Object.defineProperty:function(e,t,n){if(o(e),t=r(t,!0),o(n),i)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var o=n(405),i=n(82);e.exports=function(e){return o(i(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(163)("keys"),i=n(165);e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){e.exports=n(417)},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0||window.scrollTo(0,window.pageYOffset+o)},e.getMainResultList=function(t){var n=e.getResultLists(t);return a.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 s.Logger(t).warn(i)},e}();t.ResultListUtils=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(4),r=n(23),a=n(0),s=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){o.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){o.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 i.Utils.exists(this.delta)&&this.delta>0?e="+"+r.format(this.delta,"n0"):this.occurrences>0&&(e=r.format(this.occurrences,"n0")),e},e.prototype.getFormattedComputedField=function(e){return 0!=this.computedField?r.format(this.computedField,e):void 0},e.create=function(t){if(a.isString(t))return e.createFromValue(t);if(a.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){o.Assert.isNonEmptyString(t);var n=new e;return n.value=t,n.lookupValue=t,n},e.createFromGroupByValue=function(t){o.Assert.exists(t),o.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=i.Utils.exists(t.lookupValue)?t.lookupValue:t.value,n.occurrences=t.numberOfResults,n.computedField=i.Utils.isNonEmptyArray(t.computedFieldResults)?t.computedFieldResults[0]:void 0,n.score=t.score,n},e.createFromFieldValue=function(t){o.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=t.lookupValue,n.occurrences=t.numberOfResults,n},e}();t.FacetValue=s},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(77),r=n(68),a=n(22),s=n(4),l=n(1),c=n(0),u="[\\.\\-\\u2011\\s~=,.\\|\\/:'`\u2019;_()!?&+]",d="("+u+"|^)(",p=function(e){function t(t,n,o){void 0===t&&(t="coveo-highlight"),void 0===n&&(n=0),void 0===o&&(o="gi");var i=e.call(this)||this;return i.cssClass=t,i.shorten=n,i.regexFlags=o,i}return o(t,e),t}(i.Options);t.DefaultStreamHighlightOptions=p;var f=function(){function e(){}return e.highlightStreamHTML=function(t,n,o,i){var a=(new p).merge(i),s=function(e){var t=l.$$("div").el;return t.innerHTML=e,t}(t),u=l.$$(s).findAll("*");return u.length>0?(c.each(u,(function(e,t){var i=l.$$(e).text();e.innerHTML=r.HighlightUtils.highlightString(i,h(i,n,o,a),[],a.cssClass)})),s.innerHTML):e.highlightStreamText(t,n,o,i)},e.highlightStreamText=function(e,t,n,o){var i=(new p).merge(o);return r.HighlightUtils.highlightString(e,h(e,t,n,i),[],i.cssClass)},e}();function h(e,t,n,o){var i=[],r=c.chain(n).values().map(c.keys).flatten().value();return c.each(t,(function(t,n){var l=c.chain([n]).concat(t).compact().difference(r).map(s.Utils.escapeRegexCharacter).sortBy("length").value();if(0!==l.length){var p=""+d+l.join("|")+")(?=(?:"+u+"|$)+)",f=a.StringUtils.getHighlights(e,new RegExp(p,o.regexFlags),n);void 0!=f&&s.Utils.isNonEmptyArray(f)&&i.push(f)}})),c.each(n,(function(t,n){var r=n.split(" "),l=d;c.each(r,(function(e,n){l+="(?:"+[e].concat(t[e]).join("|")+")",n==r.length-1&&(l+="(?="),l+=u,n==r.length-1&&(l+="|$)"),n!=r.length-1&&(l+="+")})),l+=")";var p=a.StringUtils.getHighlights(e,new RegExp(l,o.regexFlags),n);void 0!=p&&s.Utils.isNonEmptyArray(p)&&i.push(p)})),c.chain(i).flatten().compact().uniq((function(e){return e.offset})).sortBy((function(e){return e.offset})).map((function(e){var o=c.keys(t),i=c.keys(n),r=o.concat(i),a=c.indexOf(r,e.dataHighlightGroupTerm)+1;return c.extend(e,{dataHighlightGroup:a})})).value()}t.StreamHighlightUtils=f,t.getRestHighlightsForAllTerms=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(4),r=n(6),a=n(5),s=n(0),l=function(){function e(){}return e.get=function(t){var n=i.Utils.getFieldValue(t,"objecttype"),o=i.Utils.getFieldValue(t,"filetype");return i.Utils.isNonEmptyString(n)&&!n.match(/^(file|document|contentversion|item)$/i)?e.getObjectType(n):i.Utils.isNonEmptyString(o)?e.getFileType(o):{icon:"coveo-icon filetype",caption:r.l("Unknown")}},e.getObjectType=function(e,t){void 0===t&&(t=!0);var n=e.toLowerCase(),o="objecttype_"+n,i=r.l(o);return i.toLowerCase()==o.toLowerCase()&&(i=t?r.l(e):e),this.safelyBuildFileTypeInfo("objecttype",n,i)},e.getFileType=function(e,t){void 0===t&&(t=!0);var n=e.toLowerCase();"."==n[0]&&(n=n.substring(1));var o="filetype_"+n,i=r.l(o);return i.toLowerCase()==o.toLowerCase()&&(i=t?r.l(e):e),this.safelyBuildFileTypeInfo("filetype",n,i)},e.getFileTypeCaptions=function(){if(void 0==o){o={};var e=String.locales[String.locale.toLowerCase()];a.Assert.isNotUndefined(e),s.keys(e).forEach((function(e){0==e.indexOf("filetype_")?o[e.substr("filetype_".length)]=e.toLocaleString():0==e.indexOf("objecttype_")&&(o[e.substr("objecttype_".length)]=e.toLocaleString())}))}return o},e.safelyBuildFileTypeInfo=function(e,t,n){return{icon:"coveo-icon "+e+" "+s.escape(t.replace(" ","-")),caption:s.escape(n)}},e}();t.FileTypes=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(58),r=n(4),a=function(){function e(){}return e.registerFieldHelper=function(t,n){e.fieldHelpers.push(t),e.registerTemplateHelper(t,n)},e.registerTemplateHelper=function(t,n){o.Assert.isNonEmptyString(t),o.Assert.exists(n),e.registerTemplateHelperInUnderscore(t,n),e.helpers[t]=n},e.getHelper=function(t){return r.Utils.getCaseInsensitiveProperty(e.helpers,t)},e.getHelpers=function(){return e.helpers},e.registerTemplateHelperInUnderscore=function(e,t){o.Assert.isNonEmptyString(e),o.Assert.exists(t),i.UnderscoreTemplate.registerTemplateHelper(e,t)},e.helpers={},e.fieldHelpers=[],e}();t.TemplateHelpers=a},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(58),a=n(67),s=n(5),l=n(1),c=n(0),u=n(2),d=function(e){function t(){var t=e.call(this)||this;return t.addFields(u.Initialization.getRegisteredFieldsForQuery()),t}return o(t,e),t.prototype.instantiateToString=function(e,t){void 0===t&&(t={}),s.Assert.exists(e);var n=(new i.DefaultInstantiateTemplateOptions).merge(t);e=c.extend({},e,r.UnderscoreTemplate.templateHelpers);for(var o=c.chain(a.TemplateCache.getDefaultTemplates()).map((function(e){return a.TemplateCache.getTemplate(e)})).value(),l=c.chain(o).sortBy((function(e){return null==e.condition})).sortBy((function(e){return null==e.fieldsToMatch})).value(),u=0;u1&&this.isValueHierarchical&&(e=e.slice(-1)),this.appendValuesToDom(e),null!=this.options.textCaption&&this.prependTextCaptionToDom()},FieldValue.prototype.getValue=function(){var e=Utils_1.Utils.getFieldValue(this.result,this.options.field);return!underscore_1.isArray(e)&&underscore_1.isObject(e)&&(e=null),e},FieldValue.prototype.renderOneValue=function(e){var t=Dom_1.$$("span").el,n=this.getCaption(e);if(this.options.helper){var o=TemplateHelpers_1.TemplateHelpers.getHelper(this.options.helper+"v2")||TemplateHelpers_1.TemplateHelpers.getHelper(""+this.options.helper);Utils_1.Utils.exists(o)?n=o.call(this,e,this.getHelperOptions(),this.result):this.logger.warn("Helper "+this.options.helper+" is not found in available helpers. The list of supported helpers is :",underscore_1.keys(TemplateHelpers_1.TemplateHelpers.getHelpers()));var i=this.getFullDate(e,this.options.helper);i&&t.setAttribute("title",i),"date"!=this.options.helper&&"dateTime"!=this.options.helper&&"emailDateTime"!=this.options.helper||(n=StringUtils_1.StringUtils.capitalizeFirstLetter(n))}return this.options.htmlValue?t.innerHTML=n:t.appendChild(document.createTextNode(n)),this.bindEventOnValue(t,e,n),t},FieldValue.prototype.getValueContainer=function(){return this.element},FieldValue.prototype.normalizeHelperAndOptions=function(){var e=this;this.options=ComponentOptions_1.ComponentOptions.initOptions(this.element,FieldValue.helperOptions,this.options,FieldValue.ID);var t=underscore_1.keys(FieldValue.options.helperOptions.subOptions),n=underscore_1.filter(t,(function(t){var n=FieldValue.options.helperOptions.subOptions[t];if(n){var o=n.helpers;return null!=o&&underscore_1.contains(o,e.options.helper)}return!1}));this.options.helperOptions=underscore_1.omit(this.options.helperOptions,(function(e,t){return!underscore_1.contains(n,t)}))},FieldValue.prototype.getHelperOptions=function(){var inlineOptions=ComponentOptions_1.ComponentOptions.loadStringOption(this.element,"helperOptions",{});return Utils_1.Utils.isNonEmptyString(inlineOptions)?underscore_1.extend({},this.options.helperOptions,eval("("+inlineOptions+")")):this.options.helperOptions},FieldValue.prototype.getFullDate=function(e,t){var n={useLongDateFormat:!0,useTodayYesterdayAndTomorrow:!1,useWeekdayIfThisWeek:!1,omitYearIfCurrentOne:!1};return"date"==t?DateUtils_1.DateUtils.dateToString(new Date(parseInt(e)),n):"dateTime"==t||"emailDateTime"==t?DateUtils_1.DateUtils.dateTimeToString(new Date(parseInt(e)),n):""},FieldValue.prototype.appendValuesToDom=function(e){var t=this;underscore_1.each(e,(function(n,o){void 0!=n&&(t.getValueContainer().appendChild(t.renderOneValue(n)),o!==e.length-1&&t.getValueContainer().appendChild(document.createTextNode(t.options.displaySeparator)))}))},FieldValue.prototype.renderTextCaption=function(){return Dom_1.$$("span",{className:"coveo-field-caption"},underscore_1.escape(this.options.textCaption)).el},FieldValue.prototype.prependTextCaptionToDom=function(){var e=this.getValueContainer();Dom_1.$$(e).prepend(this.renderTextCaption()),Dom_1.$$(e).addClass("coveo-with-label")},FieldValue.prototype.bindEventOnValue=function(e,t,n){this.bindFacets(e,t,n)},FieldValue.prototype.getCaption=function(e){for(var t=0,n=this.getFacets();tthis.max&&(e=this.max),e1?new v.MultiAnalyticsClient(b.map(a,(function(e){return t.getClient(e,n,o)}))):new h.NoopAnalyticsClient},t.ignoreElementsInsideRecommendationInterface=function(e){return b.filter(e,(function(e){return void 0===d.$$(e).closest(i.Component.computeCssClassNameForType("Recommendation"))}))},t.getClient=function(e,n,o){var r=i.Component.get(e,t,!0);return r instanceof t?r.client:new t(e,n,o).client},t.prototype.handleDoNotTrack=function(){this.doNotTrack()&&(this.logger.warn("Coveo Analytics tracking disabled due to doNotTrack"),this.disable())},t.prototype.doNotTrack=function(){var e=[!0,"yes","1",1].indexOf(navigator.doNotTrack||window.doNotTrack||navigator.msDoNotTrack),t=navigator.globalPrivacyControl;return-1!==e||t},t.ID="Analytics",t.options={user:r.ComponentOptions.buildStringOption(),userDisplayName:r.ComponentOptions.buildStringOption(),token:r.ComponentOptions.buildStringOption(),endpoint:r.ComponentOptions.buildStringOption({postProcessing:function(e){return e?-1!==e.indexOf("usageanalytics")?e.split("/rest")[0]+"/rest":e:a.AnalyticsEndpoint.getURLFromSearchEndpoint(s.SearchEndpoint.defaultEndpoint)}}),anonymous:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),searchHub:r.ComponentOptions.buildStringOption({defaultValue:"default"}),splitTestRunName:r.ComponentOptions.buildStringOption(),splitTestRunVersion:r.ComponentOptions.buildStringOption(),sendToCloud:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),organization:r.ComponentOptions.buildStringOption(),autoPushToGtmDataLayer:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),gtmDataLayerName:r.ComponentOptions.buildStringOption({defaultValue:"dataLayer"})},t}(i.Component);t.Analytics=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(93),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},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=function(e){function t(t,n,o){var i=e.call(this,t,n)||this;return i.facet=t,i.facetValue=n,i.keepDisplayedValueNextTime=o,i}return o(t,e),t.prototype.bindEvent=function(){e.prototype.bindEvent.call(this,{displayNextTime:this.keepDisplayedValueNextTime,pinFacet:this.facet.options.preservePosition})},t}(n(476).ValueElement);t.FacetValueElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=n(52);t.notWordStart=" ()[],$@'\"",t.notInWord=" ()[],:",t.Basic={basicExpressions:["Word","DoubleQuoted"],grammars:{DoubleQuoted:'"[NotDoubleQuote]"',NotDoubleQuote:/[^"]*/,SingleQuoted:"'[NotSingleQuote]'",NotSingleQuote:/[^']*/,Number:/-?(0|[1-9]\d*)(\.\d+)?/,Word:function(e,n,r){var a=new RegExp("[^"+t.notWordStart.replace(/(.)/g,"\\$1")+"][^"+t.notInWord.replace(/(.)/g,"\\$1")+"]*"),s=e.match(a);null!=s&&0!=s.index&&(s=null);var l=new o.Result(null!=s?s[0]:null,r,e);return l.isSuccess()&&n&&e.length>l.value.length?new i.EndOfInputResult(l):l}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.populateResultLayout="populateResultLayout",e}();t.ResultLayoutEvents=o},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(5),r=n(77),a=n(4),s=n(23),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.decimals=0,t}return o(t,e),t}(r.Options),c=function(){function e(){}return e.currencyToString=function(e,t){if(a.Utils.isNullOrUndefined(e))return"";e=Number(e),i.Assert.isNumber(e),t=(new l).merge(t);var n=s.culture().numberFormat.currency,o=n.symbol;a.Utils.isNonEmptyString(t.symbol)&&(n.symbol=t.symbol);var r=s.format(e,"c"+t.decimals.toString());return n.symbol=o,r},e}();t.CurrencyUtils=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(5),r=function(){function e(t,n){this.element=n,i.Assert.isString(t),i.Assert.exists(n),this.element.addClass("coveo-"+t+"-dropdown-header"),this.element.addClass(e.DEFAULT_CSS_CLASS_NAME)}return e.prototype.open=function(){this.element.addClass(e.ACTIVE_HEADER_CSS_CLASS_NAME)},e.prototype.close=function(){this.element.removeClass(e.ACTIVE_HEADER_CSS_CLASS_NAME)},e.prototype.cleanUp=function(){this.element.detach()},e.prototype.hide=function(){o.$$(this.element).addClass("coveo-hidden")},e.prototype.show=function(){o.$$(this.element).removeClass("coveo-hidden")},e.DEFAULT_CSS_CLASS_NAME="coveo-dropdown-header",e.ACTIVE_HEADER_CSS_CLASS_NAME="coveo-dropdown-header-active",e}();t.ResponsiveDropdownHeader=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=function(){function e(){}return e.evaluateFieldsToMatch=function(t,n){var i=!0;return!t||(o.each(t,(function(t){var r=!1;t.values?o.each(t.values,(function(o){if(!r){var i=n.raw[t.field],a=e.getFieldValueAsArray(i);r=e.isMatch(a,o)}})):r=null!=n.raw[t.field],i=i&&(t.reverseCondition?!r:r)})),i)},e.getFieldValueAsArray=function(e){return"string"===typeof e?[e]:e},e.isMatch=function(e,t){return void 0!=o.find(e,(function(e){return e.toLowerCase()==t.toLowerCase()}))},e}();t.TemplateFieldsEvaluator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=function(){function e(){}return e.addPrefixedEvent=function(e,t,n){o.each(this.prefixes,(function(o){""==o&&(t=t.toLowerCase()),e.addEventListener(o+t,n,!1)}))},e.removePrefixedEvent=function(e,t,n){o.each(this.prefixes,(function(o){""==o&&(t=t.toLowerCase()),e.removeEventListener(o+t,n,!1)}))},e.prefixes=["webkit","moz","MS","o",""],e}();t.EventsUtils=i},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}),n(565);var i=n(11),r=n(99),a=n(3),s=n(175),l=n(221),c=n(5),u=n(18),d=n(13),p=n(6),f=n(1),h=n(10),m=n(7),v=n(8),y=n(2),g=n(510),b=n(139),w=function(e){function t(n,o,a){var c=e.call(this,n,t.ID,a)||this;c.element=n,c.options=o,c.bindings=a,n instanceof HTMLInputElement&&c.logger.error("Querybox cannot be used on an HTMLInputElement"),c.options=v.ComponentOptions.initComponentOptions(n,t,o),new g.QueryboxOptionsProcessing(c).postProcess(),f.$$(c.element).toggleClass("coveo-query-syntax-disabled",0==c.options.enableQuerySyntax),c.magicBox=l.createMagicBox(n,new s.Grammar("Query",{Query:"[Term*][Spaces?]",Term:"[Spaces?][Word]",Spaces:/ +/,Word:/[^ ]+/}),{inline:!0});var m=f.$$(c.magicBox.element).find("input");return m&&f.$$(m).setAttribute("aria-label",c.options.placeholder||p.l("Search")),c.bind.onRootElement(i.QueryEvents.buildingQuery,(function(e){return c.handleBuildingQuery(e)})),c.bind.onRootElement(r.StandaloneSearchInterfaceEvents.beforeRedirect,(function(){return c.updateQueryState()})),c.bind.onQueryState(u.MODEL_EVENTS.CHANGE_ONE,d.QUERY_STATE_ATTRIBUTES.Q,(function(e){return c.handleQueryStateChanged(e)})),c.options.enableSearchAsYouType&&(f.$$(c.element).addClass("coveo-search-as-you-type"),c.magicBox.onchange=function(){c.searchAsYouType()}),c.magicBox.onsubmit=function(){c.submit()},c.magicBox.onblur=function(){c.updateQueryState()},c.magicBox.onclear=function(){c.updateQueryState(),c.options.triggerQueryOnClear&&(c.usageAnalytics.logSearchEvent(h.analyticsActionCauseList.searchboxClear,{}),c.triggerNewQuery(!1))},c}return o(t,e),t.prototype.submit=function(){this.magicBox.clearSuggestion(),this.updateQueryState(),this.usageAnalytics.logSearchEvent(h.analyticsActionCauseList.searchboxSubmit,{}),this.triggerNewQuery(!1)},t.prototype.setText=function(e){this.magicBox.setText(e),this.updateQueryState()},t.prototype.clear=function(){this.magicBox.clear()},t.prototype.getText=function(){return this.magicBox.getText()},t.prototype.getResult=function(){return this.magicBox.getResult()},t.prototype.getDisplayedResult=function(){return this.magicBox.getDisplayedResult()},t.prototype.getCursor=function(){return this.magicBox.getCursor()},t.prototype.resultAtCursor=function(e){return this.magicBox.resultAtCursor(e)},t.prototype.handleBuildingQuery=function(e){c.Assert.exists(e),c.Assert.exists(e.queryBuilder),this.updateQueryState(),this.lastQuery=this.magicBox.getText(),new b.QueryboxQueryParameters(this.options).addParameters(e.queryBuilder,this.lastQuery)},t.prototype.triggerNewQuery=function(e){clearTimeout(this.searchAsYouTypeTimeout);var t=this.magicBox.getText();this.lastQuery!=t&&null!=t&&(this.lastQuery=t,this.queryController.executeQuery({searchAsYouType:e,logInActionsHistory:!0}))},t.prototype.updateQueryState=function(){this.queryStateModel.set(d.QueryStateModel.attributesEnum.q,this.magicBox.getText())},t.prototype.handleQueryStateChanged=function(e){c.Assert.exists(e);var t=e.value;t!=this.magicBox.getText()&&this.magicBox.setText(t)},t.prototype.searchAsYouType=function(){var e=this;clearTimeout(this.searchAsYouTypeTimeout),this.searchAsYouTypeTimeout=window.setTimeout((function(){e.usageAnalytics.logSearchAsYouType(h.analyticsActionCauseList.searchboxAsYouType,{}),e.triggerNewQuery(!0)}),this.options.searchAsYouTypeDelay)},t.ID="Querybox",t.doExport=function(){a.exportGlobally({Querybox:t,QueryboxQueryParameters:b.QueryboxQueryParameters})},t.options={enableSearchAsYouType:v.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Advanced Options"}),searchAsYouTypeDelay:v.ComponentOptions.buildNumberOption({defaultValue:50,min:0,section:"Advanced Options"}),enableQuerySyntax:v.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Advanced Options"}),enableWildcards:v.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Advanced Options"}),enableQuestionMarks:v.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableWildcards"}),enableLowercaseOperators:v.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableQuerySyntax"}),enablePartialMatch:v.ComponentOptions.buildBooleanOption({defaultValue:!1}),partialMatchKeywords:v.ComponentOptions.buildNumberOption({defaultValue:5,min:1,depend:"enablePartialMatch"}),partialMatchThreshold:v.ComponentOptions.buildStringOption({defaultValue:"50%",depend:"enablePartialMatch"}),triggerQueryOnClear:v.ComponentOptions.buildBooleanOption({defaultValue:!1})},t}(m.Component);t.Querybox=w,y.Initialization.registerAutoCreateComponent(w)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(66),r=function(){function e(e){this.options=e}return e.queryIsBlocked=function(){return!!e.queryIsCurrentlyBlocked||(e.queryIsCurrentlyBlocked=!0,i.Defer.defer((function(){return e.allowDuplicateQuery()})),!1)},e.allowDuplicateQuery=function(){e.queryIsCurrentlyBlocked=!1},e.prototype.addParameters=function(t,n){e.queryIsBlocked()||(this.options.enableWildcards&&(t.enableWildcards=!0),this.options.enableQuestionMarks&&(t.enableQuestionMarks=!0),this.options.enableLowercaseOperators&&(t.enableLowercaseOperators=!0),o.isEmpty(n)||(t.enableQuerySyntax=this.options.enableQuerySyntax,t.expression.add(n),this.options.enablePartialMatch&&(t.enablePartialMatch=this.options.enablePartialMatch,this.options.partialMatchKeywords&&(t.partialMatchKeywords=this.options.partialMatchKeywords),this.options.partialMatchThreshold&&(t.partialMatchThreshold=this.options.partialMatchThreshold))))},e.queryIsCurrentlyBlocked=!1,e}();t.QueryboxQueryParameters=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0);n(566);var r=n(3),a=function(){function e(e,t){var n=this;this.labelElement=o.$$("span",{className:"coveo-form-group-label"}),this.labelElement.text(t),this.element=o.$$("fieldset",{className:"coveo-form-group"},this.labelElement),i.each(e,(function(e){n.element.append(e.build())}))}return e.doExport=function(){r.exportGlobally({FormGroup:e})},e.prototype.build=function(){return this.element.el},e}();t.FormGroup=a},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;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]t.MIN_THRESHOLD_FOR_DUPLICATE_VALUE},e.prototype.stripInternalTime=function(e){return e&&e.forEach((function(e,t,n){delete e.internalTime})),e},e}();t.HistoryStore=r,Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function o(){return null!==document}t.hasLocalStorage=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}},t.hasSessionStorage=function(){try{return"sessionStorage"in window&&null!==window.sessionStorage}catch(e){return!1}},t.hasCookieStorage=function(){return navigator.cookieEnabled},t.hasDocument=o,t.hasDocumentLocation=function(){return o()&&null!==document.location}},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 a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}l((o=o.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[0,i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=5)throw new Error(r.REPEATED_FAILURES)},e.prototype.notifySubscribers=function(){var e=this;this.subscribers.forEach((function(t){return t(e.token)}))},e}();t.AccessToken=l},function(e,t,n){"use strict";var o,i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;ns",ShowingResultsOf:"Results {0}-{1} of {2}",ShowingResultsOfWithQuery:"Results {0}-{1} of {2} for {3}",SwitchTo:"Switch to {0}",Unexclude:"Remove exclusion filter on {0}",ClearAllFilters:"Clear All Filters",SkipLogin:"Skip login",LoginInProgress:"Login in progress, please wait ...",Login:"Log In",GetStarted:"Get Started",More:"More",NMore:"{0} more...",Less:"Fewer",Settings:"Settings",Score:"Score",ScoreDescription:"The score is computed from the number of occurrences as well as from the position in the result set.",Occurrences:"Occurrences",OccurrencesDescription:"Sort by number of occurrences, with values having the highest number appearing first.",Label:"Label",Of:"of",LabelDescription:"Sort alphabetically on the field values.",Value:"Value",ValueDescription:"Sort on the values of the first computed field",AlphaAscending:"Value Ascending",AlphaDescending:"Value Descending",ChiSquare:"Chi Square",Nosort:"No Sort",NosortDescription:"Do not sort the values. The values will be returned in a random order.",RelativeFrequency:"Relative Frequency",RelativeFrequencyDescription:"Sort based on the relative frequency of values. Less common values will appear higher.",DateDistribution:"Date distribution",Custom:"Custom",CustomDescription:"Sort based on a custom order",ComputedField:"Computed Field",Ascending:"Ascending",Descending:"Descending",noResultFor:"No results for {0}",noResult:"No results",autoCorrectedQueryTo:"Query was automatically corrected to {0}",didYouMean:"Did you mean: {0}",SuggestedResults:"Suggested Results",SuggestedQueries:"Suggested Queries",MostRelevantItems:"Most relevant items:",AllItems:"All items:",ShowLess:"Show less",ShowMore:"Show more",HideFacet:"Hide Facet",ShowFacet:"Show Facet",AndOthers:"and {0} others",Others:"{0} others",MostRelevantPosts:"Most Relevant Posts:",CompleteThread:"Complete Thread:",ShowCompleteThread:"Show Complete Thread",ShowOnlyTopMatchingPosts:"Show Only Top Matching Posts",MostRelevantReplies:"Most Relevant Replies:",AllConversation:"All Conversation:",ShowAllConversation:"Show All Conversation",ShowAllReplies:"Show All Replies",ShowOnlyMostRelevantReplies:"Show Only Most Relevant Replies",Close:"Close",Open:"Open",OpenInOutlookWhenPossible:"Open in Outlook (when possible)",AlwaysOpenInNewWindow:"Always open results in new window",Quickview:"Quick View",NoQuickview:"The Quick View for this document is unavailable",ErrorReport:"Error Report",OopsError:"Something went wrong.",ProblemPersists:"If the problem persists contact the administrator.",GoBack:"Go Back",Reset:"Reset",Retry:"Retry",MoreInfo:"More Information",Username:"Username",Password:"Password",PostedBy:"Posted by",CannotConnect:"Cannot connect to the server address.",BadUserPass:"Password does not match with username.",PleaseEnterYourCredentials:"Please enter your credentials for {0}.",PleaseEnterYourSearchPage:"Please enter your search page URL",Collapse:"Collapse",Collapsable:"Collapsible",Expand:"Expand",CollapseFacet:"Collapse {0} facet",ExpandFacet:"Expand {0} facet",ShowLessFacetResults:"Show fewer results for {0} facet",ShowMoreFacetResults:"Show more results for {0} facet",ShowLessCategoryResults:"Show fewer results for the {0} category",ShowMoreCategoryResults:"Show more results for the {0} category",ShowLessHierarchicalResults:"Show fewer results for the {0} facet",ShowMoreHierarchicalResults:"Show more results for the {0} facet",SearchFacetResults:"Search for values in {0} facet",Today:"Today",Yesterday:"Yesterday",Tomorrow:"Tomorrow",Duration:"Duration: {0}",IndexDuration:"Index Duration: {0}",ProxyDuration:"Proxy Duration: {0}",ClientDuration:"Client Duration: {0}",Unavailable:"Unavailable",Reply:"Reply",ReplyAll:"Reply All",Forward:"Forward",From:"From",Caption:"Caption",Expression:"Expression",Tab:"Tab",Tabs:"Tabs",EnterExpressionName:"Enter expression name",EnterExpressionToFilterWith:"Enter expression to filter results with",SelectTab:"Select Tab",SelectAll:"Select All",PageUrl:"Search page URL",ErrorSavingToDevice:"Error while saving the information to your device",ErrorReadingFromDevice:"Error while reading the information from your device",AppIntro:"Speak with a product specialist who can answer your questions about Coveo and help you decide which Coveo solution is right for you. Or, try a live demo !",TryDemo:"Try the demo",ContactUs:"Contact us",NewToCoveo:"New to Coveo?",LetUsHelpGetStarted:"Let us help you get started",LikesThis:"{0} likes this.",CannotConnectSearchPage:"Cannot connect to your search page",AreYouSureDeleteFilter:"Are you sure you want to delete the filter {0} with the expression {1}",OnlineHelp:"Online Help",Done:"Done",SaveFacetState:"Save this facet state",ClearFacetState:"Clear facet state",DisplayingTheOnlyMessage:"Displaying the only message in this conversation",NoNetworkConnection:"No network connection",UnknownConnection:"Unknown connection",EthernetConnection:"Ethernet connection",WiFi:"WiFi connection",CELL:"Cellular connection",CELL_2G:"Cellular 2G connection",CELL_3G:"Cellular 3G connection",CELL_4G:"Cellular 4G connection",Relevance:"Relevance",Date:"Date",Amount:"Amount",QueryExceptionNoException:"No exception",QueryExceptionInvalidSyntax:"Invalid syntax",QueryExceptionInvalidCustomField:"Invalid custom field",QueryExceptionInvalidDate:"Invalid date",QueryExceptionInvalidExactPhrase:"Invalid exact phrase",QueryExceptionInvalidDateOp:"Invalid date operator",QueryExceptionInvalidNear:"Invalid NEAR operator",QueryExceptionInvalidWeightedNear:"Invalid weighted NEAR",QueryExceptionInvalidTerm:"Invalid term",QueryExceptionTooManyTerms:"Too many terms",QueryExceptionWildcardTooGeneral:"Wildcard too general",QueryExceptionInvalidSortField:"Invalid sort field",QueryExceptionInvalidSmallStringOp:"Invalid small string operator",QueryExceptionRequestedResultsMax:"Requested results maximum",QueryExceptionAggregatedMirrorDead:"Aggregated mirror is offline",QueryExceptionAggregatedMirrorQueryTimeOut:"Aggregated mirror query timeout",QueryExceptionAggregatedMirrorInvalidBuildNumber:"Aggregated mirror invalid build number",QueryExceptionAggregatedMirrorCannotConnect:"Aggregated mirror cannot connect",QueryExceptionNotEnoughLeadingCharsWildcard:"Not enough leading character wildcard",QueryExceptionSecurityInverterNotFound:"Security inverter not found",QueryExceptionSecurityInverterAccessDenied:"Security inverter access denied",QueryExceptionAggregatedMirrorCannotImpersonate:"Aggregated mirror cannot impersonate",QueryExceptionUnexpected:"Unexpected",QueryExceptionAccessDenied:"Access denied",QueryExceptionSuperUserTokenInvalid:"Super user token invalid",QueryExceptionSuperUserTokenExpired:"Super user token is expired",QueryExceptionLicenseQueriesExpired:"Queries license expired",QueryExceptionLicenseSuperUserTokenNotSupported:"License super user token not supported",QueryExceptionInvalidSession:"Invalid session",QueryExceptionInvalidDocument:"Invalid document",QueryExceptionSearchDisabled:"Search disabled",FileType:"File type",ShowAttachment:"Show attachment",OnFeed:"on {0}'s feed.",Author:"Author",NoTitle:"No title",CurrentSelections:"Current selections",AllContent:"All content",CancelLastAction:"Cancel last action",SearchTips:"Search tips",CheckSpelling:"Check the spelling of your keywords.",TryUsingFewerKeywords:"Try using fewer, different or more general keywords.",SelectFewerFilters:"Select fewer filters to broaden your search.",Document:"Document",Time:"Time",StartDate:"Start Date",StartTime:"Start Time",DurationTitle:"Duration",UserQuery:"User query",ShowUserActions:"Show User Actions",NoData:"No data available",EventType:"Event type",GoToFullSearch:"Full search",GoToEdition:"Customize Panel",RemoveContext:"Remove context",BoxAttachToCase:"Attach to case",AttachToCase:"Attach to case",Attach:"Attach",Attached:"Attached",Detach:"Detach",Details:"Details",AdditionalFilters:"Additional filters",SelectNonContextualSearch:"Remove the context from the current record to broaden your search",CopyPasteToSupport:"Copy paste this message to the Coveo Support team for more information.",FollowQueryDescription:"Alert me for changes to the search results of this query.",SearchAlerts_Panel:"Manage Alerts",SearchAlerts_PanelDescription:"View and manage your search alerts.",SearchAlerts_PanelNoSearchAlerts:"You have no subscriptions.",SearchAlerts_Fail:"The Search Alerts service is currently unavailable.",SearchAlerts_Type:"Type",SearchAlerts_Content:"Content",SearchAlerts_Actions:"Action",EmptyQuery:"",SearchAlerts_Type_followQuery:"Query",SearchAlerts_Type_followDocument:"Item",SearchAlerts_unFollowing:"Stop Following",SearchAlerts_follow:"Follow",SearchAlerts_followed:"Followed",SearchAlerts_followQuery:"Follow Query",Subscription_StopFollowingQuery:"Stop Following Query",SearchAlerts_Frequency:"When",SubscriptionsManageSubscriptions:"Manage Alerts",SubscriptionsMessageFollowQuery:"You will receive alerts when the query {0} returns new or updated items.",SubscriptionsMessageFollow:"You will receive alerts for changes to the item {0}.",Expiration:"Expiration",Monthly:"Monthly",Daily:"Daily",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",Sunday:"Sunday",NextDay:"Next {0}",LastDay:"Last {0}",StartTypingCaseForSuggestions:"Describe your problem to see possible solutions",ExportToExcel:"Export to Excel",ExportToExcelDescription:"Export search results to Excel",CaseCreationNoResults:"No recommended solutions were found",SortBy:"Sort by",BoxCreateArticle:"Create Article",Facets:"Facets",AdvancedSearch:"Advanced Search",Keywords:"Keywords",AllTheseWords:"All these words",ExactPhrase:"This exact phrase",AnyOfTheseWords:"Any of these words",NoneOfTheseWords:"None of these words",Anytime:"Anytime",InTheLast:"In the last",Days:"days",Months:"months",Month:"Month",Year:"Year",Between:"Between",Language:"Language",Size:"Size",AtLeast:"at least",AtMost:"at most",Contains:"contains",DoesNotContain:"does not contain",Matches:"matches",Bytes:"bytes",card:"Card",table:"Table",ResultLinks:"Result links",EnableQuerySyntax:"Enable query syntax",On:"On",Off:"Off",Automatic:"Automatic",ResultsPerPage:"Results per page",PreviousMonth:"Previous month",NextMonth:"Next month",Title:"Title",FiltersInAdvancedSearch:"Filters in Advanced Search",NoEndpoints:"{0} has no registered endpoints.",InvalidToken:"The token used is invalid.",AddSources:"You will need to add sources in your index, or wait for the created sources to finish indexing.",TryAgain:"Please try again.",CoveoOnlineHelp:"Coveo Online Help",CannotAccess:"{0} cannot be accessed.",CoveoOrganization:"Coveo Organization",SearchAPIDuration:"Search API Duration: {0}",LastUpdated:"Last updated",AllDates:"All dates",WithinLastDay:"Within last day",WithinLastWeek:"Within last week",WithinLastMonth:"Within last month",WithinLastYear:"Within last year",RelevanceInspector:"Relevance Inspector",KeywordInCategory:'{0} in {1}',Result:"Result",ResultCount:"{0} results",ShowingResults:"{0} results",ShowingResultsWithQuery:"{0} results for {1}",NumberOfVideos:"Number of videos",AllCategories:"All Categories",Recommended:"Recommended",Featured:"Featured",CoveoHomePage:"Coveo Home page",SizeValue:"Size value",UnitMeasurement:"Unit of measurement",Toggle:"Toggle",FilterOn:"Filter on {0}",RemoveFilterOn:"Remove inclusion filter on {0}",Enter:"Enter",InsertAQuery:"Insert a query",PressEnterToSend:"Press enter to send",SortResultsBy:"Sort results by {0}",SortResultsByAscending:"Sort by {0} in ascending order",SortResultsByDescending:"Sort by {0} in descending order",DisplayResultsAs:"Display results as {0}",FacetTitle:"{0} facet",IncludeValueWithResultCount:"Inclusion filter on {0}; {1}",ExcludeValueWithResultCount:"Exclusion filter on {0}; {1}",PageNumber:"Page {0}",DisplayResultsPerPage:"Display {0} results per page",GroupByAndFacetRequestsCannotCoexist:"The query is invalid because it contains both Group By and Facet requests. Ensure that the search interface does not initialize DynamicFacet components alongside Facet components (or alongside any component extending the Facet component, such as FacetRange or FacetSlider).",MustContain:"Must contain:",Missing:"Missing:",Filters:"Filters",FiltersDropdown:"Filters dropdown",OpenFiltersDropdown:"Open the filters dropdown",CloseFiltersDropdown:"Close the filters dropdown",NoValuesFound:"No values found.",To:"to",DeselectFilterValues:"Deselect all active filters on {0} field",Rated:"Rated {0} out of {1} stars",RatedBy:"by {0} users",NoRatings:"No ratings",Pagination:"Pagination",ThumbnailOf:'Thumbnail of "{0}"',CollapsedUriParts:"Collapsed URI parts",HierarchicalFacetValueIndentedUnder:"{0} under {1}",HierarchicalFacetValuePathPrefix:"in",UsefulnessFeedbackRequest:"Was this useful?",UsefulnessFeedbackThankYou:"Thanks for your feedback!",UsefulnessFeedbackExplainWhy:"Explain why",UsefulnessFeedbackExplainWhyImperative:"Explain why",UsefulnessFeedbackDoesNotAnswer:"This didn't answer my question at all",UsefulnessFeedbackPartiallyAnswers:"This only partially answered my question",UsefulnessFeedbackWasNotAQuestion:"My request wasn't meant to be perceived as a question",Yes:"Yes",No:"No",Other:"Other",Send:"Send",Edit:"Edit",Delete:"Delete",Save:"Save",UsefulnessFeedbackReason:"Reason",AnswerSnippet:"Answer to your question",AnswerSpecificSnippet:'Answer to "{0}"',SuggestedQuestions:"People also ask",ExpandQuestionAnswer:'View answer for "{0}"',MoreValuesAvailable:"additional values are available",Breadcrumb:"Active filters",OrganizationIsPaused:"Your Coveo organization is paused due to inactivity and search is currently unavailable.",OrganizationWillResume:"Your organization is resuming and will be available shortly.",UpdatingResults:"Updating results",QuerySuggestionsAvailable:"{0} search suggestions are available.",QuerySuggestionsUnavailable:"There are no search suggestions."};t.defaultLanguage=function(){var e=String.locales||(String.locales={});e.en=i(e.en,r),String.toLocaleString.call(this,{en:r}),String.locale="en",String.defaultLocale="en",o.culture("en")},t.setLanguageAfterPageLoaded=function(){var e=String.locales||(String.locales={});e.en=i(e.en,r),String.toLocaleString.call(this,{en:r}),String.locale="en",String.defaultLocale="en",o.culture("en")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(26),i=n(0);String.toLocaleString=o.LocaleString;var r=/(((?!<\/pl>).)*)<\/pl>/g,a=/(((?!<\/sn>).)*)<\/sn>/g;t.L10N={format:function(e){for(var n=[],o=1;o0){var c=i.last(n);(i.isBoolean(c)||i.isNumber(c))&&(n.pop(),r=t.L10N.formatPlSn(r,c)),i.each(n,(function(e,t){return r=r.replace("{"+t+"}",e)}))}else r=r.replace(/{[0-9]}|[a-zA-Z]+<\/pl>||<\/sn>/g,"").trim();return r},formatPlSn:function(e,t){return e=(i.isBoolean(t)?t:1!==t&&-1!==t)?e.replace(r,"$1").replace(a,""):e.replace(r,"").replace(a,"$1")}}},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0)return this.logger.info("Logging analytics search events",e),this.sendToService(e,"searches","searchEvents")},e.prototype.sendDocumentViewEvent=function(e){return s.Assert.exists(e),this.logger.info("Logging analytics document view",e),this.sendToService(e,"click","clickEvent")},e.prototype.sendCustomEvent=function(e){return s.Assert.exists(e),this.logger.info("Logging analytics custom event",e),this.sendToService(e,"custom","customEvent")},e.prototype.getTopQueries=function(e){var t=this.buildAnalyticsUrl("/stats/topQueries");return this.getFromService(t,e)},e.prototype.clearCookies=function(){(new p.AnalyticsInformation).clear()},e.prototype.sendToService=function(t,n,o){return i(this,void 0,void 0,(function(){var i,a,s,l;return r(this,(function(r){switch(r.label){case 0:return null==e.pendingRequest?[3,2]:[4,e.pendingRequest];case 1:r.sent(),r.label=2;case 2:i=this.getURL(n),a=this.executeRequest(i,t),r.label=3;case 3:return r.trys.push([3,5,,8]),[4,a];case 4:return s=r.sent(),e.pendingRequest=null,this.handleAnalyticsEventResponse(s.data),[2,s.data];case 5:return l=r.sent(),e.pendingRequest=null,this.isAnalyticsTokenExpired(l)?[4,this.options.accessToken.doRenew()]:[3,7];case 6:if(r.sent())return[2,this.sendToService(t,n,o)];r.label=7;case 7:throw l;case 8:return[2]}}))}))},e.prototype.isAnalyticsTokenExpired=function(e){return null!=e&&400===e.statusCode&&e.data&&"InvalidToken"===e.data.type},e.prototype.executeRequest=function(t,n){var o=this.endpointCaller.call({errorsAsSuccess:!1,method:"POST",queryString:t.queryNormalized,requestData:n,url:t.path,responseType:"text",requestDataType:"application/json"});return o?(e.pendingRequest=o,o):Promise.resolve({data:{visitId:"",visitorId:""},duration:0})},e.prototype.getURL=function(t){var n=e.CUSTOM_ANALYTICS_VERSION||e.DEFAULT_ANALYTICS_VERSION;return u.UrlUtils.normalizeAsParts({paths:[this.options.serviceUrl,n,"/analytics/",t],query:{org:this.organization}})},e.prototype.getFromService=function(e,t){var n=o({},t,{access_token:this.options.accessToken.token});return this.endpointCaller.call({errorsAsSuccess:!1,method:"GET",queryString:this.options.organization?["org="+d.Utils.safeEncodeURIComponent(this.options.organization)]:[],requestData:n,responseType:"json",url:e}).then((function(e){return e.data}))},e.prototype.handleAnalyticsEventResponse=function(e){var t;return e.visitId?t=e.visitId:e.searchEventResponses&&(t=a.first(e.searchEventResponses).visitId),t&&(this.visitId=t),e},e.prototype.buildAnalyticsUrl=function(t){return u.UrlUtils.normalizeAsString({paths:[this.options.serviceUrl,e.CUSTOM_ANALYTICS_VERSION||e.DEFAULT_ANALYTICS_VERSION,t]})},e.DEFAULT_ANALYTICS_URI="https://analytics.cloud.coveo.com/rest/ua",e.DEFAULT_ANALYTICS_VERSION="v15",e.CUSTOM_ANALYTICS_VERSION=void 0,e}();t.AnalyticsEndpoint=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(44);t.QueryController=o.QueryController;var i=n(155);t.HistoryController=i.HistoryController;var r=n(156);t.LocalStorageHistoryController=r.LocalStorageHistoryController},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(5),r=n(17),a=n(1),s=n(42),l=n(31),c=n(45),u=n(4),d=n(0),p=n(13),f=n(10),h=n(125),m=n(18),v=function(e){function t(n,o,s,l,c){var u=e.call(this,n,t.ID)||this;return u.window=o,u.queryStateModel=s,u.queryController=l,u.willUpdateHash=!1,i.Assert.exists(u.queryStateModel),i.Assert.exists(u.queryController),a.$$(u.element).on(r.InitializationEvents.restoreHistoryState,(function(){u.logger.trace("Restore history state. Update model"),u.updateModelFromHash(),u.lastState=u.queryStateModel.getAttributes()})),a.$$(u.element).on(u.queryStateModel.getEventName(m.Model.eventTypes.all),(function(){u.logger.trace("Query model changed. Update hash"),u.updateHashFromModel()})),u.hashchange=function(){u.handleHashChange(),u.lastState=u.queryStateModel.getAttributes()},u.window.addEventListener("hashchange",u.hashchange),a.$$(u.element).on(r.InitializationEvents.nuke,(function(){return u.handleNuke()})),u}return o(t,e),Object.defineProperty(t.prototype,"usageAnalytics",{get:function(){return this.queryController.usageAnalytics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hashUtils",{get:function(){return this.hashUtilsModule?this.hashUtilsModule:s.HashUtils},set:function(e){this.hashUtilsModule=e},enumerable:!0,configurable:!0}),t.prototype.setState=function(e){this.setHashValues(e)},t.prototype.replaceState=function(e){var t="#"+this.hashUtils.encodeValues(e);this.window.location.replace(t)},t.prototype.replaceUrl=function(e){this.window.location.replace(e)},t.prototype.setHashValues=function(e){this.logger.trace("Update history hash");var t=this.hashUtils.encodeValues(e),n=t?"#"+t:"",o=this.window.location.hash!=n;this.logger.trace("from",this.window.location.hash,"to",n);var i=this.window.location,r=""+i.pathname+i.search+n;this.queryController.firstQuery?o&&(this.replaceUrl(r),this.logger.trace("History hash modified",n)):o&&(this.window.history.pushState("","",r),this.logger.trace("History hash created",n))},t.prototype.debugInfo=function(){return{state:this.queryStateModel.getAttributes()}},t.prototype.handleHashChange=function(){this.logger.trace("History hash changed");var e=this.updateModelFromHash();if(d.difference(e,t.attributesThatDoNotTriggerQuery).length>0){if(this.lastState){var n=u.Utils.differenceBetweenObjects(this.queryStateModel.getAttributes(),this.lastState);this.mapStateDifferenceToUsageAnalyticsCall(n)}this.queryController.executeQuery()}},t.prototype.handleNuke=function(){this.window.removeEventListener("hashchange",this.hashchange)},t.prototype.updateHashFromModel=function(){var e=this;this.logger.trace("Model -> history hash"),this.willUpdateHash||(l.Defer.defer((function(){var t=e.queryStateModel.getAttributes();e.setHashValues(t),e.logger.debug("Saving state to hash",t),e.willUpdateHash=!1})),this.willUpdateHash=!0)},t.prototype.updateModelFromHash=function(){var e=this;this.logger.trace("History hash -> model");var t={},n=[];return d.each(this.queryStateModel.attributes,(function(o,i,r){var a=e.getHashValue(i);t[i]=a,""+e.queryStateModel.get(i)!==""+a&&n.push(i)})),this.queryStateModel.setMultiple(t),n},t.prototype.getHashValue=function(e){var t;i.Assert.isNonEmptyString(e);try{var n=this.hashUtils.getHash(this.window);t=this.hashUtils.getValue(e,n)}catch(o){this.logger.error("Could not parse parameter "+e+" from URI")}return u.Utils.isUndefined(t)&&(t=this.queryStateModel.defaultAttributes[e]),t},t.prototype.mapStateDifferenceToUsageAnalyticsCall=function(e){var t=this;if(!this.usageAnalytics)return this.logger.warn("The query state has been modified directly in the URL and we couldn't log the proper analytics call."),void this.logger.warn("This is caused by a history controller that has been initialized without the usage analytics parameter.");p.QUERY_STATE_ATTRIBUTES.Q in e?h.logSearchBoxSubmitEvent(this.usageAnalytics):p.QUERY_STATE_ATTRIBUTES.SORT in e?h.logSortEvent(this.usageAnalytics,e[p.QUERY_STATE_ATTRIBUTES.SORT]):d.keys(e).forEach((function(e){var n=t.extractFacetInfoFromStateDifference(e);n&&t.usageAnalytics.logSearchEvent(n.actionCause,{facetId:n.fieldName,facetField:n.fieldName,facetTitle:n.fieldName,facetValue:n.valueModified})}))},t.prototype.extractFacetInfoFromStateDifference=function(e){var t,n=/^f:(?!.*:not)(.*)/.exec(e),o=/^f:(.*):not/.exec(e),i=this.queryStateModel.get(e)||[],r=this.lastState[e]||[],a=i.length");if(n>=t.maxDepth)return this.toJsonRef(e);if(v.isArray(e))return v.map(e,(function(t,r){return i.toJson(t,n+1,o.concat([e]))}));if(v.isDate(e))return this.toJsonRef(e,m.format(e,"F"));var r={};return v.each(e,(function(t,a){r[a]=i.toJson(t,n+1,o.concat([e]))})),r.ref,r}return e},t.prototype.toJsonRef=function(e,t){return(t=new String(t||e)).ref=e,t},t.prototype.componentToJson=function(e,t){return void 0===t&&(t=0),v.keys(e.options).length>0?this.toJson(e.options,t):this.toJsonRef(e.options,new String("No options"))},t.prototype.htmlToJson=function(e){if(null!=e)return{tagName:e.tagName,id:e.id,classList:e.className.split(/\s+/)}},t.prototype.templateToJson=function(e){if(null==e)return null;var t=e.element,n={type:e.getType()};return null!=t&&(n.id=t.id,n.condition=t.attributes["data-condition"],n.content=t.innerText),n},t.prototype.selectElementText=function(e){if(window.getSelection&&document.createRange){var t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}else if("createTextRange"in document.body){var o=document.body.createTextRange();o.moveToElementText(e),o.select()}},t.prototype.search=function(e,t){var n=this;v.isEmpty(e)?(c.$$(t).findAll(".coveo-search-match, .coveo-search-submatch").forEach((function(e){c.$$(e).removeClass("coveo-search-match, coveo-search-submatch")})),c.$$(t).removeClass("coveo-searching")):(c.$$(t).addClass("coveo-searching-loading"),setTimeout((function(){var o=c.$$(t).findAll(".coveo-section .coveo-section-container > .coveo-property");v.each(o,(function(t){n.findInProperty(t,e)})),c.$$(t).addClass("coveo-searching"),c.$$(t).removeClass("coveo-searching-loading")})))},t.prototype.highlightSearch=function(e,t){var n;if(e instanceof HTMLElement?n=e:e instanceof c.Dom&&(n=e.el),null!=n&&null!=n.innerText){var o=n.innerText.split(new RegExp("(?="+u.StringUtils.regexEncode(t)+")","gi"));n.innerHTML="",o.forEach((function(e){var o,i=new RegExp("("+u.StringUtils.regexEncode(t)+")","i"),r=e.match(i);null!=r?((o=c.$$("span",{className:"coveo-debug-highlight"})).text(r[1]),n.appendChild(o.el),(o=c.$$("span")).text(e.substr(r[1].length)),n.appendChild(o.el)):((o=c.$$("span")).text(e),n.appendChild(o.el))}))}},t.prototype.removeHighlightSearch=function(e){null!=e&&(e.innerHTML=e.innerText)},t.prototype.showAnimationDuringQuery=function(){c.$$(this.modalBox.content).addClass("coveo-debug-loading")},t.prototype.hideAnimationDuringQuery=function(){c.$$(this.modalBox.content).removeClass("coveo-debug-loading")},t.ID="Debug",t.doExport=function(){x.exportGlobally({Debug:t})},t.options={enableDebug:r.ComponentOptions.buildBooleanOption({defaultValue:!1})},t.customOrder=["error","queryDuration","result","fields","rankingInfo","template","query","results","state"],t.durationKeys=["indexDuration","proxyDuration","clientDuration","duration"],t.maxDepth=10,t}(p.RootComponent);t.Debug=C},function(e,t,n){var o=n(109),i=n(38).document,r=o(i)&&o(i.createElement);e.exports=function(e){return r?i.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(79),i=n(402),r=n(166),a=n(114)("IE_PROTO"),s=function(){},l=function(){var e,t=n(160)("iframe"),o=r.length;for(t.style.display="none",n(409).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("