@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.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  var $F=Object.create;var sl=Object.defineProperty;var zF=Object.getOwnPropertyDescriptor;var WF=Object.getOwnPropertyNames;var KF=Object.getPrototypeOf,GF=Object.prototype.hasOwnProperty;var HF=(e,t,r)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YF=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of WF(t))!GF.call(e,n)&&n!==r&&sl(e,n,{get:()=>t[n],enumerable:!(o=zF(t,n))||o.enumerable});return e};var It=(e,t,r)=>(r=e!=null?$F(KF(e)):{},YF(t||!e||!e.__esModule?sl(r,"default",{value:e,enumerable:!0}):r,e));var We=(e,t,r)=>HF(e,typeof t!="symbol"?t+"":t,r);var jp=Ae(xa=>{"use strict";var Bi=xa&&xa.__assign||function(){return Bi=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Bi.apply(this,arguments)};Object.defineProperty(xa,"__esModule",{value:!0});var XF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function ZF(e){var t=Bi(Bi({},XF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}xa.getSanitizedOptions=ZF});var _p=Ae(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});function eP(e){var t=Math.random()*e;return Math.round(t)}cl.fullJitter=eP});var $p=Ae(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});function tP(e){return e}ul.noJitter=tP});var zp=Ae(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var rP=_p(),oP=$p();function nP(e){switch(e.jitter){case"full":return rP.fullJitter;case"none":default:return oP.noJitter}}ll.JitterFactory=nP});var ml=Ae(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var aP=zp(),iP=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=aP.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,o=this.numOfDelayedAttempts,n=t*Math.pow(r,o);return Math.min(n,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();dl.Delay=iP});var Wp=Ae(tr=>{"use strict";var sP=tr&&tr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),cP=tr&&tr.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},uP=tr&&tr.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,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(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(tr,"__esModule",{value:!0});var lP=ml(),dP=function(e){sP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return cP(this,void 0,void 0,function(){return uP(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}(lP.Delay);tr.SkipFirstDelay=dP});var Kp=Ae(Ra=>{"use strict";var mP=Ra&&Ra.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ra,"__esModule",{value:!0});var pP=ml(),fP=function(e){mP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(pP.Delay);Ra.AlwaysDelay=fP});var Gp=Ae(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var gP=Wp(),yP=Kp();function SP(e,t){var r=hP(e);return r.setAttemptNumber(t),r}pl.DelayFactory=SP;function hP(e){return e.delayFirstAttempt?new yP.AlwaysDelay(e):new gP.SkipFirstDelay(e)}});var Hp=Ae(uo=>{"use strict";var fl=uo&&uo.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},gl=uo&&uo.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,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(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(uo,"__esModule",{value:!0});var CP=jp(),xP=Gp();function RP(e,t){return t===void 0&&(t={}),fl(this,void 0,void 0,function(){var r,o;return gl(this,function(n){switch(n.label){case 0:return r=CP.getSanitizedOptions(t),o=new FP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}uo.backOff=RP;var FP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return fl(this,void 0,void 0,function(){var t,r;return gl(this,function(o){switch(o.label){case 0:if(this.attemptLimitReached)return[3,7];o.label=1;case 1:return o.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return o.sent(),[4,this.request()];case 3:return[2,o.sent()];case 4:return t=o.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=o.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 fl(this,void 0,void 0,function(){var t;return gl(this,function(r){switch(r.label){case 0:return t=xP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Ys=Ae((Od,qd)=>{"use strict";(function(e,t){typeof Od=="object"&&typeof qd<"u"?qd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Od,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",s="day",u="week",c="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,C={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(V){var q=["th","st","nd","rd"],O=V%100;return"["+V+(q[(O-20)%10]||q[O]||q[0])+"]"}},S=function(V,q,O){var N=String(V);return!N||N.length>=q?V:""+Array(q+1-N.length).join(O)+V},A={s:S,z:function(V){var q=-V.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),k=O%60;return(q<=0?"+":"-")+S(N,2,"0")+":"+S(k,2,"0")},m:function V(q,O){if(q.date()<O.date())return-V(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),k=q.clone().add(N,c),L=O-k<0,B=q.clone().add(N+(L?-1:1),c);return+(-(N+(O-k)/(L?k-B:B-k))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:c,y:d,w:u,d:s,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",x={};x[y]=C;var I="$isDayjsObject",v=function(V){return V instanceof T||!(!V||!V[I])},R=function V(q,O,N){var k;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(k=L),O&&(x[L]=O,k=L);var B=q.split("-");if(!k&&B.length>1)return V(B[0])}else{var z=q.name;x[z]=q,k=z}return!N&&k&&(y=k),k||!N&&y},P=function(V,q){if(v(V))return V.clone();var O=typeof q=="object"?q:{};return O.date=V,O.args=arguments,new T(O)},b=A;b.l=R,b.i=v,b.w=function(V,q){return P(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function V(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[I]=!0}var q=V.prototype;return q.parse=function(O){this.$d=function(N){var k=N.date,L=N.utc;if(k===null)return new Date(NaN);if(b.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var B=k.match(f);if(B){var z=B[2]-1||0,Y=(B[7]||"0").substring(0,3);return L?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)}}return new Date(k)}(O),this.init()},q.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()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var k=P(O);return this.startOf(N)<=k&&k<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,k){return b.u(O)?this[N]:this.set(k,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var k=this,L=!!b.u(N)||N,B=b.p(O),z=function(re,se){var de=b.w(k.$u?Date.UTC(k.$y,se,re):new Date(k.$y,se,re),k);return L?de:de.endOf(s)},Y=function(re,se){return b.w(k.toDate()[re].apply(k.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(se)),k)},te=this.$W,G=this.$M,J=this.$D,K="set"+(this.$u?"UTC":"");switch(B){case d:return L?z(1,0):z(31,11);case c:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,ue=(te<Z?te+7:te)-Z;return z(L?J-ue:J+(6-ue),G);case s:case p:return Y(K+"Hours",0);case i:return Y(K+"Minutes",1);case a:return Y(K+"Seconds",2);case n:return Y(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var k,L=b.p(O),B="set"+(this.$u?"UTC":""),z=(k={},k[s]=B+"Date",k[p]=B+"Date",k[c]=B+"Month",k[d]=B+"FullYear",k[i]=B+"Hours",k[a]=B+"Minutes",k[n]=B+"Seconds",k[o]=B+"Milliseconds",k)[L],Y=L===s?this.$D+(N-this.$W):N;if(L===c||L===d){var te=this.clone().set(p,1);te.$d[z](Y),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](Y);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var k,L=this;O=Number(O);var B=b.p(N),z=function(G){var J=P(L);return b.w(J.date(J.date()+Math.round(G*O)),L)};if(B===c)return this.set(c,this.$M+O);if(B===d)return this.set(d,this.$y+O);if(B===s)return z(1);if(B===u)return z(7);var Y=(k={},k[a]=t,k[i]=r,k[n]=e,k)[B]||1,te=this.$d.getTime()+O*Y;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,k=this.$locale();if(!this.isValid())return k.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",B=b.z(this),z=this.$H,Y=this.$m,te=this.$M,G=k.weekdays,J=k.months,K=k.meridiem,Z=function(se,de,ze,st){return se&&(se[de]||se(N,L))||ze[de].slice(0,st)},ue=function(se){return b.s(z%12||12,se,"0")},re=K||function(se,de,ze){var st=se<12?"AM":"PM";return ze?st.toLowerCase():st};return L.replace(h,function(se,de){return de||function(ze){switch(ze){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return Z(k.monthsShort,te,J,3);case"MMMM":return Z(J,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(k.weekdaysMin,N.$W,G,2);case"ddd":return Z(k.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(z,Y,!0);case"A":return re(z,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return B}return null}(se)||B.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,k){var L,B=this,z=b.p(N),Y=P(O),te=(Y.utcOffset()-this.utcOffset())*t,G=this-Y,J=function(){return b.m(B,Y)};switch(z){case d:L=J()/12;break;case c:L=J();break;case l:L=J()/3;break;case u:L=(G-te)/6048e5;break;case s:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return k?L:b.a(L)},q.daysInMonth=function(){return this.endOf(c).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var k=this.clone(),L=R(O,N,!0);return L&&(k.$L=L),k},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},V}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",s],["$M",c],["$y",d],["$D",p]].forEach(function(V){M[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),P.extend=function(V,q){return V.$i||(V(q,T,P),V.$i=!0),P},P.locale=R,P.isDayjs=v,P.unix=function(V){return P(1e3*V)},P.en=x[y],P.Ls=x,P.p={},P})});var By=Ae((Dd,kd)=>{"use strict";(function(e,t){typeof Dd=="object"&&typeof kd<"u"?kd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Dd,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=n.add;n.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):a.bind(this)(s,u)};var i=n.startOf;n.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===t){var d=this.quarter()-1;return l?this.month(3*d).startOf(e).startOf("day"):this.month(3*d+2).endOf(e).endOf("day")}return i.bind(this)(s,u)}}})});var Uy=Ae((Vd,Nd)=>{"use strict";(function(e,t){typeof Vd=="object"&&typeof Nd<"u"?Nd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Vd,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/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},s=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(h){this[f]=+h}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var C=h.match(/([+-]|\d\d)/g),S=60*C[1]+(+C[2]||0);return S===0?0:C[0]==="+"?-S:S}(f)}],l=function(f){var h=i[f];return h&&(h.indexOf?h:h.s.concat(h.f))},d=function(f,h){var C,S=i.meridiem;if(S){for(var A=1;A<=24;A+=1)if(f.indexOf(S(A,0,h))>-1){C=A>12;break}}else C=f===(h?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var h=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],h)for(var S=1;S<=31;S+=1)h(S).replace(/\[|\]/g,"")===f&&(this.day=S)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var h=l("months"),C=(l("monthsShort")||h.map(function(S){return S.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var h=l("months").indexOf(f)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=s(f)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function m(f){var h,C;h=f,C=i&&i.formats;for(var S=(f=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,q,O){return q||O.slice(1)})})).match(t),A=S.length,y=0;y<A;y+=1){var x=S[y],I=p[x],v=I&&I[0],R=I&&I[1];S[y]=R?{regex:v,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<A;T+=1){var V=S[T];if(typeof V=="string")M+=V.length;else{var q=V.regex,O=V.parser,N=P.slice(M),k=q.exec(N)[0];O.call(b,k),P=P.replace(k,"")}}return function(L){var B=L.afternoon;if(B!==void 0){var z=L.hours;B?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,h,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var S=h.prototype,A=S.parse;S.parse=function(y){var x=y.date,I=y.utc,v=y.args;this.$u=I;var R=v[1];if(typeof R=="string"){var P=v[2]===!0,b=v[3]===!0,T=P||b,M=v[2];b&&(M=v[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,k,L,B){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*N);var z=m(k)(N),Y=z.year,te=z.month,G=z.day,J=z.hours,K=z.minutes,Z=z.seconds,ue=z.milliseconds,re=z.zone,se=z.week,de=new Date,ze=G||(Y||te?1:de.getDate()),st=Y||de.getFullYear(),Cr=0;Y&&!te||(Cr=te>0?te-1:de.getMonth());var $o,zo=J||0,Ca=K||0,al=Z||0,il=ue||0;return re?new Date(Date.UTC(st,Cr,ze,zo,Ca,al,il+60*re.offset*1e3)):L?new Date(Date.UTC(st,Cr,ze,zo,Ca,al,il)):($o=new Date(st,Cr,ze,zo,Ca,al,il),se&&($o=B($o).week(se).toDate()),$o)}catch{return new Date("")}}(x,R,I,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var V=R.length,q=1;q<=V;q+=1){v[1]=R[q-1];var O=C.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===V&&(this.$d=new Date(""))}else A.call(this,y)}}})});var jC=Ae((m8,UC)=>{"use strict";var GT=/(^|; )Coveo-Pendragon=([^;]*)/;UC.exports=()=>GT.exec(document.cookie)?.pop()||null});var _C=Ae((Lm,Bm)=>{"use strict";(function(e,t){typeof Lm=="object"&&typeof Bm<"u"?Bm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Lm,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(h,C){C===void 0&&(C={});var S=C.timeZoneName||"short",A=h+"|"+S,y=t[A];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),t[A]=y),y}(d,p);return f.formatToParts(m)},s=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var h=p[f],C=h.type,S=h.value,A=e[C];A>=0&&(m[A]=parseInt(S,10))}var y=m[3],x=y===24?0:y,I=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",v=+l;return(n.utc(I).valueOf()-(v-=v%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),h=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(h))/1e3/60),S=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(S))p=this.utcOffset(0,d);else if(p=n(h,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),d){var A=p.utcOffset();p=p.add(m-A,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var c=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return c.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,h=s(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,I,v){var R=x-60*I*1e3,P=s(R,v);if(I===P)return[R,I];var b=s(R-=60*(P-I)*1e3,v);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),h,f),S=C[0],A=C[1],y=n(S).utcOffset(A);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var $C=Ae((Um,jm)=>{"use strict";(function(e,t){typeof Um=="object"&&typeof jm<"u"?jm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Um,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?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(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),s.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var c=i.utcOffset;i.utcOffset=function(m,f){var h=this.$utils().u;if(h(m))return this.$u?0:h(this.$offset)?c.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var I=(""+x[0]).match(r)||["-",0,0],v=I[0],R=60*+I[1]+ +I[2];return R===0?0:v==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,S=this;if(f)return S.$offset=C,S.$u=m===0,S;if(m!==0){var A=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(S=this.local().add(C+A,e)).$offset=C,S.$x.$localOffset=A}else S=this.utc();return S};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,h){if(m&&this.$u===m.$u)return p.call(this,m,f,h);var C=this.local(),S=a(m).local();return p.call(C,S,f,h)}}})});var ox=Ae((R5,rx)=>{"use strict";function nO(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}rx.exports=aO;function aO(e,t,r){var o=r&&r.stringify||nO,n=1;if(typeof e=="object"&&e!==null){var a=t.length+n;if(a===1)return e;var i=new Array(a);i[0]=o(e);for(var s=1;s<a;s++)i[s]=o(t[s]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-n,d=-1,p=e&&e.length||0,m=0;m<p;){if(e.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=Math.floor(Number(t[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<m&&(c+=e.slice(d,m));var f=typeof t[l];if(f==="string"){c+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){c+=t[l].name||"<anonymous>",d=m+2,m++;break}c+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(c+=e.slice(d,m)),c+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(c+=e.slice(d,m)),c+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(c+=e.slice(d)),c)}});var ux=Ae((F5,du)=>{"use strict";var nx=ox();du.exports=gr;var Pi=xO().console||{},iO={mapHttpRequest:lu,mapHttpResponse:lu,wrapRequestSerializer:_m,wrapResponseSerializer:_m,wrapErrorSerializer:_m,req:lu,res:lu,err:ix,errWithCause:ix};function no(e,t){return e==="silent"?1/0:t.levels.values[e]}var Wm=Symbol("pino.logFuncs"),$m=Symbol("pino.hierarchy"),sO={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ax(e,t){let r={logger:t,parent:e[$m]};t[$m]=r}function cO(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:Pi[n]||Pi[sO[n]||"log"]||oa}),e[Wm]=o}function uO(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function gr(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||Pi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=uO(e.browser.serialize,o),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(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=oa),cO(c,s,r),ax({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:SO(e),messageKey:e.messageKey||"msg",onChild:e.onChild||oa};c.levels=lO(e),c.level=u,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=oa,c.serializers=o,c._serialize=n,c._stdErrSerialize=a,c.child=function(...h){return f.call(this,l,...h)},t&&(c._logEvent=zm());function d(){return no(this.level,this)}function p(){return this._level}function m(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,Mo(this,l,c,"error"),Mo(this,l,c,"fatal"),Mo(this,l,c,"warn"),Mo(this,l,c,"info"),Mo(this,l,c,"debug"),Mo(this,l,c,"trace"),i.forEach(C=>{Mo(this,l,c,C)})}function f(h,C,S){if(!C)throw new Error("missing bindings for child Pino");S=S||{},n&&C.serializers&&(S.serializers=C.serializers);let A=S.serializers;if(n&&A){var y=Object.assign({},o,A),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,Km([C],x,y,this._stdErrSerialize)}function I(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=zm([].concat(R._logEvent.bindings,C)))}I.prototype=this;let v=new I(this);return ax(this,v),v.child=function(...R){return f.call(this,h,...R)},v.level=S.level||this.level,h.onChild(v),v}return c}function lO(e){let t=e.customLevels||{},r=Object.assign({},gr.levels.values,t),o=Object.assign({},gr.levels.labels,dO(t));return{values:r,labels:o}}function dO(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}gr.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"}};gr.stdSerializers=iO;gr.stdTimeFunctions=Object.assign({},{nullTime:sx,epochTime:cx,unixTime:hO,isoTime:CO});function mO(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[$m];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Mo(e,t,r,o){if(Object.defineProperty(e,o,{value:no(e.level,r)>no(o,r)?oa:r[Wm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===oa){if(!t.transmit)return;let a=t.transmit.level||e.level,i=no(a,r);if(no(o,r)<i)return}e[o]=fO(e,t,r,o);let n=mO(e);n.length!==0&&(e[o]=pO(n,e[o]))}function pO(e,t){return function(){return t.apply(this,[...e,...arguments])}}function fO(e,t,r,o){return function(n){return function(){let i=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Pi?Pi:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(Km(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,gO(this,o,s,i,t)):n.apply(u,s),t.transmit){let d=t.transmit.level||e._level,p=no(d,r),m=no(o,r);if(m<p)return;yO(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:no(e._level,r)},s,l)}}}(e[Wm][o])}function gO(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},s=r.slice(),u=s[0],c={};if(o&&(c.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(c,p)}else c.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(c,s.shift());u=s.length?nx(s.shift(),s):void 0}else typeof u=="string"&&(u=nx(s.shift(),s));return u!==void 0&&(c[n.messageKey]=u),i(c)}function Km(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=gr.stdSerializers.err(e[n]);else if(typeof e[n]=="object"&&!Array.isArray(e[n])&&t)for(let a in e[n])t.indexOf(a)>-1&&a in r&&(e[n][a]=r[a](e[n][a]))}function yO(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;o||Km(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 c.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,u),e._logEvent=zm(c)}function zm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function ix(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 SO(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?sx:cx}function lu(){return{}}function _m(e){return e}function oa(){}function sx(){return!1}function cx(){return Date.now()}function hO(){return Math.round(Date.now()/1e3)}function CO(){return new Date(Date.now()).toISOString()}function xO(){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)||{}}}du.exports.default=gr;du.exports.pino=gr});var Np="coveo-headless-internal-state",U=Symbol.for(Np),Mp=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==U)},get(t,r,o){return typeof r=="symbol"&&r.description===Np&&r!==U&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
19
- If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var co=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Qp(e){return Array.isArray(e)}function Ni(e){return e.trim()===""}function Lp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Mi(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function Qi(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function er(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Bp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function Li(e){let{promise:t,resolve:r}=Bp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function JF(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function Up(e,t){let{promise:r,resolve:o}=Bp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&JF(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var Zp=It(Hp(),1);var Te=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(Te||{}),PP="recommendation-internal-options",Wo=Symbol.for(PP);var $=new Error("Failed to load reducers."),Ko=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Ui=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(Te).map(t=>t.toLowerCase()).join(", ")}`}},Go=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},ji=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},lo=class extends Error{constructor(r,o){super();We(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Yp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Jp(e){return typeof e!="object"||!e?!1:Object.values(e).every(AP)}function AP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Xp(e){return e===429}var Ho=class e{static async call(t){let r=vP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(Xp(u.status))throw u;return u};try{let u=await(0,Zp.backOff)(s,{retry:c=>{let l=c&&Xp(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Ko;case 404:throw new lo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new lo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=er(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function Oe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ke(e,t="prod"){return`${Oe(e,t)}/rest/search/v2`}function yl(e,t="prod"){return`${Oe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function vP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=bP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function bP(e,t){return t==="application/x-www-form-urlencoded"?Jp(e)?Yp(e):"":JSON.stringify(e)}function wP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function EP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Sl(e,t){if(t&&e.name==="AbortError")return{error:EP(e)};if(e instanceof lo)return{error:wP(e)};throw e}var Yo=(e,t)=>({...Fa(e,t),requestParams:IP(e)}),IP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},Fa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var ef=(e,t)=>({...Fa(e,t),requestParams:TP(e)}),TP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var tf=e=>({...Fa(e,"search/querySuggest"),requestParams:OP(e)}),OP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var qe=e=>e.error!==void 0,_i=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Yo(t,"listing"),...this.options})}async search(t){let r=Yo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ef(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Yo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=tf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Yo(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=Yo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Ho.call(t);if(r instanceof Error)return Sl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function hl(e,t="prod"){return`${Oe(e,t)}/rest/organizations/${e}/commerce/v2`}var $i=e=>e;import{StringValue as $f}from"@coveo/bueno";function ve(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 qP=typeof Symbol=="function"&&Symbol.observable||"@@observable",rf=qP,Cl=()=>Math.random().toString(36).substring(7).split("").join("."),DP={INIT:`@@redux/INIT${Cl()}`,REPLACE:`@@redux/REPLACE${Cl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Cl()}`},zi=DP;function Tt(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 xl(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(xl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Tt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:zi.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[rf](){return this}}}return p({type:zi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[rf]:f}}function kP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:zi.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:zi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Jo(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 o=Object.keys(r),n,a;try{kP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Xo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function of(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Xo(...s)(n.dispatch),{...n,dispatch:a}}}function Wi(e){return Tt(e)&&"type"in e&&typeof e.type=="string"}var Tl=Symbol.for("immer-nothing"),Pa=Symbol.for("immer-draftable"),Ge=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var po=Object.getPrototypeOf;function rt(e){return!!e&&!!e[Ge]}function He(e){return e?uf(e)||Array.isArray(e)||!!e[Pa]||!!e.constructor?.[Pa]||Ea(e)||Ia(e):!1}var VP=Object.prototype.constructor.toString();function uf(e){if(!e||typeof e!="object")return!1;let t=po(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)===VP}function Ol(e){return rt(e)||be(15,e),e[Ge].base_}function Aa(e,t){fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function fo(e){let t=e[Ge];return t?t.type_:Array.isArray(e)?1:Ea(e)?2:Ia(e)?3:0}function va(e,t){return fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Rl(e,t){return fo(e)===2?e.get(t):e[t]}function lf(e,t,r){let o=fo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function NP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ea(e){return e instanceof Map}function Ia(e){return e instanceof Set}function mo(e){return e.copy_||e.base_}function Al(e,t){if(Ea(e))return new Map(e);if(Ia(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=uf(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ge];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(po(e),o)}else{let o=po(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Hi(e,t=!1){return Yi(e)||rt(e)||!He(e)||(fo(e)>1&&(e.set=e.add=e.clear=e.delete=MP),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Hi(o,!0))),e}function MP(){be(2)}function Yi(e){return Object.isFrozen(e)}var vl={};function go(e){let t=vl[e];return t||be(0,e),t}function QP(e,t){vl[e]||(vl[e]=t)}var ba;function df(){return ba}function LP(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function nf(e,t){t&&(go("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bl(e){wl(e),e.drafts_.forEach(BP),e.drafts_=null}function wl(e){e===ba&&(ba=e.parent_)}function af(e){return ba=LP(ba,e)}function BP(e){let t=e[Ge];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ge].modified_&&(bl(t),be(4)),He(e)&&(e=Ki(t,e),t.parent_||Gi(t,e)),t.patches_&&go("Patches").generateReplacementPatches_(r[Ge].base_,e,t.patches_,t.inversePatches_)):e=Ki(t,r,[]),bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Tl?e:void 0}function Ki(e,t,r){if(Yi(t))return t;let o=t[Ge];if(!o)return Aa(t,(n,a)=>cf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Gi(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),Aa(a,(s,u)=>cf(e,o,n,s,u,r,i)),Gi(e,n,!1),r&&e.patches_&&go("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function cf(e,t,r,o,n,a,i){if(rt(n)){let s=a&&t&&t.type_!==3&&!va(t.assigned_,o)?a.concat(o):void 0,u=Ki(e,n,s);if(lf(r,o,u),rt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!Yi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ki(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Gi(e,n)}}function Gi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hi(t,r)}function UP(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:df(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=ql;r&&(n=[o],a=wa);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var ql={get(e,t){if(t===Ge)return e;let r=mo(e);if(!va(r,t))return jP(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===Fl(e.base_,t)?(Pl(e),e.copy_[t]=Il(o,e)):o},has(e,t){return t in mo(e)},ownKeys(e){return Reflect.ownKeys(mo(e))},set(e,t,r){let o=mf(mo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Fl(mo(e),t),a=n?.[Ge];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(NP(r,n)&&(r!==void 0||va(e.base_,t)))return!0;Pl(e),El(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 Fl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Pl(e),El(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=mo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return po(e.base_)},setPrototypeOf(){be(12)}},wa={};Aa(ql,(e,t)=>{wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wa.deleteProperty=function(e,t){return wa.set.call(this,e,t,void 0)};wa.set=function(e,t,r){return ql.set.call(this,e[0],t,r,e[0])};function Fl(e,t){let r=e[Ge];return(r?mo(r):e)[t]}function jP(e,t,r){let o=mf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function mf(e,t){if(!(t in e))return;let r=po(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=po(r)}}function El(e){e.modified_||(e.modified_=!0,e.parent_&&El(e.parent_))}function Pl(e){e.copy_||(e.copy_=Al(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _P=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=af(this),i=Il(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?bl(a):wl(a)}return nf(a,o),sf(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Tl&&(n=void 0),this.autoFreeze_&&Hi(n,!0),o){let a=[],i=[];go("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),rt(e)&&(e=pf(e));let t=af(this),r=Il(e,void 0);return r[Ge].isManual_=!0,wl(t),r}finishDraft(e,t){let r=e&&e[Ge];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return nf(o,t),sf(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=go("Patches").applyPatches_;return rt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Il(e,t){let r=Ea(e)?go("MapSet").proxyMap_(e,t):Ia(e)?go("MapSet").proxySet_(e,t):UP(e,t);return(t?t.scope_:df()).drafts_.push(r),r}function pf(e){return rt(e)||be(10,e),ff(e)}function ff(e){if(!He(e)||Yi(e))return e;let t=e[Ge],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Al(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Al(e,!0);return Aa(r,(o,n)=>{lf(r,o,ff(n))}),t&&(t.finalized_=!1),r}function gf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;Aa(p.assigned_,(A,y)=>{let x=Rl(C,A),I=Rl(S,A),v=y?va(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===Tl?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=fo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&be(19),typeof S=="function"&&R==="prototype"&&be(19),S=Rl(S,R),typeof S!="object"&&be(18,h.join("/"))}let A=fo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:be(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(Ea(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(Ia(p))return new Set(Array.from(p).map(l));let m=Object.create(po(p));for(let f in p)m[f]=l(p[f]);return va(p,Pa)&&(m[Pa]=p[Pa]),m}function d(p){return rt(p)?l(p):p}QP("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var ot=new _P,rr=ot.produce,Ji=ot.produceWithPatches.bind(ot),JN=ot.setAutoFreeze.bind(ot),XN=ot.setUseStrictShallowCopy.bind(ot),Dl=ot.applyPatches.bind(ot),ZN=ot.createDraft.bind(ot),eM=ot.finishDraft.bind(ot);function $P(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function WP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var yf=e=>Array.isArray(e)?e:[e];function KP(e){let t=Array.isArray(e[0])?e[0]:e;return WP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function GP(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var oM=Symbol();var nM=Object.getPrototypeOf({});var HP=class{constructor(e){this.value=e}deref(){return this.value}},YP=typeof WeakRef<"u"?WeakRef:HP,JP=0,Sf=1;function Xi(){return{s:JP,v:void 0,o:null,p:null}}function Zo(e,t={}){let r=Xi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Xi(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Xi(),f.set(m,s)):s=h}}let c=s,l;if(s.s===Sf)l=s.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new YP(l):l}return c.s=Sf,c.v=l,l}return i.clearCache=()=>{r=Xi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function hf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),$P(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Zo,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=yf(p),S=yf(f),A=KP(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=GP(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=hf(Zo),XP=Object.assign((e,t=Q)=>{zP(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),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>XP});function Cf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var xf=Cf(),Rf=Cf;var ZP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xo:Xo.apply(null,arguments)},fM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},eA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Ft(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Wi(o)&&o.type===e,r}var bf=class Ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ta.prototype)}static get[Symbol.species](){return Ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ta(...t[0].concat(this)):new Ta(...t.concat(this))}};function Ff(e){return He(e)?rr(e,()=>{}):e}function Pf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function tA(e){return typeof e=="boolean"}var rA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new bf;return r&&(tA(r)?i.push(xf):i.push(Rf(r.extraArgument))),i},Oa="RTK_autoBatch",tn=()=>e=>({payload:e,meta:{[Oa]:!0}}),Af=e=>t=>{setTimeout(t,e)},oA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Af(10):e.type==="callback"?e.queueNotification:Af(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Oa],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},nA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new bf(e);return o&&n.push(oA(typeof o=="object"?o:void 0)),n};function wf(e){let t=rA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Tt(r))s=Jo(r);else throw new Error(Ft(1));let u;typeof o=="function"?u=o(t):u=t();let c=Xo;n&&(c=ZP({trace:!1,...typeof n=="object"&&n}));let l=of(...u),d=nA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return xl(s,a,m)}function Ef(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ft(28));if(s in t)throw new Error(Ft(29));return t[s]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function aA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Ef(t),a;if(aA(e))a=()=>Ff(e());else{let s=Ff(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(rt(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return rr(l,p=>d(p,u));{let p=d(l,u);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 If=(e,t)=>eA(e)?e.match(t):e(t);function Ot(...e){return t=>e.some(r=>If(r,t))}function en(...e){return t=>e.every(r=>If(r,t))}function es(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function qa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ts(...e){return e.length===0?t=>es(t,["pending"]):qa(e)?Ot(...e.map(t=>t.pending)):ts()(e[0])}function yo(...e){return e.length===0?t=>es(t,["rejected"]):qa(e)?Ot(...e.map(t=>t.rejected)):yo()(e[0])}function Da(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?en(yo(...e),t):qa(e)?en(yo(...e),t):Da()(e[0])}function or(...e){return e.length===0?t=>es(t,["fulfilled"]):qa(e)?Ot(...e.map(t=>t.fulfilled)):or()(e[0])}function rs(...e){return e.length===0?t=>es(t,["pending","fulfilled","rejected"]):qa(e)?Ot(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):rs()(e[0])}var iA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",os=(e=21)=>{let t="",r=e;for(;r--;)t+=iA[Math.random()*64|0];return t},sA=["name","message","stack","code"],kl=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},vf=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},cA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of sA)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||cA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):os(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(lA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new kl(v,R),fulfillWithValue:(v,R)=>new vf(v,R)})).then(v=>{if(v instanceof kl)throw v;return v instanceof vf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof kl?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(uA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Ot(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function uA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function lA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Tf=Symbol.for("rtk-slice-createasyncthunk"),CM={[Tf]:_};function dA(e,t){return`${e}/${t}`}function mA({creators:e}={}){let t=e?.asyncThunk?.[Tf];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Ft(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(fA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Ft(12));if(x in u.sliceCaseReducersByType)throw new Error(Ft(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:dA(n,A),createNotation:typeof o.reducers=="function"};yA(y)?hA(x,y,c,t):gA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Ef(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Pf(p,y,()=>new WeakMap);return Pf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=pA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function pA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var So=mA();function fA(){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 gA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!SA(o))throw new Error(Ft(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function yA(e){return e._reducerDefinitionType==="asyncThunk"}function SA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function hA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Ft(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Zi,pending:s||Zi,rejected:u||Zi,settled:c||Zi})}function Zi(){}var Of="listener",qf="completed",Df="cancelled",xM=`task-${Df}`,RM=`task-${qf}`,FM=`${Of}-${Df}`,PM=`${Of}-${qf}`;var{assign:kf}=Object;var Vl="listenerMiddleware";var CA=kf(g(`${Vl}/add`),{withTypes:()=>CA}),AM=g(`${Vl}/removeAll`),xA=kf(g(`${Vl}/remove`),{withTypes:()=>xA});var vM=Symbol.for("rtk-state-proxy-original");function Ft(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. `}import{Schema as RA,SchemaValidationError as FA,StringValue as ka,RecordValue as PA,ArrayValue as AA}from"@coveo/bueno";var D=new ka({required:!0,emptyAllowed:!1}),ne=new ka({required:!1,emptyAllowed:!1}),me=new ka({required:!0,emptyAllowed:!0}),Vf=new ka({required:!1,emptyAllowed:!0}),ns=new AA({each:D,required:!0}),Nf=new ka({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Se=(e,t)=>{if("required"in t)return{payload:new RA({value:t}).validate({value:e}).value};let n=new PA({options:{required:!0},values:t}).validate(e);if(n)throw new FA(n);return{payload:e}},F=(e,t)=>{try{return Se(e,t)}catch(r){return{payload:e,error:je(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Mf(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Mf(e,t,r,n,"Controller initialization error")},Mf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as vA,BooleanValue as Lf,RecordValue as bA,StringValue as Va,Value as wA}from"@coveo/bueno";var ho="3.24.2-pre.dc880bbfb8",Qf=["@coveo/atomic","@coveo/quantic"];var Nl=()=>ne,Bf=()=>D,Co=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Uf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Va({required:!1,url:!0}),pipeline:new Va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new vA({required:!1,each:D})})),rn={enabled:new Lf({default:!0}),originContext:Nl(),originLevel2:Nl(),originLevel3:Nl(),proxyBaseUrl:new Va({required:!1,url:!0}),runtimeEnvironment:new wA,anonymous:new Lf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new bA({options:{required:!1},values:Qf.reduce((e,t)=>(e[t]=Nf,e),{})})},Ml=g("configuration/updateAnalyticsConfiguration",e=>F(e,rn)),as=g("configuration/analytics/disable"),is=g("configuration/analytics/enable"),jf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Bf()})),_f=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Bf()}));var on=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new $f({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),nn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new $f({required:!1,url:!0})})),an=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:rn.enabled,proxyBaseUrl:rn.proxyBaseUrl,source:rn.source,trackingId:rn.trackingId})),ss=g("commerce/configuration/analytics/disable"),cs=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as xo}from"@coveo/bueno";var zf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ql=j(zf(),e=>e.addCase(on,(t,r)=>{Wf(t,r.payload)}).addCase(Co,(t,r)=>{Wf(t,r.payload)}).addCase(nn,(t,r)=>{EA(t,r.payload)}).addCase(an,(t,r)=>{IA(t,r.payload)}).addCase(ss,t=>{t.analytics.enabled=!1}).addCase(cs,t=>{t.analytics.enabled=!0}));function Wf(e,t){xo(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",xo(t.organizationId)||(e.organizationId=t.organizationId)}function EA(e,t){xo(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function IA(e,t){xo(t.enabled)||(e.analytics.enabled=t.enabled),xo(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),xo(t.source)||(e.analytics.source=t.source),xo(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function sn(e){return e.currency}var Kf=(e,t)=>({currency:sn(t.commerceContext),products:TA(t.cart),transaction:e}),Gf=(e,t)=>({currency:sn(t.commerceContext),...e}),Ro=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),TA=Q(Ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as OA,NumberValue as Hf,RecordValue as qA,Schema as DA,StringValue as kA}from"@coveo/bueno";var Ll={productId:D,quantity:new Hf({required:!0,min:0}),name:new kA({required:!1}),price:new Hf({required:!1,min:0})},Bl=new OA({each:new qA({values:{...Ll}})}),Ul={items:Bl},Yf=new DA(Ul);var xr=g("commerce/cart/setItems",e=>F(e,Bl)),cn=g("commerce/cart/updateItemQuantity",e=>F(e,Ll)),un=g("commerce/cart/purchase"),us=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Kf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),ls=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Gf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function Jf(e,t){return e.cart[Fo(t)]}var Xf=Q(Ro,e=>e.reduce((t,r)=>t+r.quantity,0)),Zf=Q(Ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function eg(e,t={}){if(!VA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};Ye(e,Yf,a,"buildCart"),a.items!==void 0&&r(xr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of Ro(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(us(l)),r(un())},updateItemQuantity(l){let d=Jf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(ls(c(l,d))),r(cn(l)))},get state(){let l=n();return{items:Ro(l),totalQuantity:Xf(l),totalPrice:Zf(l)}}}}function Fo(e){return`${e.productId},${e.name},${e.price}`}function VA(e){return e.addReducers({cart:ln}),!0}var ds=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),tg=e=>og(e.cartItems,e.cart),rg=e=>og(e.purchasedItems,e.purchased);function og(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var ln=j(ds(),e=>{e.addCase(xr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Fo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},ds());ng(t,n,o)}).addCase(cn,(t,{payload:r})=>{let o=Fo(r);if(!(o in t.cart)){NA(r,t);return}if(r.quantity<=0){MA(r,t);return}t.cart[o]=r}).addCase(un,t=>{QA(t);let{cart:r,cartItems:o}=ds();ng(t,o,r)})});function ng(e,t,r){e.cartItems=t,e.cart=r}function NA(e,t){if(e.quantity<=0)return;let r=Fo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function MA(e,t){let r=Fo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function QA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as ag,RecordValue as ig,Schema as LA,StringValue as BA}from"@coveo/bueno";var UA=Intl.supportedValuesOf("currency"),jA=new BA({required:!0,emptyAllowed:!1,constrainTo:UA}),jl={url:D},_l={latitude:new ag({min:-90,max:90,required:!0}),longitude:new ag({min:-180,max:180,required:!0})},Na={language:D,country:D,currency:jA,view:new ig({options:{required:!0},values:jl}),location:new ig({options:{required:!1},values:_l})},sg=new LA(Na);var ce=g("commerce/context/set",e=>F(e,Na)),le=g("commerce/context/setView",e=>F(e,jl)),dn=g("commerce/context/setLocation",e=>F(e,_l));var cg=()=>({language:"",country:"",currency:"",view:{url:""}});var qt=j(cg(),e=>{e.addCase(ce,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(dn,(t,{payload:r})=>{t.location=r})});var ms=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as lv,RecordValue as dv,StringValue as Tg}from"@coveo/bueno";var ct=g("breadcrumb/deselectAll"),Rr=g("breadcrumb/deselectAllNonBreadcrumbs");var Fr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ho}`));var Pr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??hl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:tg(e.cart),source:Fr(e.configuration.analytics)}}};import{ArrayValue as zA,EnumValue as dg,StringValue as mg,RecordValue as pg}from"@coveo/bueno";import{ArrayValue as _A,EnumValue as ug,RecordValue as lg,StringValue as $A}from"@coveo/bueno";var Pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pt||{}),mn=(r=>(r.Ascending="asc",r.Descending="desc",r))(mn||{}),nr=()=>({by:"relevance"});var SQ=new lg({options:{required:!1},values:{by:new ug({enum:Pt,required:!0}),fields:new _A({each:new lg({values:{name:new $A,direction:new ug({enum:mn})}})})}});var $l=e=>({by:"fields",fields:e}),fg=new pg({options:{required:!1},values:{by:new dg({enum:Pt,required:!0}),fields:new zA({each:new pg({values:{field:new mg({required:!0}),direction:new dg({enum:mn}),displayName:new mg}})})}});var ps=(e,t,r)=>({...Pr(e,t),...WA(e,r)}),WA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ut=(e,t)=>({...ps(e,t),facets:[...KA(e)],...e.commerceSort&&{sort:GA(e.commerceSort.appliedSort)}});function KA(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function GA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as zl,NumberValue as HA}from"@coveo/bueno";var Po=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new HA({required:!0,min:1})})),Ao=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new zl({required:!0})})),pe=g("commerce/facets/core/clearAll"),De=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),vo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new zl({required:!0})})),pn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new zl({required:!0})}));import{NumberValue as gg}from"@coveo/bueno";var fs={slotId:Vf},YA={...fs,pageSize:new gg({required:!0,min:0})},ar=g("commerce/pagination/setPageSize",e=>F(e,YA)),JA={...fs,page:new gg({required:!0,min:0})},Dt=g("commerce/pagination/selectPage",e=>F(e,JA)),Ar=g("commerce/pagination/nextPage",e=>F(e,fs)),vr=g("commerce/pagination/previousPage",e=>F(e,fs)),fn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var br=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),gs=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),wr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),ys=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ss=Q(e=>e.commercePagination?.principal.page||0,e=>e),yg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);import{StringValue as XA}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new XA}));import{isNullOrUndefined as Ig}from"@coveo/bueno";import{RecordValue as ZA,StringValue as ev}from"@coveo/bueno";var Er=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new ev({emptyAllowed:!0,required:!0})})),gn=g("commerce/triggers/query/applyModification",e=>F(e,new ZA({values:{originalQuery:ne,modification:ne}})));import{isNullOrUndefined as Rg}from"@coveo/bueno";function Wl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Kl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function kt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Vt(e){let{activeValue:t,ancestryMap:r}=tv(e);return t?rv(t,r):[]}function tv(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function rv(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Sg(){return{principal:Ir(),recommendations:{}}}function Ir(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function bo(){return{appliedSort:nr(),availableSorts:[nr()]}}function hs(e){return{...ov(e?.commercePagination,t=>t.principal.page,Ir().page),...nv(e?.commercePagination,t=>t.principal.perPage,Ir().perPage),...Kl(e?.commerceSort,t=>t.appliedSort,bo().appliedSort),...kt(e.commerceFacetSet,Tr(e,"regular"),av,"f"),...kt(e.commerceFacetSet,Tr(e,"regular"),iv,"fExcluded"),...kt(e.commerceFacetSet,Tr(e,"location"),sv,"lf"),...kt(e.commerceFacetSet,Tr(e,"hierarchical"),cv,"cf"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),hg,"df"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),Cg,"dfExcluded"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),hg,"nf"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),Cg,"nfExcluded"),...xg("selected",e.manualNumericFacetSet),...xg("excluded",e.manualNumericFacetSet)}}function ov(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function nv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function iv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function sv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function hg(e){return e.values.filter(t=>t.state==="selected")}function Cg(e){return e.values.filter(t=>t.state==="excluded")}function xg(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function cv(e){return Vt(e.values).map(r=>r.value)}function Tr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Cs=()=>({query:""});var SL=Q(e=>e[U].commerceSearch.responseId,e=>e),Gl=Q(e=>e.commerceSearch.responseId,e=>e),Fg=Q(e=>e.commerceSearch.requestId,e=>e),Ma=Q(e=>e.commerceSearch?.products.length||0,e=>e),Pg=Q(e=>({total:wr(e),current:Ma(e)}),({current:e,total:t})=>e<t),Ag=Q(e=>e.commerceSearch?.isLoading,e=>Rg(e)?!1:e),vg=Q(e=>e.commerceSearch?.error,e=>e??null),xs=Q(e=>e.commerceQuery?.query,e=>e??""),uv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),bg=(e,t)=>Rg(t.queryCorrection?.correctedQuery)?xs(e):t.queryCorrection.correctedQuery,wg=e=>({...Wl(e?.commerceQuery,t=>t.query,Cs().query),...hs(e)});function Eg(e){return{query:uv(e)||""}}var Qa=class{constructor(t){this.config=t}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return qe(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!Ig(n)&&!Ig(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:bg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Er({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return qe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(gn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ut(this.getState(),this.navigatorContext),query:t})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return qe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ut(o,n),i=xs(o),s=new Qa(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),Or=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Pg(o))return null;let i=br(o),u=Ma(o)/i,c=xs(o),l=ut(o,n),d=new Qa(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),yn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Tg,clearFilters:new lv}),e.clearFilters&&(r(pe()),r(Rr())),r(pn({allow:!0})),r(fe({query:e.query})),r(Dt({page:0}))}),Sn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Pr(n,i),query:s});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),mv={child:new dv({options:{required:!0},values:{permanentid:new Tg({required:!0})}})},hn=g("commerce/search/promoteChildToParent",e=>F(e,mv));function Og(){return{wasCorrectedTo:"",queryCorrection:ms(),originalQuery:""}}var Rs=j(Og(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=ms(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as kg,BooleanValue as qg,ArrayValue as Ps,StringValue as Fs,NumberValue as Dg,RecordValue as Cv}from"@coveo/bueno";var H=D;import{Value as pv,NumberValue as fv,StringValue as gv,ArrayValue as yv,BooleanValue as Sv}from"@coveo/bueno";var hv={state:new pv({required:!0}),numberOfResults:new fv({required:!0,min:0}),value:new gv({required:!0,emptyAllowed:!0}),path:new yv({required:!0,each:D}),moreValuesAvailable:new Sv({required:!1})};function La(e){e.children.forEach(t=>{La(t)}),Se({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},hv)}var Cn={facetId:H,field:D,tabs:new Cv({options:{required:!1},values:{included:new Ps({each:new Fs}),excluded:new Ps({each:new Fs})}}),activeTab:new Fs({required:!1}),delimitingCharacter:new Fs({required:!1,emptyAllowed:!0}),filterFacetCount:new qg({required:!1}),injectionDepth:new Dg({required:!1,min:0}),numberOfValues:new Dg({required:!1,min:1}),sortCriteria:new kg({required:!1}),basePath:new Ps({required:!1,each:D}),filterByBasePath:new qg({required:!1})},xn=5,Vg=g("categoryFacet/register",e=>F(e,Cn)),Ng=g("categoryFacet/toggleSelectValue",e=>{try{return Se(e.facetId,D),La(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Mg=g("categoryFacet/deselectAll",e=>F(e,Cn.facetId)),uB=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:Cn.facetId,numberOfValues:Cn.numberOfValues})),lB=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:Cn.facetId,criterion:new kg})),dB=g("categoryFacet/updateBasePath",e=>F(e,{facetId:Cn.facetId,basePath:new Ps({each:D})}));import{NumberValue as Pv,RecordValue as Av,ArrayValue as vv}from"@coveo/bueno";import{RecordValue as xv,NumberValue as Rv,StringValue as Fv}from"@coveo/bueno";var Ba={facetId:H,captions:new xv({options:{required:!1}}),numberOfValues:new Rv({required:!1,min:1}),query:new Fv({required:!1,emptyAllowed:!0})};var bv={path:new vv({required:!0,each:D}),displayValue:me,rawValue:me,count:new Pv({required:!0,min:0})},Nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Av({values:bv})})),As=g("categoryFacetSearch/register",e=>F(e,Ba));import{RecordValue as wv,NumberValue as Ev}from"@coveo/bueno";var Qg={facetId:H,value:new wv({values:{displayValue:me,rawValue:me,count:new Ev({required:!0,min:0})}})},vs=g("facetSearch/register",e=>F(e,Ba)),qr=g("facetSearch/update",e=>F(e,Ba)),nt=g("facetSearch/toggleSelectValue",e=>F(e,Qg)),At=g("facetSearch/toggleExcludeValue",e=>F(e,Qg));import{BooleanValue as Iv}from"@coveo/bueno";var ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Iv({required:!1})})),Hl=g("facetOptions/facet/enable",e=>F(e,H)),sr=g("facetOptions/facet/disable",e=>F(e,H));var Tv=g("history/undo"),Ov=g("history/redo"),Mt=g("history/snapshot"),kB=_("history/back",async(e,{dispatch:t})=>{t(Tv()),await t(xe())}),VB=_("history/forward",async(e,{dispatch:t})=>{t(Ov()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Lg,StringValue as Ua,NumberValue as Bg,RecordValue as Dr}from"@coveo/bueno";var bs={q:new Ua,enableQuerySyntax:new Lg,aq:new Ua,cq:new Ua,firstResult:new Bg({min:0}),numberOfResults:new Bg({min:0}),sortCriteria:new Ua,f:new Dr,fExcluded:new Dr,cf:new Dr,nf:new Dr,mnf:new Dr,df:new Dr,debug:new Lg,sf:new Dr,tab:new Ua,af:new Dr};var we=g("searchParameters/restore",e=>F(e,bs)),qv=g("searchParameters/restoreTab",e=>F(e,D));import{BooleanValue as gS,NumberValue as yS,StringValue as LE}from"@coveo/bueno";function cr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Xl(){return typeof window<"u"}function dd(){return typeof navigator<"u"}function Rn(){return typeof document<"u"}function Zl(){try{return typeof localStorage<"u"}catch{return!1}}function Dv(){try{return typeof sessionStorage<"u"}catch{return!1}}function ey(){return dd()&&navigator.cookieEnabled}var kv=[ee.click,ee.custom,ee.search,ee.view],Vv=(e,t)=>kv.indexOf(e)!==-1?Object.assign({language:Rn()?document.documentElement.lang:"unknown",userAgent:dd()?navigator.userAgent:"unknown"},t):t,$a=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Ug(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Ug(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];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 Ug(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Nv(){return Zl()?localStorage:ey()?new za:Dv()?sessionStorage:new Pn}var za=class e{getItem(t){return $a.get(`${e.prefix}${t}`)}removeItem(t){$a.erase(`${e.prefix}${t}`)}setItem(t,r,o){$a.set(`${e.prefix}${t}`,r,o)}};za.prefix="coveo_";var ed=class{constructor(){this.cookieStorage=new za}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)}},Pn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ja="__coveo.analytics.history",ty=20,ry=1e3*60,oy=75,An=class{constructor(t){this.store=t||Nv()}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(ja);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(ja);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ja,JSON.stringify(t.slice(0,ty)))}catch{}}clear(){try{this.store.removeItem(ja)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,oy)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ry:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},ny=Object.freeze({__proto__:null,HistoryStore:An,MAX_NUMBER_OF_HISTORY_ELEMENTS:ty,MAX_VALUE_SIZE:oy,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ry,STORE_KEY:ja,default:An}),Mv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Qv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Qv=e=>w(void 0,void 0,void 0,function*(){let t=new An,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ws,Lv=new Uint8Array(16);function Bv(){if(!ws&&(ws=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ws))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ws(Lv)}var Uv=/^(?:[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 Is(e){return typeof e=="string"&&Uv.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function ay(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function jv(e){if(!Is(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 _v(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var $v="6ba7b810-9dad-11d1-80b4-00c04fd430c8",zv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Wv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=_v(n)),typeof a=="string"&&(a=jv(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return ay(c)}try{o.name=e}catch{}return o.DNS=$v,o.URL=zv,o}var Kv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jg={randomUUID:Kv};function wo(e,t,r){if(jg.randomUUID&&!t&&!e)return jg.randomUUID();e=e||{};let o=e.random||(e.rng||Bv)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return ay(o)}function Gv(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function Yl(e,t){return e<<t|e>>>32-t}function Hv(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 o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=s}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Yl(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Yl(u,5)+Gv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Yl(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>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 Yv=Wv("v5",80,Hv),_g=Yv,iy="2.30.45",$g=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,_a={pageview:"pageview",event:"event"},Ts=class{constructor({client:t,uuidGenerator:r=wo}){this.client=t,this.uuidGenerator=r}},td=class extends Ts{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=$g(window.location),this.lastReferrer=Rn()?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:Rn()?document.title:"",encoding:Rn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===_a.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===_a.pageview?this.nextPageViewId:this.pageViewId,referrer:t===_a.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===_a.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return $g(window.location)}},kr=class e{constructor(t,r){if(!Is(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 o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return Is(a)?new e(a,Number.parseInt(n)*1e3):null}};kr.cvo_cid="cvo_cid";kr.expirationTime=120;var rd=class extends Ts{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),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(kr.cvo_cid,new kr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};rd.Id="link";var dt=Object.keys;function Es(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Jl=128,sy=192,zg=224,Wg=240;function Jv(e){return(e&248)===Wg?4:(e&Wg)===zg?3:(e&zg)===sy?2:1}function Xv(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&Jl)!=Jl)break;if(r-=3,(o&sy)!=Jl){t-r>=Jv(o)*3&&(r=t);break}}return e.substring(0,r)}var od={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"},Zv=dt(od).map(e=>od[e]),eb=[...Zv].join("|"),tb=new RegExp(`^(${eb}$)`),rb={svcAction:"svc_action",svcActionData:"svc_action_data"},ob=e=>dt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=od[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),nb=e=>tb.test(e),ab=[nb],Kg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ke={action:"pa",list:"pal",listSource:"pls"},Os={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ib=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],nd={id:"quoteId",affiliation:"quoteAffiliation"},ad={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},sb={add:ke,bookmark_add:ke,bookmark_remove:ke,click:ke,checkout:ke,checkout_option:ke,detail:ke,impression:ke,remove:ke,refund:Object.assign(Object.assign({},ke),Os),purchase:Object.assign(Object.assign({},ke),Os),quickview:ke,quote:Object.assign(Object.assign({},ke),nd),review:Object.assign(Object.assign({},ke),ad)},cb=dt(Kg).map(e=>Kg[e]),ub=dt(Gg).map(e=>Gg[e]),lb=dt(ke).map(e=>ke[e]),db=dt(Os).map(e=>Os[e]),mb=dt(ad).map(e=>ad[e]),pb=dt(nd).map(e=>nd[e]),fb=[...cb,"custom"].join("|"),gb=[...ub,"custom"].join("|"),cy="(pr[0-9]+)",uy="(il[0-9]+pi[0-9]+)",yb=new RegExp(`^${cy}(${fb})$`),Sb=new RegExp(`^(${uy}(${gb}))|(il[0-9]+nm)$`),hb=new RegExp(`^(${lb.join("|")})$`),Cb=new RegExp(`^(${db.join("|")})$`),xb=new RegExp(`^${cy}custom$`),Rb=new RegExp(`^${uy}custom$`),Fb=new RegExp(`^(${[...ib,...mb,...pb].join("|")})$`),Pb=e=>yb.test(e),Ab=e=>Sb.test(e),vb=e=>hb.test(e),bb=e=>Cb.test(e),wb=e=>Fb.test(e),Eb=[Ab,Pb,vb,bb,wb],Ib=[xb,Rb],Tb={anonymizeIp:"aip"},Ob={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},qb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Db=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],kb=Object.assign(Object.assign(Object.assign(Object.assign({},Tb),Ob),qb),Db.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),id=Object.assign(Object.assign({},kb),rb),Vb=e=>{let t=!!e.action&&sb[e.action]||{};return dt(e).reduce((r,o)=>{let n=t[o]||id[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},Nb=dt(id).map(e=>id[e]),Mb=e=>Nb.indexOf(e)!==-1,Qb=e=>e==="custom",Lb=e=>[...Eb,...ab,Mb,Qb].some(t=>t(e)),Bb=e=>dt(e).reduce((t,r)=>{let o=Ub(r);return o?Object.assign(Object.assign({},t),jb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ub=e=>{let t;return[...Ib].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},jb=(e,t)=>dt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),sd=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:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}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:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},cd=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()})}},Hg=globalThis.fetch,qs=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=cr(u,["url"]),d;try{d=yield Hg(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,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 Hg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.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"})}},ud=class{constructor(t,r){Zl()&&ey()?this.storage=new ed:Zl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Pn),this.client=new qs(t),this.beaconClient=new sd(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ld=class{constructor(t,r){this.storage=r||new Pn,this.client=new qs(t)}getClientDependingOnEventType(t){return this.client}},Ds=class{constructor(){this.storage=new Pn,this.client=new cd}getClientDependingOnEventType(t){return this.client}},_b="xx",$b=e=>e?.startsWith(_b)||!1,zb=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var co=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Qp(e){return Array.isArray(e)}function Ni(e){return e.trim()===""}function Lp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Mi(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function Qi(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function er(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Bp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function Li(e){let{promise:t,resolve:r}=Bp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function JF(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function Up(e,t){let{promise:r,resolve:o}=Bp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&JF(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var Zp=It(Hp(),1);var Te=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(Te||{}),PP="recommendation-internal-options",Wo=Symbol.for(PP);var $=new Error("Failed to load reducers."),Ko=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Ui=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(Te).map(t=>t.toLowerCase()).join(", ")}`}},Go=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},ji=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},lo=class extends Error{constructor(r,o){super();We(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Yp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Jp(e){return typeof e!="object"||!e?!1:Object.values(e).every(AP)}function AP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Xp(e){return e===429}var Ho=class e{static async call(t){let r=vP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(Xp(u.status))throw u;return u};try{let u=await(0,Zp.backOff)(s,{retry:c=>{let l=c&&Xp(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Ko;case 404:throw new lo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new lo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=er(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function Oe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ke(e,t="prod"){return`${Oe(e,t)}/rest/search/v2`}function yl(e,t="prod"){return`${Oe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function vP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=bP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function bP(e,t){return t==="application/x-www-form-urlencoded"?Jp(e)?Yp(e):"":JSON.stringify(e)}function wP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function EP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Sl(e,t){if(t&&e.name==="AbortError")return{error:EP(e)};if(e instanceof lo)return{error:wP(e)};throw e}var Yo=(e,t)=>({...Fa(e,t),requestParams:IP(e)}),IP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},Fa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var ef=(e,t)=>({...Fa(e,t),requestParams:TP(e)}),TP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var tf=e=>({...Fa(e,"search/querySuggest"),requestParams:OP(e)}),OP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var qe=e=>e.error!==void 0,_i=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Yo(t,"listing"),...this.options})}async search(t){let r=Yo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ef(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Yo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=tf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Yo(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=Yo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Ho.call(t);if(r instanceof Error)return Sl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function hl(e,t="prod"){return`${Oe(e,t)}/rest/organizations/${e}/commerce/v2`}var $i=e=>e;import{StringValue as $f}from"@coveo/bueno";function ve(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 qP=typeof Symbol=="function"&&Symbol.observable||"@@observable",rf=qP,Cl=()=>Math.random().toString(36).substring(7).split("").join("."),DP={INIT:`@@redux/INIT${Cl()}`,REPLACE:`@@redux/REPLACE${Cl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Cl()}`},zi=DP;function Tt(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 xl(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(xl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Tt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:zi.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[rf](){return this}}}return p({type:zi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[rf]:f}}function kP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:zi.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:zi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Jo(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 o=Object.keys(r),n,a;try{kP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Xo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function of(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Xo(...s)(n.dispatch),{...n,dispatch:a}}}function Wi(e){return Tt(e)&&"type"in e&&typeof e.type=="string"}var Tl=Symbol.for("immer-nothing"),Pa=Symbol.for("immer-draftable"),Ge=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var po=Object.getPrototypeOf;function rt(e){return!!e&&!!e[Ge]}function He(e){return e?uf(e)||Array.isArray(e)||!!e[Pa]||!!e.constructor?.[Pa]||Ea(e)||Ia(e):!1}var VP=Object.prototype.constructor.toString();function uf(e){if(!e||typeof e!="object")return!1;let t=po(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)===VP}function Ol(e){return rt(e)||be(15,e),e[Ge].base_}function Aa(e,t){fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function fo(e){let t=e[Ge];return t?t.type_:Array.isArray(e)?1:Ea(e)?2:Ia(e)?3:0}function va(e,t){return fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Rl(e,t){return fo(e)===2?e.get(t):e[t]}function lf(e,t,r){let o=fo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function NP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ea(e){return e instanceof Map}function Ia(e){return e instanceof Set}function mo(e){return e.copy_||e.base_}function Al(e,t){if(Ea(e))return new Map(e);if(Ia(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=uf(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ge];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(po(e),o)}else{let o=po(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Hi(e,t=!1){return Yi(e)||rt(e)||!He(e)||(fo(e)>1&&(e.set=e.add=e.clear=e.delete=MP),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Hi(o,!0))),e}function MP(){be(2)}function Yi(e){return Object.isFrozen(e)}var vl={};function go(e){let t=vl[e];return t||be(0,e),t}function QP(e,t){vl[e]||(vl[e]=t)}var ba;function df(){return ba}function LP(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function nf(e,t){t&&(go("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bl(e){wl(e),e.drafts_.forEach(BP),e.drafts_=null}function wl(e){e===ba&&(ba=e.parent_)}function af(e){return ba=LP(ba,e)}function BP(e){let t=e[Ge];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ge].modified_&&(bl(t),be(4)),He(e)&&(e=Ki(t,e),t.parent_||Gi(t,e)),t.patches_&&go("Patches").generateReplacementPatches_(r[Ge].base_,e,t.patches_,t.inversePatches_)):e=Ki(t,r,[]),bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Tl?e:void 0}function Ki(e,t,r){if(Yi(t))return t;let o=t[Ge];if(!o)return Aa(t,(n,a)=>cf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Gi(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),Aa(a,(s,u)=>cf(e,o,n,s,u,r,i)),Gi(e,n,!1),r&&e.patches_&&go("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function cf(e,t,r,o,n,a,i){if(rt(n)){let s=a&&t&&t.type_!==3&&!va(t.assigned_,o)?a.concat(o):void 0,u=Ki(e,n,s);if(lf(r,o,u),rt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!Yi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ki(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Gi(e,n)}}function Gi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hi(t,r)}function UP(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:df(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=ql;r&&(n=[o],a=wa);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var ql={get(e,t){if(t===Ge)return e;let r=mo(e);if(!va(r,t))return jP(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===Fl(e.base_,t)?(Pl(e),e.copy_[t]=Il(o,e)):o},has(e,t){return t in mo(e)},ownKeys(e){return Reflect.ownKeys(mo(e))},set(e,t,r){let o=mf(mo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Fl(mo(e),t),a=n?.[Ge];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(NP(r,n)&&(r!==void 0||va(e.base_,t)))return!0;Pl(e),El(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 Fl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Pl(e),El(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=mo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return po(e.base_)},setPrototypeOf(){be(12)}},wa={};Aa(ql,(e,t)=>{wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wa.deleteProperty=function(e,t){return wa.set.call(this,e,t,void 0)};wa.set=function(e,t,r){return ql.set.call(this,e[0],t,r,e[0])};function Fl(e,t){let r=e[Ge];return(r?mo(r):e)[t]}function jP(e,t,r){let o=mf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function mf(e,t){if(!(t in e))return;let r=po(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=po(r)}}function El(e){e.modified_||(e.modified_=!0,e.parent_&&El(e.parent_))}function Pl(e){e.copy_||(e.copy_=Al(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _P=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=af(this),i=Il(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?bl(a):wl(a)}return nf(a,o),sf(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Tl&&(n=void 0),this.autoFreeze_&&Hi(n,!0),o){let a=[],i=[];go("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),rt(e)&&(e=pf(e));let t=af(this),r=Il(e,void 0);return r[Ge].isManual_=!0,wl(t),r}finishDraft(e,t){let r=e&&e[Ge];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return nf(o,t),sf(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=go("Patches").applyPatches_;return rt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Il(e,t){let r=Ea(e)?go("MapSet").proxyMap_(e,t):Ia(e)?go("MapSet").proxySet_(e,t):UP(e,t);return(t?t.scope_:df()).drafts_.push(r),r}function pf(e){return rt(e)||be(10,e),ff(e)}function ff(e){if(!He(e)||Yi(e))return e;let t=e[Ge],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Al(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Al(e,!0);return Aa(r,(o,n)=>{lf(r,o,ff(n))}),t&&(t.finalized_=!1),r}function gf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;Aa(p.assigned_,(A,y)=>{let x=Rl(C,A),I=Rl(S,A),v=y?va(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===Tl?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=fo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&be(19),typeof S=="function"&&R==="prototype"&&be(19),S=Rl(S,R),typeof S!="object"&&be(18,h.join("/"))}let A=fo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:be(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(Ea(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(Ia(p))return new Set(Array.from(p).map(l));let m=Object.create(po(p));for(let f in p)m[f]=l(p[f]);return va(p,Pa)&&(m[Pa]=p[Pa]),m}function d(p){return rt(p)?l(p):p}QP("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var ot=new _P,rr=ot.produce,Ji=ot.produceWithPatches.bind(ot),JN=ot.setAutoFreeze.bind(ot),XN=ot.setUseStrictShallowCopy.bind(ot),Dl=ot.applyPatches.bind(ot),ZN=ot.createDraft.bind(ot),eM=ot.finishDraft.bind(ot);function $P(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function WP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var yf=e=>Array.isArray(e)?e:[e];function KP(e){let t=Array.isArray(e[0])?e[0]:e;return WP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function GP(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var oM=Symbol();var nM=Object.getPrototypeOf({});var HP=class{constructor(e){this.value=e}deref(){return this.value}},YP=typeof WeakRef<"u"?WeakRef:HP,JP=0,Sf=1;function Xi(){return{s:JP,v:void 0,o:null,p:null}}function Zo(e,t={}){let r=Xi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Xi(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Xi(),f.set(m,s)):s=h}}let c=s,l;if(s.s===Sf)l=s.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new YP(l):l}return c.s=Sf,c.v=l,l}return i.clearCache=()=>{r=Xi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function hf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),$P(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Zo,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=yf(p),S=yf(f),A=KP(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=GP(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=hf(Zo),XP=Object.assign((e,t=Q)=>{zP(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),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>XP});function Cf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var xf=Cf(),Rf=Cf;var ZP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xo:Xo.apply(null,arguments)},fM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},eA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Ft(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Wi(o)&&o.type===e,r}var bf=class Ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ta.prototype)}static get[Symbol.species](){return Ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ta(...t[0].concat(this)):new Ta(...t.concat(this))}};function Ff(e){return He(e)?rr(e,()=>{}):e}function Pf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function tA(e){return typeof e=="boolean"}var rA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new bf;return r&&(tA(r)?i.push(xf):i.push(Rf(r.extraArgument))),i},Oa="RTK_autoBatch",tn=()=>e=>({payload:e,meta:{[Oa]:!0}}),Af=e=>t=>{setTimeout(t,e)},oA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Af(10):e.type==="callback"?e.queueNotification:Af(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Oa],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},nA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new bf(e);return o&&n.push(oA(typeof o=="object"?o:void 0)),n};function wf(e){let t=rA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Tt(r))s=Jo(r);else throw new Error(Ft(1));let u;typeof o=="function"?u=o(t):u=t();let c=Xo;n&&(c=ZP({trace:!1,...typeof n=="object"&&n}));let l=of(...u),d=nA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return xl(s,a,m)}function Ef(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ft(28));if(s in t)throw new Error(Ft(29));return t[s]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function aA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Ef(t),a;if(aA(e))a=()=>Ff(e());else{let s=Ff(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(rt(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return rr(l,p=>d(p,u));{let p=d(l,u);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 If=(e,t)=>eA(e)?e.match(t):e(t);function Ot(...e){return t=>e.some(r=>If(r,t))}function en(...e){return t=>e.every(r=>If(r,t))}function es(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function qa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ts(...e){return e.length===0?t=>es(t,["pending"]):qa(e)?Ot(...e.map(t=>t.pending)):ts()(e[0])}function yo(...e){return e.length===0?t=>es(t,["rejected"]):qa(e)?Ot(...e.map(t=>t.rejected)):yo()(e[0])}function Da(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?en(yo(...e),t):qa(e)?en(yo(...e),t):Da()(e[0])}function or(...e){return e.length===0?t=>es(t,["fulfilled"]):qa(e)?Ot(...e.map(t=>t.fulfilled)):or()(e[0])}function rs(...e){return e.length===0?t=>es(t,["pending","fulfilled","rejected"]):qa(e)?Ot(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):rs()(e[0])}var iA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",os=(e=21)=>{let t="",r=e;for(;r--;)t+=iA[Math.random()*64|0];return t},sA=["name","message","stack","code"],kl=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},vf=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},cA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of sA)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||cA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):os(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(lA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new kl(v,R),fulfillWithValue:(v,R)=>new vf(v,R)})).then(v=>{if(v instanceof kl)throw v;return v instanceof vf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof kl?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(uA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Ot(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function uA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function lA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Tf=Symbol.for("rtk-slice-createasyncthunk"),CM={[Tf]:_};function dA(e,t){return`${e}/${t}`}function mA({creators:e}={}){let t=e?.asyncThunk?.[Tf];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Ft(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(fA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Ft(12));if(x in u.sliceCaseReducersByType)throw new Error(Ft(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:dA(n,A),createNotation:typeof o.reducers=="function"};yA(y)?hA(x,y,c,t):gA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Ef(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Pf(p,y,()=>new WeakMap);return Pf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=pA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function pA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var So=mA();function fA(){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 gA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!SA(o))throw new Error(Ft(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function yA(e){return e._reducerDefinitionType==="asyncThunk"}function SA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function hA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Ft(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Zi,pending:s||Zi,rejected:u||Zi,settled:c||Zi})}function Zi(){}var Of="listener",qf="completed",Df="cancelled",xM=`task-${Df}`,RM=`task-${qf}`,FM=`${Of}-${Df}`,PM=`${Of}-${qf}`;var{assign:kf}=Object;var Vl="listenerMiddleware";var CA=kf(g(`${Vl}/add`),{withTypes:()=>CA}),AM=g(`${Vl}/removeAll`),xA=kf(g(`${Vl}/remove`),{withTypes:()=>xA});var vM=Symbol.for("rtk-state-proxy-original");function Ft(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. `}import{Schema as RA,SchemaValidationError as FA,StringValue as ka,RecordValue as PA,ArrayValue as AA}from"@coveo/bueno";var D=new ka({required:!0,emptyAllowed:!1}),ne=new ka({required:!1,emptyAllowed:!1}),me=new ka({required:!0,emptyAllowed:!0}),Vf=new ka({required:!1,emptyAllowed:!0}),ns=new AA({each:D,required:!0}),Nf=new ka({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Se=(e,t)=>{if("required"in t)return{payload:new RA({value:t}).validate({value:e}).value};let n=new PA({options:{required:!0},values:t}).validate(e);if(n)throw new FA(n);return{payload:e}},F=(e,t)=>{try{return Se(e,t)}catch(r){return{payload:e,error:je(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Mf(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Mf(e,t,r,n,"Controller initialization error")},Mf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as vA,BooleanValue as Lf,RecordValue as bA,StringValue as Va,Value as wA}from"@coveo/bueno";var ho="3.24.2-pre.e4ba2aa040",Qf=["@coveo/atomic","@coveo/quantic"];var Nl=()=>ne,Bf=()=>D,Co=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Uf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Va({required:!1,url:!0}),pipeline:new Va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new vA({required:!1,each:D})})),rn={enabled:new Lf({default:!0}),originContext:Nl(),originLevel2:Nl(),originLevel3:Nl(),proxyBaseUrl:new Va({required:!1,url:!0}),runtimeEnvironment:new wA,anonymous:new Lf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new bA({options:{required:!1},values:Qf.reduce((e,t)=>(e[t]=Nf,e),{})})},Ml=g("configuration/updateAnalyticsConfiguration",e=>F(e,rn)),as=g("configuration/analytics/disable"),is=g("configuration/analytics/enable"),jf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Bf()})),_f=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Bf()}));var on=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new $f({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),nn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new $f({required:!1,url:!0})})),an=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:rn.enabled,proxyBaseUrl:rn.proxyBaseUrl,source:rn.source,trackingId:rn.trackingId})),ss=g("commerce/configuration/analytics/disable"),cs=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as xo}from"@coveo/bueno";var zf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ql=j(zf(),e=>e.addCase(on,(t,r)=>{Wf(t,r.payload)}).addCase(Co,(t,r)=>{Wf(t,r.payload)}).addCase(nn,(t,r)=>{EA(t,r.payload)}).addCase(an,(t,r)=>{IA(t,r.payload)}).addCase(ss,t=>{t.analytics.enabled=!1}).addCase(cs,t=>{t.analytics.enabled=!0}));function Wf(e,t){xo(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",xo(t.organizationId)||(e.organizationId=t.organizationId)}function EA(e,t){xo(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function IA(e,t){xo(t.enabled)||(e.analytics.enabled=t.enabled),xo(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),xo(t.source)||(e.analytics.source=t.source),xo(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function sn(e){return e.currency}var Kf=(e,t)=>({currency:sn(t.commerceContext),products:TA(t.cart),transaction:e}),Gf=(e,t)=>({currency:sn(t.commerceContext),...e}),Ro=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),TA=Q(Ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as OA,NumberValue as Hf,RecordValue as qA,Schema as DA,StringValue as kA}from"@coveo/bueno";var Ll={productId:D,quantity:new Hf({required:!0,min:0}),name:new kA({required:!1}),price:new Hf({required:!1,min:0})},Bl=new OA({each:new qA({values:{...Ll}})}),Ul={items:Bl},Yf=new DA(Ul);var xr=g("commerce/cart/setItems",e=>F(e,Bl)),cn=g("commerce/cart/updateItemQuantity",e=>F(e,Ll)),un=g("commerce/cart/purchase"),us=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Kf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),ls=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Gf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function Jf(e,t){return e.cart[Fo(t)]}var Xf=Q(Ro,e=>e.reduce((t,r)=>t+r.quantity,0)),Zf=Q(Ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function eg(e,t={}){if(!VA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};Ye(e,Yf,a,"buildCart"),a.items!==void 0&&r(xr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of Ro(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(us(l)),r(un())},updateItemQuantity(l){let d=Jf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(ls(c(l,d))),r(cn(l)))},get state(){let l=n();return{items:Ro(l),totalQuantity:Xf(l),totalPrice:Zf(l)}}}}function Fo(e){return`${e.productId},${e.name},${e.price}`}function VA(e){return e.addReducers({cart:ln}),!0}var ds=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),tg=e=>og(e.cartItems,e.cart),rg=e=>og(e.purchasedItems,e.purchased);function og(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var ln=j(ds(),e=>{e.addCase(xr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Fo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},ds());ng(t,n,o)}).addCase(cn,(t,{payload:r})=>{let o=Fo(r);if(!(o in t.cart)){NA(r,t);return}if(r.quantity<=0){MA(r,t);return}t.cart[o]=r}).addCase(un,t=>{QA(t);let{cart:r,cartItems:o}=ds();ng(t,o,r)})});function ng(e,t,r){e.cartItems=t,e.cart=r}function NA(e,t){if(e.quantity<=0)return;let r=Fo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function MA(e,t){let r=Fo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function QA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as ag,RecordValue as ig,Schema as LA,StringValue as BA}from"@coveo/bueno";var UA=Intl.supportedValuesOf("currency"),jA=new BA({required:!0,emptyAllowed:!1,constrainTo:UA}),jl={url:D},_l={latitude:new ag({min:-90,max:90,required:!0}),longitude:new ag({min:-180,max:180,required:!0})},Na={language:D,country:D,currency:jA,view:new ig({options:{required:!0},values:jl}),location:new ig({options:{required:!1},values:_l})},sg=new LA(Na);var ce=g("commerce/context/set",e=>F(e,Na)),le=g("commerce/context/setView",e=>F(e,jl)),dn=g("commerce/context/setLocation",e=>F(e,_l));var cg=()=>({language:"",country:"",currency:"",view:{url:""}});var qt=j(cg(),e=>{e.addCase(ce,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(dn,(t,{payload:r})=>{t.location=r})});var ms=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as lv,RecordValue as dv,StringValue as Tg}from"@coveo/bueno";var ct=g("breadcrumb/deselectAll"),Rr=g("breadcrumb/deselectAllNonBreadcrumbs");var Fr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ho}`));var Pr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??hl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:tg(e.cart),source:Fr(e.configuration.analytics)}}};import{ArrayValue as zA,EnumValue as dg,StringValue as mg,RecordValue as pg}from"@coveo/bueno";import{ArrayValue as _A,EnumValue as ug,RecordValue as lg,StringValue as $A}from"@coveo/bueno";var Pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pt||{}),mn=(r=>(r.Ascending="asc",r.Descending="desc",r))(mn||{}),nr=()=>({by:"relevance"});var SQ=new lg({options:{required:!1},values:{by:new ug({enum:Pt,required:!0}),fields:new _A({each:new lg({values:{name:new $A,direction:new ug({enum:mn})}})})}});var $l=e=>({by:"fields",fields:e}),fg=new pg({options:{required:!1},values:{by:new dg({enum:Pt,required:!0}),fields:new zA({each:new pg({values:{field:new mg({required:!0}),direction:new dg({enum:mn}),displayName:new mg}})})}});var ps=(e,t,r)=>({...Pr(e,t),...WA(e,r)}),WA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ut=(e,t)=>({...ps(e,t),facets:[...KA(e)],...e.commerceSort&&{sort:GA(e.commerceSort.appliedSort)}});function KA(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function GA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as zl,NumberValue as HA}from"@coveo/bueno";var Po=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new HA({required:!0,min:1})})),Ao=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new zl({required:!0})})),pe=g("commerce/facets/core/clearAll"),De=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),vo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new zl({required:!0})})),pn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new zl({required:!0})}));import{NumberValue as gg}from"@coveo/bueno";var fs={slotId:Vf},YA={...fs,pageSize:new gg({required:!0,min:0})},ar=g("commerce/pagination/setPageSize",e=>F(e,YA)),JA={...fs,page:new gg({required:!0,min:0})},Dt=g("commerce/pagination/selectPage",e=>F(e,JA)),Ar=g("commerce/pagination/nextPage",e=>F(e,fs)),vr=g("commerce/pagination/previousPage",e=>F(e,fs)),fn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var br=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),gs=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),wr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),ys=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ss=Q(e=>e.commercePagination?.principal.page||0,e=>e),yg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);import{StringValue as XA}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new XA}));import{isNullOrUndefined as Ig}from"@coveo/bueno";import{RecordValue as ZA,StringValue as ev}from"@coveo/bueno";var Er=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new ev({emptyAllowed:!0,required:!0})})),gn=g("commerce/triggers/query/applyModification",e=>F(e,new ZA({values:{originalQuery:ne,modification:ne}})));import{isNullOrUndefined as Rg}from"@coveo/bueno";function Wl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Kl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function kt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Vt(e){let{activeValue:t,ancestryMap:r}=tv(e);return t?rv(t,r):[]}function tv(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function rv(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Sg(){return{principal:Ir(),recommendations:{}}}function Ir(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function bo(){return{appliedSort:nr(),availableSorts:[nr()]}}function hs(e){return{...ov(e?.commercePagination,t=>t.principal.page,Ir().page),...nv(e?.commercePagination,t=>t.principal.perPage,Ir().perPage),...Kl(e?.commerceSort,t=>t.appliedSort,bo().appliedSort),...kt(e.commerceFacetSet,Tr(e,"regular"),av,"f"),...kt(e.commerceFacetSet,Tr(e,"regular"),iv,"fExcluded"),...kt(e.commerceFacetSet,Tr(e,"location"),sv,"lf"),...kt(e.commerceFacetSet,Tr(e,"hierarchical"),cv,"cf"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),hg,"df"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),Cg,"dfExcluded"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),hg,"nf"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),Cg,"nfExcluded"),...xg("selected",e.manualNumericFacetSet),...xg("excluded",e.manualNumericFacetSet)}}function ov(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function nv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function iv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function sv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function hg(e){return e.values.filter(t=>t.state==="selected")}function Cg(e){return e.values.filter(t=>t.state==="excluded")}function xg(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function cv(e){return Vt(e.values).map(r=>r.value)}function Tr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Cs=()=>({query:""});var SL=Q(e=>e[U].commerceSearch.responseId,e=>e),Gl=Q(e=>e.commerceSearch.responseId,e=>e),Fg=Q(e=>e.commerceSearch.requestId,e=>e),Ma=Q(e=>e.commerceSearch?.products.length||0,e=>e),Pg=Q(e=>({total:wr(e),current:Ma(e)}),({current:e,total:t})=>e<t),Ag=Q(e=>e.commerceSearch?.isLoading,e=>Rg(e)?!1:e),vg=Q(e=>e.commerceSearch?.error,e=>e??null),xs=Q(e=>e.commerceQuery?.query,e=>e??""),uv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),bg=(e,t)=>Rg(t.queryCorrection?.correctedQuery)?xs(e):t.queryCorrection.correctedQuery,wg=e=>({...Wl(e?.commerceQuery,t=>t.query,Cs().query),...hs(e)});function Eg(e){return{query:uv(e)||""}}var Qa=class{constructor(t){this.config=t}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return qe(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!Ig(n)&&!Ig(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:bg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Er({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return qe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(gn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ut(this.getState(),this.navigatorContext),query:t})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return qe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ut(o,n),i=xs(o),s=new Qa(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),Or=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Pg(o))return null;let i=br(o),u=Ma(o)/i,c=xs(o),l=ut(o,n),d=new Qa(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),yn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Tg,clearFilters:new lv}),e.clearFilters&&(r(pe()),r(Rr())),r(pn({allow:!0})),r(fe({query:e.query})),r(Dt({page:0}))}),Sn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Pr(n,i),query:s});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),mv={child:new dv({options:{required:!0},values:{permanentid:new Tg({required:!0})}})},hn=g("commerce/search/promoteChildToParent",e=>F(e,mv));function Og(){return{wasCorrectedTo:"",queryCorrection:ms(),originalQuery:""}}var Rs=j(Og(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=ms(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as kg,BooleanValue as qg,ArrayValue as Ps,StringValue as Fs,NumberValue as Dg,RecordValue as Cv}from"@coveo/bueno";var H=D;import{Value as pv,NumberValue as fv,StringValue as gv,ArrayValue as yv,BooleanValue as Sv}from"@coveo/bueno";var hv={state:new pv({required:!0}),numberOfResults:new fv({required:!0,min:0}),value:new gv({required:!0,emptyAllowed:!0}),path:new yv({required:!0,each:D}),moreValuesAvailable:new Sv({required:!1})};function La(e){e.children.forEach(t=>{La(t)}),Se({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},hv)}var Cn={facetId:H,field:D,tabs:new Cv({options:{required:!1},values:{included:new Ps({each:new Fs}),excluded:new Ps({each:new Fs})}}),activeTab:new Fs({required:!1}),delimitingCharacter:new Fs({required:!1,emptyAllowed:!0}),filterFacetCount:new qg({required:!1}),injectionDepth:new Dg({required:!1,min:0}),numberOfValues:new Dg({required:!1,min:1}),sortCriteria:new kg({required:!1}),basePath:new Ps({required:!1,each:D}),filterByBasePath:new qg({required:!1})},xn=5,Vg=g("categoryFacet/register",e=>F(e,Cn)),Ng=g("categoryFacet/toggleSelectValue",e=>{try{return Se(e.facetId,D),La(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Mg=g("categoryFacet/deselectAll",e=>F(e,Cn.facetId)),uB=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:Cn.facetId,numberOfValues:Cn.numberOfValues})),lB=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:Cn.facetId,criterion:new kg})),dB=g("categoryFacet/updateBasePath",e=>F(e,{facetId:Cn.facetId,basePath:new Ps({each:D})}));import{NumberValue as Pv,RecordValue as Av,ArrayValue as vv}from"@coveo/bueno";import{RecordValue as xv,NumberValue as Rv,StringValue as Fv}from"@coveo/bueno";var Ba={facetId:H,captions:new xv({options:{required:!1}}),numberOfValues:new Rv({required:!1,min:1}),query:new Fv({required:!1,emptyAllowed:!0})};var bv={path:new vv({required:!0,each:D}),displayValue:me,rawValue:me,count:new Pv({required:!0,min:0})},Nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Av({values:bv})})),As=g("categoryFacetSearch/register",e=>F(e,Ba));import{RecordValue as wv,NumberValue as Ev}from"@coveo/bueno";var Qg={facetId:H,value:new wv({values:{displayValue:me,rawValue:me,count:new Ev({required:!0,min:0})}})},vs=g("facetSearch/register",e=>F(e,Ba)),qr=g("facetSearch/update",e=>F(e,Ba)),nt=g("facetSearch/toggleSelectValue",e=>F(e,Qg)),At=g("facetSearch/toggleExcludeValue",e=>F(e,Qg));import{BooleanValue as Iv}from"@coveo/bueno";var ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Iv({required:!1})})),Hl=g("facetOptions/facet/enable",e=>F(e,H)),sr=g("facetOptions/facet/disable",e=>F(e,H));var Tv=g("history/undo"),Ov=g("history/redo"),Mt=g("history/snapshot"),kB=_("history/back",async(e,{dispatch:t})=>{t(Tv()),await t(xe())}),VB=_("history/forward",async(e,{dispatch:t})=>{t(Ov()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Lg,StringValue as Ua,NumberValue as Bg,RecordValue as Dr}from"@coveo/bueno";var bs={q:new Ua,enableQuerySyntax:new Lg,aq:new Ua,cq:new Ua,firstResult:new Bg({min:0}),numberOfResults:new Bg({min:0}),sortCriteria:new Ua,f:new Dr,fExcluded:new Dr,cf:new Dr,nf:new Dr,mnf:new Dr,df:new Dr,debug:new Lg,sf:new Dr,tab:new Ua,af:new Dr};var we=g("searchParameters/restore",e=>F(e,bs)),qv=g("searchParameters/restoreTab",e=>F(e,D));import{BooleanValue as gS,NumberValue as yS,StringValue as LE}from"@coveo/bueno";function cr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Xl(){return typeof window<"u"}function dd(){return typeof navigator<"u"}function Rn(){return typeof document<"u"}function Zl(){try{return typeof localStorage<"u"}catch{return!1}}function Dv(){try{return typeof sessionStorage<"u"}catch{return!1}}function ey(){return dd()&&navigator.cookieEnabled}var kv=[ee.click,ee.custom,ee.search,ee.view],Vv=(e,t)=>kv.indexOf(e)!==-1?Object.assign({language:Rn()?document.documentElement.lang:"unknown",userAgent:dd()?navigator.userAgent:"unknown"},t):t,$a=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Ug(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Ug(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];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 Ug(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Nv(){return Zl()?localStorage:ey()?new za:Dv()?sessionStorage:new Pn}var za=class e{getItem(t){return $a.get(`${e.prefix}${t}`)}removeItem(t){$a.erase(`${e.prefix}${t}`)}setItem(t,r,o){$a.set(`${e.prefix}${t}`,r,o)}};za.prefix="coveo_";var ed=class{constructor(){this.cookieStorage=new za}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)}},Pn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ja="__coveo.analytics.history",ty=20,ry=1e3*60,oy=75,An=class{constructor(t){this.store=t||Nv()}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(ja);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(ja);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ja,JSON.stringify(t.slice(0,ty)))}catch{}}clear(){try{this.store.removeItem(ja)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,oy)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ry:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},ny=Object.freeze({__proto__:null,HistoryStore:An,MAX_NUMBER_OF_HISTORY_ELEMENTS:ty,MAX_VALUE_SIZE:oy,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ry,STORE_KEY:ja,default:An}),Mv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Qv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Qv=e=>w(void 0,void 0,void 0,function*(){let t=new An,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ws,Lv=new Uint8Array(16);function Bv(){if(!ws&&(ws=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ws))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ws(Lv)}var Uv=/^(?:[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 Is(e){return typeof e=="string"&&Uv.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function ay(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function jv(e){if(!Is(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 _v(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var $v="6ba7b810-9dad-11d1-80b4-00c04fd430c8",zv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Wv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=_v(n)),typeof a=="string"&&(a=jv(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return ay(c)}try{o.name=e}catch{}return o.DNS=$v,o.URL=zv,o}var Kv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jg={randomUUID:Kv};function wo(e,t,r){if(jg.randomUUID&&!t&&!e)return jg.randomUUID();e=e||{};let o=e.random||(e.rng||Bv)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return ay(o)}function Gv(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function Yl(e,t){return e<<t|e>>>32-t}function Hv(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 o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=s}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Yl(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Yl(u,5)+Gv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Yl(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>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 Yv=Wv("v5",80,Hv),_g=Yv,iy="2.30.45",$g=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,_a={pageview:"pageview",event:"event"},Ts=class{constructor({client:t,uuidGenerator:r=wo}){this.client=t,this.uuidGenerator=r}},td=class extends Ts{constructor({client:t,uuidGenerator:r=wo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=$g(window.location),this.lastReferrer=Rn()?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:Rn()?document.title:"",encoding:Rn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===_a.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===_a.pageview?this.nextPageViewId:this.pageViewId,referrer:t===_a.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===_a.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return $g(window.location)}},kr=class e{constructor(t,r){if(!Is(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 o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return Is(a)?new e(a,Number.parseInt(n)*1e3):null}};kr.cvo_cid="cvo_cid";kr.expirationTime=120;var rd=class extends Ts{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),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(kr.cvo_cid,new kr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};rd.Id="link";var dt=Object.keys;function Es(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Jl=128,sy=192,zg=224,Wg=240;function Jv(e){return(e&248)===Wg?4:(e&Wg)===zg?3:(e&zg)===sy?2:1}function Xv(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&Jl)!=Jl)break;if(r-=3,(o&sy)!=Jl){t-r>=Jv(o)*3&&(r=t);break}}return e.substring(0,r)}var od={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"},Zv=dt(od).map(e=>od[e]),eb=[...Zv].join("|"),tb=new RegExp(`^(${eb}$)`),rb={svcAction:"svc_action",svcActionData:"svc_action_data"},ob=e=>dt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=od[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),nb=e=>tb.test(e),ab=[nb],Kg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ke={action:"pa",list:"pal",listSource:"pls"},Os={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ib=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],nd={id:"quoteId",affiliation:"quoteAffiliation"},ad={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},sb={add:ke,bookmark_add:ke,bookmark_remove:ke,click:ke,checkout:ke,checkout_option:ke,detail:ke,impression:ke,remove:ke,refund:Object.assign(Object.assign({},ke),Os),purchase:Object.assign(Object.assign({},ke),Os),quickview:ke,quote:Object.assign(Object.assign({},ke),nd),review:Object.assign(Object.assign({},ke),ad)},cb=dt(Kg).map(e=>Kg[e]),ub=dt(Gg).map(e=>Gg[e]),lb=dt(ke).map(e=>ke[e]),db=dt(Os).map(e=>Os[e]),mb=dt(ad).map(e=>ad[e]),pb=dt(nd).map(e=>nd[e]),fb=[...cb,"custom"].join("|"),gb=[...ub,"custom"].join("|"),cy="(pr[0-9]+)",uy="(il[0-9]+pi[0-9]+)",yb=new RegExp(`^${cy}(${fb})$`),Sb=new RegExp(`^(${uy}(${gb}))|(il[0-9]+nm)$`),hb=new RegExp(`^(${lb.join("|")})$`),Cb=new RegExp(`^(${db.join("|")})$`),xb=new RegExp(`^${cy}custom$`),Rb=new RegExp(`^${uy}custom$`),Fb=new RegExp(`^(${[...ib,...mb,...pb].join("|")})$`),Pb=e=>yb.test(e),Ab=e=>Sb.test(e),vb=e=>hb.test(e),bb=e=>Cb.test(e),wb=e=>Fb.test(e),Eb=[Ab,Pb,vb,bb,wb],Ib=[xb,Rb],Tb={anonymizeIp:"aip"},Ob={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},qb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Db=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],kb=Object.assign(Object.assign(Object.assign(Object.assign({},Tb),Ob),qb),Db.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),id=Object.assign(Object.assign({},kb),rb),Vb=e=>{let t=!!e.action&&sb[e.action]||{};return dt(e).reduce((r,o)=>{let n=t[o]||id[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},Nb=dt(id).map(e=>id[e]),Mb=e=>Nb.indexOf(e)!==-1,Qb=e=>e==="custom",Lb=e=>[...Eb,...ab,Mb,Qb].some(t=>t(e)),Bb=e=>dt(e).reduce((t,r)=>{let o=Ub(r);return o?Object.assign(Object.assign({},t),jb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ub=e=>{let t;return[...Ib].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},jb=(e,t)=>dt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),sd=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:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}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:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},cd=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()})}},Hg=globalThis.fetch,qs=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=cr(u,["url"]),d;try{d=yield Hg(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,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 Hg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.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"})}},ud=class{constructor(t,r){Zl()&&ey()?this.storage=new ed:Zl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Pn),this.client=new qs(t),this.beaconClient=new sd(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ld=class{constructor(t,r){this.storage=r||new Pn,this.client=new qs(t)}getClientDependingOnEventType(t){return this.client}},Ds=class{constructor(){this.storage=new Pn,this.client=new cd}getClientDependingOnEventType(t){return this.client}},_b="xx",$b=e=>e?.startsWith(_b)||!1,zb=`
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