@coveo/headless 3.24.2-pre.dc880bbfb8 → 3.24.2-pre.e4ba2aa040
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/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
package/dist/browser/headless.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadless",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadless"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
|
|
18
18
|
"use strict";var sP=Object.create;var Vs=Object.defineProperty;var cP=Object.getOwnPropertyDescriptor;var uP=Object.getOwnPropertyNames;var lP=Object.getPrototypeOf,dP=Object.prototype.hasOwnProperty;var pP=(e,t,r)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),OS=(e,t)=>{for(var r in t)Vs(e,r,{get:t[r],enumerable:!0})},kS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of uP(t))!dP.call(e,o)&&o!==r&&Vs(e,o,{get:()=>t[o],enumerable:!(n=cP(t,o))||n.enumerable});return e};var or=(e,t,r)=>(r=e!=null?sP(lP(e)):{},kS(t||!e||!e.__esModule?Vs(r,"default",{value:e,enumerable:!0}):r,e)),mP=e=>kS(Vs({},"__esModule",{value:!0}),e);var Re=(e,t,r)=>pP(e,typeof t!="symbol"?t+"":t,r);var GS=Be(Qs=>{"use strict";var fu=Qs&&Qs.__assign||function(){return fu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},fu.apply(this,arguments)};Object.defineProperty(Qs,"__esModule",{value:!0});var bP={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function vP(e){var t=fu(fu({},bP),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Qs.getSanitizedOptions=vP});var WS=Be(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});function PP(e){var t=Math.random()*e;return Math.round(t)}Em.fullJitter=PP});var HS=Be(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});function wP(e){return e}Tm.noJitter=wP});var zS=Be(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var IP=WS(),EP=HS();function TP(e){switch(e.jitter){case"full":return IP.fullJitter;case"none":default:return EP.noJitter}}Om.JitterFactory=TP});var qm=Be(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var OP=zS(),kP=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=OP.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();km.Delay=kP});var KS=Be(Hr=>{"use strict";var qP=Hr&&Hr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),DP=Hr&&Hr.__awaiter||function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(m){i(m)}}function c(l){try{u(n.throw(l))}catch(m){i(m)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})},VP=Hr&&Hr.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Hr,"__esModule",{value:!0});var NP=qm(),MP=function(e){qP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return DP(this,void 0,void 0,function(){return VP(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(NP.Delay);Hr.SkipFirstDelay=MP});var YS=Be(Ls=>{"use strict";var QP=Ls&&Ls.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ls,"__esModule",{value:!0});var LP=qm(),BP=function(e){QP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(LP.Delay);Ls.AlwaysDelay=BP});var JS=Be(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var UP=KS(),_P=YS();function jP(e,t){var r=$P(e);return r.setAttemptNumber(t),r}Dm.DelayFactory=jP;function $P(e){return e.delayFirstAttempt?new _P.AlwaysDelay(e):new UP.SkipFirstDelay(e)}});var XS=Be(Co=>{"use strict";var Vm=Co&&Co.__awaiter||function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(m){i(m)}}function c(l){try{u(n.throw(l))}catch(m){i(m)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})},Nm=Co&&Co.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Co,"__esModule",{value:!0});var GP=GS(),WP=JS();function HP(e,t){return t===void 0&&(t={}),Vm(this,void 0,void 0,function(){var r,n;return Nm(this,function(o){switch(o.label){case 0:return r=GP.getSanitizedOptions(t),n=new zP(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Co.backOff=HP;var zP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Vm(this,void 0,void 0,function(){var t,r;return Nm(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Vm(this,void 0,void 0,function(){var t;return Nm(this,function(r){switch(r.label){case 0:return t=WP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var cl=Be((Mf,Qf)=>{"use strict";(function(e,t){typeof Mf=="object"&&typeof Qf<"u"?Qf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Mf,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",i="hour",s="day",c="week",u="month",l="quarter",m="year",p="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],O=D%100;return"["+D+(k[(O-20)%10]||k[O]||k[0])+"]"}},g=function(D,k,O){var Q=String(D);return!Q||Q.length>=k?D:""+Array(k+1-Q.length).join(O)+D},C={s:g,z:function(D){var k=-D.utcOffset(),O=Math.abs(k),Q=Math.floor(O/60),q=O%60;return(k<=0?"+":"-")+g(Q,2,"0")+":"+g(q,2,"0")},m:function D(k,O){if(k.date()<O.date())return-D(O,k);var Q=12*(O.year()-k.year())+(O.month()-k.month()),q=k.clone().add(Q,u),U=O-q<0,_=k.clone().add(Q+(U?-1:1),u);return+(-(Q+(O-q)/(U?q-_:_-q))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:u,y:m,w:c,d:s,D:p,h:i,m:a,s:o,ms:n,Q:l}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},h="en",F={};F[h]=S;var I="$isDayjsObject",v=function(D){return D instanceof T||!(!D||!D[I])},R=function D(k,O,Q){var q;if(!k)return h;if(typeof k=="string"){var U=k.toLowerCase();F[U]&&(q=U),O&&(F[U]=O,q=U);var _=k.split("-");if(!q&&_.length>1)return D(_[0])}else{var H=k.name;F[H]=k,q=H}return!Q&&q&&(h=q),q||!Q&&h},b=function(D,k){if(v(D))return D.clone();var O=typeof k=="object"?k:{};return O.date=D,O.args=arguments,new T(O)},P=C;P.l=R,P.i=v,P.w=function(D,k){return b(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var T=function(){function D(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[I]=!0}var k=D.prototype;return k.parse=function(O){this.$d=function(Q){var q=Q.date,U=Q.utc;if(q===null)return new Date(NaN);if(P.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var _=q.match(f);if(_){var H=_[2]-1||0,ee=(_[7]||"0").substring(0,3);return U?new Date(Date.UTC(_[1],H,_[3]||1,_[4]||0,_[5]||0,_[6]||0,ee)):new Date(_[1],H,_[3]||1,_[4]||0,_[5]||0,_[6]||0,ee)}}return new Date(q)}(O),this.init()},k.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},k.$utils=function(){return P},k.isValid=function(){return this.$d.toString()!==d},k.isSame=function(O,Q){var q=b(O);return this.startOf(Q)<=q&&q<=this.endOf(Q)},k.isAfter=function(O,Q){return b(O)<this.startOf(Q)},k.isBefore=function(O,Q){return this.endOf(Q)<b(O)},k.$g=function(O,Q,q){return P.u(O)?this[Q]:this.set(q,O)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(O,Q){var q=this,U=!!P.u(Q)||Q,_=P.p(O),H=function(ie,he){var Fe=P.w(q.$u?Date.UTC(q.$y,he,ie):new Date(q.$y,he,ie),q);return U?Fe:Fe.endOf(s)},ee=function(ie,he){return P.w(q.toDate()[ie].apply(q.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(he)),q)},oe=this.$W,X=this.$M,te=this.$D,J="set"+(this.$u?"UTC":"");switch(_){case m:return U?H(1,0):H(31,11);case u:return U?H(1,X):H(0,X+1);case c:var re=this.$locale().weekStart||0,Ce=(oe<re?oe+7:oe)-re;return H(U?te-Ce:te+(6-Ce),X);case s:case p:return ee(J+"Hours",0);case i:return ee(J+"Minutes",1);case a:return ee(J+"Seconds",2);case o:return ee(J+"Milliseconds",3);default:return this.clone()}},k.endOf=function(O){return this.startOf(O,!1)},k.$set=function(O,Q){var q,U=P.p(O),_="set"+(this.$u?"UTC":""),H=(q={},q[s]=_+"Date",q[p]=_+"Date",q[u]=_+"Month",q[m]=_+"FullYear",q[i]=_+"Hours",q[a]=_+"Minutes",q[o]=_+"Seconds",q[n]=_+"Milliseconds",q)[U],ee=U===s?this.$D+(Q-this.$W):Q;if(U===u||U===m){var oe=this.clone().set(p,1);oe.$d[H](ee),oe.init(),this.$d=oe.set(p,Math.min(this.$D,oe.daysInMonth())).$d}else H&&this.$d[H](ee);return this.init(),this},k.set=function(O,Q){return this.clone().$set(O,Q)},k.get=function(O){return this[P.p(O)]()},k.add=function(O,Q){var q,U=this;O=Number(O);var _=P.p(Q),H=function(X){var te=b(U);return P.w(te.date(te.date()+Math.round(X*O)),U)};if(_===u)return this.set(u,this.$M+O);if(_===m)return this.set(m,this.$y+O);if(_===s)return H(1);if(_===c)return H(7);var ee=(q={},q[a]=t,q[i]=r,q[o]=e,q)[_]||1,oe=this.$d.getTime()+O*ee;return P.w(oe,this)},k.subtract=function(O,Q){return this.add(-1*O,Q)},k.format=function(O){var Q=this,q=this.$locale();if(!this.isValid())return q.invalidDate||d;var U=O||"YYYY-MM-DDTHH:mm:ssZ",_=P.z(this),H=this.$H,ee=this.$m,oe=this.$M,X=q.weekdays,te=q.months,J=q.meridiem,re=function(he,Fe,ot,Rt){return he&&(he[Fe]||he(Q,U))||ot[Fe].slice(0,Rt)},Ce=function(he){return P.s(H%12||12,he,"0")},ie=J||function(he,Fe,ot){var Rt=he<12?"AM":"PM";return ot?Rt.toLowerCase():Rt};return U.replace(A,function(he,Fe){return Fe||function(ot){switch(ot){case"YY":return String(Q.$y).slice(-2);case"YYYY":return P.s(Q.$y,4,"0");case"M":return oe+1;case"MM":return P.s(oe+1,2,"0");case"MMM":return re(q.monthsShort,oe,te,3);case"MMMM":return re(te,oe);case"D":return Q.$D;case"DD":return P.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return re(q.weekdaysMin,Q.$W,X,2);case"ddd":return re(q.weekdaysShort,Q.$W,X,3);case"dddd":return X[Q.$W];case"H":return String(H);case"HH":return P.s(H,2,"0");case"h":return Ce(1);case"hh":return Ce(2);case"a":return ie(H,ee,!0);case"A":return ie(H,ee,!1);case"m":return String(ee);case"mm":return P.s(ee,2,"0");case"s":return String(Q.$s);case"ss":return P.s(Q.$s,2,"0");case"SSS":return P.s(Q.$ms,3,"0");case"Z":return _}return null}(he)||_.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(O,Q,q){var U,_=this,H=P.p(Q),ee=b(O),oe=(ee.utcOffset()-this.utcOffset())*t,X=this-ee,te=function(){return P.m(_,ee)};switch(H){case m:U=te()/12;break;case u:U=te();break;case l:U=te()/3;break;case c:U=(X-oe)/6048e5;break;case s:U=(X-oe)/864e5;break;case i:U=X/r;break;case a:U=X/t;break;case o:U=X/e;break;default:U=X}return q?U:P.a(U)},k.daysInMonth=function(){return this.endOf(u).$D},k.$locale=function(){return F[this.$L]},k.locale=function(O,Q){if(!O)return this.$L;var q=this.clone(),U=R(O,Q,!0);return U&&(q.$L=U),q},k.clone=function(){return P.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),B=T.prototype;return b.prototype=B,[["$ms",n],["$s",o],["$m",a],["$H",i],["$W",s],["$M",u],["$y",m],["$D",p]].forEach(function(D){B[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),b.extend=function(D,k){return D.$i||(D(k,T,b),D.$i=!0),b},b.locale=R,b.isDayjs=v,b.unix=function(D){return b(1e3*D)},b.en=F[h],b.Ls=F,b.p={},b})});var mC=Be((Lf,Bf)=>{"use strict";(function(e,t){typeof Lf=="object"&&typeof Bf<"u"?Bf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Lf,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=o.add;o.add=function(s,c){return s=Number(s),this.$utils().p(c)===t?this.add(3*s,e):a.bind(this)(s,c)};var i=o.startOf;o.startOf=function(s,c){var u=this.$utils(),l=!!u.u(c)||c;if(u.p(s)===t){var m=this.quarter()-1;return l?this.month(3*m).startOf(e).startOf("day"):this.month(3*m+2).endOf(e).endOf("day")}return i.bind(this)(s,c)}}})});var fC=Be((Uf,_f)=>{"use strict";(function(e,t){typeof Uf=="object"&&typeof _f<"u"?_f.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Uf,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},s=function(f){return(f=+f)+(f>68?1900:2e3)},c=function(f){return function(A){this[f]=+A}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(A){if(!A||A==="Z")return 0;var S=A.match(/([+-]|\d\d)/g),g=60*S[1]+(+S[2]||0);return g===0?0:S[0]==="+"?-g:g}(f)}],l=function(f){var A=i[f];return A&&(A.indexOf?A:A.s.concat(A.f))},m=function(f,A){var S,g=i.meridiem;if(g){for(var C=1;C<=24;C+=1)if(f.indexOf(g(C,0,A))>-1){S=C>12;break}}else S=f===(A?"pm":"PM");return S},p={A:[a,function(f){this.afternoon=m(f,!1)}],a:[a,function(f){this.afternoon=m(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[n,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[o,c("seconds")],ss:[o,c("seconds")],m:[o,c("minutes")],mm:[o,c("minutes")],H:[o,c("hours")],h:[o,c("hours")],HH:[o,c("hours")],hh:[o,c("hours")],D:[o,c("day")],DD:[n,c("day")],Do:[a,function(f){var A=i.ordinal,S=f.match(/\d+/);if(this.day=S[0],A)for(var g=1;g<=31;g+=1)A(g).replace(/\[|\]/g,"")===f&&(this.day=g)}],w:[o,c("week")],ww:[n,c("week")],M:[o,c("month")],MM:[n,c("month")],MMM:[a,function(f){var A=l("months"),S=(l("monthsShort")||A.map(function(g){return g.slice(0,3)})).indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(f){var A=l("months").indexOf(f)+1;if(A<1)throw new Error;this.month=A%12||A}],Y:[/[+-]?\d+/,c("year")],YY:[n,function(f){this.year=s(f)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u};function d(f){var A,S;A=f,S=i&&i.formats;for(var g=(f=A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,P,T){var B=T&&T.toUpperCase();return P||S[T]||e[T]||S[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,k,O){return k||O.slice(1)})})).match(t),C=g.length,h=0;h<C;h+=1){var F=g[h],I=p[F],v=I&&I[0],R=I&&I[1];g[h]=R?{regex:v,parser:R}:F.replace(/^\[|\]$/g,"")}return function(b){for(var P={},T=0,B=0;T<C;T+=1){var D=g[T];if(typeof D=="string")B+=D.length;else{var k=D.regex,O=D.parser,Q=b.slice(B),q=k.exec(Q)[0];O.call(P,q),b=b.replace(q,"")}}return function(U){var _=U.afternoon;if(_!==void 0){var H=U.hours;_?H<12&&(U.hours+=12):H===12&&(U.hours=0),delete U.afternoon}}(P),P}}return function(f,A,S){S.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var g=A.prototype,C=g.parse;g.parse=function(h){var F=h.date,I=h.utc,v=h.args;this.$u=I;var R=v[1];if(typeof R=="string"){var b=v[2]===!0,P=v[3]===!0,T=b||P,B=v[2];P&&(B=v[2]),i=this.$locale(),!b&&B&&(i=S.Ls[B]),this.$d=function(Q,q,U,_){try{if(["x","X"].indexOf(q)>-1)return new Date((q==="X"?1e3:1)*Q);var H=d(q)(Q),ee=H.year,oe=H.month,X=H.day,te=H.hours,J=H.minutes,re=H.seconds,Ce=H.milliseconds,ie=H.zone,he=H.week,Fe=new Date,ot=X||(ee||oe?1:Fe.getDate()),Rt=ee||Fe.getFullYear(),gn=0;ee&&!oe||(gn=oe>0?oe-1:Fe.getMonth());var oa,aa=te||0,Ds=J||0,xm=re||0,Am=Ce||0;return ie?new Date(Date.UTC(Rt,gn,ot,aa,Ds,xm,Am+60*ie.offset*1e3)):U?new Date(Date.UTC(Rt,gn,ot,aa,Ds,xm,Am)):(oa=new Date(Rt,gn,ot,aa,Ds,xm,Am),he&&(oa=_(oa).week(he).toDate()),oa)}catch{return new Date("")}}(F,R,I,S),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),T&&F!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var D=R.length,k=1;k<=D;k+=1){v[1]=R[k-1];var O=S.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}k===D&&(this.$d=new Date(""))}else C.call(this,h)}}})});var Ix=Be((FW,wx)=>{"use strict";var ek=/(^|; )Coveo-Pendragon=([^;]*)/;wx.exports=()=>ek.exec(document.cookie)?.pop()||null});var Tx=Be((hg,Cg)=>{"use strict";(function(e,t){typeof hg=="object"&&typeof Cg<"u"?Cg.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(hg,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var a,i=function(l,m,p){p===void 0&&(p={});var d=new Date(l),f=function(A,S){S===void 0&&(S={});var g=S.timeZoneName||"short",C=A+"|"+g,h=t[C];return h||(h=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:g}),t[C]=h),h}(m,p);return f.formatToParts(d)},s=function(l,m){for(var p=i(l,m),d=[],f=0;f<p.length;f+=1){var A=p[f],S=A.type,g=A.value,C=e[S];C>=0&&(d[C]=parseInt(g,10))}var h=d[3],F=h===24?0:h,I=d[0]+"-"+d[1]+"-"+d[2]+" "+F+":"+d[4]+":"+d[5]+":000",v=+l;return(o.utc(I).valueOf()-(v-=v%1e3))/6e4},c=n.prototype;c.tz=function(l,m){l===void 0&&(l=a);var p,d=this.utcOffset(),f=this.toDate(),A=f.toLocaleString("en-US",{timeZone:l}),S=Math.round((f-new Date(A))/1e3/60),g=15*-Math.round(f.getTimezoneOffset()/15)-S;if(!Number(g))p=this.utcOffset(0,m);else if(p=o(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(g,!0),m){var C=p.utcOffset();p=p.add(d-C,"minute")}return p.$x.$timezone=l,p},c.offsetName=function(l){var m=this.$x.$timezone||o.tz.guess(),p=i(this.valueOf(),m,{timeZoneName:l}).find(function(d){return d.type.toLowerCase()==="timezonename"});return p&&p.value};var u=c.startOf;c.startOf=function(l,m){if(!this.$x||!this.$x.$timezone)return u.call(this,l,m);var p=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(p,l,m).tz(this.$x.$timezone,!0)},o.tz=function(l,m,p){var d=p&&m,f=p||m||a,A=s(+o(),f);if(typeof l!="string")return o(l).tz(f);var S=function(F,I,v){var R=F-60*I*1e3,b=s(R,v);if(I===b)return[R,I];var P=s(R-=60*(b-I)*1e3,v);return b===P?[R,b]:[F-60*Math.min(b,P)*1e3,Math.max(b,P)]}(o.utc(l,d).valueOf(),A,f),g=S[0],C=S[1],h=o(g).utcOffset(C);return h.$x.$timezone=f,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(l){a=l}}})});var Ox=Be((xg,Ag)=>{"use strict";(function(e,t){typeof xg=="object"&&typeof Ag<"u"?Ag.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(xg,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(d){var f={date:d,utc:!0,args:arguments};return new o(f)},i.utc=function(d){var f=a(this.toDate(),{locale:this.$L,utc:!0});return d?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),s.call(this,d)};var c=i.init;i.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else c.call(this)};var u=i.utcOffset;i.utcOffset=function(d,f){var A=this.$utils().u;if(A(d))return this.$u?0:A(this.$offset)?u.call(this):this.$offset;if(typeof d=="string"&&(d=function(h){h===void 0&&(h="");var F=h.match(t);if(!F)return null;var I=(""+F[0]).match(r)||["-",0,0],v=I[0],R=60*+I[1]+ +I[2];return R===0?0:v==="+"?R:-R}(d),d===null))return this;var S=Math.abs(d)<=16?60*d:d,g=this;if(f)return g.$offset=S,g.$u=d===0,g;if(d!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(g=this.local().add(S+C,e)).$offset=S,g.$x.$localOffset=C}else g=this.utc();return g};var l=i.format;i.format=function(d){var f=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var m=i.toDate;i.toDate=function(d){return d==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var p=i.diff;i.diff=function(d,f,A){if(d&&this.$u===d.$u)return p.call(this,d,f,A);var S=this.local(),g=a(d).local();return p.call(S,g,f,A)}}})});var jx=Be((wH,_x)=>{"use strict";function pk(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}_x.exports=mk;function mk(e,t,r){var n=r&&r.stringify||pk,o=1;if(typeof e=="object"&&e!==null){var a=t.length+o;if(a===1)return e;var i=new Array(a);i[0]=n(e);for(var s=1;s<a;s++)i[s]=n(t[s]);return i.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var u="",l=1-o,m=-1,p=e&&e.length||0,d=0;d<p;){if(e.charCodeAt(d)===37&&d+1<p){switch(m=m>-1?m:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=c||t[l]==null)break;m<d&&(u+=e.slice(m,d)),u+=Number(t[l]),m=d+2,d++;break;case 105:if(l>=c||t[l]==null)break;m<d&&(u+=e.slice(m,d)),u+=Math.floor(Number(t[l])),m=d+2,d++;break;case 79:case 111:case 106:if(l>=c||t[l]===void 0)break;m<d&&(u+=e.slice(m,d));var f=typeof t[l];if(f==="string"){u+="'"+t[l]+"'",m=d+2,d++;break}if(f==="function"){u+=t[l].name||"<anonymous>",m=d+2,d++;break}u+=n(t[l]),m=d+2,d++;break;case 115:if(l>=c)break;m<d&&(u+=e.slice(m,d)),u+=String(t[l]),m=d+2,d++;break;case 37:m<d&&(u+=e.slice(m,d)),u+="%",m=d+2,d++,l--;break}++l}++d}return m===-1?e:(m<p&&(u+=e.slice(m)),u)}});var Kx=Be((IH,Jl)=>{"use strict";var $x=jx();Jl.exports=nn;var Oc=Ik().console||{},fk={mapHttpRequest:Yl,mapHttpResponse:Yl,wrapRequestSerializer:Rg,wrapResponseSerializer:Rg,wrapErrorSerializer:Rg,req:Yl,res:Yl,err:Wx,errWithCause:Wx};function Gn(e,t){return e==="silent"?1/0:t.levels.values[e]}var Pg=Symbol("pino.logFuncs"),bg=Symbol("pino.hierarchy"),gk={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Gx(e,t){let r={logger:t,parent:e[bg]};t[bg]=r}function Sk(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Oc[o]||Oc[gk[o]||"log"]||pi}),e[Pg]=n}function yk(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function nn(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Oc;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=yk(e.browser.serialize,n),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),s=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&s.forEach(function(A){r[A]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let c=e.level||"info",u=Object.create(r);u.log||(u.log=pi),Sk(u,s,r),Gx({},u),Object.defineProperty(u,"levelVal",{get:m}),Object.defineProperty(u,"level",{get:p,set:d});let l={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:vk(e),messageKey:e.messageKey||"msg",onChild:e.onChild||pi};u.levels=hk(e),u.level=c,u.setMaxListeners=u.getMaxListeners=u.emit=u.addListener=u.on=u.prependListener=u.once=u.prependOnceListener=u.removeListener=u.removeAllListeners=u.listeners=u.listenerCount=u.eventNames=u.write=u.flush=pi,u.serializers=n,u._serialize=o,u._stdErrSerialize=a,u.child=function(...A){return f.call(this,l,...A)},t&&(u._logEvent=vg());function m(){return Gn(this.level,this)}function p(){return this._level}function d(A){if(A!=="silent"&&!this.levels.values[A])throw Error("unknown level "+A);this._level=A,Vo(this,l,u,"error"),Vo(this,l,u,"fatal"),Vo(this,l,u,"warn"),Vo(this,l,u,"info"),Vo(this,l,u,"debug"),Vo(this,l,u,"trace"),i.forEach(S=>{Vo(this,l,u,S)})}function f(A,S,g){if(!S)throw new Error("missing bindings for child Pino");g=g||{},o&&S.serializers&&(g.serializers=S.serializers);let C=g.serializers;if(o&&C){var h=Object.assign({},n,C),F=e.browser.serialize===!0?Object.keys(h):o;delete S.serializers,wg([S],F,h,this._stdErrSerialize)}function I(R){this._childLevel=(R._childLevel|0)+1,this.bindings=S,h&&(this.serializers=h,this._serialize=F),t&&(this._logEvent=vg([].concat(R._logEvent.bindings,S)))}I.prototype=this;let v=new I(this);return Gx(this,v),v.child=function(...R){return f.call(this,A,...R)},v.level=g.level||this.level,A.onChild(v),v}return u}function hk(e){let t=e.customLevels||{},r=Object.assign({},nn.levels.values,t),n=Object.assign({},nn.levels.labels,Ck(t));return{values:r,labels:n}}function Ck(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}nn.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};nn.stdSerializers=fk;nn.stdTimeFunctions=Object.assign({},{nullTime:Hx,epochTime:zx,unixTime:Pk,isoTime:wk});function xk(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[bg];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Vo(e,t,r,n){if(Object.defineProperty(e,n,{value:Gn(e.level,r)>Gn(n,r)?pi:r[Pg][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===pi){if(!t.transmit)return;let a=t.transmit.level||e.level,i=Gn(a,r);if(Gn(n,r)<i)return}e[n]=Fk(e,t,r,n);let o=xk(e);o.length!==0&&(e[n]=Ak(o,e[n]))}function Ak(e,t){return function(){return t.apply(this,[...e,...arguments])}}function Fk(e,t,r,n){return function(o){return function(){let i=t.timestamp(),s=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Oc?Oc:this;for(var u=0;u<s.length;u++)s[u]=arguments[u];var l=!1;if(t.serialize&&(wg(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(c,Rk(this,n,s,i,t)):o.apply(c,s),t.transmit){let m=t.transmit.level||e._level,p=Gn(m,r),d=Gn(n,r);if(d<p)return;bk(this,{ts:i,methodLevel:n,methodValue:d,transmitLevel:m,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Gn(e._level,r)},s,l)}}}(e[Pg][n])}function Rk(e,t,r,n,o){let{level:a,log:i=p=>p}=o.formatters||{},s=r.slice(),c=s[0],u={};if(n&&(u.time=n),a){let p=a(t,e.levels.values[t]);Object.assign(u,p)}else u.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),c!==null&&typeof c=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(u,s.shift());c=s.length?$x(s.shift(),s):void 0}else typeof c=="string"&&(c=$x(s.shift(),s));return c!==void 0&&(u[o.messageKey]=c),i(u)}function wg(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=nn.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let a in e[o])t.indexOf(a)>-1&&a in r&&(e[o][a]=r[a](e[o][a]))}function bk(e,t,r,n=!1){let o=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,c=t.val,u=e._logEvent.bindings;n||wg(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return u.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,o(i,e._logEvent,c),e._logEvent=vg(u)}function vg(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Wx(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function vk(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Hx:zx}function Yl(){return{}}function Rg(e){return e}function pi(){}function Hx(){return!1}function zx(){return Date.now()}function Pk(){return Math.round(Date.now()/1e3)}function wk(){return new Date(Date.now()).toISOString()}function Ik(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}Jl.exports.default=nn;Jl.exports.pino=nn});var CQ={};OS(CQ,{API_DATE_FORMAT:()=>za,DefaultFieldsToInclude:()=>kg,EcommerceDefaultFieldsToInclude:()=>mA,HighlightUtils:()=>bm,MinimumFieldsToInclude:()=>ed,ResultTemplatesHelpers:()=>BC,SortBy:()=>Eo,SortOrder:()=>ac,VERSION:()=>An,baseFacetResponseSelector:()=>Gt,buildAutomaticFacetGenerator:()=>Dv,buildBreadcrumbManager:()=>Rb,buildCategoryFacet:()=>xF,buildCategoryFieldSuggestions:()=>Ev,buildContext:()=>hA,buildController:()=>j,buildCriterionExpression:()=>ur,buildDateFacet:()=>jF,buildDateFilter:()=>oR,buildDateRange:()=>io,buildDateSortCriterion:()=>Hu,buildDictionaryFieldContext:()=>CA,buildDidYouMean:()=>vA,buildExecuteTrigger:()=>cv,buildFacet:()=>VF,buildFacetConditionsManager:()=>wv,buildFacetManager:()=>Cb,buildFieldSortCriterion:()=>zu,buildFieldSuggestions:()=>Iv,buildFoldedResultList:()=>ev,buildGeneratedAnswer:()=>Qv,buildHistoryManager:()=>bR,buildInstantResults:()=>ib,buildInteractiveCitation:()=>Bv,buildInteractiveInstantResult:()=>DR,buildInteractiveRecentResult:()=>Pv,buildInteractiveResult:()=>qR,buildNoSortCriterion:()=>Yu,buildNotifyTrigger:()=>lv,buildNumericFacet:()=>zF,buildNumericFilter:()=>ZF,buildNumericRange:()=>Bi,buildPager:()=>wR,buildQueryError:()=>ER,buildQueryExpression:()=>yQ,buildQueryRankingExpressionSortCriterion:()=>Ku,buildQuerySummary:()=>OR,buildQueryTrigger:()=>sv,buildQuickview:()=>Hb,buildRecentQueriesList:()=>Av,buildRecentResultsList:()=>vv,buildRedirectionTrigger:()=>iv,buildRelevanceInspector:()=>gA,buildRelevanceSortCriterion:()=>Ea,buildResultList:()=>kR,buildResultTemplatesManager:()=>Hv,buildResultsPerPage:()=>NR,buildSearchBox:()=>kp,buildSearchEngine:()=>cA,buildSearchParameterManager:()=>em,buildSearchParameterSerializer:()=>ou,buildSearchStatus:()=>_b,buildSmartSnippet:()=>fv,buildSmartSnippetQuestionsList:()=>yv,buildSort:()=>lb,buildStandaloneSearchBox:()=>wb,buildStaticFilter:()=>pb,buildStaticFilterValue:()=>oS,buildTab:()=>gb,buildTabManager:()=>yb,buildUrlManager:()=>Ub,currentPageSelector:()=>pn,currentPagesSelector:()=>Rp,deserializeRelativeDate:()=>bC,facetRequestSelector:()=>Wu,facetResponseSelectedValuesSelector:()=>Th,facetResponseSelector:()=>Fa,getAnalyticsNextApiBaseUrl:()=>gu,getOrganizationEndpoint:()=>Ue,getSampleSearchEngineConfiguration:()=>Tg,getSearchApiBaseUrl:()=>Ie,loadAdvancedSearchQueryActions:()=>wM,loadBreadcrumbActions:()=>tQ,loadCategoryFacetSetActions:()=>IM,loadClickAnalyticsActions:()=>lQ,loadConfigurationActions:()=>TM,loadContextActions:()=>kM,loadDateFacetSetActions:()=>VM,loadDebugActions:()=>DM,loadDictionaryFieldContextActions:()=>qM,loadDidYouMeanActions:()=>MM,loadExcerptLengthActions:()=>oQ,loadFacetOptionsActions:()=>NM,loadFacetSetActions:()=>EM,loadFieldActions:()=>QM,loadFoldingActions:()=>UM,loadGeneratedAnswerActions:()=>iQ,loadGenericAnalyticsActions:()=>dQ,loadHistoryActions:()=>LM,loadIPXActionsHistoryActions:()=>pQ,loadInstantResultsActions:()=>WM,loadNumericFacetSetActions:()=>BM,loadPaginationActions:()=>_M,loadPipelineActions:()=>jM,loadQueryActions:()=>$M,loadQuerySetActions:()=>GM,loadQuerySuggestActions:()=>HM,loadQuestionAnsweringActions:()=>eQ,loadRecentQueriesActions:()=>rQ,loadRecentResultsActions:()=>nQ,loadResultPreviewActions:()=>aQ,loadSearchActions:()=>zM,loadSearchAnalyticsActions:()=>uQ,loadSearchConfigurationActions:()=>OM,loadSearchHubActions:()=>KM,loadSortCriteriaActions:()=>YM,loadStandaloneSearchBoxSetActions:()=>JM,loadStaticFilterSetActions:()=>XM,loadTabSetActions:()=>ZM,maxPageSelector:()=>zc,parseCriterionExpression:()=>Kv,validateRelativeDate:()=>qn});module.exports=mP(CQ);var bm={};OS(bm,{escape:()=>sa,getHighlightedSuggestion:()=>Rm,highlightString:()=>SP});var MS=require("@coveo/bueno");var Sn=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function uu(e){return Array.isArray(e)}function lu(e){return e.trim()===""}function qS(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function fP(e){return btoa(encodeURI(e))}function du(e,t){let{[e]:r,...n}=t;return n}function ia(e){return fP(JSON.stringify(e))}var gP=new Set(["1",1,"yes",!0]);function DS(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>gP.has(r))}function VS(e){let t={};for(let[r,n]of e)t[r]=n;return t}function NS(e,t,r){return clearTimeout(t),setTimeout(e,r)}function Ns(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function SP(e){if(lu(e.openingDelimiter)||lu(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,MS.isNullOrUndefined)(e.content)||lu(e.content))return e.content;if(e.highlights.length===0)return sa(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],i=a.offset,s=i+a.length;if(s>t)break;r+=sa(e.content.slice(n,i)),r+=e.openingDelimiter,r+=sa(e.content.slice(i,s)),r+=e.closingDelimiter,n=s}return n!==t&&(r+=sa(e.content.slice(n))),r}function Rm(e,t){return e=sa(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?Fm(n,t.notMatchDelimiters):o?Fm(o,t.exactMatchDelimiters):a?Fm(a,t.correctionDelimiters):r)}function Fm(e,t){return t?t.open+e+t.close:e}function sa(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,a=>t[a]):e}async function LS(e,t){let r=e.getReader(),n;for(;!(n=await r.read()).done;)t(n.value)}function BS(e){let t,r,n,o=!1;return function(i){t===void 0?(t=i,r=0,n=-1):t=hP(t,i);let s=t.length,c=0;for(;r<s;){o&&(t[r]===10&&(c=++r),o=!1);let u=-1;for(;r<s&&u===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-c);break;case 13:o=!0,u=r;break;case 10:u=r;break}if(u===-1)break;e(t.subarray(c,u),n),c=r,n=-1}c===s?t=void 0:c!==0&&(t=t.subarray(c),r-=c)}}function US(e,t,r){let n=QS(),o=new TextDecoder;return function(i,s){if(i.length===0)r?.(n),n=QS();else if(s>0){let c=o.decode(i.subarray(0,s)),u=s+(i[s+1]===32?2:1),l=o.decode(i.subarray(u));switch(c){case"data":n.data=n.data?n.data+`
|
|
19
|
-
`+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":yP(l,n,t);break}}}}function yP(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function hP(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function QS(){return{data:"",event:"",id:"",retry:void 0}}var vm="text/event-stream",CP=1e3,_S="last-event-id";function jS(){return typeof window<"u"}function pu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:s,fetch:c,...u}){return new Promise((l,m)=>{let p={...r};p.accept||(p.accept=vm);let d;function f(){d?.abort(),document.hidden||F()}!s&&jS()&&document.addEventListener("visibilitychange",f);let A=CP,S;function g(){jS()&&document.removeEventListener("visibilitychange",f),clearTimeout(S),d?.abort()}t?.addEventListener("abort",()=>{g(),l()});let C=c??fetch,h=n??xP;async function F(){d=AbortController?new AbortController:null;try{let I=await C(e,{...u,headers:p,signal:d?.signal});await h(I),await LS(I.body,BS(US(v=>{v?p[_S]=v:delete p[_S]},v=>{A=v},o))),a?.(),g(),l()}catch(I){if(!d?.signal?.aborted)try{let v=i?.(I)??A;clearTimeout(S),S=setTimeout(F,v)}catch(v){g(),m(v)}}}F()})}function xP(e){let t=e.headers.get("content-type");if(!t?.startsWith(vm))throw new Error(`Expected content-type to be ${vm}, Actual: ${t}`)}var yn=class{constructor(t){Re(this,"_basePath");Re(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var AP=(e,t,r)=>new yn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,$S=3,FP=5e3,RP="text/event-stream",Im=1,Pm=class extends Error{},Ms=class extends Error{constructor(r){super(r.message);this.payload=r}},wm=class{constructor(){Re(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},mu=class{constructor(t){Re(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:s,abort:c,close:u,resetAnswer:l}=r,m=new wm;if(!a){this.logger.error("No stream ID found");return}let p=0,d,f=()=>{d&&!m.isActive(d)&&(S?.abort(),l(),g())},A=()=>{m.remove(d),d=NS(f,d,FP),m.add(d)},S=new AbortController,g=()=>pu(AP(n,o,a),{method:"GET",fetch,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:S?.signal,async onopen(C){if(C.ok&&C.headers.get("content-type")===RP)return;throw C.status>=400&&C.status<500&&C.status!==429?new Ms({message:"Error opening stream",code:C.status}):new Pm},onmessage:C=>{if(S?.signal.aborted)return;let h=JSON.parse(C.data);if(h.finishReason==="ERROR"){m.remove(d),S?.abort(),c({message:h.errorMessage,code:h.statusCode});return}s(h),p=0,h.finishReason==="COMPLETED"?(m.remove(d),u()):A()},onerror:C=>{if(!S?.signal.aborted){if(m.remove(d),C instanceof Ms)throw S?.abort(),c(C),C;if(++p>$S){this.logger.info("Maximum retry exceeded.");let h={message:"Failed to complete stream.",code:Im};throw S?.abort(),c(h),new Ms(h)}this.logger.info(`Retrying...(${p}/${$S})`),l()}}});return g(),S}};var ry=or(XS(),1);var KP="recommendation-internal-options",$Q=Symbol.for(KP);var M=new Error("Failed to load reducers."),ca=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var xo=class extends Error{constructor(r,n){super();Re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function ZS(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function ey(e){return typeof e!="object"||!e?!1:Object.values(e).every(YP)}function YP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ty(e){return e===429}var bt=class e{static async call(t){let r=JP(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,s=async()=>{let c=await fetch(a,i);if(ty(c.status))throw c;return c};try{let c=await(0,ry.backOff)(s,{retry:u=>{let l=u&&ty(u.status);return l&&n.info("Platform retrying request"),l}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new ca;case 404:throw new xo(a,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new xo(a):c}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:s,...c}=t,u=Ns(c);try{let l=await o(t,n,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return u}};function Ue(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Ie(e,t="prod"){return`${Ue(e,t)}/rest/search/v2`}function gu(e,t="prod"){return`${Ue(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function JP(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",c=XP(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:c},signal:i}}function XP(e,t){return t==="application/x-www-form-urlencoded"?ey(e)?ZS(e):"":JSON.stringify(e)}var Su=e=>e;var ny=e=>e,oy=e=>e,ay=e=>e;var dy=require("@coveo/bueno");function ua(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ft(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ua(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ua(),extendedResults:{}}}function hn(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var Cn=e=>{let{response:t}=e;return t.body?ZP(e):ew(t)},ZP=e=>rw(e)?nw(e):tw(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},ew=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function tw(e){return e.body.statusCode!==void 0}function rw(e){return e.body.exception!==void 0}var nw=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var xn=class{constructor(){Re(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};function iy(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var zr=(e,t,r,n)=>{let o=new yn(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var sy=(e,t)=>{let r=new yn(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},cy=async(e,t)=>{let r=await bt.call({...zr(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:hn(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=iy(r),o=await r.arrayBuffer(),i=new TextDecoder(n).decode(o);return ow(i)?{success:i}:{error:Cn({response:r,body:i})}};function ow(e){return typeof e=="string"}function aw(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function iw(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Bs(e,t){if(t&&e.name==="AbortError")return{error:iw(e)};if(e instanceof xo)return{error:aw(e)};throw e}var yu=class{constructor(t){this.options=t;Re(this,"apiCallsQueues",{unknown:new xn,mainSearch:new xn,facetValues:new xn,foldingCollection:new xn,instantResults:new xn})}async plan(t){let r=await bt.call({...zr(t,"POST","application/json","/plan"),requestParams:hn(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Bs(r);let n=await r.json();return cw(n)?{success:n}:{error:Cn({response:r,body:n})}}async querySuggest(t){let r=await bt.call({...zr(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:hn(t),...this.options});if(r instanceof Error)return Bs(r);let n=await r.json(),o={response:r,body:n};return sw(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:Cn(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(s=>bt.call({...zr(t,"POST","application/json",""),requestParams:hn(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:s??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Bs(o,r?.disableAbortWarning);let a=await o.json(),i={response:o,body:a};return uy(a)?(i.body=ly(a),{success:(await this.options.postprocessSearchResponseMiddleware(i)).body}):{error:Cn(i)}}async facetSearch(t){let r=await bt.call({...zr(t,"POST","application/json","/facet"),requestParams:hn(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await bt.call({...zr(t,"POST","application/json",""),requestParams:hn(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(uy(n)){let o={response:r,body:n};return o.body=ly(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:Cn({response:r,body:n})}}async html(t){return cy(t,{...this.options})}async fieldDescriptions(t){let r=await bt.call({...zr(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return uw(n)?{success:n}:{error:Cn({response:r,body:n})}}},hu=e=>e.success!==void 0,Ve=e=>e.error!==void 0;function uy(e){return e.results!==void 0}function ly(e){let t=ua();return(0,dy.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function sw(e){return e.completions!==void 0}function cw(e){return e.preprocessingOutput!==void 0}function uw(e){return e.fields!==void 0}var at=require("@coveo/bueno"),V=new at.StringValue({required:!0,emptyAllowed:!1}),pe=new at.StringValue({required:!1,emptyAllowed:!1}),se=new at.StringValue({required:!0,emptyAllowed:!0}),py=new at.StringValue({required:!1,emptyAllowed:!0}),Cu=new at.ArrayValue({each:V,required:!0}),my=new at.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Kr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),vt=(e,t)=>{if("required"in t)return{payload:new at.Schema({value:t}).validate({value:e}).value};let o=new at.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new at.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return vt(e,t)}catch(r){return{payload:e,error:Kr(r)}}},Ee=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return fy(e,t,r,o,"Controller initialization error")},ue=(e,t,r,n)=>{let o=`Check the options of ${n}`;return fy(e,t,r,o,"Controller initialization error")},fy=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};var ht=require("@coveo/bueno");function _e(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var lw=typeof Symbol=="function"&&Symbol.observable||"@@observable",gy=lw,Mm=()=>Math.random().toString(36).substring(7).split("").join("."),dw={INIT:`@@redux/INIT${Mm()}`,REPLACE:`@@redux/REPLACE${Mm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mm()}`},xu=dw;function ar(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Qm(e,t,r){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_e(1));return r(Qm)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,c=!1;function u(){i===a&&(i=new Map,a.forEach((S,g)=>{i.set(g,S)}))}function l(){if(c)throw new Error(_e(3));return o}function m(S){if(typeof S!="function")throw new Error(_e(4));if(c)throw new Error(_e(5));let g=!0;u();let C=s++;return i.set(C,S),function(){if(g){if(c)throw new Error(_e(6));g=!1,u(),i.delete(C),a=null}}}function p(S){if(!ar(S))throw new Error(_e(7));if(typeof S.type>"u")throw new Error(_e(8));if(typeof S.type!="string")throw new Error(_e(17));if(c)throw new Error(_e(9));try{c=!0,o=n(o,S)}finally{c=!1}return(a=i).forEach(C=>{C()}),S}function d(S){if(typeof S!="function")throw new Error(_e(10));n=S,p({type:xu.REPLACE})}function f(){let S=m;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(_e(11));function C(){let F=g;F.next&&F.next(l())}return C(),{unsubscribe:S(C)}},[gy](){return this}}}return p({type:xu.INIT}),{dispatch:p,subscribe:m,getState:l,replaceReducer:d,[gy]:f}}function pw(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xu.INIT})>"u")throw new Error(_e(12));if(typeof r(void 0,{type:xu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function la(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,a;try{pw(r)}catch(i){a=i}return function(s={},c){if(a)throw a;let u=!1,l={};for(let m=0;m<n.length;m++){let p=n[m],d=r[p],f=s[p],A=d(f,c);if(typeof A>"u"){let S=c&&c.type;throw new Error(_e(14))}l[p]=A,u=u||A!==f}return u=u||n.length!==Object.keys(s).length,u?l:s}}function da(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Sy(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(_e(15))},i={getState:o.getState,dispatch:(c,...u)=>a(c,...u)},s=e.map(c=>c(i));return a=da(...s)(o.dispatch),{...o,dispatch:a}}}function Au(e){return ar(e)&&"type"in e&&typeof e.type=="string"}var zm=Symbol.for("immer-nothing"),Us=Symbol.for("immer-draftable"),it=Symbol.for("immer-state");function je(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[it]}function st(e){return e?Ay(e)||Array.isArray(e)||!!e[Us]||!!e.constructor?.[Us]||Ws(e)||Hs(e):!1}var mw=Object.prototype.constructor.toString();function Ay(e){if(!e||typeof e!="object")return!1;let t=Fo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===mw}function Km(e){return gt(e)||je(15,e),e[it].base_}function _s(e,t){Ro(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Ro(e){let t=e[it];return t?t.type_:Array.isArray(e)?1:Ws(e)?2:Hs(e)?3:0}function js(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Lm(e,t){return Ro(e)===2?e.get(t):e[t]}function Fy(e,t,r){let n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function fw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ws(e){return e instanceof Map}function Hs(e){return e instanceof Set}function Ao(e){return e.copy_||e.base_}function _m(e,t){if(Ws(e))return new Map(e);if(Hs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ay(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[it];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],s=n[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Fo(e),n)}else{let n=Fo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function bu(e,t=!1){return vu(e)||gt(e)||!st(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=gw),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>bu(n,!0))),e}function gw(){je(2)}function vu(e){return Object.isFrozen(e)}var jm={};function bo(e){let t=jm[e];return t||je(0,e),t}function Sw(e,t){jm[e]||(jm[e]=t)}var $s;function Ry(){return $s}function yw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yy(e,t){t&&(bo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $m(e){Gm(e),e.drafts_.forEach(hw),e.drafts_=null}function Gm(e){e===$s&&($s=e.parent_)}function hy(e){return $s=yw($s,e)}function hw(e){let t=e[it];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Cy(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[it].modified_&&($m(t),je(4)),st(e)&&(e=Fu(t,e),t.parent_||Ru(t,e)),t.patches_&&bo("Patches").generateReplacementPatches_(r[it].base_,e,t.patches_,t.inversePatches_)):e=Fu(t,r,[]),$m(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zm?e:void 0}function Fu(e,t,r){if(vu(t))return t;let n=t[it];if(!n)return _s(t,(o,a)=>xy(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Ru(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),_s(a,(s,c)=>xy(e,n,o,s,c,r,i)),Ru(e,o,!1),r&&e.patches_&&bo("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function xy(e,t,r,n,o,a,i){if(gt(o)){let s=a&&t&&t.type_!==3&&!js(t.assigned_,n)?a.concat(n):void 0,c=Fu(e,o,s);if(Fy(r,n,c),gt(c))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(st(o)&&!vu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fu(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Ru(e,o)}}function Ru(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bu(t,r)}function Cw(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ry(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=Ym;r&&(o=[n],a=Gs);let{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}var Ym={get(e,t){if(t===it)return e;let r=Ao(e);if(!js(r,t))return xw(e,r,t);let n=r[t];return e.finalized_||!st(n)?n:n===Bm(e.base_,t)?(Um(e),e.copy_[t]=Hm(n,e)):n},has(e,t){return t in Ao(e)},ownKeys(e){return Reflect.ownKeys(Ao(e))},set(e,t,r){let n=by(Ao(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Bm(Ao(e),t),a=o?.[it];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(fw(r,o)&&(r!==void 0||js(e.base_,t)))return!0;Um(e),Wm(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Bm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Um(e),Wm(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ao(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){je(11)},getPrototypeOf(e){return Fo(e.base_)},setPrototypeOf(){je(12)}},Gs={};_s(Ym,(e,t)=>{Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)};Gs.set=function(e,t,r){return Ym.set.call(this,e[0],t,r,e[0])};function Bm(e,t){let r=e[it];return(r?Ao(r):e)[t]}function xw(e,t,r){let n=by(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function by(e,t){if(!(t in e))return;let r=Fo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Fo(r)}}function Wm(e){e.modified_||(e.modified_=!0,e.parent_&&Wm(e.parent_))}function Um(e){e.copy_||(e.copy_=_m(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Aw=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(c=a,...u){return i.produce(c,l=>r.call(this,l,...u))}}typeof r!="function"&&je(6),n!==void 0&&typeof n!="function"&&je(7);let o;if(st(t)){let a=hy(this),i=Hm(t,void 0),s=!0;try{o=r(i),s=!1}finally{s?$m(a):Gm(a)}return yy(a,n),Cy(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===zm&&(o=void 0),this.autoFreeze_&&bu(o,!0),n){let a=[],i=[];bo("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else je(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,c=>t(c,...s));let n,o;return[this.produce(t,r,(i,s)=>{n=i,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){st(e)||je(8),gt(e)&&(e=vy(e));let t=hy(this),r=Hm(e,void 0);return r[it].isManual_=!0,Gm(t),r}finishDraft(e,t){let r=e&&e[it];(!r||!r.isManual_)&&je(9);let{scope_:n}=r;return yy(n,t),Cy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=bo("Patches").applyPatches_;return gt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Hm(e,t){let r=Ws(e)?bo("MapSet").proxyMap_(e,t):Hs(e)?bo("MapSet").proxySet_(e,t):Cw(e,t);return(t?t.scope_:Ry()).drafts_.push(r),r}function vy(e){return gt(e)||je(10,e),Py(e)}function Py(e){if(!st(e)||vu(e))return e;let t=e[it],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=_m(e,t.scope_.immer_.useStrictShallowCopy_)}else r=_m(e,!0);return _s(r,(n,o)=>{Fy(r,n,Py(o))}),t&&(t.finalized_=!1),r}function wy(){let t="replace",r="add",n="remove";function o(p,d,f,A){switch(p.type_){case 0:case 2:return i(p,d,f,A);case 1:return a(p,d,f,A);case 3:return s(p,d,f,A)}}function a(p,d,f,A){let{base_:S,assigned_:g}=p,C=p.copy_;C.length<S.length&&([S,C]=[C,S],[f,A]=[A,f]);for(let h=0;h<S.length;h++)if(g[h]&&C[h]!==S[h]){let F=d.concat([h]);f.push({op:t,path:F,value:m(C[h])}),A.push({op:t,path:F,value:m(S[h])})}for(let h=S.length;h<C.length;h++){let F=d.concat([h]);f.push({op:r,path:F,value:m(C[h])})}for(let h=C.length-1;S.length<=h;--h){let F=d.concat([h]);A.push({op:n,path:F})}}function i(p,d,f,A){let{base_:S,copy_:g}=p;_s(p.assigned_,(C,h)=>{let F=Lm(S,C),I=Lm(g,C),v=h?js(S,C)?t:r:n;if(F===I&&v===t)return;let R=d.concat(C);f.push(v===n?{op:v,path:R}:{op:v,path:R,value:I}),A.push(v===r?{op:n,path:R}:v===n?{op:r,path:R,value:m(F)}:{op:t,path:R,value:m(F)})})}function s(p,d,f,A){let{base_:S,copy_:g}=p,C=0;S.forEach(h=>{if(!g.has(h)){let F=d.concat([C]);f.push({op:n,path:F,value:h}),A.unshift({op:r,path:F,value:h})}C++}),C=0,g.forEach(h=>{if(!S.has(h)){let F=d.concat([C]);f.push({op:r,path:F,value:h}),A.unshift({op:n,path:F,value:h})}C++})}function c(p,d,f,A){f.push({op:t,path:[],value:d===zm?void 0:d}),A.push({op:t,path:[],value:p})}function u(p,d){return d.forEach(f=>{let{path:A,op:S}=f,g=p;for(let I=0;I<A.length-1;I++){let v=Ro(g),R=A[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&je(19),typeof g=="function"&&R==="prototype"&&je(19),g=Lm(g,R),typeof g!="object"&&je(18,A.join("/"))}let C=Ro(g),h=l(f.value),F=A[A.length-1];switch(S){case t:switch(C){case 2:return g.set(F,h);case 3:je(16);default:return g[F]=h}case r:switch(C){case 1:return F==="-"?g.push(h):g.splice(F,0,h);case 2:return g.set(F,h);case 3:return g.add(h);default:return g[F]=h}case n:switch(C){case 1:return g.splice(F,1);case 2:return g.delete(F);case 3:return g.delete(f.value);default:return delete g[F]}default:je(17,S)}}),p}function l(p){if(!st(p))return p;if(Array.isArray(p))return p.map(l);if(Ws(p))return new Map(Array.from(p.entries()).map(([f,A])=>[f,l(A)]));if(Hs(p))return new Set(Array.from(p).map(l));let d=Object.create(Fo(p));for(let f in p)d[f]=l(p[f]);return js(p,Us)&&(d[Us]=p[Us]),d}function m(p){return gt(p)?l(p):p}Sw("Patches",{applyPatches_:u,generatePatches_:o,generateReplacementPatches_:c})}var St=new Aw,Yr=St.produce,Pu=St.produceWithPatches.bind(St),qL=St.setAutoFreeze.bind(St),DL=St.setUseStrictShallowCopy.bind(St),Jm=St.applyPatches.bind(St),VL=St.createDraft.bind(St),NL=St.finishDraft.bind(St);function Fw(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Rw(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function bw(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Iy=e=>Array.isArray(e)?e:[e];function vw(e){let t=Array.isArray(e[0])?e[0]:e;return bw(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Pw(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var LL=Symbol();var BL=Object.getPrototypeOf({});var ww=class{constructor(e){this.value=e}deref(){return this.value}},Iw=typeof WeakRef<"u"?WeakRef:ww,Ew=0,Ey=1;function wu(){return{s:Ew,v:void 0,o:null,p:null}}function pa(e,t={}){let r=wu(),{resultEqualityCheck:n}=t,o,a=0;function i(){let s=r,{length:c}=arguments;for(let m=0,p=c;m<p;m++){let d=arguments[m];if(typeof d=="function"||typeof d=="object"&&d!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let A=f.get(d);A===void 0?(s=wu(),f.set(d,s)):s=A}else{let f=s.p;f===null&&(s.p=f=new Map);let A=f.get(d);A===void 0?(s=wu(),f.set(d,s)):s=A}}let u=s,l;if(s.s===Ey)l=s.v;else if(l=e.apply(null,arguments),a++,n){let m=o?.deref?.()??o;m!=null&&n(m,l)&&(l=m,a!==0&&a--),o=typeof l=="object"&&l!==null||typeof l=="function"?new Iw(l):l}return u.s=Ey,u.v=l,l}return i.clearCache=()=>{r=wu(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Ty(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),Fw(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let l={...r,...c},{memoize:m,memoizeOptions:p=[],argsMemoize:d=pa,argsMemoizeOptions:f=[],devModeChecks:A={}}=l,S=Iy(p),g=Iy(f),C=vw(o),h=m(function(){return a++,u.apply(null,arguments)},...S),F=!0,I=d(function(){i++;let R=Pw(C,arguments);return s=h.apply(null,R),s},...g);return Object.assign(I,{resultFunc:u,memoizedResultFunc:h,dependencies:C,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:m,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Ty(pa),Tw=Object.assign((e,t=Y)=>{Rw(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((i,s,c)=>(i[r[c]]=s,i),{}))},{withTypes:()=>Tw});function Oy(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ky=Oy(),qy=Oy;var Ow=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?da:da.apply(null,arguments)},YL=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},kw=e=>e&&typeof e.match=="function";function y(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error($t(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Au(n)&&n.type===e,r}var Qy=class zs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,zs.prototype)}static get[Symbol.species](){return zs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new zs(...t[0].concat(this)):new zs(...t.concat(this))}};function Dy(e){return st(e)?Yr(e,()=>{}):e}function Vy(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function qw(e){return typeof e=="boolean"}var Dw=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new Qy;return r&&(qw(r)?i.push(ky):i.push(qy(r.extraArgument))),i},Ks="RTK_autoBatch",fa=()=>e=>({payload:e,meta:{[Ks]:!0}}),Ny=e=>t=>{setTimeout(t,e)},Vw=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ny(10):e.type==="callback"?e.queueNotification:Ny(e.timeout),u=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let m=()=>o&&l(),p=n.subscribe(m);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[Ks],a=!o,a&&(i||(i=!0,c(u))),n.dispatch(l)}finally{o=!0}}})},Nw=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Qy(e);return n&&o.push(Vw(typeof n=="object"?n:void 0)),o};function Ly(e){let t=Dw(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(ar(r))s=la(r);else throw new Error($t(1));let c;typeof n=="function"?c=n(t):c=t();let u=da;o&&(u=Ow({trace:!1,...typeof o=="object"&&o}));let l=Sy(...c),m=Nw(l),p=typeof i=="function"?i(m):m(),d=u(...p);return Qm(s,a,d)}function By(e){let t={},r=[],n,o={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error($t(28));if(s in t)throw new Error($t(29));return t[s]=i,o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function Mw(e){return typeof e=="function"}function $(e,t){let[r,n,o]=By(t),a;if(Mw(e))a=()=>Dy(e());else{let s=Dy(e);a=()=>s}function i(s=a(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[o]),u.reduce((l,m)=>{if(m)if(gt(l)){let d=m(l,c);return d===void 0?l:d}else{if(st(l))return Yr(l,p=>m(p,c));{let p=m(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return i.getInitialState=a,i}var Uy=(e,t)=>kw(e)?e.match(t):e(t);function ir(...e){return t=>e.some(r=>Uy(r,t))}function ma(...e){return t=>e.every(r=>Uy(r,t))}function Eu(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ys(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Tu(...e){return e.length===0?t=>Eu(t,["pending"]):Ys(e)?ir(...e.map(t=>t.pending)):Tu()(e[0])}function vo(...e){return e.length===0?t=>Eu(t,["rejected"]):Ys(e)?ir(...e.map(t=>t.rejected)):vo()(e[0])}function Js(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ma(vo(...e),t):Ys(e)?ma(vo(...e),t):Js()(e[0])}function Jr(...e){return e.length===0?t=>Eu(t,["fulfilled"]):Ys(e)?ir(...e.map(t=>t.fulfilled)):Jr()(e[0])}function Ou(...e){return e.length===0?t=>Eu(t,["pending","fulfilled","rejected"]):Ys(e)?ir(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ou()(e[0])}var Qw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ku=(e=21)=>{let t="",r=e;for(;r--;)t+=Qw[Math.random()*64|0];return t},Lw=["name","message","stack","code"],Xm=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},My=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},Bw=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Lw)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},W=(()=>{function e(t,r,n){let o=y(t+"/fulfilled",(c,u,l,m)=>({payload:c,meta:{...m||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),a=y(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),i=y(t+"/rejected",(c,u,l,m,p)=>({payload:m,error:(n&&n.serializeError||Bw)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c){return(u,l,m)=>{let p=n?.idGenerator?n.idGenerator(c):ku(),d=new AbortController,f,A;function S(C){A=C,d.abort()}let g=async function(){let C;try{let F=n?.condition?.(c,{getState:l,extra:m});if(_w(F)&&(F=await F),F===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:A||"Aborted"})},d.signal.addEventListener("abort",f)});u(a(p,c,n?.getPendingMeta?.({requestId:p,arg:c},{getState:l,extra:m}))),C=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:l,extra:m,requestId:p,signal:d.signal,abort:S,rejectWithValue:(v,R)=>new Xm(v,R),fulfillWithValue:(v,R)=>new My(v,R)})).then(v=>{if(v instanceof Xm)throw v;return v instanceof My?o(v.payload,p,c,v.meta):o(v,p,c)})])}catch(F){C=F instanceof Xm?i(null,p,c,F.payload,F.meta):i(F,p,c)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(C)&&C.meta.condition||u(C),C}();return Object.assign(g,{abort:S,requestId:p,arg:c,unwrap(){return g.then(Uw)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:o,settled:ir(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Uw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _w(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _y=Symbol.for("rtk-slice-createasyncthunk"),t0={[_y]:W};function jw(e,t){return`${e}/${t}`}function $w({creators:e}={}){let t=e?.asyncThunk?.[_y];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error($t(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(Ww()):n.reducers)||{},s=Object.keys(i),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(C,h){let F=typeof C=="string"?C:C.type;if(!F)throw new Error($t(12));if(F in c.sliceCaseReducersByType)throw new Error($t(13));return c.sliceCaseReducersByType[F]=h,u},addMatcher(C,h){return c.sliceMatchers.push({matcher:C,reducer:h}),u},exposeAction(C,h){return c.actionCreators[C]=h,u},exposeCaseReducer(C,h){return c.sliceCaseReducersByName[C]=h,u}};s.forEach(C=>{let h=i[C],F={reducerName:C,type:jw(o,C),createNotation:typeof n.reducers=="function"};zw(h)?Yw(F,h,u,t):Hw(F,h,u)});function l(){let[C={},h=[],F=void 0]=typeof n.extraReducers=="function"?By(n.extraReducers):[n.extraReducers],I={...C,...c.sliceCaseReducersByType};return $(n.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of c.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of h)v.addMatcher(R.matcher,R.reducer);F&&v.addDefaultCase(F)})}let m=C=>C,p=new Map,d;function f(C,h){return d||(d=l()),d(C,h)}function A(){return d||(d=l()),d.getInitialState()}function S(C,h=!1){function F(v){let R=v[C];return typeof R>"u"&&h&&(R=A()),R}function I(v=m){let R=Vy(p,h,()=>new WeakMap);return Vy(R,v,()=>{let b={};for(let[P,T]of Object.entries(n.selectors??{}))b[P]=Gw(T,v,A,h);return b})}return{reducerPath:C,getSelectors:I,get selectors(){return I(F)},selectSlice:F}}let g={name:o,reducer:f,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:A,...S(a),injectInto(C,{reducerPath:h,...F}={}){let I=h??a;return C.inject({reducerPath:I,reducer:f},F),{...g,...S(I,!0)}}};return g}}function Gw(e,t,r,n){function o(a,...i){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...i)}return o.unwrapped=e,o}var Po=$w();function Ww(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Hw({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!Kw(n))throw new Error($t(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?y(e,i):y(e))}function zw(e){return e._reducerDefinitionType==="asyncThunk"}function Kw(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Yw({type:e,reducerName:t},r,n,o){if(!o)throw new Error($t(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,m=o(e,a,l);n.exposeAction(t,m),i&&n.addCase(m.fulfilled,i),s&&n.addCase(m.pending,s),c&&n.addCase(m.rejected,c),u&&n.addMatcher(m.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Iu,pending:s||Iu,rejected:c||Iu,settled:u||Iu})}function Iu(){}var jy="listener",$y="completed",Gy="cancelled",r0=`task-${Gy}`,n0=`task-${$y}`,o0=`${jy}-${Gy}`,a0=`${jy}-${$y}`;var{assign:Wy}=Object;var Zm="listenerMiddleware";var Jw=Wy(y(`${Zm}/add`),{withTypes:()=>Jw}),i0=y(`${Zm}/removeAll`),Xw=Wy(y(`${Zm}/remove`),{withTypes:()=>Xw});var s0=Symbol.for("rtk-state-proxy-original");function $t(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Hy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Zw(e){return typeof e=="string"&&Hy.test(e)}var ef=Zw;var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function zy(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}var tf,eI=new Uint8Array(16);function rf(){if(!tf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tf=crypto.getRandomValues.bind(crypto)}return tf(eI)}var tI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nf={randomUUID:tI};function rI(e,t,r){if(nf.randomUUID&&!t&&!e)return nf.randomUUID();e=e||{};let n=e.random??e.rng?.()??rf();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return zy(n)}var of=rI;function Ky(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function nI({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;i!=="disabled"&&(n.call(r),t.send(o,a,r))}var Yy="visitorId";function oI(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Yy),o=n&&ef(n)?n:t.generateUUID();return r.setItem(Yy,o),o}}}var Xy="1.2.0";function aI(e){let{trackingId:t}=e;return{trackingId:t}}function iI(e){return(e.source||[]).concat([`relay@${Xy}`])}function Zy(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:i}=r,s=aI(t),c=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:iI(t),clientId:c,userAgent:i(),referrer:o(),location:a()})}function sI(e,t,r,n,o){return{...t,meta:Zy(e,r,n,o)}}var cI="*";function uI(){let e=[];function t({type:c,callback:u}){return e.findIndex(l=>l.type===c&&l.callback===u)}function r(c,u){return c.type==="*"||u===c.type}function n(c){return t(c)<0&&e.push(c),()=>s(c.type,c.callback)}function o(c){e.forEach(u=>{if(r(u,c.meta.type))try{u.callback(c)}catch(l){console.error(l)}})}function a(c){if(c===cI)e.length=0;else for(let u=e.length-1;u>=0;u--)e[u].type===c&&e.splice(u,1)}function i(c){let u=t(c);u>=0&&e.splice(u,1)}function s(c,u){u?i({type:c,callback:u}):a(c)}return{add:n,call:o,remove:s}}function Jy({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function lI(e){let t=Jy(e);return{get:()=>t,update:r=>{t=Jy({...t,...r})}}}var af=dI();function dI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function pI(){return{getItem(e){return af.getItem(e)||localStorage.getItem(e)},removeItem(e){af.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),af.setItem(e,t,31556952e3)}}}function mI(){let e=document.referrer;return e===""?null:e}function fI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Ky().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>mI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>of(),storage:pI()}}function gI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function SI(){return{getItem(){return null},removeItem(){},setItem(){}}}function yI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:SI()}}function hI(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=yI();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&CI()&&gI()?fI():n}function CI(){try{return typeof window=="object"}catch{return!1}}function xI(e){return{get:()=>Object.freeze(hI(e))}}function eh(e){let t=lI(e),r=uI(),n=xI(t),o=oI(n);return{emit:(a,i)=>{let s=t.get(),c=n.get(),u=sI(a,i,s,c,o);return nI({config:s,environment:c,event:u,listenerManager:r})},getMeta:a=>Zy(a,t.get(),n.get(),o),on:(a,i)=>r.add({type:a,callback:i}),off:(a,i)=>r.remove(a,i),updateConfig:a=>t.update(a),version:Xy}}var An="3.24.2-pre.dc880bbfb8",th=["@coveo/atomic","@coveo/quantic"];var Fn=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${An}`));var ga=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Fn(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i)=>eh({mode:a?"emit":"disabled",url:o??gu(e,t),token:r,trackingId:n,source:i}));function Xr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function w(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(m){i(m)}}function c(l){try{u(n.throw(l))}catch(m){i(m)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var ne;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ne||(ne={}));function uf(){return typeof window<"u"}function Ff(){return typeof navigator<"u"}function Sa(){return typeof document<"u"}function lf(){try{return typeof localStorage<"u"}catch{return!1}}function AI(){try{return typeof sessionStorage<"u"}catch{return!1}}function gh(){return Ff()&&navigator.cookieEnabled}var FI=[ne.click,ne.custom,ne.search,ne.view],RI=(e,t)=>FI.indexOf(e)!==-1?Object.assign({language:Sa()?document.documentElement.lang:"unknown",userAgent:Ff()?navigator.userAgent:"unknown"},t):t,ec=class e{static set(t,r,n){var o,a,i,s;n&&(a=new Date,a.setTime(a.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?rh(t,r,a):(i=s.split("."),o=i[i.length-2]+"."+i[i.length-1],rh(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function rh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function bI(){return lf()?localStorage:gh()?new tc:AI()?sessionStorage:new ha}var tc=class e{getItem(t){return ec.get(`${e.prefix}${t}`)}removeItem(t){ec.erase(`${e.prefix}${t}`)}setItem(t,r,n){ec.set(`${e.prefix}${t}`,r,n)}};tc.prefix="coveo_";var df=class{constructor(){this.cookieStorage=new tc}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},ha=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Xs="__coveo.analytics.history",Sh=20,yh=1e3*60,hh=75,Ca=class{constructor(t){this.store=t||bI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Xs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Xs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Xs,JSON.stringify(t.slice(0,Sh)))}catch{}}clear(){try{this.store.removeItem(Xs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,hh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>yh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ch=Object.freeze({__proto__:null,HistoryStore:Ca,MAX_NUMBER_OF_HISTORY_ELEMENTS:Sh,MAX_VALUE_SIZE:hh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:yh,STORE_KEY:Xs,default:Ca}),vI=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ne.view?(yield PI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),PI=e=>w(void 0,void 0,void 0,function*(){let t=new Ca,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),qu,wI=new Uint8Array(16);function II(){if(!qu&&(qu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qu(wI)}var EI=/^(?:[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 Vu(e){return typeof e=="string"&&EI.test(e)}var Ge=[];for(let e=0;e<256;++e)Ge.push((e+256).toString(16).slice(1));function xh(e,t=0){return(Ge[e[t+0]]+Ge[e[t+1]]+Ge[e[t+2]]+Ge[e[t+3]]+"-"+Ge[e[t+4]]+Ge[e[t+5]]+"-"+Ge[e[t+6]]+Ge[e[t+7]]+"-"+Ge[e[t+8]]+Ge[e[t+9]]+"-"+Ge[e[t+10]]+Ge[e[t+11]]+Ge[e[t+12]]+Ge[e[t+13]]+Ge[e[t+14]]+Ge[e[t+15]]).toLowerCase()}function TI(e){if(!Vu(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function OI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var kI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function DI(e,t,r){function n(o,a,i,s){var c;if(typeof o=="string"&&(o=OI(o)),typeof a=="string"&&(a=TI(a)),((c=a)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+o.length);if(u.set(a),u.set(o,a.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=u[l];return i}return xh(u)}try{n.name=e}catch{}return n.DNS=kI,n.URL=qI,n}var VI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nh={randomUUID:VI};function wo(e,t,r){if(nh.randomUUID&&!t&&!e)return nh.randomUUID();e=e||{};let n=e.random||(e.rng||II)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return xh(n)}function NI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function sf(e,t){return e<<t|e>>>32-t}function MI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let s=0;s<i.length;++s)e.push(i.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=e[i*64+c*4]<<24|e[i*64+c*4+1]<<16|e[i*64+c*4+2]<<8|e[i*64+c*4+3];a[i]=s}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=a[i][d];for(let d=16;d<80;++d)s[d]=sf(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let c=r[0],u=r[1],l=r[2],m=r[3],p=r[4];for(let d=0;d<80;++d){let f=Math.floor(d/20),A=sf(c,5)+NI(f,u,l,m)+p+t[f]+s[d]>>>0;p=m,m=l,l=sf(u,30)>>>0,u=c,c=A}r[0]=r[0]+c>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var QI=DI("v5",80,MI),oh=QI,Ah="2.30.45",ah=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Zs={pageview:"pageview",event:"event"},Nu=class{constructor({client:t,uuidGenerator:r=wo}){this.client=t,this.uuidGenerator=r}},pf=class extends Nu{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ah(window.location),this.lastReferrer=Sa()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:Sa()?document.title:"",encoding:Sa()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Zs.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Zs.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Zs.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Zs.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ah(window.location)}},Rn=class e{constructor(t,r){if(!Vu(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Vu(a)?new e(a,Number.parseInt(o)*1e3):null}};Rn.cvo_cid="cvo_cid";Rn.expirationTime=120;var mf=class extends Nu{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Rn.cvo_cid,new Rn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};mf.Id="link";var wt=Object.keys;function Du(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var cf=128,Fh=192,ih=224,sh=240;function LI(e){return(e&248)===sh?4:(e&sh)===ih?3:(e&ih)===Fh?2:1}function BI(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&cf)!=cf)break;if(r-=3,(n&Fh)!=cf){t-r>=LI(n)*3&&(r=t);break}}return e.substring(0,r)}var ff={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"},UI=wt(ff).map(e=>ff[e]),_I=[...UI].join("|"),jI=new RegExp(`^(${_I}$)`),$I={svcAction:"svc_action",svcActionData:"svc_action_data"},GI=e=>wt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ff[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),WI=e=>jI.test(e),HI=[WI],ch={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},uh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},We={action:"pa",list:"pal",listSource:"pls"},Mu={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},zI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],gf={id:"quoteId",affiliation:"quoteAffiliation"},Sf={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},KI={add:We,bookmark_add:We,bookmark_remove:We,click:We,checkout:We,checkout_option:We,detail:We,impression:We,remove:We,refund:Object.assign(Object.assign({},We),Mu),purchase:Object.assign(Object.assign({},We),Mu),quickview:We,quote:Object.assign(Object.assign({},We),gf),review:Object.assign(Object.assign({},We),Sf)},YI=wt(ch).map(e=>ch[e]),JI=wt(uh).map(e=>uh[e]),XI=wt(We).map(e=>We[e]),ZI=wt(Mu).map(e=>Mu[e]),eE=wt(Sf).map(e=>Sf[e]),tE=wt(gf).map(e=>gf[e]),rE=[...YI,"custom"].join("|"),nE=[...JI,"custom"].join("|"),Rh="(pr[0-9]+)",bh="(il[0-9]+pi[0-9]+)",oE=new RegExp(`^${Rh}(${rE})$`),aE=new RegExp(`^(${bh}(${nE}))|(il[0-9]+nm)$`),iE=new RegExp(`^(${XI.join("|")})$`),sE=new RegExp(`^(${ZI.join("|")})$`),cE=new RegExp(`^${Rh}custom$`),uE=new RegExp(`^${bh}custom$`),lE=new RegExp(`^(${[...zI,...eE,...tE].join("|")})$`),dE=e=>oE.test(e),pE=e=>aE.test(e),mE=e=>iE.test(e),fE=e=>sE.test(e),gE=e=>lE.test(e),SE=[pE,dE,mE,fE,gE],yE=[cE,uE],hE={anonymizeIp:"aip"},CE={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},xE={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},AE=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],FE=Object.assign(Object.assign(Object.assign(Object.assign({},hE),CE),xE),AE.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),yf=Object.assign(Object.assign({},FE),$I),RE=e=>{let t=!!e.action&&KI[e.action]||{};return wt(e).reduce((r,n)=>{let o=t[n]||yf[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},bE=wt(yf).map(e=>yf[e]),vE=e=>bE.indexOf(e)!==-1,PE=e=>e==="custom",wE=e=>[...SE,...HI,vE,PE].some(t=>t(e)),IE=e=>wt(e).reduce((t,r)=>{let n=EE(r);return n?Object.assign(Object.assign({},t),TE(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),EE=e=>{let t;return[...yE].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},TE=(e,t)=>wt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),hf=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return w(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=i;o=s||t;try{a=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Cf=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},lh=globalThis.fetch,Qu=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:u}=c,l=Xr(c,["url"]),m;try{m=yield lh(u,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(m.ok){let p=yield m.json();return p.visitorId&&o.setCurrentVisitorId(p.visitorId),p}else{try{m.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,m,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield lh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},xf=class{constructor(t,r){lf()&&gh()?this.storage=new df:lf()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ha),this.client=new Qu(t),this.beaconClient=new hf(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Af=class{constructor(t,r){this.storage=r||new ha,this.client=new Qu(t)}getClientDependingOnEventType(t){return this.client}},Lu=class{constructor(){this.storage=new ha,this.client=new Cf}getClientDependingOnEventType(t){return this.client}},OE="xx",kE=e=>e?.startsWith(OE)||!1,qE=`
|
|
19
|
+
`+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":yP(l,n,t);break}}}}function yP(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function hP(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function QS(){return{data:"",event:"",id:"",retry:void 0}}var vm="text/event-stream",CP=1e3,_S="last-event-id";function jS(){return typeof window<"u"}function pu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:s,fetch:c,...u}){return new Promise((l,m)=>{let p={...r};p.accept||(p.accept=vm);let d;function f(){d?.abort(),document.hidden||F()}!s&&jS()&&document.addEventListener("visibilitychange",f);let A=CP,S;function g(){jS()&&document.removeEventListener("visibilitychange",f),clearTimeout(S),d?.abort()}t?.addEventListener("abort",()=>{g(),l()});let C=c??fetch,h=n??xP;async function F(){d=AbortController?new AbortController:null;try{let I=await C(e,{...u,headers:p,signal:d?.signal});await h(I),await LS(I.body,BS(US(v=>{v?p[_S]=v:delete p[_S]},v=>{A=v},o))),a?.(),g(),l()}catch(I){if(!d?.signal?.aborted)try{let v=i?.(I)??A;clearTimeout(S),S=setTimeout(F,v)}catch(v){g(),m(v)}}}F()})}function xP(e){let t=e.headers.get("content-type");if(!t?.startsWith(vm))throw new Error(`Expected content-type to be ${vm}, Actual: ${t}`)}var yn=class{constructor(t){Re(this,"_basePath");Re(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var AP=(e,t,r)=>new yn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,$S=3,FP=5e3,RP="text/event-stream",Im=1,Pm=class extends Error{},Ms=class extends Error{constructor(r){super(r.message);this.payload=r}},wm=class{constructor(){Re(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},mu=class{constructor(t){Re(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:s,abort:c,close:u,resetAnswer:l}=r,m=new wm;if(!a){this.logger.error("No stream ID found");return}let p=0,d,f=()=>{d&&!m.isActive(d)&&(S?.abort(),l(),g())},A=()=>{m.remove(d),d=NS(f,d,FP),m.add(d)},S=new AbortController,g=()=>pu(AP(n,o,a),{method:"GET",fetch,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:S?.signal,async onopen(C){if(C.ok&&C.headers.get("content-type")===RP)return;throw C.status>=400&&C.status<500&&C.status!==429?new Ms({message:"Error opening stream",code:C.status}):new Pm},onmessage:C=>{if(S?.signal.aborted)return;let h=JSON.parse(C.data);if(h.finishReason==="ERROR"){m.remove(d),S?.abort(),c({message:h.errorMessage,code:h.statusCode});return}s(h),p=0,h.finishReason==="COMPLETED"?(m.remove(d),u()):A()},onerror:C=>{if(!S?.signal.aborted){if(m.remove(d),C instanceof Ms)throw S?.abort(),c(C),C;if(++p>$S){this.logger.info("Maximum retry exceeded.");let h={message:"Failed to complete stream.",code:Im};throw S?.abort(),c(h),new Ms(h)}this.logger.info(`Retrying...(${p}/${$S})`),l()}}});return g(),S}};var ry=or(XS(),1);var KP="recommendation-internal-options",$Q=Symbol.for(KP);var M=new Error("Failed to load reducers."),ca=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var xo=class extends Error{constructor(r,n){super();Re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function ZS(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function ey(e){return typeof e!="object"||!e?!1:Object.values(e).every(YP)}function YP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ty(e){return e===429}var bt=class e{static async call(t){let r=JP(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,s=async()=>{let c=await fetch(a,i);if(ty(c.status))throw c;return c};try{let c=await(0,ry.backOff)(s,{retry:u=>{let l=u&&ty(u.status);return l&&n.info("Platform retrying request"),l}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new ca;case 404:throw new xo(a,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new xo(a):c}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:s,...c}=t,u=Ns(c);try{let l=await o(t,n,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return u}};function Ue(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Ie(e,t="prod"){return`${Ue(e,t)}/rest/search/v2`}function gu(e,t="prod"){return`${Ue(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function JP(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",c=XP(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:c},signal:i}}function XP(e,t){return t==="application/x-www-form-urlencoded"?ey(e)?ZS(e):"":JSON.stringify(e)}var Su=e=>e;var ny=e=>e,oy=e=>e,ay=e=>e;var dy=require("@coveo/bueno");function ua(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ft(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ua(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ua(),extendedResults:{}}}function hn(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var Cn=e=>{let{response:t}=e;return t.body?ZP(e):ew(t)},ZP=e=>rw(e)?nw(e):tw(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},ew=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function tw(e){return e.body.statusCode!==void 0}function rw(e){return e.body.exception!==void 0}var nw=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var xn=class{constructor(){Re(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};function iy(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var zr=(e,t,r,n)=>{let o=new yn(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var sy=(e,t)=>{let r=new yn(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},cy=async(e,t)=>{let r=await bt.call({...zr(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:hn(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=iy(r),o=await r.arrayBuffer(),i=new TextDecoder(n).decode(o);return ow(i)?{success:i}:{error:Cn({response:r,body:i})}};function ow(e){return typeof e=="string"}function aw(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function iw(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Bs(e,t){if(t&&e.name==="AbortError")return{error:iw(e)};if(e instanceof xo)return{error:aw(e)};throw e}var yu=class{constructor(t){this.options=t;Re(this,"apiCallsQueues",{unknown:new xn,mainSearch:new xn,facetValues:new xn,foldingCollection:new xn,instantResults:new xn})}async plan(t){let r=await bt.call({...zr(t,"POST","application/json","/plan"),requestParams:hn(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Bs(r);let n=await r.json();return cw(n)?{success:n}:{error:Cn({response:r,body:n})}}async querySuggest(t){let r=await bt.call({...zr(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:hn(t),...this.options});if(r instanceof Error)return Bs(r);let n=await r.json(),o={response:r,body:n};return sw(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:Cn(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(s=>bt.call({...zr(t,"POST","application/json",""),requestParams:hn(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:s??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Bs(o,r?.disableAbortWarning);let a=await o.json(),i={response:o,body:a};return uy(a)?(i.body=ly(a),{success:(await this.options.postprocessSearchResponseMiddleware(i)).body}):{error:Cn(i)}}async facetSearch(t){let r=await bt.call({...zr(t,"POST","application/json","/facet"),requestParams:hn(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await bt.call({...zr(t,"POST","application/json",""),requestParams:hn(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(uy(n)){let o={response:r,body:n};return o.body=ly(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:Cn({response:r,body:n})}}async html(t){return cy(t,{...this.options})}async fieldDescriptions(t){let r=await bt.call({...zr(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return uw(n)?{success:n}:{error:Cn({response:r,body:n})}}},hu=e=>e.success!==void 0,Ve=e=>e.error!==void 0;function uy(e){return e.results!==void 0}function ly(e){let t=ua();return(0,dy.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function sw(e){return e.completions!==void 0}function cw(e){return e.preprocessingOutput!==void 0}function uw(e){return e.fields!==void 0}var at=require("@coveo/bueno"),V=new at.StringValue({required:!0,emptyAllowed:!1}),pe=new at.StringValue({required:!1,emptyAllowed:!1}),se=new at.StringValue({required:!0,emptyAllowed:!0}),py=new at.StringValue({required:!1,emptyAllowed:!0}),Cu=new at.ArrayValue({each:V,required:!0}),my=new at.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Kr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),vt=(e,t)=>{if("required"in t)return{payload:new at.Schema({value:t}).validate({value:e}).value};let o=new at.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new at.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return vt(e,t)}catch(r){return{payload:e,error:Kr(r)}}},Ee=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return fy(e,t,r,o,"Controller initialization error")},ue=(e,t,r,n)=>{let o=`Check the options of ${n}`;return fy(e,t,r,o,"Controller initialization error")},fy=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};var ht=require("@coveo/bueno");function _e(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var lw=typeof Symbol=="function"&&Symbol.observable||"@@observable",gy=lw,Mm=()=>Math.random().toString(36).substring(7).split("").join("."),dw={INIT:`@@redux/INIT${Mm()}`,REPLACE:`@@redux/REPLACE${Mm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mm()}`},xu=dw;function ar(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Qm(e,t,r){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_e(1));return r(Qm)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,c=!1;function u(){i===a&&(i=new Map,a.forEach((S,g)=>{i.set(g,S)}))}function l(){if(c)throw new Error(_e(3));return o}function m(S){if(typeof S!="function")throw new Error(_e(4));if(c)throw new Error(_e(5));let g=!0;u();let C=s++;return i.set(C,S),function(){if(g){if(c)throw new Error(_e(6));g=!1,u(),i.delete(C),a=null}}}function p(S){if(!ar(S))throw new Error(_e(7));if(typeof S.type>"u")throw new Error(_e(8));if(typeof S.type!="string")throw new Error(_e(17));if(c)throw new Error(_e(9));try{c=!0,o=n(o,S)}finally{c=!1}return(a=i).forEach(C=>{C()}),S}function d(S){if(typeof S!="function")throw new Error(_e(10));n=S,p({type:xu.REPLACE})}function f(){let S=m;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(_e(11));function C(){let F=g;F.next&&F.next(l())}return C(),{unsubscribe:S(C)}},[gy](){return this}}}return p({type:xu.INIT}),{dispatch:p,subscribe:m,getState:l,replaceReducer:d,[gy]:f}}function pw(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xu.INIT})>"u")throw new Error(_e(12));if(typeof r(void 0,{type:xu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function la(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,a;try{pw(r)}catch(i){a=i}return function(s={},c){if(a)throw a;let u=!1,l={};for(let m=0;m<n.length;m++){let p=n[m],d=r[p],f=s[p],A=d(f,c);if(typeof A>"u"){let S=c&&c.type;throw new Error(_e(14))}l[p]=A,u=u||A!==f}return u=u||n.length!==Object.keys(s).length,u?l:s}}function da(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Sy(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(_e(15))},i={getState:o.getState,dispatch:(c,...u)=>a(c,...u)},s=e.map(c=>c(i));return a=da(...s)(o.dispatch),{...o,dispatch:a}}}function Au(e){return ar(e)&&"type"in e&&typeof e.type=="string"}var zm=Symbol.for("immer-nothing"),Us=Symbol.for("immer-draftable"),it=Symbol.for("immer-state");function je(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[it]}function st(e){return e?Ay(e)||Array.isArray(e)||!!e[Us]||!!e.constructor?.[Us]||Ws(e)||Hs(e):!1}var mw=Object.prototype.constructor.toString();function Ay(e){if(!e||typeof e!="object")return!1;let t=Fo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===mw}function Km(e){return gt(e)||je(15,e),e[it].base_}function _s(e,t){Ro(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Ro(e){let t=e[it];return t?t.type_:Array.isArray(e)?1:Ws(e)?2:Hs(e)?3:0}function js(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Lm(e,t){return Ro(e)===2?e.get(t):e[t]}function Fy(e,t,r){let n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function fw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ws(e){return e instanceof Map}function Hs(e){return e instanceof Set}function Ao(e){return e.copy_||e.base_}function _m(e,t){if(Ws(e))return new Map(e);if(Hs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ay(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[it];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],s=n[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Fo(e),n)}else{let n=Fo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function bu(e,t=!1){return vu(e)||gt(e)||!st(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=gw),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>bu(n,!0))),e}function gw(){je(2)}function vu(e){return Object.isFrozen(e)}var jm={};function bo(e){let t=jm[e];return t||je(0,e),t}function Sw(e,t){jm[e]||(jm[e]=t)}var $s;function Ry(){return $s}function yw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yy(e,t){t&&(bo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $m(e){Gm(e),e.drafts_.forEach(hw),e.drafts_=null}function Gm(e){e===$s&&($s=e.parent_)}function hy(e){return $s=yw($s,e)}function hw(e){let t=e[it];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Cy(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[it].modified_&&($m(t),je(4)),st(e)&&(e=Fu(t,e),t.parent_||Ru(t,e)),t.patches_&&bo("Patches").generateReplacementPatches_(r[it].base_,e,t.patches_,t.inversePatches_)):e=Fu(t,r,[]),$m(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zm?e:void 0}function Fu(e,t,r){if(vu(t))return t;let n=t[it];if(!n)return _s(t,(o,a)=>xy(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Ru(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),_s(a,(s,c)=>xy(e,n,o,s,c,r,i)),Ru(e,o,!1),r&&e.patches_&&bo("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function xy(e,t,r,n,o,a,i){if(gt(o)){let s=a&&t&&t.type_!==3&&!js(t.assigned_,n)?a.concat(n):void 0,c=Fu(e,o,s);if(Fy(r,n,c),gt(c))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(st(o)&&!vu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fu(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Ru(e,o)}}function Ru(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bu(t,r)}function Cw(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ry(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=Ym;r&&(o=[n],a=Gs);let{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}var Ym={get(e,t){if(t===it)return e;let r=Ao(e);if(!js(r,t))return xw(e,r,t);let n=r[t];return e.finalized_||!st(n)?n:n===Bm(e.base_,t)?(Um(e),e.copy_[t]=Hm(n,e)):n},has(e,t){return t in Ao(e)},ownKeys(e){return Reflect.ownKeys(Ao(e))},set(e,t,r){let n=by(Ao(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Bm(Ao(e),t),a=o?.[it];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(fw(r,o)&&(r!==void 0||js(e.base_,t)))return!0;Um(e),Wm(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Bm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Um(e),Wm(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ao(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){je(11)},getPrototypeOf(e){return Fo(e.base_)},setPrototypeOf(){je(12)}},Gs={};_s(Ym,(e,t)=>{Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)};Gs.set=function(e,t,r){return Ym.set.call(this,e[0],t,r,e[0])};function Bm(e,t){let r=e[it];return(r?Ao(r):e)[t]}function xw(e,t,r){let n=by(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function by(e,t){if(!(t in e))return;let r=Fo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Fo(r)}}function Wm(e){e.modified_||(e.modified_=!0,e.parent_&&Wm(e.parent_))}function Um(e){e.copy_||(e.copy_=_m(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Aw=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(c=a,...u){return i.produce(c,l=>r.call(this,l,...u))}}typeof r!="function"&&je(6),n!==void 0&&typeof n!="function"&&je(7);let o;if(st(t)){let a=hy(this),i=Hm(t,void 0),s=!0;try{o=r(i),s=!1}finally{s?$m(a):Gm(a)}return yy(a,n),Cy(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===zm&&(o=void 0),this.autoFreeze_&&bu(o,!0),n){let a=[],i=[];bo("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else je(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,c=>t(c,...s));let n,o;return[this.produce(t,r,(i,s)=>{n=i,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){st(e)||je(8),gt(e)&&(e=vy(e));let t=hy(this),r=Hm(e,void 0);return r[it].isManual_=!0,Gm(t),r}finishDraft(e,t){let r=e&&e[it];(!r||!r.isManual_)&&je(9);let{scope_:n}=r;return yy(n,t),Cy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=bo("Patches").applyPatches_;return gt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Hm(e,t){let r=Ws(e)?bo("MapSet").proxyMap_(e,t):Hs(e)?bo("MapSet").proxySet_(e,t):Cw(e,t);return(t?t.scope_:Ry()).drafts_.push(r),r}function vy(e){return gt(e)||je(10,e),Py(e)}function Py(e){if(!st(e)||vu(e))return e;let t=e[it],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=_m(e,t.scope_.immer_.useStrictShallowCopy_)}else r=_m(e,!0);return _s(r,(n,o)=>{Fy(r,n,Py(o))}),t&&(t.finalized_=!1),r}function wy(){let t="replace",r="add",n="remove";function o(p,d,f,A){switch(p.type_){case 0:case 2:return i(p,d,f,A);case 1:return a(p,d,f,A);case 3:return s(p,d,f,A)}}function a(p,d,f,A){let{base_:S,assigned_:g}=p,C=p.copy_;C.length<S.length&&([S,C]=[C,S],[f,A]=[A,f]);for(let h=0;h<S.length;h++)if(g[h]&&C[h]!==S[h]){let F=d.concat([h]);f.push({op:t,path:F,value:m(C[h])}),A.push({op:t,path:F,value:m(S[h])})}for(let h=S.length;h<C.length;h++){let F=d.concat([h]);f.push({op:r,path:F,value:m(C[h])})}for(let h=C.length-1;S.length<=h;--h){let F=d.concat([h]);A.push({op:n,path:F})}}function i(p,d,f,A){let{base_:S,copy_:g}=p;_s(p.assigned_,(C,h)=>{let F=Lm(S,C),I=Lm(g,C),v=h?js(S,C)?t:r:n;if(F===I&&v===t)return;let R=d.concat(C);f.push(v===n?{op:v,path:R}:{op:v,path:R,value:I}),A.push(v===r?{op:n,path:R}:v===n?{op:r,path:R,value:m(F)}:{op:t,path:R,value:m(F)})})}function s(p,d,f,A){let{base_:S,copy_:g}=p,C=0;S.forEach(h=>{if(!g.has(h)){let F=d.concat([C]);f.push({op:n,path:F,value:h}),A.unshift({op:r,path:F,value:h})}C++}),C=0,g.forEach(h=>{if(!S.has(h)){let F=d.concat([C]);f.push({op:r,path:F,value:h}),A.unshift({op:n,path:F,value:h})}C++})}function c(p,d,f,A){f.push({op:t,path:[],value:d===zm?void 0:d}),A.push({op:t,path:[],value:p})}function u(p,d){return d.forEach(f=>{let{path:A,op:S}=f,g=p;for(let I=0;I<A.length-1;I++){let v=Ro(g),R=A[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&je(19),typeof g=="function"&&R==="prototype"&&je(19),g=Lm(g,R),typeof g!="object"&&je(18,A.join("/"))}let C=Ro(g),h=l(f.value),F=A[A.length-1];switch(S){case t:switch(C){case 2:return g.set(F,h);case 3:je(16);default:return g[F]=h}case r:switch(C){case 1:return F==="-"?g.push(h):g.splice(F,0,h);case 2:return g.set(F,h);case 3:return g.add(h);default:return g[F]=h}case n:switch(C){case 1:return g.splice(F,1);case 2:return g.delete(F);case 3:return g.delete(f.value);default:return delete g[F]}default:je(17,S)}}),p}function l(p){if(!st(p))return p;if(Array.isArray(p))return p.map(l);if(Ws(p))return new Map(Array.from(p.entries()).map(([f,A])=>[f,l(A)]));if(Hs(p))return new Set(Array.from(p).map(l));let d=Object.create(Fo(p));for(let f in p)d[f]=l(p[f]);return js(p,Us)&&(d[Us]=p[Us]),d}function m(p){return gt(p)?l(p):p}Sw("Patches",{applyPatches_:u,generatePatches_:o,generateReplacementPatches_:c})}var St=new Aw,Yr=St.produce,Pu=St.produceWithPatches.bind(St),qL=St.setAutoFreeze.bind(St),DL=St.setUseStrictShallowCopy.bind(St),Jm=St.applyPatches.bind(St),VL=St.createDraft.bind(St),NL=St.finishDraft.bind(St);function Fw(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Rw(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function bw(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Iy=e=>Array.isArray(e)?e:[e];function vw(e){let t=Array.isArray(e[0])?e[0]:e;return bw(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Pw(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var LL=Symbol();var BL=Object.getPrototypeOf({});var ww=class{constructor(e){this.value=e}deref(){return this.value}},Iw=typeof WeakRef<"u"?WeakRef:ww,Ew=0,Ey=1;function wu(){return{s:Ew,v:void 0,o:null,p:null}}function pa(e,t={}){let r=wu(),{resultEqualityCheck:n}=t,o,a=0;function i(){let s=r,{length:c}=arguments;for(let m=0,p=c;m<p;m++){let d=arguments[m];if(typeof d=="function"||typeof d=="object"&&d!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let A=f.get(d);A===void 0?(s=wu(),f.set(d,s)):s=A}else{let f=s.p;f===null&&(s.p=f=new Map);let A=f.get(d);A===void 0?(s=wu(),f.set(d,s)):s=A}}let u=s,l;if(s.s===Ey)l=s.v;else if(l=e.apply(null,arguments),a++,n){let m=o?.deref?.()??o;m!=null&&n(m,l)&&(l=m,a!==0&&a--),o=typeof l=="object"&&l!==null||typeof l=="function"?new Iw(l):l}return u.s=Ey,u.v=l,l}return i.clearCache=()=>{r=wu(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Ty(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),Fw(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let l={...r,...c},{memoize:m,memoizeOptions:p=[],argsMemoize:d=pa,argsMemoizeOptions:f=[],devModeChecks:A={}}=l,S=Iy(p),g=Iy(f),C=vw(o),h=m(function(){return a++,u.apply(null,arguments)},...S),F=!0,I=d(function(){i++;let R=Pw(C,arguments);return s=h.apply(null,R),s},...g);return Object.assign(I,{resultFunc:u,memoizedResultFunc:h,dependencies:C,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:m,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Ty(pa),Tw=Object.assign((e,t=Y)=>{Rw(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((i,s,c)=>(i[r[c]]=s,i),{}))},{withTypes:()=>Tw});function Oy(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ky=Oy(),qy=Oy;var Ow=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?da:da.apply(null,arguments)},YL=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},kw=e=>e&&typeof e.match=="function";function y(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error($t(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Au(n)&&n.type===e,r}var Qy=class zs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,zs.prototype)}static get[Symbol.species](){return zs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new zs(...t[0].concat(this)):new zs(...t.concat(this))}};function Dy(e){return st(e)?Yr(e,()=>{}):e}function Vy(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function qw(e){return typeof e=="boolean"}var Dw=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new Qy;return r&&(qw(r)?i.push(ky):i.push(qy(r.extraArgument))),i},Ks="RTK_autoBatch",fa=()=>e=>({payload:e,meta:{[Ks]:!0}}),Ny=e=>t=>{setTimeout(t,e)},Vw=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ny(10):e.type==="callback"?e.queueNotification:Ny(e.timeout),u=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let m=()=>o&&l(),p=n.subscribe(m);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[Ks],a=!o,a&&(i||(i=!0,c(u))),n.dispatch(l)}finally{o=!0}}})},Nw=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Qy(e);return n&&o.push(Vw(typeof n=="object"?n:void 0)),o};function Ly(e){let t=Dw(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(ar(r))s=la(r);else throw new Error($t(1));let c;typeof n=="function"?c=n(t):c=t();let u=da;o&&(u=Ow({trace:!1,...typeof o=="object"&&o}));let l=Sy(...c),m=Nw(l),p=typeof i=="function"?i(m):m(),d=u(...p);return Qm(s,a,d)}function By(e){let t={},r=[],n,o={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error($t(28));if(s in t)throw new Error($t(29));return t[s]=i,o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function Mw(e){return typeof e=="function"}function $(e,t){let[r,n,o]=By(t),a;if(Mw(e))a=()=>Dy(e());else{let s=Dy(e);a=()=>s}function i(s=a(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[o]),u.reduce((l,m)=>{if(m)if(gt(l)){let d=m(l,c);return d===void 0?l:d}else{if(st(l))return Yr(l,p=>m(p,c));{let p=m(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return i.getInitialState=a,i}var Uy=(e,t)=>kw(e)?e.match(t):e(t);function ir(...e){return t=>e.some(r=>Uy(r,t))}function ma(...e){return t=>e.every(r=>Uy(r,t))}function Eu(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ys(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Tu(...e){return e.length===0?t=>Eu(t,["pending"]):Ys(e)?ir(...e.map(t=>t.pending)):Tu()(e[0])}function vo(...e){return e.length===0?t=>Eu(t,["rejected"]):Ys(e)?ir(...e.map(t=>t.rejected)):vo()(e[0])}function Js(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ma(vo(...e),t):Ys(e)?ma(vo(...e),t):Js()(e[0])}function Jr(...e){return e.length===0?t=>Eu(t,["fulfilled"]):Ys(e)?ir(...e.map(t=>t.fulfilled)):Jr()(e[0])}function Ou(...e){return e.length===0?t=>Eu(t,["pending","fulfilled","rejected"]):Ys(e)?ir(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ou()(e[0])}var Qw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ku=(e=21)=>{let t="",r=e;for(;r--;)t+=Qw[Math.random()*64|0];return t},Lw=["name","message","stack","code"],Xm=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},My=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},Bw=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Lw)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},W=(()=>{function e(t,r,n){let o=y(t+"/fulfilled",(c,u,l,m)=>({payload:c,meta:{...m||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),a=y(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),i=y(t+"/rejected",(c,u,l,m,p)=>({payload:m,error:(n&&n.serializeError||Bw)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c){return(u,l,m)=>{let p=n?.idGenerator?n.idGenerator(c):ku(),d=new AbortController,f,A;function S(C){A=C,d.abort()}let g=async function(){let C;try{let F=n?.condition?.(c,{getState:l,extra:m});if(_w(F)&&(F=await F),F===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:A||"Aborted"})},d.signal.addEventListener("abort",f)});u(a(p,c,n?.getPendingMeta?.({requestId:p,arg:c},{getState:l,extra:m}))),C=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:l,extra:m,requestId:p,signal:d.signal,abort:S,rejectWithValue:(v,R)=>new Xm(v,R),fulfillWithValue:(v,R)=>new My(v,R)})).then(v=>{if(v instanceof Xm)throw v;return v instanceof My?o(v.payload,p,c,v.meta):o(v,p,c)})])}catch(F){C=F instanceof Xm?i(null,p,c,F.payload,F.meta):i(F,p,c)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(C)&&C.meta.condition||u(C),C}();return Object.assign(g,{abort:S,requestId:p,arg:c,unwrap(){return g.then(Uw)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:o,settled:ir(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Uw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _w(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _y=Symbol.for("rtk-slice-createasyncthunk"),t0={[_y]:W};function jw(e,t){return`${e}/${t}`}function $w({creators:e}={}){let t=e?.asyncThunk?.[_y];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error($t(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(Ww()):n.reducers)||{},s=Object.keys(i),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(C,h){let F=typeof C=="string"?C:C.type;if(!F)throw new Error($t(12));if(F in c.sliceCaseReducersByType)throw new Error($t(13));return c.sliceCaseReducersByType[F]=h,u},addMatcher(C,h){return c.sliceMatchers.push({matcher:C,reducer:h}),u},exposeAction(C,h){return c.actionCreators[C]=h,u},exposeCaseReducer(C,h){return c.sliceCaseReducersByName[C]=h,u}};s.forEach(C=>{let h=i[C],F={reducerName:C,type:jw(o,C),createNotation:typeof n.reducers=="function"};zw(h)?Yw(F,h,u,t):Hw(F,h,u)});function l(){let[C={},h=[],F=void 0]=typeof n.extraReducers=="function"?By(n.extraReducers):[n.extraReducers],I={...C,...c.sliceCaseReducersByType};return $(n.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of c.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of h)v.addMatcher(R.matcher,R.reducer);F&&v.addDefaultCase(F)})}let m=C=>C,p=new Map,d;function f(C,h){return d||(d=l()),d(C,h)}function A(){return d||(d=l()),d.getInitialState()}function S(C,h=!1){function F(v){let R=v[C];return typeof R>"u"&&h&&(R=A()),R}function I(v=m){let R=Vy(p,h,()=>new WeakMap);return Vy(R,v,()=>{let b={};for(let[P,T]of Object.entries(n.selectors??{}))b[P]=Gw(T,v,A,h);return b})}return{reducerPath:C,getSelectors:I,get selectors(){return I(F)},selectSlice:F}}let g={name:o,reducer:f,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:A,...S(a),injectInto(C,{reducerPath:h,...F}={}){let I=h??a;return C.inject({reducerPath:I,reducer:f},F),{...g,...S(I,!0)}}};return g}}function Gw(e,t,r,n){function o(a,...i){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...i)}return o.unwrapped=e,o}var Po=$w();function Ww(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Hw({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!Kw(n))throw new Error($t(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?y(e,i):y(e))}function zw(e){return e._reducerDefinitionType==="asyncThunk"}function Kw(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Yw({type:e,reducerName:t},r,n,o){if(!o)throw new Error($t(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,m=o(e,a,l);n.exposeAction(t,m),i&&n.addCase(m.fulfilled,i),s&&n.addCase(m.pending,s),c&&n.addCase(m.rejected,c),u&&n.addMatcher(m.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Iu,pending:s||Iu,rejected:c||Iu,settled:u||Iu})}function Iu(){}var jy="listener",$y="completed",Gy="cancelled",r0=`task-${Gy}`,n0=`task-${$y}`,o0=`${jy}-${Gy}`,a0=`${jy}-${$y}`;var{assign:Wy}=Object;var Zm="listenerMiddleware";var Jw=Wy(y(`${Zm}/add`),{withTypes:()=>Jw}),i0=y(`${Zm}/removeAll`),Xw=Wy(y(`${Zm}/remove`),{withTypes:()=>Xw});var s0=Symbol.for("rtk-state-proxy-original");function $t(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Hy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Zw(e){return typeof e=="string"&&Hy.test(e)}var ef=Zw;var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function zy(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}var tf,eI=new Uint8Array(16);function rf(){if(!tf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tf=crypto.getRandomValues.bind(crypto)}return tf(eI)}var tI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nf={randomUUID:tI};function rI(e,t,r){if(nf.randomUUID&&!t&&!e)return nf.randomUUID();e=e||{};let n=e.random??e.rng?.()??rf();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return zy(n)}var of=rI;function Ky(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function nI({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;i!=="disabled"&&(n.call(r),t.send(o,a,r))}var Yy="visitorId";function oI(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Yy),o=n&&ef(n)?n:t.generateUUID();return r.setItem(Yy,o),o}}}var Xy="1.2.0";function aI(e){let{trackingId:t}=e;return{trackingId:t}}function iI(e){return(e.source||[]).concat([`relay@${Xy}`])}function Zy(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:i}=r,s=aI(t),c=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:iI(t),clientId:c,userAgent:i(),referrer:o(),location:a()})}function sI(e,t,r,n,o){return{...t,meta:Zy(e,r,n,o)}}var cI="*";function uI(){let e=[];function t({type:c,callback:u}){return e.findIndex(l=>l.type===c&&l.callback===u)}function r(c,u){return c.type==="*"||u===c.type}function n(c){return t(c)<0&&e.push(c),()=>s(c.type,c.callback)}function o(c){e.forEach(u=>{if(r(u,c.meta.type))try{u.callback(c)}catch(l){console.error(l)}})}function a(c){if(c===cI)e.length=0;else for(let u=e.length-1;u>=0;u--)e[u].type===c&&e.splice(u,1)}function i(c){let u=t(c);u>=0&&e.splice(u,1)}function s(c,u){u?i({type:c,callback:u}):a(c)}return{add:n,call:o,remove:s}}function Jy({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function lI(e){let t=Jy(e);return{get:()=>t,update:r=>{t=Jy({...t,...r})}}}var af=dI();function dI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function pI(){return{getItem(e){return af.getItem(e)||localStorage.getItem(e)},removeItem(e){af.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),af.setItem(e,t,31556952e3)}}}function mI(){let e=document.referrer;return e===""?null:e}function fI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Ky().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>mI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>of(),storage:pI()}}function gI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function SI(){return{getItem(){return null},removeItem(){},setItem(){}}}function yI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:SI()}}function hI(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=yI();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&CI()&&gI()?fI():n}function CI(){try{return typeof window=="object"}catch{return!1}}function xI(e){return{get:()=>Object.freeze(hI(e))}}function eh(e){let t=lI(e),r=uI(),n=xI(t),o=oI(n);return{emit:(a,i)=>{let s=t.get(),c=n.get(),u=sI(a,i,s,c,o);return nI({config:s,environment:c,event:u,listenerManager:r})},getMeta:a=>Zy(a,t.get(),n.get(),o),on:(a,i)=>r.add({type:a,callback:i}),off:(a,i)=>r.remove(a,i),updateConfig:a=>t.update(a),version:Xy}}var An="3.24.2-pre.e4ba2aa040",th=["@coveo/atomic","@coveo/quantic"];var Fn=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${An}`));var ga=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Fn(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i)=>eh({mode:a?"emit":"disabled",url:o??gu(e,t),token:r,trackingId:n,source:i}));function Xr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function w(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(m){i(m)}}function c(l){try{u(n.throw(l))}catch(m){i(m)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var ne;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ne||(ne={}));function uf(){return typeof window<"u"}function Ff(){return typeof navigator<"u"}function Sa(){return typeof document<"u"}function lf(){try{return typeof localStorage<"u"}catch{return!1}}function AI(){try{return typeof sessionStorage<"u"}catch{return!1}}function gh(){return Ff()&&navigator.cookieEnabled}var FI=[ne.click,ne.custom,ne.search,ne.view],RI=(e,t)=>FI.indexOf(e)!==-1?Object.assign({language:Sa()?document.documentElement.lang:"unknown",userAgent:Ff()?navigator.userAgent:"unknown"},t):t,ec=class e{static set(t,r,n){var o,a,i,s;n&&(a=new Date,a.setTime(a.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?rh(t,r,a):(i=s.split("."),o=i[i.length-2]+"."+i[i.length-1],rh(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function rh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function bI(){return lf()?localStorage:gh()?new tc:AI()?sessionStorage:new ha}var tc=class e{getItem(t){return ec.get(`${e.prefix}${t}`)}removeItem(t){ec.erase(`${e.prefix}${t}`)}setItem(t,r,n){ec.set(`${e.prefix}${t}`,r,n)}};tc.prefix="coveo_";var df=class{constructor(){this.cookieStorage=new tc}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},ha=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Xs="__coveo.analytics.history",Sh=20,yh=1e3*60,hh=75,Ca=class{constructor(t){this.store=t||bI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Xs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Xs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Xs,JSON.stringify(t.slice(0,Sh)))}catch{}}clear(){try{this.store.removeItem(Xs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,hh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>yh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ch=Object.freeze({__proto__:null,HistoryStore:Ca,MAX_NUMBER_OF_HISTORY_ELEMENTS:Sh,MAX_VALUE_SIZE:hh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:yh,STORE_KEY:Xs,default:Ca}),vI=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ne.view?(yield PI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),PI=e=>w(void 0,void 0,void 0,function*(){let t=new Ca,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),qu,wI=new Uint8Array(16);function II(){if(!qu&&(qu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qu(wI)}var EI=/^(?:[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 Vu(e){return typeof e=="string"&&EI.test(e)}var Ge=[];for(let e=0;e<256;++e)Ge.push((e+256).toString(16).slice(1));function xh(e,t=0){return(Ge[e[t+0]]+Ge[e[t+1]]+Ge[e[t+2]]+Ge[e[t+3]]+"-"+Ge[e[t+4]]+Ge[e[t+5]]+"-"+Ge[e[t+6]]+Ge[e[t+7]]+"-"+Ge[e[t+8]]+Ge[e[t+9]]+"-"+Ge[e[t+10]]+Ge[e[t+11]]+Ge[e[t+12]]+Ge[e[t+13]]+Ge[e[t+14]]+Ge[e[t+15]]).toLowerCase()}function TI(e){if(!Vu(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function OI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var kI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function DI(e,t,r){function n(o,a,i,s){var c;if(typeof o=="string"&&(o=OI(o)),typeof a=="string"&&(a=TI(a)),((c=a)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+o.length);if(u.set(a),u.set(o,a.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=u[l];return i}return xh(u)}try{n.name=e}catch{}return n.DNS=kI,n.URL=qI,n}var VI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nh={randomUUID:VI};function wo(e,t,r){if(nh.randomUUID&&!t&&!e)return nh.randomUUID();e=e||{};let n=e.random||(e.rng||II)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return xh(n)}function NI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function sf(e,t){return e<<t|e>>>32-t}function MI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let s=0;s<i.length;++s)e.push(i.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=e[i*64+c*4]<<24|e[i*64+c*4+1]<<16|e[i*64+c*4+2]<<8|e[i*64+c*4+3];a[i]=s}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=a[i][d];for(let d=16;d<80;++d)s[d]=sf(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let c=r[0],u=r[1],l=r[2],m=r[3],p=r[4];for(let d=0;d<80;++d){let f=Math.floor(d/20),A=sf(c,5)+NI(f,u,l,m)+p+t[f]+s[d]>>>0;p=m,m=l,l=sf(u,30)>>>0,u=c,c=A}r[0]=r[0]+c>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var QI=DI("v5",80,MI),oh=QI,Ah="2.30.45",ah=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Zs={pageview:"pageview",event:"event"},Nu=class{constructor({client:t,uuidGenerator:r=wo}){this.client=t,this.uuidGenerator=r}},pf=class extends Nu{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ah(window.location),this.lastReferrer=Sa()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:Sa()?document.title:"",encoding:Sa()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Zs.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Zs.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Zs.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Zs.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ah(window.location)}},Rn=class e{constructor(t,r){if(!Vu(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Vu(a)?new e(a,Number.parseInt(o)*1e3):null}};Rn.cvo_cid="cvo_cid";Rn.expirationTime=120;var mf=class extends Nu{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Rn.cvo_cid,new Rn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};mf.Id="link";var wt=Object.keys;function Du(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var cf=128,Fh=192,ih=224,sh=240;function LI(e){return(e&248)===sh?4:(e&sh)===ih?3:(e&ih)===Fh?2:1}function BI(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&cf)!=cf)break;if(r-=3,(n&Fh)!=cf){t-r>=LI(n)*3&&(r=t);break}}return e.substring(0,r)}var ff={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"},UI=wt(ff).map(e=>ff[e]),_I=[...UI].join("|"),jI=new RegExp(`^(${_I}$)`),$I={svcAction:"svc_action",svcActionData:"svc_action_data"},GI=e=>wt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ff[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),WI=e=>jI.test(e),HI=[WI],ch={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},uh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},We={action:"pa",list:"pal",listSource:"pls"},Mu={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},zI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],gf={id:"quoteId",affiliation:"quoteAffiliation"},Sf={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},KI={add:We,bookmark_add:We,bookmark_remove:We,click:We,checkout:We,checkout_option:We,detail:We,impression:We,remove:We,refund:Object.assign(Object.assign({},We),Mu),purchase:Object.assign(Object.assign({},We),Mu),quickview:We,quote:Object.assign(Object.assign({},We),gf),review:Object.assign(Object.assign({},We),Sf)},YI=wt(ch).map(e=>ch[e]),JI=wt(uh).map(e=>uh[e]),XI=wt(We).map(e=>We[e]),ZI=wt(Mu).map(e=>Mu[e]),eE=wt(Sf).map(e=>Sf[e]),tE=wt(gf).map(e=>gf[e]),rE=[...YI,"custom"].join("|"),nE=[...JI,"custom"].join("|"),Rh="(pr[0-9]+)",bh="(il[0-9]+pi[0-9]+)",oE=new RegExp(`^${Rh}(${rE})$`),aE=new RegExp(`^(${bh}(${nE}))|(il[0-9]+nm)$`),iE=new RegExp(`^(${XI.join("|")})$`),sE=new RegExp(`^(${ZI.join("|")})$`),cE=new RegExp(`^${Rh}custom$`),uE=new RegExp(`^${bh}custom$`),lE=new RegExp(`^(${[...zI,...eE,...tE].join("|")})$`),dE=e=>oE.test(e),pE=e=>aE.test(e),mE=e=>iE.test(e),fE=e=>sE.test(e),gE=e=>lE.test(e),SE=[pE,dE,mE,fE,gE],yE=[cE,uE],hE={anonymizeIp:"aip"},CE={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},xE={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},AE=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],FE=Object.assign(Object.assign(Object.assign(Object.assign({},hE),CE),xE),AE.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),yf=Object.assign(Object.assign({},FE),$I),RE=e=>{let t=!!e.action&&KI[e.action]||{};return wt(e).reduce((r,n)=>{let o=t[n]||yf[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},bE=wt(yf).map(e=>yf[e]),vE=e=>bE.indexOf(e)!==-1,PE=e=>e==="custom",wE=e=>[...SE,...HI,vE,PE].some(t=>t(e)),IE=e=>wt(e).reduce((t,r)=>{let n=EE(r);return n?Object.assign(Object.assign({},t),TE(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),EE=e=>{let t;return[...yE].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},TE=(e,t)=>wt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),hf=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return w(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=i;o=s||t;try{a=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Cf=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},lh=globalThis.fetch,Qu=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:u}=c,l=Xr(c,["url"]),m;try{m=yield lh(u,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(m.ok){let p=yield m.json();return p.visitorId&&o.setCurrentVisitorId(p.visitorId),p}else{try{m.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,m,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield lh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},xf=class{constructor(t,r){lf()&&gh()?this.storage=new df:lf()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ha),this.client=new Qu(t),this.beaconClient=new hf(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Af=class{constructor(t,r){this.storage=r||new ha,this.client=new Qu(t)}getClientDependingOnEventType(t){return this.client}},Lu=class{constructor(){this.storage=new ha,this.client=new Cf}getClientDependingOnEventType(t){return this.client}},OE="xx",kE=e=>e?.startsWith(OE)||!1,qE=`
|
|
20
20
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
21
21
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
22
22
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|