coveo.analytics 2.30.48 → 2.30.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.mjs +1 -1
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.debug.js +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +1 -1
- package/dist/library.es.js +1 -1
- package/dist/library.js +1 -1
- package/dist/library.mjs +1 -1
- package/dist/react-native.es.js +1 -1
- package/package.json +1 -1
package/dist/browser.mjs
CHANGED
|
@@ -603,7 +603,7 @@ function sha1(bytes) {
|
|
|
603
603
|
const v5 = v35('v5', 0x50, sha1);
|
|
604
604
|
var uuidv5 = v5;
|
|
605
605
|
|
|
606
|
-
const libVersion = "2.30.
|
|
606
|
+
const libVersion = "2.30.49";
|
|
607
607
|
|
|
608
608
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
609
609
|
|
package/dist/coveoua.browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var coveoua=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n,r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function c(){return"undefined"!=typeof window}function u(){return"undefined"!=typeof navigator}function l(){return"undefined"!=typeof document}function p(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}function h(){return u()&&navigator.cookieEnabled}"function"==typeof SuppressedError&&SuppressedError,function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"}(n||(n={}));var d=[n.click,n.custom,n.search,n.view],v=function(e,t){return-1!==d.indexOf(e)?r({language:l()?document.documentElement.lang:"unknown",userAgent:u()?navigator.userAgent:"unknown"},t):t},g=function(){function e(){}return e.set=function(e,t,n){var r,o,i;n&&(r=new Date).setTime(r.getTime()+n),-1===(i=window.location.hostname).indexOf(".")?f(e,t,r):f(e,t,r,(o=i.split("."))[o.length-2]+"."+o[o.length-1])},e.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r];if(0===(o=o.replace(/^\s+/,"")).lastIndexOf(t,0))return o.substring(t.length,o.length)}return null},e.erase=function(t){e.set(t,"",-1)},e}();function f(e,t,n,r){document.cookie="".concat(e,"=").concat(t)+(n?";expires=".concat(n.toUTCString()):"")+(r?";domain=".concat(r):"")+";path=/;SameSite=Lax"}function m(){return p()?localStorage:h()?new y:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return!1}}()?sessionStorage:new k}var y=function(){function e(){}return e.prototype.getItem=function(t){return g.get("".concat(e.prefix).concat(t))},e.prototype.removeItem=function(t){g.erase("".concat(e.prefix).concat(t))},e.prototype.setItem=function(t,n,r){g.set("".concat(e.prefix).concat(t),n,r)},e.prefix="coveo_",e}(),S=function(){function e(){this.cookieStorage=new y}return e.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},e.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},e.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t,31556926e3)},e}(),k=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}(),w=Object.freeze({__proto__:null,CookieAndLocalStorage:S,CookieStorage:y,NullStorage:k,getAvailableStorage:m,preferredStorage:null}),I="__coveo.analytics.history",E=function(){function e(e){this.store=e||m()}return e.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},e.prototype.addElementAsync=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e)),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=n.sent())?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e]),[2]}})})},e.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))},e.prototype.getHistoryAsync=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return e=t.sent(),[2,this.stripEmptyQueries(this.stripInternalTime(e))]}})})},e.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(I);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},e.prototype.getHistoryWithInternalTimeAsync=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getItem(I)];case 1:return(e=t.sent())?[2,JSON.parse(e)]:[2,[]];case 2:return t.sent(),[2,[]];case 3:return[2]}})})},e.prototype.setHistory=function(e){try{this.store.setItem(I,JSON.stringify(e.slice(0,20)))}catch(e){}},e.prototype.clear=function(){try{this.store.removeItem(I)}catch(e){}},e.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort(function(e,t){return(t.internalTime||0)-(e.internalTime||0)})[0]:null},e.prototype.cropQueryElement=function(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e},e.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4},e.prototype.stripInternalTime=function(e){return Array.isArray(e)?e.map(function(e){return{name:e.name,time:e.time,value:e.value}}):[]},e.prototype.stripEmptyQuery=function(e){var t=e.name,n=e.time,r=e.value;return t&&"string"==typeof r&&"query"===t.toLowerCase()&&""===r.trim()?{name:t,time:n}:e},e.prototype.stripEmptyQueries=function(e){var t=this;return e.map(function(e){return t.stripEmptyQuery(e)})},e}(),b=Object.freeze({__proto__:null,HistoryStore:E,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MAX_VALUE_SIZE:75,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,STORE_KEY:I,default:E}),C=function(e,t){return i(void 0,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return e!==n.view?[3,2]:[4,A(t.contentIdValue)];case 1:return o.sent(),[2,r({location:window.location.toString(),referrer:document.referrer,title:document.title},t)];case 2:return[2,t]}})})},A=function(e){return i(void 0,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:return t=new E,n={name:"PageView",value:e,time:(new Date).toISOString()},[4,t.addElementAsync(n)];case 1:return r.sent(),[2]}})})};let D;const U=new Uint8Array(16);function R(){if(!D&&(D="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!D))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(U)}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F(e){return"string"==typeof e&&P.test(e)}const x=[];for(let e=0;e<256;++e)x.push((e+256).toString(16).slice(1));function T(e,t=0){return x[e[t+0]]+x[e[t+1]]+x[e[t+2]]+x[e[t+3]]+"-"+x[e[t+4]]+x[e[t+5]]+"-"+x[e[t+6]]+x[e[t+7]]+"-"+x[e[t+8]]+x[e[t+9]]+"-"+x[e[t+10]]+x[e[t+11]]+x[e[t+12]]+x[e[t+13]]+x[e[t+14]]+x[e[t+15]]}var L={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function O(e,t,n){if(L.randomUUID&&!t&&!e)return L.randomUUID();const r=(e=e||{}).random||(e.rng||R)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return T(r)}function V(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function M(e,t){return e<<t|e>>>32-t}var G=function(e,t,n){function r(e,r,o,i){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=function(e){if(!F(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(let e=0;e<16;++e)o[i+e]=a[e];return o}return T(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}("v5",80,function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,o=Math.ceil(r/16),i=new Array(o);for(let t=0;t<o;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];i[t]=n}i[o-1][14]=8*(e.length-1)/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<o;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=i[e][t];for(let e=16;e<80;++e)r[e]=M(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let o=n[0],s=n[1],a=n[2],c=n[3],u=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),i=M(o,5)+V(n,s,a,c)+u+t[n]+r[e]>>>0;u=c,c=a,a=M(s,30)>>>0,s=o,o=i}n[0]=n[0]+o>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+u>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}),q="2.30.48",N=function(e){return"".concat(e.protocol,"//").concat(e.hostname).concat(0===e.pathname.indexOf("/")?e.pathname:"/".concat(e.pathname)).concat(e.search)},Q={pageview:"pageview",event:"event"},_=function(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?O:n;this.client=t,this.uuidGenerator=r},H=function(e){function n(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.actionData={},i.pageViewId=o(),i.nextPageViewId=i.pageViewId,i.currentLocation=N(window.location),i.lastReferrer=l()?document.referrer:"",i.addHooks(),i}return t(n,e),n.prototype.getApi=function(e){return"setAction"===e?this.setAction:null},n.prototype.setAction=function(e,t){this.action=e,this.actionData=t},n.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},n.prototype.getLocationInformation=function(e,t){return r({hitType:e},this.getNextValues(e,t))},n.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},n.prototype.getDefaultContextInformation=function(e){var t={title:l()?document.title:"",encoding:l()?document.characterSet:"UTF-8"},n={screenResolution:"".concat(screen.width,"x").concat(screen.height),screenColor:"".concat(screen.colorDepth,"-bit")},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return r(r(r(r({},i),n),o),t)},n.prototype.updateLocationForNextPageView=function(e,t){var n=this.getNextValues(e,t),r=n.pageViewId,o=n.referrer,i=n.location;this.lastReferrer=o,this.pageViewId=r,this.currentLocation=i,e===Q.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},n.prototype.getNextValues=function(e,t){return{pageViewId:e===Q.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Q.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Q.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},n.prototype.getCurrentLocationFromPayload=function(e){if(e.page){return"".concat((t=this.currentLocation,t.split("/").slice(0,3).join("/"))).concat(e.page.replace(/^\/?(.*)$/,"/$1"))}return N(window.location);var t},n}(_),B=function(){function e(e,t){if(!F(e))throw Error("Not a valid uuid");this.clientId=e,this.creationDate=Math.floor(t/1e3)}return e.prototype.toString=function(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()},Object.defineProperty(e.prototype,"expired",{get:function(){var t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime},enumerable:!1,configurable:!0}),e.prototype.validate=function(e,t){return!this.expired&&this.matchReferrer(e,t)},e.prototype.matchReferrer=function(e,t){try{var n=new URL(e);return t.some(function(e){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host)})}catch(e){return!1}},e.fromString=function(t){var n=t.split(".");if(2!==n.length)return null;var r=n[0],o=n[1];if(32!==r.length||isNaN(parseInt(o)))return null;var i=r.substring(0,8)+"-"+r.substring(8,12)+"-"+r.substring(12,16)+"-"+r.substring(16,20)+"-"+r.substring(20,32);return F(i)?new e(i,1e3*Number.parseInt(o)):null},e.cvo_cid="cvo_cid",e.expirationTime=120,e}(),j=function(e){function n(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r;return e.call(this,{client:n,uuidGenerator:o})||this}return t(n,e),n.prototype.getApi=function(e){switch(e){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}},n.prototype.decorate=function(e){return i(this,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");r.label=1;case 1:return r.trys.push([1,3,,4]),t=new URL(e),[4,this.client.getCurrentVisitorId()];case 2:return n=r.sent(),t.searchParams.set(B.cvo_cid,new B(n,Date.now()).toString()),[2,t.toString()];case 3:throw r.sent(),new Error("Invalid URL provided");case 4:return[2]}})})},n.prototype.acceptFrom=function(e){this.client.setAcceptedLinkReferrers(e)},n.Id="link",n}(_),K=j,Y=Object.keys;function z(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function W(e){return"string"!=typeof e||""==e||Number.isNaN(+e)?e:+e}function $(e){return 240==(248&e)?4:224==(240&e)?3:192==(224&e)?2:1}var J={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},X=a([],Y(J).map(function(e){return J[e]}),!0).join("|"),Z=new RegExp("^(".concat(X,"$)")),ee=[function(e){return Z.test(e)}],te={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ne={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},re={action:"pa",list:"pal",listSource:"pls"},oe={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ie={id:"quoteId",affiliation:"quoteAffiliation"},se={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},ae={add:re,bookmark_add:re,bookmark_remove:re,click:re,checkout:re,checkout_option:re,detail:re,impression:re,remove:re,refund:r(r({},re),oe),purchase:r(r({},re),oe),quickview:re,quote:r(r({},re),ie),review:r(r({},re),se)},ce=function(e,t,n,o){return Y(e).reduce(function(i,s){var a,c="il".concat(t+1).concat(o).concat(n+1).concat(ne[s]||s);return r(r({},i),((a={})[c]=e[s],a))},{})},ue=Y(te).map(function(e){return te[e]}),le=Y(ne).map(function(e){return ne[e]}),pe=Y(re).map(function(e){return re[e]}),he=Y(oe).map(function(e){return oe[e]}),de=Y(se).map(function(e){return se[e]}),ve=Y(ie).map(function(e){return ie[e]}),ge=a(a([],ue,!0),["custom"],!1).join("|"),fe=a(a([],le,!0),["custom"],!1).join("|"),me="(pr[0-9]+)",ye="(il[0-9]+pi[0-9]+)",Se=new RegExp("^".concat(me,"(").concat(ge,")$")),ke=new RegExp("^(".concat(ye,"(").concat(fe,"))|(il[0-9]+nm)$")),we=new RegExp("^(".concat(pe.join("|"),")$")),Ie=new RegExp("^(".concat(he.join("|"),")$")),Ee=new RegExp("^".concat(me,"custom$")),be=new RegExp("^".concat(ye,"custom$")),Ce=new RegExp("^(".concat(a(a(a([],["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],!0),de,!0),ve,!0).join("|"),")$")),Ae=[function(e){return ke.test(e)},function(e){return Se.test(e)},function(e){return we.test(e)},function(e){return Ie.test(e)},function(e){return Ce.test(e)}],De=[Ee,be],Ue=r(r(r(r({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"].reduce(function(e,t){var n;return r(r({},e),((n={})[t]=t,n))},{})),Re=r(r({},Ue),{svcAction:"svc_action",svcActionData:"svc_action_data"}),Pe=Y(Re).map(function(e){return Re[e]}),Fe=function(e){return-1!==Pe.indexOf(e)},xe=function(e){return"custom"===e},Te=function(e){var t=void 0;return a([],De,!0).every(function(n){var r;return t=null===(r=n.exec(e))||void 0===r?void 0:r[1],!Boolean(t)}),t},Le=function(e,t){return Y(t).reduce(function(n,o){var i;return r(r({},n),((i={})["".concat(e).concat(o)]=t[o],i))},{})},Oe=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r,o,i,a,c,u,l,p;return s(this,function(s){switch(s.label){case 0:if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');return n=this.opts,r=n.baseUrl,o=n.preprocessRequest,[4,this.getQueryParamsForEventType(e)];case 1:return i=s.sent(),[4,this.preProcessRequestAsPotentialJSONString("".concat(r,"/analytics/").concat(e,"?").concat(i),t,o)];case 2:return a=s.sent(),c=a.url,u=a.payload,l=this.encodeForEventType(e,u),p=new Blob([l],{type:"application/x-www-form-urlencoded"}),navigator.sendBeacon(c,p),[2]}})})},e.prototype.isAvailable=function(){return"sendBeacon"in navigator},e.prototype.deleteHttpCookieVisitorId=function(){return Promise.resolve()},e.prototype.preProcessRequestAsPotentialJSONString=function(e,t,n){return i(this,void 0,void 0,function(){var r,o,i,a,c;return s(this,function(s){switch(s.label){case 0:return r=e,o=t,n?[4,n({url:e,body:JSON.stringify(t)},"analyticsBeacon")]:[3,2];case 1:i=s.sent(),a=i.url,c=i.body,r=a||e;try{o=JSON.parse(c)}catch(e){console.error("Unable to process the request body as a JSON string",e)}s.label=2;case 2:return[2,{payload:o,url:r}]}})})},e.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeEventToJson(e,t):this.encodeEventToJson(e,t,this.opts.token)},e.prototype.getQueryParamsForEventType=function(e){return i(this,void 0,void 0,function(){var t,n,r;return s(this,function(o){switch(o.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=o.sent(),[2,[n&&this.isEventTypeLegacy(e)?"access_token=".concat(n):"",r?"visitorId=".concat(r):"","discardVisitInfo=true"].filter(function(e){return!!e}).join("&")]}})})},e.prototype.isEventTypeLegacy=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.encodeEventToJson=function(e,t,n){var r="".concat(e,"Event=").concat(encodeURIComponent(JSON.stringify(t)));return n&&(r="access_token=".concat(encodeURIComponent(n),"&").concat(r)),r},e}(),Ve=function(){function e(){}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,Promise.resolve()]})})},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,Promise.resolve()]})})},e}(),Me=globalThis.fetch,Ge=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){var n,i,a,c,u,l,p,h,d,v,g,f,m,y,S;return s(this,function(s){switch(s.label){case 0:return n=this.opts,i=n.baseUrl,a=n.visitorIdProvider,c=n.preprocessRequest,this.shouldAppendVisitorId(e)?[4,this.getVisitorIdParam()]:[3,2];case 1:return l=s.sent(),[3,3];case 2:l="",s.label=3;case 3:return u=l,p={url:"".concat(i,"/analytics/").concat(e).concat(u),credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},g=[r({},p)],c?[4,c(p,"analyticsFetch")]:[3,5];case 4:return f=s.sent(),[3,6];case 5:f={},s.label=6;case 6:h=r.apply(void 0,g.concat([f])),d=h.url,v=o(h,["url"]),s.label=7;case 7:return s.trys.push([7,9,,10]),[4,Me(d,v)];case 8:return m=s.sent(),[3,10];case 9:return y=s.sent(),console.error("An error has occured when sending the event.",y),[2];case 10:return m.ok?[4,m.json()]:[3,12];case 11:return(S=s.sent()).visitorId&&a.setCurrentVisitorId(S.visitorId),[2,S];case 12:try{m.json()}catch(e){}throw console.error('An error has occured when sending the "'.concat(e,'" event.'),m,t),new Error('An error has occurred when sending the "'.concat(e,'" event. Check the console logs for more details.'))}})})},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return e=this.opts.baseUrl,t="".concat(e,"/analytics/visit"),[4,Me(t,{headers:this.getHeaders(),method:"DELETE"})];case 1:return n.sent(),[2]}})})},e.prototype.shouldAppendVisitorId=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.getVisitorIdParam=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(e=t.sent())?"?visitor=".concat(e):""]}})})},e.prototype.getHeaders=function(){var e=this.opts.token;return r(r({},e?{Authorization:"Bearer ".concat(e)}:{}),{"Content-Type":"application/json"})},e}(),qe=function(){function e(e,t){var n=this;p()&&h()?this.storage=new S:p()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new k),this.client=new Ge(e),this.beaconClient=new Oe(e),window.addEventListener("beforeunload",function(){for(var e=0,r=t();e<r.length;e++){var o=r[e],i=o.eventType,s=o.payload;n.beaconClient.sendEvent(i,s)}})}return e.prototype.getClientDependingOnEventType=function(e){return"click"===e&&this.beaconClient.isAvailable()?this.beaconClient:this.client},e}(),Ne=function(){function e(e,t){this.storage=t||new k,this.client=new Ge(e)}return e.prototype.getClientDependingOnEventType=function(e){return this.client},e}(),Qe=function(){function e(){this.storage=new k,this.client=new Ve}return e.prototype.getClientDependingOnEventType=function(e){return this.client},e}();var _e=["1",1,"yes",!0];function He(){var e=[];return c()&&e.push(window.doNotTrack),u()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(function(e){return-1!==_e.indexOf(e)})}var Be=Object.freeze({__proto__:null,default:He,doNotTrack:He}),je="v15",Ke={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Ye(e,t,n){if(void 0===e&&(e=Ke.default),void 0===t&&(t=je),void 0===n&&(n=!1),e=e.replace(/\/$/,""),n)return"".concat(e,"/").concat(t);var r=e.endsWith("/rest")||e.endsWith("/rest/ua");return"".concat(e).concat(r?"":"/rest","/").concat(t)}var ze,We,$e,Je=function(){function e(e){if(this.acceptedLinkReferrers=[],!e)throw new Error("You have to pass options to this constructor");this.options=r(r({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[C,v].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};var t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};He()?this.runtime=new Qe:this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),this.addEventTypeMapping(n.view,{newEventType:n.view,addClientIdParameter:!0}),this.addEventTypeMapping(n.click,{newEventType:n.click,addClientIdParameter:!0}),this.addEventTypeMapping(n.custom,{newEventType:n.custom,addClientIdParameter:!0}),this.addEventTypeMapping(n.search,{newEventType:n.search,addClientIdParameter:!0})}return Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return{endpoint:Ke.default,isCustomEndpoint:!1,token:"",version:je,beforeSendHooks:[],afterSendHooks:[]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return q},enumerable:!1,configurable:!0}),e.prototype.initRuntime=function(e){var t=this;return c()&&l()?new qe(e,function(){var e=a([],t.bufferedRequests,!0);return t.bufferedRequests=[],e}):("undefined"!=typeof navigator&&"ReactNative"==navigator.product&&console.warn("\n We've detected you're using React Native but have not provided the corresponding runtime, \n for an optimal experience please use the \"coveo.analytics/react-native\" subpackage.\n Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native\n "),new Ne(e))},Object.defineProperty(e.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!1,configurable:!0}),e.prototype.determineVisitorId=function(){return i(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),(e=c()&&this.extractClientIdFromLink(window.location.href))?[3,2]:[4,this.storage.getItem("visitorId")];case 1:e=n.sent(),n.label=2;case 2:return[2,e||O()];case 3:return t=n.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),[2,O()];case 4:return[2]}})})},e.prototype.getCurrentVisitorId=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return e=t.sent(),[4,this.setCurrentVisitorId(e)];case 2:t.sent(),t.label=3;case 3:return[2,this.visitorId]}})})},e.prototype.setCurrentVisitorId=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this.visitorId=e,[4,this.storage.setItem("visitorId",e)];case 1:return t.sent(),[2]}})})},e.prototype.setClientId=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){if(F(e))this.setCurrentVisitorId(e.toLowerCase());else{if(!t)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(G(e,G(t,"38824e1f-37f5-42d3-8372-a4b8fa9df946")))}return[2]})})},e.prototype.getParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return[2,n.sent()]}})})},e.prototype.getPayload=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return n=r.sent(),[4,this.resolvePayloadForParameters(e,n)];case 2:return[2,r.sent()]}})})},Object.defineProperty(e.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(O()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!1,configurable:!0}),e.prototype.extractClientIdFromLink=function(e){if(He())return null;try{var t=new URL(e).searchParams.get(B.cvo_cid);if(null==t)return null;var n=B.fromString(t);return n&&l()&&n.validate(document.referrer,this.acceptedLinkReferrers)?n.clientId:null}catch(e){}return null},e.prototype.resolveParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n,o,a,c,u,l,p,h,d,v,g,f,m=this;return s(this,function(y){switch(y.label){case 0:return n=this.eventTypeMapping[e]||{},o=n.variableLengthArgumentsNames,a=void 0===o?[]:o,c=n.addVisitorIdParameter,u=void 0!==c&&c,l=n.usesMeasurementProtocol,p=void 0!==l&&l,h=n.addClientIdParameter,d=void 0!==h&&h,v=function(e){return i(m,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=[r({},e)],o={},u?[4,this.getCurrentVisitorId()]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n="",i.label=3;case 3:return[2,r.apply(void 0,t.concat([(o.visitorId=n,o)]))]}})})},g=function(e){return i(m,void 0,void 0,function(){var t,n;return s(this,function(o){switch(o.label){case 0:return d?(t=[r({},e)],n={},[4,this.getCurrentVisitorId()]):[3,2];case 1:return[2,r.apply(void 0,t.concat([(n.clientId=o.sent(),n)]))];case 2:return[2,e]}})})},f=function(t){return m.beforeSendHooks.reduce(function(t,n){return i(m,void 0,void 0,function(){var r;return s(this,function(o){switch(o.label){case 0:return[4,t];case 1:return r=o.sent(),[4,n(e,r)];case 2:return[2,o.sent()]}})})},t)},[4,[function(e){return a.length>0?m.parseVariableArgumentsPayload(a,e):e[0]},v,g,function(e){return p?m.ensureAnonymousUserWhenUsingApiKey(e):e},f].reduce(function(e,t){return i(m,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}})})},Promise.resolve(t))];case 1:return[2,y.sent()]}})})},e.prototype.resolvePayloadForParameters=function(e,t){return i(this,void 0,void 0,function(){var n,o,a,c=this;return s(this,function(u){switch(u.label){case 0:return n=(this.eventTypeMapping[e]||{}).usesMeasurementProtocol,o=void 0!==n&&n,a=function(e){return o?(n=!!(t=e).action&&ae[t.action]||{},Y(t).reduce(function(e,o){var i,s=n[o]||Re[o]||o;return r(r({},e),((i={})[s]=t[o],i))},{})):e;var t,n},[4,[function(e){return c.setTrackingIdIfTrackingIdNotPresent(e)},function(t){return c.removeEmptyPayloadValues(t,e)},function(t){return c.validateParams(t,e)},a,function(e){return o?c.removeUnknownParameters(e):e},function(e){return o?c.processCustomParameters(e):c.mapCustomParametersToCustomData(e)}].reduce(function(e,t){return i(c,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}})})},Promise.resolve(t))];case 1:return[2,u.sent()]}})})},e.prototype.makeEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n,o,c,u,l=this;return s(this,function(p){switch(p.label){case 0:return n=(this.eventTypeMapping[e]||{}).newEventType,o=void 0===n?e:n,[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return c=p.sent(),[4,this.resolvePayloadForParameters(e,c)];case 2:return u=p.sent(),[2,{eventType:o,payload:u,log:function(t){return i(l,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return this.bufferedRequests.push({eventType:o,payload:r(r({},u),t)}),[4,Promise.all(this.afterSendHooks.map(function(n){return n(e,r(r({},c),t))}))];case 1:return n.sent(),[4,this.deferExecution()];case 2:return n.sent(),[4,this.sendFromBuffer()];case 3:return[2,n.sent()]}})})}}]}})})},e.prototype.sendEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeEvent.apply(this,a([e],t,!1))];case 1:return[2,n.sent().log({})]}})})},e.prototype.deferExecution=function(){return new Promise(function(e){return setTimeout(e,0)})},e.prototype.sendFromBuffer=function(){return i(this,void 0,void 0,function(){var e,t,n;return s(this,function(r){return(e=this.bufferedRequests.shift())?(t=e.eventType,n=e.payload,[2,this.runtime.getClientDependingOnEventType(t).sendEvent(t,n)]):[2]})})},e.prototype.clear=function(){this.storage.removeItem("visitorId"),(new E).clear()},e.prototype.deleteHttpOnlyVisitorId=function(){this.runtime.client.deleteHttpCookieVisitorId()},e.prototype.makeSearchEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.search,e)]})})},e.prototype.sendSearchEvent=function(e){return i(this,void 0,void 0,function(){var t=e.searchQueryUid,n=o(e,["searchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchEvent(n)];case 1:return[2,e.sent().log({searchQueryUid:t})]}})})},e.prototype.makeClickEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.click,e)]})})},e.prototype.sendClickEvent=function(e){return i(this,void 0,void 0,function(){var t=e.searchQueryUid,n=o(e,["searchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeClickEvent(n)];case 1:return[2,e.sent().log({searchQueryUid:t})]}})})},e.prototype.makeCustomEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.custom,e)]})})},e.prototype.sendCustomEvent=function(e){return i(this,void 0,void 0,function(){var t=e.lastSearchQueryUid,n=o(e,["lastSearchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeCustomEvent(n)];case 1:return[2,e.sent().log({lastSearchQueryUid:t})]}})})},e.prototype.makeViewEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.view,e)]})})},e.prototype.sendViewEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeViewEvent(e)];case 1:return[2,t.sent().log({})]}})})},e.prototype.getVisit=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,fetch("".concat(this.baseUrl,"/analytics/visit"))];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),this.visitorId=e.visitorId,[2,e]}})})},e.prototype.getHealth=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(this.baseUrl,"/analytics/monitoring/health"))];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}})})},e.prototype.registerBeforeSendEventHook=function(e){this.beforeSendHooks.push(e)},e.prototype.registerAfterSendEventHook=function(e){this.afterSendHooks.push(e)},e.prototype.addEventTypeMapping=function(e,t){this.eventTypeMapping[e]=t},e.prototype.setAcceptedLinkReferrers=function(e){if(!Array.isArray(e)||!e.every(function(e){return"string"==typeof e}))throw Error("Parameter should be an array of domain strings");this.acceptedLinkReferrers=e},e.prototype.parseVariableArgumentsPayload=function(e,t){for(var n={},o=0,i=t.length;o<i;o++){var s=t[o];if("string"==typeof s)n[e[o]]=s;else if("object"==typeof s)return r(r({},n),s)}return n},e.prototype.isKeyAllowedEmpty=function(e,t){var r;return-1!==(((r={})[n.search]=["queryText"],r)[e]||[]).indexOf(t)},e.prototype.removeEmptyPayloadValues=function(e,t){var n=this;return Object.keys(e).filter(function(r){return n.isKeyAllowedEmpty(t,r)||null!=(o=e[r])&&""!==o;var o}).reduce(function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))},{})},e.prototype.removeUnknownParameters=function(e){var t=Object.keys(e).filter(function(e){if(function(e){return a(a(a([],Ae,!0),ee,!0),[Fe,xe],!1).some(function(t){return t(e)})}(e))return!0;console.log(e,"is not processed by coveoua")}).reduce(function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))},{});return t},e.prototype.processCustomParameters=function(e){var t=e.custom,n=o(e,["custom"]),i={};t&&z(t)&&(i=this.lowercaseKeys(t));var s,a=Y(s=n).reduce(function(e,t){var n,o=Te(t);return r(r({},e),o?Le(o,s[t]):((n={})[t]=s[t],n))},{});return r(r({},i),a)},e.prototype.mapCustomParametersToCustomData=function(e){var t=e.custom,n=o(e,["custom"]);if(t&&z(t)){var i=this.lowercaseKeys(t);return r(r({},n),{customData:r(r({},i),e.customData)})}return e},e.prototype.lowercaseKeys=function(e){var t=Object.keys(e),n={};return t.forEach(function(t){n[t.toLowerCase()]=e[t]}),n},e.prototype.validateParams=function(e,t){var r=e.anonymizeIp,i=o(e,["anonymizeIp"]);return void 0!==r&&-1==["0","false","undefined","null","{}","[]",""].indexOf("".concat(r).toLowerCase())&&(i.anonymizeIp=1),t!=n.view&&t!=n.click&&t!=n.search&&t!=n.custom||(i.originLevel3=this.limit(i.originLevel3,1024)),t==n.view&&(i.location=this.limit(i.location,1024)),"pageview"!=t&&"event"!=t||(i.referrer=this.limit(i.referrer,2048),i.location=this.limit(i.location,2048),i.page=this.limit(i.page,2048)),i},e.prototype.ensureAnonymousUserWhenUsingApiKey=function(e){var t,n=e.userId,r=o(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!n?(r.userId="anonymous",r):e},e.prototype.setTrackingIdIfTrackingIdNotPresent=function(e){var t=e.trackingId,n=o(e,["trackingId"]);return t?e:(n.hasOwnProperty("custom")&&z(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&z(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)},e.prototype.limit=function(e,t){return"string"==typeof e?function(e,t){if(t<0||e.length<=t)return e;var n=e.indexOf("%",t-2);for(n<0||n>t?n=t:t=n;n>2&&"%"==e.charAt(n-3);){var r=Number.parseInt(e.substring(n-2,n),16);if(128&~r)break;if(n-=3,128!=(192&r)){t-n>=3*$(r)&&(n=t);break}}return e.substring(0,n)}(e,t):e},Object.defineProperty(e.prototype,"baseUrl",{get:function(){return Ye(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)},enumerable:!1,configurable:!0}),e}(),Xe=Object.freeze({__proto__:null,CoveoAnalyticsClient:Je,Endpoints:Ke,Version:je,buildBaseUrl:Ye,default:Je}),Ze=r({},Q),et=Object.keys(Ze).map(function(e){return Ze[e]}),tt=function(e){function i(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.products=[],i.impressions=[],i}return t(i,e),i.prototype.getApi=function(t){var n=e.prototype.getApi.call(this,t);if(null!==n)return n;switch(t){case"addProduct":return this.addProduct;case"addImpression":return this.addImpression;default:return null}},i.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},i.prototype.addProduct=function(e){this.products.push(e)},i.prototype.addImpression=function(e){this.impressions.push(e)},i.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},i.prototype.addHooksForECEvents=function(){var e=this;this.client.registerBeforeSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==et.indexOf(t)?e.addECDataToPayload(t,o):o}),this.client.registerAfterSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==et.indexOf(t)&&e.updateLocationInformation(t,o),o})},i.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Ze.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Ze.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addECDataToPayload=function(e,t){var n=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),o=this.getProductPayload(),i=this.getImpressionPayload();return this.clearData(),r(r(r(r({},i),o),n),t)},i.prototype.getProductPayload=function(){var e=this;return this.products.map(function(t){return e.assureProductValidity(t)}).reduce(function(t,n,o){return r(r({},t),function(e,t){return Y(e).reduce(function(n,o){var i,s="pr".concat(t+1).concat(te[o]||o);return r(r({},n),((i={})[s]=e[o],i))},{})}(e.convertNumberTypes(n),o))},{})},i.prototype.convertNumberTypes=function(e){var t=r({},e);return"quantity"in t&&(t.quantity=W(t.quantity)),"position"in t&&(t.position=W(t.position)),t},i.prototype.getImpressionPayload=function(){var e=this;return this.getImpressionsByList().map(function(t){var n=t.impressions,i=o(t,["impressions"]);return r(r({},i),{impressions:n.map(function(t){return e.assureBaseImpressionValidity(t)})})}).reduce(function(e,t,n){return r(r({},e),function(e,t,n){var o=e.impressions.reduce(function(e,o,i){return r(r({},e),ce(o,t,i,n))},{});return e.listName&&(o["il".concat(t+1,"nm")]=e.listName),o}(t,n,"pi"))},{})},i.prototype.assureProductValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for product '".concat(e.name||e.id,"' must be greater ")+"than 0 when provided."),n):e},i.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for impression '".concat(e.name||e.id,"'")+" must be greater than 0 when provided."),n):e},i.prototype.getImpressionsByList=function(){return this.impressions.reduce(function(e,t){var n=t.list,r=o(t,["list"]),i=e.find(function(e){return e.listName===n});return i?i.impressions.push(r):e.push({listName:n,impressions:[r]}),e},[])},i.Id="ec",i}(H),nt=tt,rt=r({},Q),ot=Object.keys(rt).map(function(e){return rt[e]}),it=function(e){function o(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.ticket={},i}return t(o,e),o.prototype.getApi=function(t){var n=e.prototype.getApi.call(this,t);return null!==n?n:"setTicket"===t?this.setTicket:null},o.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},o.prototype.setTicket=function(e){this.ticket=e},o.prototype.clearPluginData=function(){this.ticket={}},o.prototype.addHooksForSVCEvents=function(){var e=this;this.client.registerBeforeSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==ot.indexOf(t)?e.addSVCDataToPayload(t,o):o}),this.client.registerAfterSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==ot.indexOf(t)&&e.updateLocationInformation(t,o),o})},o.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(rt.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(rt.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addSVCDataToPayload=function(e,t){var n,o=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),r(r(r({},i),o),t)},o.prototype.getTicketPayload=function(){return e=this.ticket,Y(e).filter(function(t){return void 0!==e[t]}).reduce(function(t,n){var o,i=J[n]||n;return r(r({},t),((o={})[i]=e[n],o))},{});var e},o.Id="svc",o}(H),st=it,at=function(){function e(){var e;this.registeredPluginsMap=((e={})[nt.Id]=nt,e[st.Id]=st,e[K.Id]=K,e),this.requiredPlugins={}}return e.prototype.require=function(e,t){var n=this.registeredPluginsMap[e];if(!n)throw new Error('No plugin named "'.concat(e,"\" is currently registered. If you use a custom plugin, use 'provide' first."));this.requiredPlugins[e]=new n(t)},e.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},e.prototype.clearRequired=function(){this.requiredPlugins={}},e.prototype.execute=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.requiredPlugins[e];if(!o)throw new Error('The plugin "'.concat(e,'" is not required. Check that you required it on initialization.'));var i=o.getApi(t);if(!i)throw new Error('The function "'.concat(t,'" does not exist on the plugin "').concat(e,'".'));if("function"!=typeof i)throw new Error('"'.concat(t,'" of the plugin "').concat(e,'" is not a function.'));return i.apply(o,n)},e.DefaultPlugins=[nt.Id,st.Id,K.Id],e}(),ct=function(){function e(){this.plugins=new at,this.params={}}return e.prototype.init=function(e,t){var n=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new Je({token:e,endpoint:this.getEndpoint(t),isCustomEndpoint:this.getIsCustomEndpoint(t)}):this.isAnalyticsClient(e)&&(this.client=e),!this.client)throw new Error("You must pass either your token or a valid object when you call 'init'");var o={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach(function(e){return n.plugins.require(e,o)}),this.client.registerBeforeSendEventHook(function(e,t){return r(r({},t),n.params)})},e.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},e.prototype.getPluginKeys=function(e){return"string"==typeof e?at.DefaultPlugins:Array.isArray(null==e?void 0:e.plugins)?e.plugins:at.DefaultPlugins},e.prototype.getEndpoint=function(e){return"string"==typeof e?e||Ke.default:(null==e?void 0:e.endpoint)?e.endpoint:Ke.default},e.prototype.getIsCustomEndpoint=function(e){return"string"!=typeof e&&(!!(null==e?void 0:e.isCustomEndpoint)&&e.isCustomEndpoint)},e.prototype.initForProxy=function(e,t){if(void 0===t&&(t=!1),!e)throw new Error("You must pass your endpoint when you call 'initForProxy'");if("string"!=typeof e)throw new Error("You must pass a string as the endpoint parameter when you call 'initForProxy'");this.client=new Je({endpoint:e,isCustomEndpoint:t})},e.prototype.set=function(e,t){var n=this;"string"==typeof e?this.params[e]=t:Object.keys(e).map(function(t){n.params[t]=e[t]})},e.prototype.send=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=t.slice(1);if(void 0===this.client)throw new Error("You must call init before sending an event");if(!r)throw new Error('You must provide an event type when calling "send".');return(e=this.client).sendEvent.apply(e,a([r.toLowerCase()],o,!1))},e.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},e.prototype.provide=function(e,t){this.plugins.provide(e,t)},e.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,r(r({},t),{client:this.client}))},e.prototype.callPlugin=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!this.client)throw new Error("You must call init before calling a plugin function");return(n=this.plugins).execute.apply(n,a([e,t],r,!1))},e.prototype.reset=function(){this.client=void 0,this.plugins=new at,this.params={}},e.prototype.version=function(){return q},e}(),ut=new ct,lt=function(){return ut.client},pt=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/.exec(e);r[1];var o=r[2],i=r[3],s=ut[i];if(o&&i)return ut.callPlugin.apply(ut,a([o,i],t,!1));if(s)return s.apply(ut,t);throw new Error('The action "'.concat(e,'" does not exist. Available actions: ').concat(["init","set","send","onLoad","callPlugin","reset","require","provide","version"].join(", "),"."))},ht=Object.freeze({__proto__:null,CoveoUA:ct,coveoua:ut,default:pt,getCurrentClient:lt,handleOneAnalyticsEvent:pt});!function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"}(ze||(ze={})),function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"}($e||($e={}));var dt=((We={})[$e.triggerNotify]="queryPipelineTriggers",We[$e.triggerExecute]="queryPipelineTriggers",We[$e.triggerQuery]="queryPipelineTriggers",We[$e.triggerRedirect]="queryPipelineTriggers",We[$e.queryErrorBack]="errors",We[$e.queryErrorClear]="errors",We[$e.queryErrorRetry]="errors",We[$e.pagerNext]="getMoreResults",We[$e.pagerPrevious]="getMoreResults",We[$e.pagerNumber]="getMoreResults",We[$e.pagerResize]="getMoreResults",We[$e.pagerScrolling]="getMoreResults",We[$e.facetSearch]="facet",We[$e.facetShowLess]="facet",We[$e.facetShowMore]="facet",We[$e.recommendation]="recommendation",We[$e.likeSmartSnippet]="smartSnippet",We[$e.dislikeSmartSnippet]="smartSnippet",We[$e.expandSmartSnippet]="smartSnippet",We[$e.collapseSmartSnippet]="smartSnippet",We[$e.openSmartSnippetFeedbackModal]="smartSnippet",We[$e.closeSmartSnippetFeedbackModal]="smartSnippet",We[$e.sendSmartSnippetReason]="smartSnippet",We[$e.expandSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.showMoreSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.showLessSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.clearRecentQueries]="recentQueries",We[$e.recentResultClick]="recentlyClickedDocuments",We[$e.clearRecentResults]="recentlyClickedDocuments",We[$e.showLessFoldedResults]="folding",We[$e.caseDetach]="case",We[$e.likeGeneratedAnswer]="generatedAnswer",We[$e.dislikeGeneratedAnswer]="generatedAnswer",We[$e.openGeneratedAnswerSource]="generatedAnswer",We[$e.generatedAnswerStreamEnd]="generatedAnswer",We[$e.generatedAnswerSourceHover]="generatedAnswer",We[$e.generatedAnswerCopyToClipboard]="generatedAnswer",We[$e.generatedAnswerHideAnswers]="generatedAnswer",We[$e.generatedAnswerShowAnswers]="generatedAnswer",We[$e.generatedAnswerExpand]="generatedAnswer",We[$e.generatedAnswerCollapse]="generatedAnswer",We[$e.generatedAnswerFeedbackSubmit]="generatedAnswer",We[$e.generatedAnswerFeedbackSubmitV2]="generatedAnswer",We[ze.expandToFullUI]="interface",We[ze.openUserActions]="User Actions",We[ze.showPrecedingSessions]="User Actions",We[ze.showFollowingSessions]="User Actions",We[ze.clickViewedDocument]="User Actions",We[ze.clickPageView]="User Actions",We[ze.createArticle]="createArticle",We),vt=function(){function e(){this.runtime=new Qe,this.currentVisitorId=""}return e.prototype.getPayload=function(){return Promise.resolve()},e.prototype.getParameters=function(){return Promise.resolve()},e.prototype.makeEvent=function(e){return Promise.resolve({eventType:e,payload:null,log:function(){return Promise.resolve()}})},e.prototype.sendEvent=function(){return Promise.resolve()},e.prototype.makeSearchEvent=function(){return this.makeEvent(n.search)},e.prototype.sendSearchEvent=function(){return Promise.resolve()},e.prototype.makeClickEvent=function(){return this.makeEvent(n.click)},e.prototype.sendClickEvent=function(){return Promise.resolve()},e.prototype.makeCustomEvent=function(){return this.makeEvent(n.custom)},e.prototype.sendCustomEvent=function(){return Promise.resolve()},e.prototype.makeViewEvent=function(){return this.makeEvent(n.view)},e.prototype.sendViewEvent=function(){return Promise.resolve()},e.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},e.prototype.getHealth=function(){return Promise.resolve({status:""})},e.prototype.registerBeforeSendEventHook=function(){},e.prototype.registerAfterSendEventHook=function(){},e.prototype.addEventTypeMapping=function(){},Object.defineProperty(e.prototype,"version",{get:function(){return q},enumerable:!1,configurable:!0}),e}();function gt(e){var t=e.join(";");return t.length<=256?t:gt(e.slice(1))}var ft=function(e){var t=function(e){return e.map(function(e){return e.replace(/;/g,"")})}(e),n=function(e){var t="";return e.filter(function(e){var n=e!==t;return t=e,n})}(t);return gt(n)};function mt(e){var t="string"==typeof e.partialQueries?e.partialQueries:ft(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:ft(e.suggestions);return r(r({},e),{partialQueries:t,suggestions:n})}var yt,St,kt,wt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||He();this.coveoAnalyticsClient=n?new vt:new Je(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.opts)},e.prototype.makeInterfaceLoad=function(){return this.makeSearchEvent($e.interfaceLoad)},e.prototype.logInterfaceLoad=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeInterfaceLoad()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendationInterfaceLoad=function(){return this.makeSearchEvent($e.recommendationInterfaceLoad)},e.prototype.logRecommendationInterfaceLoad=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecommendationInterfaceLoad()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendation=function(){return this.makeCustomEvent($e.recommendation)},e.prototype.logRecommendation=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecommendation()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendationOpen=function(e,t){return this.makeClickEvent($e.recommendationOpen,e,t)},e.prototype.logRecommendationOpen=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeRecommendationOpen(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterClearAll=function(e){return this.makeSearchEvent($e.staticFilterClearAll,e)},e.prototype.logStaticFilterClearAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterClearAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterSelect=function(e){return this.makeSearchEvent($e.staticFilterSelect,e)},e.prototype.logStaticFilterSelect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterSelect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterDeselect=function(e){return this.makeSearchEvent($e.staticFilterDeselect,e)},e.prototype.logStaticFilterDeselect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterDeselect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFetchMoreResults=function(){return this.makeCustomEvent($e.pagerScrolling,{type:"getMoreResults"})},e.prototype.logFetchMoreResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeFetchMoreResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeInterfaceChange=function(e){return this.makeSearchEvent($e.interfaceChange,e)},e.prototype.logInterfaceChange=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeInterfaceChange(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDidYouMeanAutomatic=function(){return this.makeSearchEvent($e.didyoumeanAutomatic)},e.prototype.logDidYouMeanAutomatic=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDidYouMeanAutomatic()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDidYouMeanClick=function(){return this.makeSearchEvent($e.didyoumeanClick)},e.prototype.logDidYouMeanClick=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDidYouMeanClick()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeResultsSort=function(e){return this.makeSearchEvent($e.resultsSort,e)},e.prototype.logResultsSort=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeResultsSort(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxSubmit=function(){return this.makeSearchEvent($e.searchboxSubmit)},e.prototype.logSearchboxSubmit=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxSubmit()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxClear=function(){return this.makeSearchEvent($e.searchboxClear)},e.prototype.logSearchboxClear=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxClear()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxAsYouType=function(){return this.makeSearchEvent($e.searchboxAsYouType)},e.prototype.logSearchboxAsYouType=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxAsYouType()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeBreadcrumbFacet=function(e){return this.makeSearchEvent($e.breadcrumbFacet,e)},e.prototype.logBreadcrumbFacet=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeBreadcrumbFacet(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeBreadcrumbResetAll=function(){return this.makeSearchEvent($e.breadcrumbResetAll)},e.prototype.logBreadcrumbResetAll=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeBreadcrumbResetAll()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDocumentQuickview=function(e,t){return this.makeClickEvent($e.documentQuickview,e,t)},e.prototype.logDocumentQuickview=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeDocumentQuickview(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDocumentOpen=function(e,t){return this.makeClickEvent($e.documentOpen,e,t)},e.prototype.logDocumentOpen=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeDocumentOpen(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOmniboxAnalytics=function(e){return this.makeSearchEvent($e.omniboxAnalytics,mt(e))},e.prototype.logOmniboxAnalytics=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOmniboxAnalytics(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOmniboxFromLink=function(e){return this.makeSearchEvent($e.omniboxFromLink,mt(e))},e.prototype.logOmniboxFromLink=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOmniboxFromLink(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchFromLink=function(){return this.makeSearchEvent($e.searchFromLink)},e.prototype.logSearchFromLink=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchFromLink()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerNotify=function(e){return this.makeCustomEvent($e.triggerNotify,e)},e.prototype.logTriggerNotify=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerNotify(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerExecute=function(e){return this.makeCustomEvent($e.triggerExecute,e)},e.prototype.logTriggerExecute=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerExecute(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerQuery=function(){return this.makeCustomEvent($e.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")},e.prototype.logTriggerQuery=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeTriggerQuery()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeUndoTriggerQuery=function(e){return this.makeSearchEvent($e.undoTriggerQuery,e)},e.prototype.logUndoTriggerQuery=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeUndoTriggerQuery(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerRedirect=function(e){return this.makeCustomEvent($e.triggerRedirect,r(r({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))},e.prototype.logTriggerRedirect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerRedirect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerResize=function(e){return this.makeCustomEvent($e.pagerResize,e)},e.prototype.logPagerResize=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerResize(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerNumber=function(e){return this.makeCustomEvent($e.pagerNumber,e)},e.prototype.logPagerNumber=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerNumber(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerNext=function(e){return this.makeCustomEvent($e.pagerNext,e)},e.prototype.logPagerNext=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerNext(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerPrevious=function(e){return this.makeCustomEvent($e.pagerPrevious,e)},e.prototype.logPagerPrevious=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerPrevious(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerScrolling=function(){return this.makeCustomEvent($e.pagerScrolling)},e.prototype.logPagerScrolling=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makePagerScrolling()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetClearAll=function(e){return this.makeSearchEvent($e.facetClearAll,e)},e.prototype.logFacetClearAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetClearAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSearch=function(e){return this.makeSearchEvent($e.facetSearch,e)},e.prototype.logFacetSearch=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSearch(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSelect=function(e){return this.makeSearchEvent($e.facetSelect,e)},e.prototype.logFacetSelect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSelect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetDeselect=function(e){return this.makeSearchEvent($e.facetDeselect,e)},e.prototype.logFacetDeselect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetDeselect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetExclude=function(e){return this.makeSearchEvent($e.facetExclude,e)},e.prototype.logFacetExclude=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetExclude(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetUnexclude=function(e){return this.makeSearchEvent($e.facetUnexclude,e)},e.prototype.logFacetUnexclude=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetUnexclude(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSelectAll=function(e){return this.makeSearchEvent($e.facetSelectAll,e)},e.prototype.logFacetSelectAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSelectAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetUpdateSort=function(e){return this.makeSearchEvent($e.facetUpdateSort,e)},e.prototype.logFacetUpdateSort=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetUpdateSort(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetShowMore=function(e){return this.makeCustomEvent($e.facetShowMore,e)},e.prototype.logFacetShowMore=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetShowMore(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetShowLess=function(e){return this.makeCustomEvent($e.facetShowLess,e)},e.prototype.logFacetShowLess=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetShowLess(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryError=function(e){return this.makeCustomEvent($e.queryError,e)},e.prototype.logQueryError=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeQueryError(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorBack=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorBack)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorBack)]}})})}}]}})})},e.prototype.logQueryErrorBack=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorBack()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorRetry=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorRetry)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorRetry)]}})})}}]}})})},e.prototype.logQueryErrorRetry=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorRetry()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorClear=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorClear)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorClear)]}})})}}]}})})},e.prototype.logQueryErrorClear=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorClear()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeLikeSmartSnippet=function(){return this.makeCustomEvent($e.likeSmartSnippet)},e.prototype.logLikeSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeLikeSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDislikeSmartSnippet=function(){return this.makeCustomEvent($e.dislikeSmartSnippet)},e.prototype.logDislikeSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDislikeSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeExpandSmartSnippet=function(){return this.makeCustomEvent($e.expandSmartSnippet)},e.prototype.logExpandSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeExpandSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCollapseSmartSnippet=function(){return this.makeCustomEvent($e.collapseSmartSnippet)},e.prototype.logCollapseSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeCollapseSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetFeedbackModal=function(){return this.makeCustomEvent($e.openSmartSnippetFeedbackModal)},e.prototype.logOpenSmartSnippetFeedbackModal=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeOpenSmartSnippetFeedbackModal()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCloseSmartSnippetFeedbackModal=function(){return this.makeCustomEvent($e.closeSmartSnippetFeedbackModal)},e.prototype.logCloseSmartSnippetFeedbackModal=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeCloseSmartSnippetFeedbackModal()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSmartSnippetFeedbackReason=function(e,t){return this.makeCustomEvent($e.sendSmartSnippetReason,{reason:e,details:t})},e.prototype.logSmartSnippetFeedbackReason=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeSmartSnippetFeedbackReason(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeExpandSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logExpandSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeExpandSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCollapseSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logCollapseSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeCollapseSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowMoreSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.showMoreSmartSnippetSuggestion,e)},e.prototype.logShowMoreSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeShowMoreSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowLessSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.showLessSmartSnippetSuggestion,e)},e.prototype.logShowLessSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeShowLessSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSource=function(e,t){return this.makeClickEvent($e.openSmartSnippetSource,e,t)},e.prototype.logOpenSmartSnippetSource=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSource(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSuggestionSource=function(e,t){return this.makeClickEvent($e.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.makeCopyToClipboard=function(e,t){return this.makeClickEvent($e.copyToClipboard,e,t)},e.prototype.logCopyToClipboard=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeCopyToClipboard(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSuggestionSource(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetInlineLink=function(e,t){return this.makeClickEvent($e.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetInlineLink(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeClickEvent($e.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSuggestionInlineLink(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecentQueryClick=function(){return this.makeSearchEvent($e.recentQueryClick)},e.prototype.logRecentQueryClick=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecentQueryClick()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeClearRecentQueries=function(){return this.makeCustomEvent($e.clearRecentQueries)},e.prototype.logClearRecentQueries=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeClearRecentQueries()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecentResultClick=function(e,t){return this.makeCustomEvent($e.recentResultClick,{info:e,identifier:t})},e.prototype.logRecentResultClick=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeRecentResultClick(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeClearRecentResults=function(){return this.makeCustomEvent($e.clearRecentResults)},e.prototype.logClearRecentResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeClearRecentResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeNoResultsBack=function(){return this.makeSearchEvent($e.noResultsBack)},e.prototype.logNoResultsBack=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeNoResultsBack()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowMoreFoldedResults=function(e,t){return this.makeClickEvent($e.showMoreFoldedResults,e,t)},e.prototype.logShowMoreFoldedResults=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeShowMoreFoldedResults(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowLessFoldedResults=function(){return this.makeCustomEvent($e.showLessFoldedResults)},e.prototype.logShowLessFoldedResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeShowLessFoldedResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeEventDescription=function(e,t){var n;return{actionCause:t,customData:null===(n=e.payload)||void 0===n?void 0:n.customData}},e.prototype.makeCustomEvent=function(e,t){return i(this,arguments,void 0,function(e,t,n){var o,i,a,c;return void 0===n&&(n=dt[e]),s(this,function(s){switch(s.label){case 0:return this.coveoAnalyticsClient.getParameters,o=r(r({},this.provider.getBaseMetadata()),t),a=[{}],[4,this.getBaseEventRequest(o)];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{eventType:n,eventValue:e}]),[4,this.coveoAnalyticsClient.makeCustomEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({lastSearchQueryUid:t})}}]}})})},e.prototype.logCustomEvent=function(e,t){return i(this,arguments,void 0,function(e,t,n){return void 0===n&&(n=dt[e]),s(this,function(r){switch(r.label){case 0:return[4,this.makeCustomEvent(e,t,n)];case 1:return[2,r.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCustomEventWithType=function(e,t,n){return i(this,void 0,void 0,function(){var o,i,a,c;return s(this,function(s){switch(s.label){case 0:return o=r(r({},this.provider.getBaseMetadata()),n),a=[{}],[4,this.getBaseEventRequest(o)];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{eventType:t,eventValue:e}]),[4,this.coveoAnalyticsClient.makeCustomEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({lastSearchQueryUid:t})}}]}})})},e.prototype.logCustomEventWithType=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.makeCustomEventWithType(e,t,n)];case 1:return[2,r.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeSearchEvent(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){switch(o.label){case 0:return[4,this.getBaseSearchEventRequest(e,t)];case 1:return n=o.sent(),[4,this.coveoAnalyticsClient.makeSearchEvent(n)];case 2:return r=o.sent(),[2,{description:this.makeEventDescription(r,e),log:function(e){var t=e.searchUID;return r.log({searchQueryUid:t})}}]}})})},e.prototype.makeClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a,c;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{queryPipeline:this.provider.getPipeline(),actionCause:e}]),[4,this.coveoAnalyticsClient.makeClickEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({searchQueryUid:t})}}]}})})},e.prototype.logClickEvent=function(e,t,n,r){return i(this,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return[4,this.makeClickEvent(e,t,n,r)];case 1:return[2,o.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=[{}],[4,this.getBaseEventRequest(r(r({},t),null===(i=(o=this.provider).getGeneratedAnswerMetadata)||void 0===i?void 0:i.call(o)))];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([s.sent()])),this.provider.getSearchEventRequestPayload()]),{queryPipeline:this.provider.getPipeline(),actionCause:e}])]}})})},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r(r({},this.getOrigins()),this.getSplitTestRun())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}})})},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getSplitTestRun=function(){var e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return r(r({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})},e.prototype.makeLikeGeneratedAnswer=function(e){return this.makeCustomEvent($e.likeGeneratedAnswer,e)},e.prototype.logLikeGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeLikeGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDislikeGeneratedAnswer=function(e){return this.makeCustomEvent($e.dislikeGeneratedAnswer,e)},e.prototype.logDislikeGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeDislikeGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenGeneratedAnswerSource=function(e){return this.makeCustomEvent($e.openGeneratedAnswerSource,e)},e.prototype.logOpenGeneratedAnswerSource=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOpenGeneratedAnswerSource(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCitationClick=function(e,t){return this.makeClickEvent($e.generatedAnswerCitationClick,r(r({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logGeneratedAnswerCitationClick=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeGeneratedAnswerCitationClick(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerSourceHover=function(e){return this.makeCustomEvent($e.generatedAnswerSourceHover,e)},e.prototype.logGeneratedAnswerSourceHover=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerSourceHover(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCopyToClipboard=function(e){return this.makeCustomEvent($e.generatedAnswerCopyToClipboard,e)},e.prototype.logGeneratedAnswerCopyToClipboard=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerCopyToClipboard(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerHideAnswers=function(e){return this.makeCustomEvent($e.generatedAnswerHideAnswers,e)},e.prototype.logGeneratedAnswerHideAnswers=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerHideAnswers(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerShowAnswers=function(e){return this.makeCustomEvent($e.generatedAnswerShowAnswers,e)},e.prototype.logGeneratedAnswerShowAnswers=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerShowAnswers(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerExpand=function(e){return this.makeCustomEvent($e.generatedAnswerExpand,e)},e.prototype.logGeneratedAnswerExpand=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerExpand(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCollapse=function(e){return this.makeCustomEvent($e.generatedAnswerCollapse,e)},e.prototype.logGeneratedAnswerCollapse=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerCollapse(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerFeedbackSubmit=function(e){return this.makeCustomEvent($e.generatedAnswerFeedbackSubmit,e)},e.prototype.logGeneratedAnswerFeedbackSubmit=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerFeedbackSubmit(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerFeedbackSubmitV2=function(e){return this.makeCustomEvent($e.generatedAnswerFeedbackSubmitV2,e)},e.prototype.logGeneratedAnswerFeedbackSubmitV2=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerFeedbackSubmitV2(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRephraseGeneratedAnswer=function(e){return this.makeSearchEvent($e.rephraseGeneratedAnswer,e)},e.prototype.logRephraseGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeRephraseGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRetryGeneratedAnswer=function(){return this.makeSearchEvent($e.retryGeneratedAnswer)},e.prototype.logRetryGeneratedAnswer=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRetryGeneratedAnswer()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerStreamEnd=function(e){return this.makeCustomEvent($e.generatedAnswerStreamEnd,e)},e.prototype.logGeneratedAnswerStreamEnd=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerStreamEnd(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e}();!function(e){e.click="click",e.flowStart="flowStart"}(yt||(yt={})),function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"}(St||(St={})),function(e){e.quit="Quit",e.solved="Solved"}(kt||(kt={}));var It=function(){function e(e,t){var n;this.options=e,this.provider=t;var r=(null===(n=e.enableAnalytics)||void 0===n||n)&&!He();this.coveoAnalyticsClient=r?new Je(e):new vt,this.svc=new it({client:this.coveoAnalyticsClient})}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt,this.svc=new it({client:this.coveoAnalyticsClient})},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.options),this.svc=new it({client:this.coveoAnalyticsClient})},e.prototype.logEnterInterface=function(e){return this.svc.setAction(St.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()},e.prototype.logUpdateCaseField=function(e){return this.svc.setAction(St.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectFieldSuggestion=function(e){return this.svc.setAction(St.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectDocumentSuggestion=function(e){return this.logClickEvent(St.documentSuggestionClick,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})},e.prototype.logQuickviewDocumentSuggestion=function(e){return this.logClickEvent(St.documentSuggestionQuickview,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})},e.prototype.logRateDocumentSuggestion=function(e){return this.svc.setAction(St.suggestionRate,r({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logMoveToNextCaseStep=function(e){return this.svc.setAction(St.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCancelled=function(e){return this.svc.setAction(St.caseCancelled,{reason:kt.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseSolved=function(e){return this.svc.setAction(St.caseSolved,{reason:kt.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCreated=function(e){return this.svc.setAction(St.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.sendFlowStartEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",yt.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.sendClickEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",yt.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o,i,a;return s(this,function(s){switch(s.label){case 0:return t=r({},e),n=[r({},this.getOrigins())],o={customData:t,language:null===(i=this.provider)||void 0===i?void 0:i.getLanguage(),anonymous:null===(a=this.provider)||void 0===a?void 0:a.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=s.sent(),o)]))]}})})},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getOrigins=function(){var e,t,n,r,o;return{originContext:null===(t=null===(e=this.provider)||void 0===e?void 0:e.getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:null===(n=this.provider)||void 0===n?void 0:n.getOriginLevel1(),originLevel2:null===(r=this.provider)||void 0===r?void 0:r.getOriginLevel2(),originLevel3:null===(o=this.provider)||void 0===o?void 0:o.getOriginLevel3()}},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a,c,u;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:null!==(u=null===(c=this.provider)||void 0===c?void 0:c.getSearchUID())&&void 0!==u?u:"",actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}})})},e}(),Et=function(e,t){void 0===t&&(t=!0),e.caseContext;var n=e.caseId,i=e.caseNumber,s=o(e,["caseContext","caseId","caseNumber"]),a=function(e){var t={};return e.caseContext&&Object.keys(e.caseContext).forEach(function(n){var r,o=null===(r=e.caseContext)||void 0===r?void 0:r[n];if(o){var i="context_".concat(n);t[i]=o}}),t}(e);return r(r(r({CaseId:n,CaseNumber:i},s),!!a.context_Case_Subject&&{CaseSubject:a.context_Case_Subject}),t&&a)},bt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||He();this.coveoAnalyticsClient=n?new vt:new Je(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.opts)},e.prototype.logInterfaceLoad=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.interfaceLoad,t)}return this.logSearchEvent($e.interfaceLoad)},e.prototype.logRecentQueryClick=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.recentQueryClick,t)}return this.logSearchEvent($e.recentQueryClick)},e.prototype.logClearRecentQueries=function(e){if(e){var t=Et(e);return this.logCustomEvent($e.clearRecentQueries,t)}return this.logCustomEvent($e.clearRecentQueries)},e.prototype.logInterfaceChange=function(e){var t=Et(e);return this.logSearchEvent($e.interfaceChange,t)},e.prototype.logStaticFilterDeselect=function(e){var t=Et(e);return this.logSearchEvent($e.staticFilterDeselect,t)},e.prototype.logFetchMoreResults=function(e){if(e){var t=Et(e);return this.logCustomEvent($e.pagerScrolling,r(r({},t),{type:"getMoreResults"}))}return this.logCustomEvent($e.pagerScrolling,{type:"getMoreResults"})},e.prototype.logBreadcrumbFacet=function(e){var t=Et(e);return this.logSearchEvent($e.breadcrumbFacet,t)},e.prototype.logBreadcrumbResetAll=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.breadcrumbResetAll,t)}return this.logSearchEvent($e.breadcrumbResetAll)},e.prototype.logFacetSelect=function(e){var t=Et(e);return this.logSearchEvent($e.facetSelect,t)},e.prototype.logFacetExclude=function(e){var t=Et(e);return this.logSearchEvent($e.facetExclude,t)},e.prototype.logFacetDeselect=function(e){var t=Et(e);return this.logSearchEvent($e.facetDeselect,t)},e.prototype.logFacetUpdateSort=function(e){var t=Et(e);return this.logSearchEvent($e.facetUpdateSort,t)},e.prototype.logFacetClearAll=function(e){var t=Et(e);return this.logSearchEvent($e.facetClearAll,t)},e.prototype.logFacetShowMore=function(e){var t=Et(e,!1);return this.logCustomEvent($e.facetShowMore,t)},e.prototype.logFacetShowLess=function(e){var t=Et(e,!1);return this.logCustomEvent($e.facetShowLess,t)},e.prototype.logQueryError=function(e){var t=Et(e,!1);return this.logCustomEvent($e.queryError,t)},e.prototype.logPagerNumber=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerNumber,t)},e.prototype.logPagerNext=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerNext,t)},e.prototype.logPagerPrevious=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerPrevious,t)},e.prototype.logDidYouMeanAutomatic=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.didyoumeanAutomatic,t)}return this.logSearchEvent($e.didyoumeanAutomatic)},e.prototype.logDidYouMeanClick=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.didyoumeanClick,t)}return this.logSearchEvent($e.didyoumeanClick)},e.prototype.logResultsSort=function(e){var t=Et(e);return this.logSearchEvent($e.resultsSort,t)},e.prototype.logSearchboxSubmit=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.searchboxSubmit,t)}return this.logSearchEvent($e.searchboxSubmit)},e.prototype.logContextChanged=function(e){var t=Et(e);return this.logSearchEvent(ze.contextChanged,t)},e.prototype.logExpandToFullUI=function(e){var t=Et(e);return this.logCustomEvent(ze.expandToFullUI,t)},e.prototype.logOpenUserActions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.openUserActions,t)},e.prototype.logShowPrecedingSessions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.showPrecedingSessions,t)},e.prototype.logShowFollowingSessions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.showFollowingSessions,t)},e.prototype.logViewedDocumentClick=function(e,t){return this.logCustomEvent(ze.clickViewedDocument,r(r({},Et(t,!1)),{document:e}))},e.prototype.logPageViewClick=function(e,t){return this.logCustomEvent(ze.clickPageView,r(r({},Et(t,!1)),{pageView:e}))},e.prototype.logCreateArticle=function(e,t){return this.logCustomEvent(ze.createArticle,t?r(r({},Et(t,!1)),e):e)},e.prototype.logDocumentOpen=function(e,t,n){return this.logClickEvent($e.documentOpen,e,t,n?Et(n,!1):void 0)},e.prototype.logCopyToClipboard=function(e,t,n){return this.logClickEvent($e.copyToClipboard,e,t,n?Et(n,!1):void 0)},e.prototype.logCaseSendEmail=function(e,t,n){return this.logClickEvent($e.caseSendEmail,e,t,n?Et(n,!1):void 0)},e.prototype.logFeedItemTextPost=function(e,t,n){return this.logClickEvent($e.feedItemTextPost,e,t,n?Et(n,!1):void 0)},e.prototype.logDocumentQuickview=function(e,t,n){var o={documentTitle:e.documentTitle,documentURL:e.documentUrl};return this.logClickEvent($e.documentQuickview,e,t,n?r(r({},Et(n,!1)),o):o)},e.prototype.logCaseAttach=function(e,t,n){var o={documentTitle:e.documentTitle,documentURL:e.documentUrl,resultUriHash:e.documentUriHash};return this.logClickEvent($e.caseAttach,e,t,n?r(r({},Et(n,!1)),o):o)},e.prototype.logCaseDetach=function(e,t){return this.logCustomEvent($e.caseDetach,t?r(r({},Et(t,!1)),{resultUriHash:e}):{resultUriHash:e})},e.prototype.logLikeSmartSnippet=function(e){return this.logCustomEvent($e.likeSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logDislikeSmartSnippet=function(e){return this.logCustomEvent($e.dislikeSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logExpandSmartSnippet=function(e){return this.logCustomEvent($e.expandSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logCollapseSmartSnippet=function(e){return this.logCustomEvent($e.collapseSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logOpenSmartSnippetFeedbackModal=function(e){return this.logCustomEvent($e.openSmartSnippetFeedbackModal,e?Et(e,!1):void 0)},e.prototype.logCloseSmartSnippetFeedbackModal=function(e){return this.logCustomEvent($e.closeSmartSnippetFeedbackModal,e?Et(e,!1):void 0)},e.prototype.logSmartSnippetFeedbackReason=function(e,t,n){return this.logCustomEvent($e.sendSmartSnippetReason,n?r(r({},Et(n,!1)),{reason:e,details:t}):{reason:e,details:t})},e.prototype.logExpandSmartSnippetSuggestion=function(e,t){var n="documentId"in e?e:{documentId:e};return this.logCustomEvent($e.expandSmartSnippetSuggestion,t?r(r({},Et(t,!1)),n):n)},e.prototype.logCollapseSmartSnippetSuggestion=function(e,t){var n="documentId"in e?e:{documentId:e};return this.logCustomEvent($e.collapseSmartSnippetSuggestion,t?r(r({},Et(t,!1)),n):n)},e.prototype.logOpenSmartSnippetSource=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSource,e,t,n?Et(n,!1):void 0)},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t,n){return this.logClickEvent($e.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logLikeGeneratedAnswer=function(e,t){return this.logCustomEvent($e.likeGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logDislikeGeneratedAnswer=function(e,t){return this.logCustomEvent($e.dislikeGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logOpenGeneratedAnswerSource=function(e,t){return this.logCustomEvent($e.openGeneratedAnswerSource,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCitationClick=function(e,t,n){return this.logClickEvent($e.generatedAnswerCitationClick,r(r({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logGeneratedAnswerSourceHover=function(e,t){return this.logCustomEvent($e.generatedAnswerSourceHover,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCopyToClipboard=function(e,t){return this.logCustomEvent($e.generatedAnswerCopyToClipboard,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerHideAnswers=function(e,t){return this.logCustomEvent($e.generatedAnswerHideAnswers,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerShowAnswers=function(e,t){return this.logCustomEvent($e.generatedAnswerShowAnswers,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerExpand=function(e,t){return this.logCustomEvent($e.generatedAnswerExpand,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCollapse=function(e,t){return this.logCustomEvent($e.generatedAnswerCollapse,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerFeedbackSubmit=function(e,t){return this.logCustomEvent($e.generatedAnswerFeedbackSubmit,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerFeedbackSubmitV2=function(e,t){return this.logCustomEvent($e.generatedAnswerFeedbackSubmitV2,t?r(r({},Et(t,!1)),e):e)},e.prototype.logRephraseGeneratedAnswer=function(e,t){return this.logSearchEvent($e.rephraseGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logRetryGeneratedAnswer=function(e){return this.logSearchEvent($e.retryGeneratedAnswer,e?r({},Et(e,!1)):{})},e.prototype.logGeneratedAnswerStreamEnd=function(e,t){return this.logCustomEvent($e.generatedAnswerStreamEnd,t?r(r({},Et(t,!1)),e):e)},e.prototype.logCustomEvent=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=r(r({},this.provider.getBaseMetadata()),t),i=[{}],[4,this.getBaseCustomEventRequest(n)];case 1:return o=r.apply(void 0,[r.apply(void 0,i.concat([s.sent()])),{eventType:dt[e],eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(o)]}})})},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}})})},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}})})},e.prototype.logShowMoreFoldedResults=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(r){return[2,this.logClickEvent($e.showMoreFoldedResults,e,t,n?Et(n,!1):void 0)]})})},e.prototype.logShowLessFoldedResults=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.logCustomEvent($e.showLessFoldedResults,e?Et(e,!1):void 0)]})})},e.prototype.logTriggerNotify=function(e,t){return this.logCustomEvent($e.triggerNotify,t?r(r({},Et(t,!1)),e):e)},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}})})},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=[{}],[4,this.getBaseEventRequest(r(r({},t),null===(i=(o=this.provider).getGeneratedAnswerMetadata)||void 0===i?void 0:i.call(o)))];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([s.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}})})},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r({},this.getOrigins())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}})})},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e}(),Ct=Object.freeze({__proto__:null,get CaseAssistActions(){return St},CaseAssistClient:It,get CaseAssistEvents(){return yt},get CaseCancelledReasons(){return kt},CoveoAnalyticsClient:Je,CoveoInsightClient:bt,CoveoSearchPageClient:wt,CoveoUA:ct,CustomEventsTypes:dt,get EventType(){return n},get InsightEvents(){return ze},get SearchPageEvents(){return $e},SimpleAnalytics:ht,analytics:Xe,donottrack:Be,getCurrentClient:lt,handleOneAnalyticsEvent:pt,history:b,storage:w});window.Promise instanceof Function||global||console.error('This script uses window.Promise which is not supported in your browser. Consider adding a polyfill like "es6-promise".'),window.fetch instanceof Function||global||console.error('This script uses window.fetch which is not supported in your browser. Consider adding a polyfill like "fetch".');var At=self.coveoua||pt;if(self.coveoua=pt,self.coveoanalytics=Ct,At.q){var Dt=At.q.filter(function(e){return"init"===e[0]}),Ut=At.q.filter(function(e){return"init"!==e[0]});a(a([],Dt,!0),Ut,!0).forEach(function(e){return pt.apply(void 0,e)})}return self.coveoua}();
|
|
1
|
+
var coveoua=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n,r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function c(){return"undefined"!=typeof window}function u(){return"undefined"!=typeof navigator}function l(){return"undefined"!=typeof document}function p(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}function h(){return u()&&navigator.cookieEnabled}"function"==typeof SuppressedError&&SuppressedError,function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"}(n||(n={}));var d=[n.click,n.custom,n.search,n.view],v=function(e,t){return-1!==d.indexOf(e)?r({language:l()?document.documentElement.lang:"unknown",userAgent:u()?navigator.userAgent:"unknown"},t):t},g=function(){function e(){}return e.set=function(e,t,n){var r,o,i;n&&(r=new Date).setTime(r.getTime()+n),-1===(i=window.location.hostname).indexOf(".")?f(e,t,r):f(e,t,r,(o=i.split("."))[o.length-2]+"."+o[o.length-1])},e.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r];if(0===(o=o.replace(/^\s+/,"")).lastIndexOf(t,0))return o.substring(t.length,o.length)}return null},e.erase=function(t){e.set(t,"",-1)},e}();function f(e,t,n,r){document.cookie="".concat(e,"=").concat(t)+(n?";expires=".concat(n.toUTCString()):"")+(r?";domain=".concat(r):"")+";path=/;SameSite=Lax"}function m(){return p()?localStorage:h()?new y:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return!1}}()?sessionStorage:new k}var y=function(){function e(){}return e.prototype.getItem=function(t){return g.get("".concat(e.prefix).concat(t))},e.prototype.removeItem=function(t){g.erase("".concat(e.prefix).concat(t))},e.prototype.setItem=function(t,n,r){g.set("".concat(e.prefix).concat(t),n,r)},e.prefix="coveo_",e}(),S=function(){function e(){this.cookieStorage=new y}return e.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},e.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},e.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t,31556926e3)},e}(),k=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}(),w=Object.freeze({__proto__:null,CookieAndLocalStorage:S,CookieStorage:y,NullStorage:k,getAvailableStorage:m,preferredStorage:null}),I="__coveo.analytics.history",E=function(){function e(e){this.store=e||m()}return e.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},e.prototype.addElementAsync=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e)),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=n.sent())?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e]),[2]}})})},e.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))},e.prototype.getHistoryAsync=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return e=t.sent(),[2,this.stripEmptyQueries(this.stripInternalTime(e))]}})})},e.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(I);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},e.prototype.getHistoryWithInternalTimeAsync=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getItem(I)];case 1:return(e=t.sent())?[2,JSON.parse(e)]:[2,[]];case 2:return t.sent(),[2,[]];case 3:return[2]}})})},e.prototype.setHistory=function(e){try{this.store.setItem(I,JSON.stringify(e.slice(0,20)))}catch(e){}},e.prototype.clear=function(){try{this.store.removeItem(I)}catch(e){}},e.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort(function(e,t){return(t.internalTime||0)-(e.internalTime||0)})[0]:null},e.prototype.cropQueryElement=function(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e},e.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4},e.prototype.stripInternalTime=function(e){return Array.isArray(e)?e.map(function(e){return{name:e.name,time:e.time,value:e.value}}):[]},e.prototype.stripEmptyQuery=function(e){var t=e.name,n=e.time,r=e.value;return t&&"string"==typeof r&&"query"===t.toLowerCase()&&""===r.trim()?{name:t,time:n}:e},e.prototype.stripEmptyQueries=function(e){var t=this;return e.map(function(e){return t.stripEmptyQuery(e)})},e}(),b=Object.freeze({__proto__:null,HistoryStore:E,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MAX_VALUE_SIZE:75,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,STORE_KEY:I,default:E}),C=function(e,t){return i(void 0,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return e!==n.view?[3,2]:[4,A(t.contentIdValue)];case 1:return o.sent(),[2,r({location:window.location.toString(),referrer:document.referrer,title:document.title},t)];case 2:return[2,t]}})})},A=function(e){return i(void 0,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:return t=new E,n={name:"PageView",value:e,time:(new Date).toISOString()},[4,t.addElementAsync(n)];case 1:return r.sent(),[2]}})})};let D;const U=new Uint8Array(16);function R(){if(!D&&(D="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!D))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(U)}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F(e){return"string"==typeof e&&P.test(e)}const x=[];for(let e=0;e<256;++e)x.push((e+256).toString(16).slice(1));function T(e,t=0){return x[e[t+0]]+x[e[t+1]]+x[e[t+2]]+x[e[t+3]]+"-"+x[e[t+4]]+x[e[t+5]]+"-"+x[e[t+6]]+x[e[t+7]]+"-"+x[e[t+8]]+x[e[t+9]]+"-"+x[e[t+10]]+x[e[t+11]]+x[e[t+12]]+x[e[t+13]]+x[e[t+14]]+x[e[t+15]]}var L={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function O(e,t,n){if(L.randomUUID&&!t&&!e)return L.randomUUID();const r=(e=e||{}).random||(e.rng||R)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return T(r)}function V(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function M(e,t){return e<<t|e>>>32-t}var G=function(e,t,n){function r(e,r,o,i){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=function(e){if(!F(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(let e=0;e<16;++e)o[i+e]=a[e];return o}return T(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}("v5",80,function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,o=Math.ceil(r/16),i=new Array(o);for(let t=0;t<o;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];i[t]=n}i[o-1][14]=8*(e.length-1)/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<o;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=i[e][t];for(let e=16;e<80;++e)r[e]=M(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let o=n[0],s=n[1],a=n[2],c=n[3],u=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),i=M(o,5)+V(n,s,a,c)+u+t[n]+r[e]>>>0;u=c,c=a,a=M(s,30)>>>0,s=o,o=i}n[0]=n[0]+o>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+u>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}),q="2.30.49",N=function(e){return"".concat(e.protocol,"//").concat(e.hostname).concat(0===e.pathname.indexOf("/")?e.pathname:"/".concat(e.pathname)).concat(e.search)},Q={pageview:"pageview",event:"event"},_=function(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?O:n;this.client=t,this.uuidGenerator=r},H=function(e){function n(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.actionData={},i.pageViewId=o(),i.nextPageViewId=i.pageViewId,i.currentLocation=N(window.location),i.lastReferrer=l()?document.referrer:"",i.addHooks(),i}return t(n,e),n.prototype.getApi=function(e){return"setAction"===e?this.setAction:null},n.prototype.setAction=function(e,t){this.action=e,this.actionData=t},n.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},n.prototype.getLocationInformation=function(e,t){return r({hitType:e},this.getNextValues(e,t))},n.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},n.prototype.getDefaultContextInformation=function(e){var t={title:l()?document.title:"",encoding:l()?document.characterSet:"UTF-8"},n={screenResolution:"".concat(screen.width,"x").concat(screen.height),screenColor:"".concat(screen.colorDepth,"-bit")},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return r(r(r(r({},i),n),o),t)},n.prototype.updateLocationForNextPageView=function(e,t){var n=this.getNextValues(e,t),r=n.pageViewId,o=n.referrer,i=n.location;this.lastReferrer=o,this.pageViewId=r,this.currentLocation=i,e===Q.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},n.prototype.getNextValues=function(e,t){return{pageViewId:e===Q.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Q.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Q.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},n.prototype.getCurrentLocationFromPayload=function(e){if(e.page){return"".concat((t=this.currentLocation,t.split("/").slice(0,3).join("/"))).concat(e.page.replace(/^\/?(.*)$/,"/$1"))}return N(window.location);var t},n}(_),B=function(){function e(e,t){if(!F(e))throw Error("Not a valid uuid");this.clientId=e,this.creationDate=Math.floor(t/1e3)}return e.prototype.toString=function(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()},Object.defineProperty(e.prototype,"expired",{get:function(){var t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime},enumerable:!1,configurable:!0}),e.prototype.validate=function(e,t){return!this.expired&&this.matchReferrer(e,t)},e.prototype.matchReferrer=function(e,t){try{var n=new URL(e);return t.some(function(e){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host)})}catch(e){return!1}},e.fromString=function(t){var n=t.split(".");if(2!==n.length)return null;var r=n[0],o=n[1];if(32!==r.length||isNaN(parseInt(o)))return null;var i=r.substring(0,8)+"-"+r.substring(8,12)+"-"+r.substring(12,16)+"-"+r.substring(16,20)+"-"+r.substring(20,32);return F(i)?new e(i,1e3*Number.parseInt(o)):null},e.cvo_cid="cvo_cid",e.expirationTime=120,e}(),j=function(e){function n(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r;return e.call(this,{client:n,uuidGenerator:o})||this}return t(n,e),n.prototype.getApi=function(e){switch(e){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}},n.prototype.decorate=function(e){return i(this,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");r.label=1;case 1:return r.trys.push([1,3,,4]),t=new URL(e),[4,this.client.getCurrentVisitorId()];case 2:return n=r.sent(),t.searchParams.set(B.cvo_cid,new B(n,Date.now()).toString()),[2,t.toString()];case 3:throw r.sent(),new Error("Invalid URL provided");case 4:return[2]}})})},n.prototype.acceptFrom=function(e){this.client.setAcceptedLinkReferrers(e)},n.Id="link",n}(_),K=j,Y=Object.keys;function z(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function W(e){return"string"!=typeof e||""==e||Number.isNaN(+e)?e:+e}function $(e){return 240==(248&e)?4:224==(240&e)?3:192==(224&e)?2:1}var J={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},X=a([],Y(J).map(function(e){return J[e]}),!0).join("|"),Z=new RegExp("^(".concat(X,"$)")),ee=[function(e){return Z.test(e)}],te={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ne={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},re={action:"pa",list:"pal",listSource:"pls"},oe={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ie={id:"quoteId",affiliation:"quoteAffiliation"},se={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},ae={add:re,bookmark_add:re,bookmark_remove:re,click:re,checkout:re,checkout_option:re,detail:re,impression:re,remove:re,refund:r(r({},re),oe),purchase:r(r({},re),oe),quickview:re,quote:r(r({},re),ie),review:r(r({},re),se)},ce=function(e,t,n,o){return Y(e).reduce(function(i,s){var a,c="il".concat(t+1).concat(o).concat(n+1).concat(ne[s]||s);return r(r({},i),((a={})[c]=e[s],a))},{})},ue=Y(te).map(function(e){return te[e]}),le=Y(ne).map(function(e){return ne[e]}),pe=Y(re).map(function(e){return re[e]}),he=Y(oe).map(function(e){return oe[e]}),de=Y(se).map(function(e){return se[e]}),ve=Y(ie).map(function(e){return ie[e]}),ge=a(a([],ue,!0),["custom"],!1).join("|"),fe=a(a([],le,!0),["custom"],!1).join("|"),me="(pr[0-9]+)",ye="(il[0-9]+pi[0-9]+)",Se=new RegExp("^".concat(me,"(").concat(ge,")$")),ke=new RegExp("^(".concat(ye,"(").concat(fe,"))|(il[0-9]+nm)$")),we=new RegExp("^(".concat(pe.join("|"),")$")),Ie=new RegExp("^(".concat(he.join("|"),")$")),Ee=new RegExp("^".concat(me,"custom$")),be=new RegExp("^".concat(ye,"custom$")),Ce=new RegExp("^(".concat(a(a(a([],["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],!0),de,!0),ve,!0).join("|"),")$")),Ae=[function(e){return ke.test(e)},function(e){return Se.test(e)},function(e){return we.test(e)},function(e){return Ie.test(e)},function(e){return Ce.test(e)}],De=[Ee,be],Ue=r(r(r(r({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"].reduce(function(e,t){var n;return r(r({},e),((n={})[t]=t,n))},{})),Re=r(r({},Ue),{svcAction:"svc_action",svcActionData:"svc_action_data"}),Pe=Y(Re).map(function(e){return Re[e]}),Fe=function(e){return-1!==Pe.indexOf(e)},xe=function(e){return"custom"===e},Te=function(e){var t=void 0;return a([],De,!0).every(function(n){var r;return t=null===(r=n.exec(e))||void 0===r?void 0:r[1],!Boolean(t)}),t},Le=function(e,t){return Y(t).reduce(function(n,o){var i;return r(r({},n),((i={})["".concat(e).concat(o)]=t[o],i))},{})},Oe=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r,o,i,a,c,u,l,p;return s(this,function(s){switch(s.label){case 0:if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');return n=this.opts,r=n.baseUrl,o=n.preprocessRequest,[4,this.getQueryParamsForEventType(e)];case 1:return i=s.sent(),[4,this.preProcessRequestAsPotentialJSONString("".concat(r,"/analytics/").concat(e,"?").concat(i),t,o)];case 2:return a=s.sent(),c=a.url,u=a.payload,l=this.encodeForEventType(e,u),p=new Blob([l],{type:"application/x-www-form-urlencoded"}),navigator.sendBeacon(c,p),[2]}})})},e.prototype.isAvailable=function(){return"sendBeacon"in navigator},e.prototype.deleteHttpCookieVisitorId=function(){return Promise.resolve()},e.prototype.preProcessRequestAsPotentialJSONString=function(e,t,n){return i(this,void 0,void 0,function(){var r,o,i,a,c;return s(this,function(s){switch(s.label){case 0:return r=e,o=t,n?[4,n({url:e,body:JSON.stringify(t)},"analyticsBeacon")]:[3,2];case 1:i=s.sent(),a=i.url,c=i.body,r=a||e;try{o=JSON.parse(c)}catch(e){console.error("Unable to process the request body as a JSON string",e)}s.label=2;case 2:return[2,{payload:o,url:r}]}})})},e.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeEventToJson(e,t):this.encodeEventToJson(e,t,this.opts.token)},e.prototype.getQueryParamsForEventType=function(e){return i(this,void 0,void 0,function(){var t,n,r;return s(this,function(o){switch(o.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=o.sent(),[2,[n&&this.isEventTypeLegacy(e)?"access_token=".concat(n):"",r?"visitorId=".concat(r):"","discardVisitInfo=true"].filter(function(e){return!!e}).join("&")]}})})},e.prototype.isEventTypeLegacy=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.encodeEventToJson=function(e,t,n){var r="".concat(e,"Event=").concat(encodeURIComponent(JSON.stringify(t)));return n&&(r="access_token=".concat(encodeURIComponent(n),"&").concat(r)),r},e}(),Ve=function(){function e(){}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,Promise.resolve()]})})},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,Promise.resolve()]})})},e}(),Me=globalThis.fetch,Ge=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,function(){var n,i,a,c,u,l,p,h,d,v,g,f,m,y,S;return s(this,function(s){switch(s.label){case 0:return n=this.opts,i=n.baseUrl,a=n.visitorIdProvider,c=n.preprocessRequest,this.shouldAppendVisitorId(e)?[4,this.getVisitorIdParam()]:[3,2];case 1:return l=s.sent(),[3,3];case 2:l="",s.label=3;case 3:return u=l,p={url:"".concat(i,"/analytics/").concat(e).concat(u),credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},g=[r({},p)],c?[4,c(p,"analyticsFetch")]:[3,5];case 4:return f=s.sent(),[3,6];case 5:f={},s.label=6;case 6:h=r.apply(void 0,g.concat([f])),d=h.url,v=o(h,["url"]),s.label=7;case 7:return s.trys.push([7,9,,10]),[4,Me(d,v)];case 8:return m=s.sent(),[3,10];case 9:return y=s.sent(),console.error("An error has occured when sending the event.",y),[2];case 10:return m.ok?[4,m.json()]:[3,12];case 11:return(S=s.sent()).visitorId&&a.setCurrentVisitorId(S.visitorId),[2,S];case 12:try{m.json()}catch(e){}throw console.error('An error has occured when sending the "'.concat(e,'" event.'),m,t),new Error('An error has occurred when sending the "'.concat(e,'" event. Check the console logs for more details.'))}})})},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return e=this.opts.baseUrl,t="".concat(e,"/analytics/visit"),[4,Me(t,{headers:this.getHeaders(),method:"DELETE"})];case 1:return n.sent(),[2]}})})},e.prototype.shouldAppendVisitorId=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.getVisitorIdParam=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(e=t.sent())?"?visitor=".concat(e):""]}})})},e.prototype.getHeaders=function(){var e=this.opts.token;return r(r({},e?{Authorization:"Bearer ".concat(e)}:{}),{"Content-Type":"application/json"})},e}(),qe=function(){function e(e,t){var n=this;p()&&h()?this.storage=new S:p()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new k),this.client=new Ge(e),this.beaconClient=new Oe(e),window.addEventListener("beforeunload",function(){for(var e=0,r=t();e<r.length;e++){var o=r[e],i=o.eventType,s=o.payload;n.beaconClient.sendEvent(i,s)}})}return e.prototype.getClientDependingOnEventType=function(e){return"click"===e&&this.beaconClient.isAvailable()?this.beaconClient:this.client},e}(),Ne=function(){function e(e,t){this.storage=t||new k,this.client=new Ge(e)}return e.prototype.getClientDependingOnEventType=function(e){return this.client},e}(),Qe=function(){function e(){this.storage=new k,this.client=new Ve}return e.prototype.getClientDependingOnEventType=function(e){return this.client},e}();var _e=["1",1,"yes",!0];function He(){var e=[];return c()&&e.push(window.doNotTrack),u()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(function(e){return-1!==_e.indexOf(e)})}var Be=Object.freeze({__proto__:null,default:He,doNotTrack:He}),je="v15",Ke={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Ye(e,t,n){if(void 0===e&&(e=Ke.default),void 0===t&&(t=je),void 0===n&&(n=!1),e=e.replace(/\/$/,""),n)return"".concat(e,"/").concat(t);var r=e.endsWith("/rest")||e.endsWith("/rest/ua");return"".concat(e).concat(r?"":"/rest","/").concat(t)}var ze,We,$e,Je=function(){function e(e){if(this.acceptedLinkReferrers=[],!e)throw new Error("You have to pass options to this constructor");this.options=r(r({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[C,v].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};var t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};He()?this.runtime=new Qe:this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),this.addEventTypeMapping(n.view,{newEventType:n.view,addClientIdParameter:!0}),this.addEventTypeMapping(n.click,{newEventType:n.click,addClientIdParameter:!0}),this.addEventTypeMapping(n.custom,{newEventType:n.custom,addClientIdParameter:!0}),this.addEventTypeMapping(n.search,{newEventType:n.search,addClientIdParameter:!0})}return Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return{endpoint:Ke.default,isCustomEndpoint:!1,token:"",version:je,beforeSendHooks:[],afterSendHooks:[]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return q},enumerable:!1,configurable:!0}),e.prototype.initRuntime=function(e){var t=this;return c()&&l()?new qe(e,function(){var e=a([],t.bufferedRequests,!0);return t.bufferedRequests=[],e}):("undefined"!=typeof navigator&&"ReactNative"==navigator.product&&console.warn("\n We've detected you're using React Native but have not provided the corresponding runtime, \n for an optimal experience please use the \"coveo.analytics/react-native\" subpackage.\n Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native\n "),new Ne(e))},Object.defineProperty(e.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!1,configurable:!0}),e.prototype.determineVisitorId=function(){return i(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),(e=c()&&this.extractClientIdFromLink(window.location.href))?[3,2]:[4,this.storage.getItem("visitorId")];case 1:e=n.sent(),n.label=2;case 2:return[2,e||O()];case 3:return t=n.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),[2,O()];case 4:return[2]}})})},e.prototype.getCurrentVisitorId=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return e=t.sent(),[4,this.setCurrentVisitorId(e)];case 2:t.sent(),t.label=3;case 3:return[2,this.visitorId]}})})},e.prototype.setCurrentVisitorId=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this.visitorId=e,[4,this.storage.setItem("visitorId",e)];case 1:return t.sent(),[2]}})})},e.prototype.setClientId=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){if(F(e))this.setCurrentVisitorId(e.toLowerCase());else{if(!t)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(G(e,G(t,"38824e1f-37f5-42d3-8372-a4b8fa9df946")))}return[2]})})},e.prototype.getParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return[2,n.sent()]}})})},e.prototype.getPayload=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return n=r.sent(),[4,this.resolvePayloadForParameters(e,n)];case 2:return[2,r.sent()]}})})},Object.defineProperty(e.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(O()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!1,configurable:!0}),e.prototype.extractClientIdFromLink=function(e){if(He())return null;try{var t=new URL(e).searchParams.get(B.cvo_cid);if(null==t)return null;var n=B.fromString(t);return n&&l()&&n.validate(document.referrer,this.acceptedLinkReferrers)?n.clientId:null}catch(e){}return null},e.prototype.resolveParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n,o,a,c,u,l,p,h,d,v,g,f,m=this;return s(this,function(y){switch(y.label){case 0:return n=this.eventTypeMapping[e]||{},o=n.variableLengthArgumentsNames,a=void 0===o?[]:o,c=n.addVisitorIdParameter,u=void 0!==c&&c,l=n.usesMeasurementProtocol,p=void 0!==l&&l,h=n.addClientIdParameter,d=void 0!==h&&h,v=function(e){return i(m,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=[r({},e)],o={},u?[4,this.getCurrentVisitorId()]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n="",i.label=3;case 3:return[2,r.apply(void 0,t.concat([(o.visitorId=n,o)]))]}})})},g=function(e){return i(m,void 0,void 0,function(){var t,n;return s(this,function(o){switch(o.label){case 0:return d?(t=[r({},e)],n={},[4,this.getCurrentVisitorId()]):[3,2];case 1:return[2,r.apply(void 0,t.concat([(n.clientId=o.sent(),n)]))];case 2:return[2,e]}})})},f=function(t){return m.beforeSendHooks.reduce(function(t,n){return i(m,void 0,void 0,function(){var r;return s(this,function(o){switch(o.label){case 0:return[4,t];case 1:return r=o.sent(),[4,n(e,r)];case 2:return[2,o.sent()]}})})},t)},[4,[function(e){return a.length>0?m.parseVariableArgumentsPayload(a,e):e[0]},v,g,function(e){return p?m.ensureAnonymousUserWhenUsingApiKey(e):e},f].reduce(function(e,t){return i(m,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}})})},Promise.resolve(t))];case 1:return[2,y.sent()]}})})},e.prototype.resolvePayloadForParameters=function(e,t){return i(this,void 0,void 0,function(){var n,o,a,c=this;return s(this,function(u){switch(u.label){case 0:return n=(this.eventTypeMapping[e]||{}).usesMeasurementProtocol,o=void 0!==n&&n,a=function(e){return o?(n=!!(t=e).action&&ae[t.action]||{},Y(t).reduce(function(e,o){var i,s=n[o]||Re[o]||o;return r(r({},e),((i={})[s]=t[o],i))},{})):e;var t,n},[4,[function(e){return c.setTrackingIdIfTrackingIdNotPresent(e)},function(t){return c.removeEmptyPayloadValues(t,e)},function(t){return c.validateParams(t,e)},a,function(e){return o?c.removeUnknownParameters(e):e},function(e){return o?c.processCustomParameters(e):c.mapCustomParametersToCustomData(e)}].reduce(function(e,t){return i(c,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}})})},Promise.resolve(t))];case 1:return[2,u.sent()]}})})},e.prototype.makeEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){var n,o,c,u,l=this;return s(this,function(p){switch(p.label){case 0:return n=(this.eventTypeMapping[e]||{}).newEventType,o=void 0===n?e:n,[4,this.resolveParameters.apply(this,a([e],t,!1))];case 1:return c=p.sent(),[4,this.resolvePayloadForParameters(e,c)];case 2:return u=p.sent(),[2,{eventType:o,payload:u,log:function(t){return i(l,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return this.bufferedRequests.push({eventType:o,payload:r(r({},u),t)}),[4,Promise.all(this.afterSendHooks.map(function(n){return n(e,r(r({},c),t))}))];case 1:return n.sent(),[4,this.deferExecution()];case 2:return n.sent(),[4,this.sendFromBuffer()];case 3:return[2,n.sent()]}})})}}]}})})},e.prototype.sendEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeEvent.apply(this,a([e],t,!1))];case 1:return[2,n.sent().log({})]}})})},e.prototype.deferExecution=function(){return new Promise(function(e){return setTimeout(e,0)})},e.prototype.sendFromBuffer=function(){return i(this,void 0,void 0,function(){var e,t,n;return s(this,function(r){return(e=this.bufferedRequests.shift())?(t=e.eventType,n=e.payload,[2,this.runtime.getClientDependingOnEventType(t).sendEvent(t,n)]):[2]})})},e.prototype.clear=function(){this.storage.removeItem("visitorId"),(new E).clear()},e.prototype.deleteHttpOnlyVisitorId=function(){this.runtime.client.deleteHttpCookieVisitorId()},e.prototype.makeSearchEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.search,e)]})})},e.prototype.sendSearchEvent=function(e){return i(this,void 0,void 0,function(){var t=e.searchQueryUid,n=o(e,["searchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchEvent(n)];case 1:return[2,e.sent().log({searchQueryUid:t})]}})})},e.prototype.makeClickEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.click,e)]})})},e.prototype.sendClickEvent=function(e){return i(this,void 0,void 0,function(){var t=e.searchQueryUid,n=o(e,["searchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeClickEvent(n)];case 1:return[2,e.sent().log({searchQueryUid:t})]}})})},e.prototype.makeCustomEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.custom,e)]})})},e.prototype.sendCustomEvent=function(e){return i(this,void 0,void 0,function(){var t=e.lastSearchQueryUid,n=o(e,["lastSearchQueryUid"]);return s(this,function(e){switch(e.label){case 0:return[4,this.makeCustomEvent(n)];case 1:return[2,e.sent().log({lastSearchQueryUid:t})]}})})},e.prototype.makeViewEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.makeEvent(n.view,e)]})})},e.prototype.sendViewEvent=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeViewEvent(e)];case 1:return[2,t.sent().log({})]}})})},e.prototype.getVisit=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,fetch("".concat(this.baseUrl,"/analytics/visit"))];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),this.visitorId=e.visitorId,[2,e]}})})},e.prototype.getHealth=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(this.baseUrl,"/analytics/monitoring/health"))];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}})})},e.prototype.registerBeforeSendEventHook=function(e){this.beforeSendHooks.push(e)},e.prototype.registerAfterSendEventHook=function(e){this.afterSendHooks.push(e)},e.prototype.addEventTypeMapping=function(e,t){this.eventTypeMapping[e]=t},e.prototype.setAcceptedLinkReferrers=function(e){if(!Array.isArray(e)||!e.every(function(e){return"string"==typeof e}))throw Error("Parameter should be an array of domain strings");this.acceptedLinkReferrers=e},e.prototype.parseVariableArgumentsPayload=function(e,t){for(var n={},o=0,i=t.length;o<i;o++){var s=t[o];if("string"==typeof s)n[e[o]]=s;else if("object"==typeof s)return r(r({},n),s)}return n},e.prototype.isKeyAllowedEmpty=function(e,t){var r;return-1!==(((r={})[n.search]=["queryText"],r)[e]||[]).indexOf(t)},e.prototype.removeEmptyPayloadValues=function(e,t){var n=this;return Object.keys(e).filter(function(r){return n.isKeyAllowedEmpty(t,r)||null!=(o=e[r])&&""!==o;var o}).reduce(function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))},{})},e.prototype.removeUnknownParameters=function(e){var t=Object.keys(e).filter(function(e){if(function(e){return a(a(a([],Ae,!0),ee,!0),[Fe,xe],!1).some(function(t){return t(e)})}(e))return!0;console.log(e,"is not processed by coveoua")}).reduce(function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))},{});return t},e.prototype.processCustomParameters=function(e){var t=e.custom,n=o(e,["custom"]),i={};t&&z(t)&&(i=this.lowercaseKeys(t));var s,a=Y(s=n).reduce(function(e,t){var n,o=Te(t);return r(r({},e),o?Le(o,s[t]):((n={})[t]=s[t],n))},{});return r(r({},i),a)},e.prototype.mapCustomParametersToCustomData=function(e){var t=e.custom,n=o(e,["custom"]);if(t&&z(t)){var i=this.lowercaseKeys(t);return r(r({},n),{customData:r(r({},i),e.customData)})}return e},e.prototype.lowercaseKeys=function(e){var t=Object.keys(e),n={};return t.forEach(function(t){n[t.toLowerCase()]=e[t]}),n},e.prototype.validateParams=function(e,t){var r=e.anonymizeIp,i=o(e,["anonymizeIp"]);return void 0!==r&&-1==["0","false","undefined","null","{}","[]",""].indexOf("".concat(r).toLowerCase())&&(i.anonymizeIp=1),t!=n.view&&t!=n.click&&t!=n.search&&t!=n.custom||(i.originLevel3=this.limit(i.originLevel3,1024)),t==n.view&&(i.location=this.limit(i.location,1024)),"pageview"!=t&&"event"!=t||(i.referrer=this.limit(i.referrer,2048),i.location=this.limit(i.location,2048),i.page=this.limit(i.page,2048)),i},e.prototype.ensureAnonymousUserWhenUsingApiKey=function(e){var t,n=e.userId,r=o(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!n?(r.userId="anonymous",r):e},e.prototype.setTrackingIdIfTrackingIdNotPresent=function(e){var t=e.trackingId,n=o(e,["trackingId"]);return t?e:(n.hasOwnProperty("custom")&&z(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&z(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)},e.prototype.limit=function(e,t){return"string"==typeof e?function(e,t){if(t<0||e.length<=t)return e;var n=e.indexOf("%",t-2);for(n<0||n>t?n=t:t=n;n>2&&"%"==e.charAt(n-3);){var r=Number.parseInt(e.substring(n-2,n),16);if(128&~r)break;if(n-=3,128!=(192&r)){t-n>=3*$(r)&&(n=t);break}}return e.substring(0,n)}(e,t):e},Object.defineProperty(e.prototype,"baseUrl",{get:function(){return Ye(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)},enumerable:!1,configurable:!0}),e}(),Xe=Object.freeze({__proto__:null,CoveoAnalyticsClient:Je,Endpoints:Ke,Version:je,buildBaseUrl:Ye,default:Je}),Ze=r({},Q),et=Object.keys(Ze).map(function(e){return Ze[e]}),tt=function(e){function i(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.products=[],i.impressions=[],i}return t(i,e),i.prototype.getApi=function(t){var n=e.prototype.getApi.call(this,t);if(null!==n)return n;switch(t){case"addProduct":return this.addProduct;case"addImpression":return this.addImpression;default:return null}},i.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},i.prototype.addProduct=function(e){this.products.push(e)},i.prototype.addImpression=function(e){this.impressions.push(e)},i.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},i.prototype.addHooksForECEvents=function(){var e=this;this.client.registerBeforeSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==et.indexOf(t)?e.addECDataToPayload(t,o):o}),this.client.registerAfterSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==et.indexOf(t)&&e.updateLocationInformation(t,o),o})},i.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Ze.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Ze.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addECDataToPayload=function(e,t){var n=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),o=this.getProductPayload(),i=this.getImpressionPayload();return this.clearData(),r(r(r(r({},i),o),n),t)},i.prototype.getProductPayload=function(){var e=this;return this.products.map(function(t){return e.assureProductValidity(t)}).reduce(function(t,n,o){return r(r({},t),function(e,t){return Y(e).reduce(function(n,o){var i,s="pr".concat(t+1).concat(te[o]||o);return r(r({},n),((i={})[s]=e[o],i))},{})}(e.convertNumberTypes(n),o))},{})},i.prototype.convertNumberTypes=function(e){var t=r({},e);return"quantity"in t&&(t.quantity=W(t.quantity)),"position"in t&&(t.position=W(t.position)),t},i.prototype.getImpressionPayload=function(){var e=this;return this.getImpressionsByList().map(function(t){var n=t.impressions,i=o(t,["impressions"]);return r(r({},i),{impressions:n.map(function(t){return e.assureBaseImpressionValidity(t)})})}).reduce(function(e,t,n){return r(r({},e),function(e,t,n){var o=e.impressions.reduce(function(e,o,i){return r(r({},e),ce(o,t,i,n))},{});return e.listName&&(o["il".concat(t+1,"nm")]=e.listName),o}(t,n,"pi"))},{})},i.prototype.assureProductValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for product '".concat(e.name||e.id,"' must be greater ")+"than 0 when provided."),n):e},i.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for impression '".concat(e.name||e.id,"'")+" must be greater than 0 when provided."),n):e},i.prototype.getImpressionsByList=function(){return this.impressions.reduce(function(e,t){var n=t.list,r=o(t,["list"]),i=e.find(function(e){return e.listName===n});return i?i.impressions.push(r):e.push({listName:n,impressions:[r]}),e},[])},i.Id="ec",i}(H),nt=tt,rt=r({},Q),ot=Object.keys(rt).map(function(e){return rt[e]}),it=function(e){function o(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?O:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.ticket={},i}return t(o,e),o.prototype.getApi=function(t){var n=e.prototype.getApi.call(this,t);return null!==n?n:"setTicket"===t?this.setTicket:null},o.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},o.prototype.setTicket=function(e){this.ticket=e},o.prototype.clearPluginData=function(){this.ticket={}},o.prototype.addHooksForSVCEvents=function(){var e=this;this.client.registerBeforeSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==ot.indexOf(t)?e.addSVCDataToPayload(t,o):o}),this.client.registerAfterSendEventHook(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==ot.indexOf(t)&&e.updateLocationInformation(t,o),o})},o.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(rt.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(rt.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addSVCDataToPayload=function(e,t){var n,o=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),r(r(r({},i),o),t)},o.prototype.getTicketPayload=function(){return e=this.ticket,Y(e).filter(function(t){return void 0!==e[t]}).reduce(function(t,n){var o,i=J[n]||n;return r(r({},t),((o={})[i]=e[n],o))},{});var e},o.Id="svc",o}(H),st=it,at=function(){function e(){var e;this.registeredPluginsMap=((e={})[nt.Id]=nt,e[st.Id]=st,e[K.Id]=K,e),this.requiredPlugins={}}return e.prototype.require=function(e,t){var n=this.registeredPluginsMap[e];if(!n)throw new Error('No plugin named "'.concat(e,"\" is currently registered. If you use a custom plugin, use 'provide' first."));this.requiredPlugins[e]=new n(t)},e.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},e.prototype.clearRequired=function(){this.requiredPlugins={}},e.prototype.execute=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.requiredPlugins[e];if(!o)throw new Error('The plugin "'.concat(e,'" is not required. Check that you required it on initialization.'));var i=o.getApi(t);if(!i)throw new Error('The function "'.concat(t,'" does not exist on the plugin "').concat(e,'".'));if("function"!=typeof i)throw new Error('"'.concat(t,'" of the plugin "').concat(e,'" is not a function.'));return i.apply(o,n)},e.DefaultPlugins=[nt.Id,st.Id,K.Id],e}(),ct=function(){function e(){this.plugins=new at,this.params={}}return e.prototype.init=function(e,t){var n=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new Je({token:e,endpoint:this.getEndpoint(t),isCustomEndpoint:this.getIsCustomEndpoint(t)}):this.isAnalyticsClient(e)&&(this.client=e),!this.client)throw new Error("You must pass either your token or a valid object when you call 'init'");var o={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach(function(e){return n.plugins.require(e,o)}),this.client.registerBeforeSendEventHook(function(e,t){return r(r({},t),n.params)})},e.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},e.prototype.getPluginKeys=function(e){return"string"==typeof e?at.DefaultPlugins:Array.isArray(null==e?void 0:e.plugins)?e.plugins:at.DefaultPlugins},e.prototype.getEndpoint=function(e){return"string"==typeof e?e||Ke.default:(null==e?void 0:e.endpoint)?e.endpoint:Ke.default},e.prototype.getIsCustomEndpoint=function(e){return"string"!=typeof e&&(!!(null==e?void 0:e.isCustomEndpoint)&&e.isCustomEndpoint)},e.prototype.initForProxy=function(e,t){if(void 0===t&&(t=!1),!e)throw new Error("You must pass your endpoint when you call 'initForProxy'");if("string"!=typeof e)throw new Error("You must pass a string as the endpoint parameter when you call 'initForProxy'");this.client=new Je({endpoint:e,isCustomEndpoint:t})},e.prototype.set=function(e,t){var n=this;"string"==typeof e?this.params[e]=t:Object.keys(e).map(function(t){n.params[t]=e[t]})},e.prototype.send=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=t.slice(1);if(void 0===this.client)throw new Error("You must call init before sending an event");if(!r)throw new Error('You must provide an event type when calling "send".');return(e=this.client).sendEvent.apply(e,a([r.toLowerCase()],o,!1))},e.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},e.prototype.provide=function(e,t){this.plugins.provide(e,t)},e.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,r(r({},t),{client:this.client}))},e.prototype.callPlugin=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!this.client)throw new Error("You must call init before calling a plugin function");return(n=this.plugins).execute.apply(n,a([e,t],r,!1))},e.prototype.reset=function(){this.client=void 0,this.plugins=new at,this.params={}},e.prototype.version=function(){return q},e}(),ut=new ct,lt=function(){return ut.client},pt=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/.exec(e);r[1];var o=r[2],i=r[3],s=ut[i];if(o&&i)return ut.callPlugin.apply(ut,a([o,i],t,!1));if(s)return s.apply(ut,t);throw new Error('The action "'.concat(e,'" does not exist. Available actions: ').concat(["init","set","send","onLoad","callPlugin","reset","require","provide","version"].join(", "),"."))},ht=Object.freeze({__proto__:null,CoveoUA:ct,coveoua:ut,default:pt,getCurrentClient:lt,handleOneAnalyticsEvent:pt});!function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"}(ze||(ze={})),function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"}($e||($e={}));var dt=((We={})[$e.triggerNotify]="queryPipelineTriggers",We[$e.triggerExecute]="queryPipelineTriggers",We[$e.triggerQuery]="queryPipelineTriggers",We[$e.triggerRedirect]="queryPipelineTriggers",We[$e.queryErrorBack]="errors",We[$e.queryErrorClear]="errors",We[$e.queryErrorRetry]="errors",We[$e.pagerNext]="getMoreResults",We[$e.pagerPrevious]="getMoreResults",We[$e.pagerNumber]="getMoreResults",We[$e.pagerResize]="getMoreResults",We[$e.pagerScrolling]="getMoreResults",We[$e.facetSearch]="facet",We[$e.facetShowLess]="facet",We[$e.facetShowMore]="facet",We[$e.recommendation]="recommendation",We[$e.likeSmartSnippet]="smartSnippet",We[$e.dislikeSmartSnippet]="smartSnippet",We[$e.expandSmartSnippet]="smartSnippet",We[$e.collapseSmartSnippet]="smartSnippet",We[$e.openSmartSnippetFeedbackModal]="smartSnippet",We[$e.closeSmartSnippetFeedbackModal]="smartSnippet",We[$e.sendSmartSnippetReason]="smartSnippet",We[$e.expandSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.showMoreSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.showLessSmartSnippetSuggestion]="smartSnippetSuggestions",We[$e.clearRecentQueries]="recentQueries",We[$e.recentResultClick]="recentlyClickedDocuments",We[$e.clearRecentResults]="recentlyClickedDocuments",We[$e.showLessFoldedResults]="folding",We[$e.caseDetach]="case",We[$e.likeGeneratedAnswer]="generatedAnswer",We[$e.dislikeGeneratedAnswer]="generatedAnswer",We[$e.openGeneratedAnswerSource]="generatedAnswer",We[$e.generatedAnswerStreamEnd]="generatedAnswer",We[$e.generatedAnswerSourceHover]="generatedAnswer",We[$e.generatedAnswerCopyToClipboard]="generatedAnswer",We[$e.generatedAnswerHideAnswers]="generatedAnswer",We[$e.generatedAnswerShowAnswers]="generatedAnswer",We[$e.generatedAnswerExpand]="generatedAnswer",We[$e.generatedAnswerCollapse]="generatedAnswer",We[$e.generatedAnswerFeedbackSubmit]="generatedAnswer",We[$e.generatedAnswerFeedbackSubmitV2]="generatedAnswer",We[ze.expandToFullUI]="interface",We[ze.openUserActions]="User Actions",We[ze.showPrecedingSessions]="User Actions",We[ze.showFollowingSessions]="User Actions",We[ze.clickViewedDocument]="User Actions",We[ze.clickPageView]="User Actions",We[ze.createArticle]="createArticle",We),vt=function(){function e(){this.runtime=new Qe,this.currentVisitorId=""}return e.prototype.getPayload=function(){return Promise.resolve()},e.prototype.getParameters=function(){return Promise.resolve()},e.prototype.makeEvent=function(e){return Promise.resolve({eventType:e,payload:null,log:function(){return Promise.resolve()}})},e.prototype.sendEvent=function(){return Promise.resolve()},e.prototype.makeSearchEvent=function(){return this.makeEvent(n.search)},e.prototype.sendSearchEvent=function(){return Promise.resolve()},e.prototype.makeClickEvent=function(){return this.makeEvent(n.click)},e.prototype.sendClickEvent=function(){return Promise.resolve()},e.prototype.makeCustomEvent=function(){return this.makeEvent(n.custom)},e.prototype.sendCustomEvent=function(){return Promise.resolve()},e.prototype.makeViewEvent=function(){return this.makeEvent(n.view)},e.prototype.sendViewEvent=function(){return Promise.resolve()},e.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},e.prototype.getHealth=function(){return Promise.resolve({status:""})},e.prototype.registerBeforeSendEventHook=function(){},e.prototype.registerAfterSendEventHook=function(){},e.prototype.addEventTypeMapping=function(){},Object.defineProperty(e.prototype,"version",{get:function(){return q},enumerable:!1,configurable:!0}),e}();function gt(e){var t=e.join(";");return t.length<=256?t:gt(e.slice(1))}var ft=function(e){var t=function(e){return e.map(function(e){return e.replace(/;/g,"")})}(e),n=function(e){var t="";return e.filter(function(e){var n=e!==t;return t=e,n})}(t);return gt(n)};function mt(e){var t="string"==typeof e.partialQueries?e.partialQueries:ft(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:ft(e.suggestions);return r(r({},e),{partialQueries:t,suggestions:n})}var yt,St,kt,wt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||He();this.coveoAnalyticsClient=n?new vt:new Je(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.opts)},e.prototype.makeInterfaceLoad=function(){return this.makeSearchEvent($e.interfaceLoad)},e.prototype.logInterfaceLoad=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeInterfaceLoad()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendationInterfaceLoad=function(){return this.makeSearchEvent($e.recommendationInterfaceLoad)},e.prototype.logRecommendationInterfaceLoad=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecommendationInterfaceLoad()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendation=function(){return this.makeCustomEvent($e.recommendation)},e.prototype.logRecommendation=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecommendation()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecommendationOpen=function(e,t){return this.makeClickEvent($e.recommendationOpen,e,t)},e.prototype.logRecommendationOpen=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeRecommendationOpen(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterClearAll=function(e){return this.makeSearchEvent($e.staticFilterClearAll,e)},e.prototype.logStaticFilterClearAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterClearAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterSelect=function(e){return this.makeSearchEvent($e.staticFilterSelect,e)},e.prototype.logStaticFilterSelect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterSelect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeStaticFilterDeselect=function(e){return this.makeSearchEvent($e.staticFilterDeselect,e)},e.prototype.logStaticFilterDeselect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeStaticFilterDeselect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFetchMoreResults=function(){return this.makeCustomEvent($e.pagerScrolling,{type:"getMoreResults"})},e.prototype.logFetchMoreResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeFetchMoreResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeInterfaceChange=function(e){return this.makeSearchEvent($e.interfaceChange,e)},e.prototype.logInterfaceChange=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeInterfaceChange(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDidYouMeanAutomatic=function(){return this.makeSearchEvent($e.didyoumeanAutomatic)},e.prototype.logDidYouMeanAutomatic=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDidYouMeanAutomatic()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDidYouMeanClick=function(){return this.makeSearchEvent($e.didyoumeanClick)},e.prototype.logDidYouMeanClick=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDidYouMeanClick()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeResultsSort=function(e){return this.makeSearchEvent($e.resultsSort,e)},e.prototype.logResultsSort=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeResultsSort(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxSubmit=function(){return this.makeSearchEvent($e.searchboxSubmit)},e.prototype.logSearchboxSubmit=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxSubmit()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxClear=function(){return this.makeSearchEvent($e.searchboxClear)},e.prototype.logSearchboxClear=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxClear()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchboxAsYouType=function(){return this.makeSearchEvent($e.searchboxAsYouType)},e.prototype.logSearchboxAsYouType=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchboxAsYouType()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeBreadcrumbFacet=function(e){return this.makeSearchEvent($e.breadcrumbFacet,e)},e.prototype.logBreadcrumbFacet=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeBreadcrumbFacet(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeBreadcrumbResetAll=function(){return this.makeSearchEvent($e.breadcrumbResetAll)},e.prototype.logBreadcrumbResetAll=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeBreadcrumbResetAll()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDocumentQuickview=function(e,t){return this.makeClickEvent($e.documentQuickview,e,t)},e.prototype.logDocumentQuickview=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeDocumentQuickview(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDocumentOpen=function(e,t){return this.makeClickEvent($e.documentOpen,e,t)},e.prototype.logDocumentOpen=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeDocumentOpen(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOmniboxAnalytics=function(e){return this.makeSearchEvent($e.omniboxAnalytics,mt(e))},e.prototype.logOmniboxAnalytics=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOmniboxAnalytics(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOmniboxFromLink=function(e){return this.makeSearchEvent($e.omniboxFromLink,mt(e))},e.prototype.logOmniboxFromLink=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOmniboxFromLink(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchFromLink=function(){return this.makeSearchEvent($e.searchFromLink)},e.prototype.logSearchFromLink=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeSearchFromLink()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerNotify=function(e){return this.makeCustomEvent($e.triggerNotify,e)},e.prototype.logTriggerNotify=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerNotify(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerExecute=function(e){return this.makeCustomEvent($e.triggerExecute,e)},e.prototype.logTriggerExecute=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerExecute(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerQuery=function(){return this.makeCustomEvent($e.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")},e.prototype.logTriggerQuery=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeTriggerQuery()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeUndoTriggerQuery=function(e){return this.makeSearchEvent($e.undoTriggerQuery,e)},e.prototype.logUndoTriggerQuery=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeUndoTriggerQuery(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeTriggerRedirect=function(e){return this.makeCustomEvent($e.triggerRedirect,r(r({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))},e.prototype.logTriggerRedirect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeTriggerRedirect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerResize=function(e){return this.makeCustomEvent($e.pagerResize,e)},e.prototype.logPagerResize=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerResize(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerNumber=function(e){return this.makeCustomEvent($e.pagerNumber,e)},e.prototype.logPagerNumber=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerNumber(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerNext=function(e){return this.makeCustomEvent($e.pagerNext,e)},e.prototype.logPagerNext=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerNext(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerPrevious=function(e){return this.makeCustomEvent($e.pagerPrevious,e)},e.prototype.logPagerPrevious=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makePagerPrevious(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makePagerScrolling=function(){return this.makeCustomEvent($e.pagerScrolling)},e.prototype.logPagerScrolling=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makePagerScrolling()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetClearAll=function(e){return this.makeSearchEvent($e.facetClearAll,e)},e.prototype.logFacetClearAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetClearAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSearch=function(e){return this.makeSearchEvent($e.facetSearch,e)},e.prototype.logFacetSearch=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSearch(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSelect=function(e){return this.makeSearchEvent($e.facetSelect,e)},e.prototype.logFacetSelect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSelect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetDeselect=function(e){return this.makeSearchEvent($e.facetDeselect,e)},e.prototype.logFacetDeselect=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetDeselect(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetExclude=function(e){return this.makeSearchEvent($e.facetExclude,e)},e.prototype.logFacetExclude=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetExclude(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetUnexclude=function(e){return this.makeSearchEvent($e.facetUnexclude,e)},e.prototype.logFacetUnexclude=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetUnexclude(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetSelectAll=function(e){return this.makeSearchEvent($e.facetSelectAll,e)},e.prototype.logFacetSelectAll=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetSelectAll(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetUpdateSort=function(e){return this.makeSearchEvent($e.facetUpdateSort,e)},e.prototype.logFacetUpdateSort=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetUpdateSort(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetShowMore=function(e){return this.makeCustomEvent($e.facetShowMore,e)},e.prototype.logFacetShowMore=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetShowMore(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeFacetShowLess=function(e){return this.makeCustomEvent($e.facetShowLess,e)},e.prototype.logFacetShowLess=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeFacetShowLess(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryError=function(e){return this.makeCustomEvent($e.queryError,e)},e.prototype.logQueryError=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeQueryError(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorBack=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorBack)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorBack)]}})})}}]}})})},e.prototype.logQueryErrorBack=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorBack()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorRetry=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorRetry)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorRetry)]}})})}}]}})})},e.prototype.logQueryErrorRetry=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorRetry()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeQueryErrorClear=function(){return i(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:return[4,this.makeCustomEvent($e.queryErrorClear)];case 1:return[2,{description:(e=n.sent()).description,log:function(){return i(t,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,e.log({searchUID:this.provider.getSearchUID()})];case 1:return t.sent(),[2,this.logSearchEvent($e.queryErrorClear)]}})})}}]}})})},e.prototype.logQueryErrorClear=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeQueryErrorClear()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeLikeSmartSnippet=function(){return this.makeCustomEvent($e.likeSmartSnippet)},e.prototype.logLikeSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeLikeSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDislikeSmartSnippet=function(){return this.makeCustomEvent($e.dislikeSmartSnippet)},e.prototype.logDislikeSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeDislikeSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeExpandSmartSnippet=function(){return this.makeCustomEvent($e.expandSmartSnippet)},e.prototype.logExpandSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeExpandSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCollapseSmartSnippet=function(){return this.makeCustomEvent($e.collapseSmartSnippet)},e.prototype.logCollapseSmartSnippet=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeCollapseSmartSnippet()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetFeedbackModal=function(){return this.makeCustomEvent($e.openSmartSnippetFeedbackModal)},e.prototype.logOpenSmartSnippetFeedbackModal=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeOpenSmartSnippetFeedbackModal()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCloseSmartSnippetFeedbackModal=function(){return this.makeCustomEvent($e.closeSmartSnippetFeedbackModal)},e.prototype.logCloseSmartSnippetFeedbackModal=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeCloseSmartSnippetFeedbackModal()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSmartSnippetFeedbackReason=function(e,t){return this.makeCustomEvent($e.sendSmartSnippetReason,{reason:e,details:t})},e.prototype.logSmartSnippetFeedbackReason=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeSmartSnippetFeedbackReason(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeExpandSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logExpandSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeExpandSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCollapseSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logCollapseSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeCollapseSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowMoreSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.showMoreSmartSnippetSuggestion,e)},e.prototype.logShowMoreSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeShowMoreSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowLessSmartSnippetSuggestion=function(e){return this.makeCustomEvent($e.showLessSmartSnippetSuggestion,e)},e.prototype.logShowLessSmartSnippetSuggestion=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeShowLessSmartSnippetSuggestion(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSource=function(e,t){return this.makeClickEvent($e.openSmartSnippetSource,e,t)},e.prototype.logOpenSmartSnippetSource=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSource(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSuggestionSource=function(e,t){return this.makeClickEvent($e.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.makeCopyToClipboard=function(e,t){return this.makeClickEvent($e.copyToClipboard,e,t)},e.prototype.logCopyToClipboard=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeCopyToClipboard(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSuggestionSource(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetInlineLink=function(e,t){return this.makeClickEvent($e.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetInlineLink(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeClickEvent($e.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeOpenSmartSnippetSuggestionInlineLink(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecentQueryClick=function(){return this.makeSearchEvent($e.recentQueryClick)},e.prototype.logRecentQueryClick=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRecentQueryClick()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeClearRecentQueries=function(){return this.makeCustomEvent($e.clearRecentQueries)},e.prototype.logClearRecentQueries=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeClearRecentQueries()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRecentResultClick=function(e,t){return this.makeCustomEvent($e.recentResultClick,{info:e,identifier:t})},e.prototype.logRecentResultClick=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeRecentResultClick(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeClearRecentResults=function(){return this.makeCustomEvent($e.clearRecentResults)},e.prototype.logClearRecentResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeClearRecentResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeNoResultsBack=function(){return this.makeSearchEvent($e.noResultsBack)},e.prototype.logNoResultsBack=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeNoResultsBack()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowMoreFoldedResults=function(e,t){return this.makeClickEvent($e.showMoreFoldedResults,e,t)},e.prototype.logShowMoreFoldedResults=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeShowMoreFoldedResults(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeShowLessFoldedResults=function(){return this.makeCustomEvent($e.showLessFoldedResults)},e.prototype.logShowLessFoldedResults=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeShowLessFoldedResults()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeEventDescription=function(e,t){var n;return{actionCause:t,customData:null===(n=e.payload)||void 0===n?void 0:n.customData}},e.prototype.makeCustomEvent=function(e,t){return i(this,arguments,void 0,function(e,t,n){var o,i,a,c;return void 0===n&&(n=dt[e]),s(this,function(s){switch(s.label){case 0:return this.coveoAnalyticsClient.getParameters,o=r(r({},this.provider.getBaseMetadata()),t),a=[{}],[4,this.getBaseEventRequest(o)];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{eventType:n,eventValue:e}]),[4,this.coveoAnalyticsClient.makeCustomEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({lastSearchQueryUid:t})}}]}})})},e.prototype.logCustomEvent=function(e,t){return i(this,arguments,void 0,function(e,t,n){return void 0===n&&(n=dt[e]),s(this,function(r){switch(r.label){case 0:return[4,this.makeCustomEvent(e,t,n)];case 1:return[2,r.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeCustomEventWithType=function(e,t,n){return i(this,void 0,void 0,function(){var o,i,a,c;return s(this,function(s){switch(s.label){case 0:return o=r(r({},this.provider.getBaseMetadata()),n),a=[{}],[4,this.getBaseEventRequest(o)];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{eventType:t,eventValue:e}]),[4,this.coveoAnalyticsClient.makeCustomEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({lastSearchQueryUid:t})}}]}})})},e.prototype.logCustomEventWithType=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.makeCustomEventWithType(e,t,n)];case 1:return[2,r.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeSearchEvent(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeSearchEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){switch(o.label){case 0:return[4,this.getBaseSearchEventRequest(e,t)];case 1:return n=o.sent(),[4,this.coveoAnalyticsClient.makeSearchEvent(n)];case 2:return r=o.sent(),[2,{description:this.makeEventDescription(r,e),log:function(e){var t=e.searchUID;return r.log({searchQueryUid:t})}}]}})})},e.prototype.makeClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a,c;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{queryPipeline:this.provider.getPipeline(),actionCause:e}]),[4,this.coveoAnalyticsClient.makeClickEvent(i)];case 2:return c=s.sent(),[2,{description:this.makeEventDescription(c,e),log:function(e){var t=e.searchUID;return c.log({searchQueryUid:t})}}]}})})},e.prototype.logClickEvent=function(e,t,n,r){return i(this,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return[4,this.makeClickEvent(e,t,n,r)];case 1:return[2,o.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=[{}],[4,this.getBaseEventRequest(r(r({},t),null===(i=(o=this.provider).getGeneratedAnswerMetadata)||void 0===i?void 0:i.call(o)))];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([s.sent()])),this.provider.getSearchEventRequestPayload()]),{queryPipeline:this.provider.getPipeline(),actionCause:e}])]}})})},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r(r({},this.getOrigins()),this.getSplitTestRun())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}})})},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getSplitTestRun=function(){var e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return r(r({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})},e.prototype.makeLikeGeneratedAnswer=function(e){return this.makeCustomEvent($e.likeGeneratedAnswer,e)},e.prototype.logLikeGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeLikeGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeDislikeGeneratedAnswer=function(e){return this.makeCustomEvent($e.dislikeGeneratedAnswer,e)},e.prototype.logDislikeGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeDislikeGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeOpenGeneratedAnswerSource=function(e){return this.makeCustomEvent($e.openGeneratedAnswerSource,e)},e.prototype.logOpenGeneratedAnswerSource=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeOpenGeneratedAnswerSource(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCitationClick=function(e,t){return this.makeClickEvent($e.generatedAnswerCitationClick,r(r({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logGeneratedAnswerCitationClick=function(e,t){return i(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.makeGeneratedAnswerCitationClick(e,t)];case 1:return[2,n.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerSourceHover=function(e){return this.makeCustomEvent($e.generatedAnswerSourceHover,e)},e.prototype.logGeneratedAnswerSourceHover=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerSourceHover(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCopyToClipboard=function(e){return this.makeCustomEvent($e.generatedAnswerCopyToClipboard,e)},e.prototype.logGeneratedAnswerCopyToClipboard=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerCopyToClipboard(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerHideAnswers=function(e){return this.makeCustomEvent($e.generatedAnswerHideAnswers,e)},e.prototype.logGeneratedAnswerHideAnswers=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerHideAnswers(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerShowAnswers=function(e){return this.makeCustomEvent($e.generatedAnswerShowAnswers,e)},e.prototype.logGeneratedAnswerShowAnswers=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerShowAnswers(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerExpand=function(e){return this.makeCustomEvent($e.generatedAnswerExpand,e)},e.prototype.logGeneratedAnswerExpand=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerExpand(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerCollapse=function(e){return this.makeCustomEvent($e.generatedAnswerCollapse,e)},e.prototype.logGeneratedAnswerCollapse=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerCollapse(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerFeedbackSubmit=function(e){return this.makeCustomEvent($e.generatedAnswerFeedbackSubmit,e)},e.prototype.logGeneratedAnswerFeedbackSubmit=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerFeedbackSubmit(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerFeedbackSubmitV2=function(e){return this.makeCustomEvent($e.generatedAnswerFeedbackSubmitV2,e)},e.prototype.logGeneratedAnswerFeedbackSubmitV2=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerFeedbackSubmitV2(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRephraseGeneratedAnswer=function(e){return this.makeSearchEvent($e.rephraseGeneratedAnswer,e)},e.prototype.logRephraseGeneratedAnswer=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeRephraseGeneratedAnswer(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeRetryGeneratedAnswer=function(){return this.makeSearchEvent($e.retryGeneratedAnswer)},e.prototype.logRetryGeneratedAnswer=function(){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.makeRetryGeneratedAnswer()];case 1:return[2,e.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e.prototype.makeGeneratedAnswerStreamEnd=function(e){return this.makeCustomEvent($e.generatedAnswerStreamEnd,e)},e.prototype.logGeneratedAnswerStreamEnd=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.makeGeneratedAnswerStreamEnd(e)];case 1:return[2,t.sent().log({searchUID:this.provider.getSearchUID()})]}})})},e}();!function(e){e.click="click",e.flowStart="flowStart"}(yt||(yt={})),function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"}(St||(St={})),function(e){e.quit="Quit",e.solved="Solved"}(kt||(kt={}));var It=function(){function e(e,t){var n;this.options=e,this.provider=t;var r=(null===(n=e.enableAnalytics)||void 0===n||n)&&!He();this.coveoAnalyticsClient=r?new Je(e):new vt,this.svc=new it({client:this.coveoAnalyticsClient})}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt,this.svc=new it({client:this.coveoAnalyticsClient})},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.options),this.svc=new it({client:this.coveoAnalyticsClient})},e.prototype.logEnterInterface=function(e){return this.svc.setAction(St.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()},e.prototype.logUpdateCaseField=function(e){return this.svc.setAction(St.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectFieldSuggestion=function(e){return this.svc.setAction(St.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectDocumentSuggestion=function(e){return this.logClickEvent(St.documentSuggestionClick,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})},e.prototype.logQuickviewDocumentSuggestion=function(e){return this.logClickEvent(St.documentSuggestionQuickview,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})},e.prototype.logRateDocumentSuggestion=function(e){return this.svc.setAction(St.suggestionRate,r({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logMoveToNextCaseStep=function(e){return this.svc.setAction(St.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCancelled=function(e){return this.svc.setAction(St.caseCancelled,{reason:kt.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseSolved=function(e){return this.svc.setAction(St.caseSolved,{reason:kt.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCreated=function(e){return this.svc.setAction(St.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.sendFlowStartEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",yt.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.sendClickEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",yt.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o,i,a;return s(this,function(s){switch(s.label){case 0:return t=r({},e),n=[r({},this.getOrigins())],o={customData:t,language:null===(i=this.provider)||void 0===i?void 0:i.getLanguage(),anonymous:null===(a=this.provider)||void 0===a?void 0:a.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=s.sent(),o)]))]}})})},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getOrigins=function(){var e,t,n,r,o;return{originContext:null===(t=null===(e=this.provider)||void 0===e?void 0:e.getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:null===(n=this.provider)||void 0===n?void 0:n.getOriginLevel1(),originLevel2:null===(r=this.provider)||void 0===r?void 0:r.getOriginLevel2(),originLevel3:null===(o=this.provider)||void 0===o?void 0:o.getOriginLevel3()}},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a,c,u;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:null!==(u=null===(c=this.provider)||void 0===c?void 0:c.getSearchUID())&&void 0!==u?u:"",actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}})})},e}(),Et=function(e,t){void 0===t&&(t=!0),e.caseContext;var n=e.caseId,i=e.caseNumber,s=o(e,["caseContext","caseId","caseNumber"]),a=function(e){var t={};return e.caseContext&&Object.keys(e.caseContext).forEach(function(n){var r,o=null===(r=e.caseContext)||void 0===r?void 0:r[n];if(o){var i="context_".concat(n);t[i]=o}}),t}(e);return r(r(r({CaseId:n,CaseNumber:i},s),!!a.context_Case_Subject&&{CaseSubject:a.context_Case_Subject}),t&&a)},bt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||He();this.coveoAnalyticsClient=n?new vt:new Je(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient=new vt},e.prototype.enable=function(){this.coveoAnalyticsClient=new Je(this.opts)},e.prototype.logInterfaceLoad=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.interfaceLoad,t)}return this.logSearchEvent($e.interfaceLoad)},e.prototype.logRecentQueryClick=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.recentQueryClick,t)}return this.logSearchEvent($e.recentQueryClick)},e.prototype.logClearRecentQueries=function(e){if(e){var t=Et(e);return this.logCustomEvent($e.clearRecentQueries,t)}return this.logCustomEvent($e.clearRecentQueries)},e.prototype.logInterfaceChange=function(e){var t=Et(e);return this.logSearchEvent($e.interfaceChange,t)},e.prototype.logStaticFilterDeselect=function(e){var t=Et(e);return this.logSearchEvent($e.staticFilterDeselect,t)},e.prototype.logFetchMoreResults=function(e){if(e){var t=Et(e);return this.logCustomEvent($e.pagerScrolling,r(r({},t),{type:"getMoreResults"}))}return this.logCustomEvent($e.pagerScrolling,{type:"getMoreResults"})},e.prototype.logBreadcrumbFacet=function(e){var t=Et(e);return this.logSearchEvent($e.breadcrumbFacet,t)},e.prototype.logBreadcrumbResetAll=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.breadcrumbResetAll,t)}return this.logSearchEvent($e.breadcrumbResetAll)},e.prototype.logFacetSelect=function(e){var t=Et(e);return this.logSearchEvent($e.facetSelect,t)},e.prototype.logFacetExclude=function(e){var t=Et(e);return this.logSearchEvent($e.facetExclude,t)},e.prototype.logFacetDeselect=function(e){var t=Et(e);return this.logSearchEvent($e.facetDeselect,t)},e.prototype.logFacetUpdateSort=function(e){var t=Et(e);return this.logSearchEvent($e.facetUpdateSort,t)},e.prototype.logFacetClearAll=function(e){var t=Et(e);return this.logSearchEvent($e.facetClearAll,t)},e.prototype.logFacetShowMore=function(e){var t=Et(e,!1);return this.logCustomEvent($e.facetShowMore,t)},e.prototype.logFacetShowLess=function(e){var t=Et(e,!1);return this.logCustomEvent($e.facetShowLess,t)},e.prototype.logQueryError=function(e){var t=Et(e,!1);return this.logCustomEvent($e.queryError,t)},e.prototype.logPagerNumber=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerNumber,t)},e.prototype.logPagerNext=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerNext,t)},e.prototype.logPagerPrevious=function(e){var t=Et(e,!1);return this.logCustomEvent($e.pagerPrevious,t)},e.prototype.logDidYouMeanAutomatic=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.didyoumeanAutomatic,t)}return this.logSearchEvent($e.didyoumeanAutomatic)},e.prototype.logDidYouMeanClick=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.didyoumeanClick,t)}return this.logSearchEvent($e.didyoumeanClick)},e.prototype.logResultsSort=function(e){var t=Et(e);return this.logSearchEvent($e.resultsSort,t)},e.prototype.logSearchboxSubmit=function(e){if(e){var t=Et(e);return this.logSearchEvent($e.searchboxSubmit,t)}return this.logSearchEvent($e.searchboxSubmit)},e.prototype.logContextChanged=function(e){var t=Et(e);return this.logSearchEvent(ze.contextChanged,t)},e.prototype.logExpandToFullUI=function(e){var t=Et(e);return this.logCustomEvent(ze.expandToFullUI,t)},e.prototype.logOpenUserActions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.openUserActions,t)},e.prototype.logShowPrecedingSessions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.showPrecedingSessions,t)},e.prototype.logShowFollowingSessions=function(e){var t=Et(e,!1);return this.logCustomEvent(ze.showFollowingSessions,t)},e.prototype.logViewedDocumentClick=function(e,t){return this.logCustomEvent(ze.clickViewedDocument,r(r({},Et(t,!1)),{document:e}))},e.prototype.logPageViewClick=function(e,t){return this.logCustomEvent(ze.clickPageView,r(r({},Et(t,!1)),{pageView:e}))},e.prototype.logCreateArticle=function(e,t){return this.logCustomEvent(ze.createArticle,t?r(r({},Et(t,!1)),e):e)},e.prototype.logDocumentOpen=function(e,t,n){return this.logClickEvent($e.documentOpen,e,t,n?Et(n,!1):void 0)},e.prototype.logCopyToClipboard=function(e,t,n){return this.logClickEvent($e.copyToClipboard,e,t,n?Et(n,!1):void 0)},e.prototype.logCaseSendEmail=function(e,t,n){return this.logClickEvent($e.caseSendEmail,e,t,n?Et(n,!1):void 0)},e.prototype.logFeedItemTextPost=function(e,t,n){return this.logClickEvent($e.feedItemTextPost,e,t,n?Et(n,!1):void 0)},e.prototype.logDocumentQuickview=function(e,t,n){var o={documentTitle:e.documentTitle,documentURL:e.documentUrl};return this.logClickEvent($e.documentQuickview,e,t,n?r(r({},Et(n,!1)),o):o)},e.prototype.logCaseAttach=function(e,t,n){var o={documentTitle:e.documentTitle,documentURL:e.documentUrl,resultUriHash:e.documentUriHash};return this.logClickEvent($e.caseAttach,e,t,n?r(r({},Et(n,!1)),o):o)},e.prototype.logCaseDetach=function(e,t){return this.logCustomEvent($e.caseDetach,t?r(r({},Et(t,!1)),{resultUriHash:e}):{resultUriHash:e})},e.prototype.logLikeSmartSnippet=function(e){return this.logCustomEvent($e.likeSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logDislikeSmartSnippet=function(e){return this.logCustomEvent($e.dislikeSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logExpandSmartSnippet=function(e){return this.logCustomEvent($e.expandSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logCollapseSmartSnippet=function(e){return this.logCustomEvent($e.collapseSmartSnippet,e?Et(e,!1):void 0)},e.prototype.logOpenSmartSnippetFeedbackModal=function(e){return this.logCustomEvent($e.openSmartSnippetFeedbackModal,e?Et(e,!1):void 0)},e.prototype.logCloseSmartSnippetFeedbackModal=function(e){return this.logCustomEvent($e.closeSmartSnippetFeedbackModal,e?Et(e,!1):void 0)},e.prototype.logSmartSnippetFeedbackReason=function(e,t,n){return this.logCustomEvent($e.sendSmartSnippetReason,n?r(r({},Et(n,!1)),{reason:e,details:t}):{reason:e,details:t})},e.prototype.logExpandSmartSnippetSuggestion=function(e,t){var n="documentId"in e?e:{documentId:e};return this.logCustomEvent($e.expandSmartSnippetSuggestion,t?r(r({},Et(t,!1)),n):n)},e.prototype.logCollapseSmartSnippetSuggestion=function(e,t){var n="documentId"in e?e:{documentId:e};return this.logCustomEvent($e.collapseSmartSnippetSuggestion,t?r(r({},Et(t,!1)),n):n)},e.prototype.logOpenSmartSnippetSource=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSource,e,t,n?Et(n,!1):void 0)},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t,n){return this.logClickEvent($e.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t,n){return this.logClickEvent($e.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logLikeGeneratedAnswer=function(e,t){return this.logCustomEvent($e.likeGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logDislikeGeneratedAnswer=function(e,t){return this.logCustomEvent($e.dislikeGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logOpenGeneratedAnswerSource=function(e,t){return this.logCustomEvent($e.openGeneratedAnswerSource,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCitationClick=function(e,t,n){return this.logClickEvent($e.generatedAnswerCitationClick,r(r({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},n?r(r({},Et(n,!1)),t):t)},e.prototype.logGeneratedAnswerSourceHover=function(e,t){return this.logCustomEvent($e.generatedAnswerSourceHover,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCopyToClipboard=function(e,t){return this.logCustomEvent($e.generatedAnswerCopyToClipboard,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerHideAnswers=function(e,t){return this.logCustomEvent($e.generatedAnswerHideAnswers,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerShowAnswers=function(e,t){return this.logCustomEvent($e.generatedAnswerShowAnswers,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerExpand=function(e,t){return this.logCustomEvent($e.generatedAnswerExpand,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerCollapse=function(e,t){return this.logCustomEvent($e.generatedAnswerCollapse,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerFeedbackSubmit=function(e,t){return this.logCustomEvent($e.generatedAnswerFeedbackSubmit,t?r(r({},Et(t,!1)),e):e)},e.prototype.logGeneratedAnswerFeedbackSubmitV2=function(e,t){return this.logCustomEvent($e.generatedAnswerFeedbackSubmitV2,t?r(r({},Et(t,!1)),e):e)},e.prototype.logRephraseGeneratedAnswer=function(e,t){return this.logSearchEvent($e.rephraseGeneratedAnswer,t?r(r({},Et(t,!1)),e):e)},e.prototype.logRetryGeneratedAnswer=function(e){return this.logSearchEvent($e.retryGeneratedAnswer,e?r({},Et(e,!1)):{})},e.prototype.logGeneratedAnswerStreamEnd=function(e,t){return this.logCustomEvent($e.generatedAnswerStreamEnd,t?r(r({},Et(t,!1)),e):e)},e.prototype.logCustomEvent=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=r(r({},this.provider.getBaseMetadata()),t),i=[{}],[4,this.getBaseCustomEventRequest(n)];case 1:return o=r.apply(void 0,[r.apply(void 0,i.concat([s.sent()])),{eventType:dt[e],eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(o)]}})})},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}})})},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,a;return s(this,function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}})})},e.prototype.logShowMoreFoldedResults=function(e,t,n){return i(this,void 0,void 0,function(){return s(this,function(r){return[2,this.logClickEvent($e.showMoreFoldedResults,e,t,n?Et(n,!1):void 0)]})})},e.prototype.logShowLessFoldedResults=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.logCustomEvent($e.showLessFoldedResults,e?Et(e,!1):void 0)]})})},e.prototype.logTriggerNotify=function(e,t){return this.logCustomEvent($e.triggerNotify,t?r(r({},Et(t,!1)),e):e)},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}})})},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){switch(s.label){case 0:return n=[{}],[4,this.getBaseEventRequest(r(r({},t),null===(i=(o=this.provider).getGeneratedAnswerMetadata)||void 0===i?void 0:i.call(o)))];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([s.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}})})},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,function(){var t,n,o;return s(this,function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r({},this.getOrigins())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}})})},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof Je?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e}(),Ct=Object.freeze({__proto__:null,get CaseAssistActions(){return St},CaseAssistClient:It,get CaseAssistEvents(){return yt},get CaseCancelledReasons(){return kt},CoveoAnalyticsClient:Je,CoveoInsightClient:bt,CoveoSearchPageClient:wt,CoveoUA:ct,CustomEventsTypes:dt,get EventType(){return n},get InsightEvents(){return ze},get SearchPageEvents(){return $e},SimpleAnalytics:ht,analytics:Xe,donottrack:Be,getCurrentClient:lt,handleOneAnalyticsEvent:pt,history:b,storage:w});window.Promise instanceof Function||global||console.error('This script uses window.Promise which is not supported in your browser. Consider adding a polyfill like "es6-promise".'),window.fetch instanceof Function||global||console.error('This script uses window.fetch which is not supported in your browser. Consider adding a polyfill like "fetch".');var At=self.coveoua||pt;if(self.coveoua=pt,self.coveoanalytics=Ct,At.q){var Dt=At.q.filter(function(e){return"init"===e[0]}),Ut=At.q.filter(function(e){return"init"!==e[0]});a(a([],Dt,!0),Ut,!0).forEach(function(e){return pt.apply(void 0,e)})}return self.coveoua}();
|
|
2
2
|
//# sourceMappingURL=coveoua.browser.js.map
|
package/dist/coveoua.debug.js
CHANGED
|
@@ -733,7 +733,7 @@
|
|
|
733
733
|
const v5 = v35('v5', 0x50, sha1);
|
|
734
734
|
var uuidv5 = v5;
|
|
735
735
|
|
|
736
|
-
var libVersion = "2.30.
|
|
736
|
+
var libVersion = "2.30.49";
|
|
737
737
|
|
|
738
738
|
var getFormattedLocation = function (location) {
|
|
739
739
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|