@coveo/headless 3.24.2-pre.dc880bbfb8 → 3.24.2-pre.e4ba2aa040
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessCommerce",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessCommerce"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
|
|
18
18
|
"use strict";var WR=Object.create;var Na=Object.defineProperty;var KR=Object.getOwnPropertyDescriptor;var GR=Object.getOwnPropertyNames;var HR=Object.getPrototypeOf,YR=Object.prototype.hasOwnProperty;var JR=(e,t,r)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),al=(e,t)=>{for(var r in t)Na(e,r,{get:t[r],enumerable:!0})},cp=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of GR(t))!YR.call(e,n)&&n!==r&&Na(e,n,{get:()=>t[n],enumerable:!(o=KR(t,n))||o.enumerable});return e};var $t=(e,t,r)=>(r=e!=null?WR(HR(e)):{},cp(t||!e||!e.__esModule?Na(r,"default",{value:e,enumerable:!0}):r,e)),XR=e=>cp(Na({},"__esModule",{value:!0}),e);var Xe=(e,t,r)=>JR(e,typeof t!="symbol"?t+"":t,r);var df=Te(ei=>{"use strict";var fc=ei&&ei.__assign||function(){return fc=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},fc.apply(this,arguments)};Object.defineProperty(ei,"__esModule",{value:!0});var eP={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function tP(e){var t=fc(fc({},eP),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ei.getSanitizedOptions=tP});var mf=Te(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});function rP(e){var t=Math.random()*e;return Math.round(t)}ql.fullJitter=rP});var pf=Te(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});function oP(e){return e}kl.noJitter=oP});var ff=Te(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var nP=mf(),aP=pf();function iP(e){switch(e.jitter){case"full":return nP.fullJitter;case"none":default:return aP.noJitter}}Vl.JitterFactory=iP});var Nl=Te(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var cP=ff(),sP=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=cP.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=sP});var gf=Te(Cr=>{"use strict";var uP=Cr&&Cr.__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)}}(),lP=Cr&&Cr.__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 c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},dP=Cr&&Cr.__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:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Cr,"__esModule",{value:!0});var mP=Nl(),pP=function(e){uP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return lP(this,void 0,void 0,function(){return dP(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}(mP.Delay);Cr.SkipFirstDelay=pP});var yf=Te(ti=>{"use strict";var fP=ti&&ti.__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(ti,"__esModule",{value:!0});var gP=Nl(),yP=function(e){fP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(gP.Delay);ti.AlwaysDelay=yP});var hf=Te(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var hP=gf(),SP=yf();function CP(e,t){var r=xP(e);return r.setAttemptNumber(t),r}Ml.DelayFactory=CP;function xP(e){return e.delayFirstAttempt?new SP.AlwaysDelay(e):new hP.SkipFirstDelay(e)}});var Sf=Te(qo=>{"use strict";var Ql=qo&&qo.__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 c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},Ll=qo&&qo.__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:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(qo,"__esModule",{value:!0});var RP=df(),FP=hf();function PP(e,t){return t===void 0&&(t={}),Ql(this,void 0,void 0,function(){var r,o;return Ll(this,function(n){switch(n.label){case 0:return r=RP.getSanitizedOptions(t),o=new vP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}qo.backOff=PP;var vP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Ql(this,void 0,void 0,function(){var t,r;return Ll(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 Ql(this,void 0,void 0,function(){var t;return Ll(this,function(r){switch(r.label){case 0:return t=FP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var os=Te((Td,Od)=>{"use strict";(function(e,t){typeof Td=="object"&&typeof Od<"u"?Od.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Td,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",c="day",u="week",s="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+)?$/,S=/\[([^\]]+)]|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(D){var q=["th","st","nd","rd"],O=D%100;return"["+D+(q[(O-20)%10]||q[O]||q[0])+"]"}},h=function(D,q,O){var N=String(D);return!N||N.length>=q?D:""+Array(q+1-N.length).join(O)+D},v={s:h,z:function(D){var q=-D.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),V=O%60;return(q<=0?"+":"-")+h(N,2,"0")+":"+h(V,2,"0")},m:function D(q,O){if(q.date()<O.date())return-D(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),V=q.clone().add(N,s),L=O-V<0,U=q.clone().add(N+(L?-1:1),s);return+(-(N+(O-V)/(L?V-U:U-V))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},y="en",x={};x[y]=C;var E="$isDayjsObject",A=function(D){return D instanceof T||!(!D||!D[E])},R=function D(q,O,N){var V;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(V=L),O&&(x[L]=O,V=L);var U=q.split("-");if(!V&&U.length>1)return D(U[0])}else{var z=q.name;x[z]=q,V=z}return!N&&V&&(y=V),V||!N&&y},P=function(D,q){if(A(D))return D.clone();var O=typeof q=="object"?q:{};return O.date=D,O.args=arguments,new T(O)},b=v;b.l=R,b.i=A,b.w=function(D,q){return P(D,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function D(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var q=D.prototype;return q.parse=function(O){this.$d=function(N){var V=N.date,L=N.utc;if(V===null)return new Date(NaN);if(b.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var U=V.match(f);if(U){var z=U[2]-1||0,J=(U[7]||"0").substring(0,3);return L?new Date(Date.UTC(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)):new Date(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)}}return new Date(V)}(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 V=P(O);return this.startOf(N)<=V&&V<=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,V){return b.u(O)?this[N]:this.set(V,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var V=this,L=!!b.u(N)||N,U=b.p(O),z=function(re,de){var ge=b.w(V.$u?Date.UTC(V.$y,de,re):new Date(V.$y,de,re),V);return L?ge:ge.endOf(c)},J=function(re,de){return b.w(V.toDate()[re].apply(V.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(de)),V)},te=this.$W,G=this.$M,X=this.$D,K="set"+(this.$u?"UTC":"");switch(U){case d:return L?z(1,0):z(31,11);case s:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,pe=(te<Z?te+7:te)-Z;return z(L?X-pe:X+(6-pe),G);case c:case p:return J(K+"Hours",0);case i:return J(K+"Minutes",1);case a:return J(K+"Seconds",2);case n:return J(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var V,L=b.p(O),U="set"+(this.$u?"UTC":""),z=(V={},V[c]=U+"Date",V[p]=U+"Date",V[s]=U+"Month",V[d]=U+"FullYear",V[i]=U+"Hours",V[a]=U+"Minutes",V[n]=U+"Seconds",V[o]=U+"Milliseconds",V)[L],J=L===c?this.$D+(N-this.$W):N;if(L===s||L===d){var te=this.clone().set(p,1);te.$d[z](J),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](J);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 V,L=this;O=Number(O);var U=b.p(N),z=function(G){var X=P(L);return b.w(X.date(X.date()+Math.round(G*O)),L)};if(U===s)return this.set(s,this.$M+O);if(U===d)return this.set(d,this.$y+O);if(U===c)return z(1);if(U===u)return z(7);var J=(V={},V[a]=t,V[i]=r,V[n]=e,V)[U]||1,te=this.$d.getTime()+O*J;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),z=this.$H,J=this.$m,te=this.$M,G=V.weekdays,X=V.months,K=V.meridiem,Z=function(de,ge,Je,ht){return de&&(de[ge]||de(N,L))||Je[ge].slice(0,ht)},pe=function(de){return b.s(z%12||12,de,"0")},re=K||function(de,ge,Je){var ht=de<12?"AM":"PM";return Je?ht.toLowerCase():ht};return L.replace(S,function(de,ge){return ge||function(Je){switch(Je){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(V.monthsShort,te,X,3);case"MMMM":return Z(X,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(V.weekdaysMin,N.$W,G,2);case"ddd":return Z(V.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 pe(1);case"hh":return pe(2);case"a":return re(z,J,!0);case"A":return re(z,J,!1);case"m":return String(J);case"mm":return b.s(J,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 U}return null}(de)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,V){var L,U=this,z=b.p(N),J=P(O),te=(J.utcOffset()-this.utcOffset())*t,G=this-J,X=function(){return b.m(U,J)};switch(z){case d:L=X()/12;break;case s:L=X();break;case l:L=X()/3;break;case u:L=(G-te)/6048e5;break;case c: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 V?L:b.a(L)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var V=this.clone(),L=R(O,N,!0);return L&&(V.$L=L),V},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()},D}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(D){M[D[1]]=function(q){return this.$g(q,D[0],D[1])}}),P.extend=function(D,q){return D.$i||(D(q,T,P),D.$i=!0),P},P.locale=R,P.isDayjs=A,P.unix=function(D){return P(1e3*D)},P.en=x[y],P.Ls=x,P.p={},P})});var cy=Te((qd,kd)=>{"use strict";(function(e,t){typeof qd=="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()})(qd,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var a=n.add;n.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):a.bind(this)(c,u)};var i=n.startOf;n.startOf=function(c,u){var s=this.$utils(),l=!!s.u(u)||u;if(s.p(c)===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)(c,u)}}})});var sy=Te((Vd,Dd)=>{"use strict";(function(e,t){typeof Vd=="object"&&typeof Dd<"u"?Dd.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={},c=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(S){this[f]=+S}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var C=S.match(/([+-]|\d\d)/g),h=60*C[1]+(+C[2]||0);return h===0?0:C[0]==="+"?-h:h}(f)}],l=function(f){var S=i[f];return S&&(S.indexOf?S:S.s.concat(S.f))},d=function(f,S){var C,h=i.meridiem;if(h){for(var v=1;v<=24;v+=1)if(f.indexOf(h(v,0,S))>-1){C=v>12;break}}else C=f===(S?"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 S=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],S)for(var h=1;h<=31;h+=1)S(h).replace(/\[|\]/g,"")===f&&(this.day=h)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var S=l("months"),C=(l("monthsShort")||S.map(function(h){return h.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var S=l("months").indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=c(f)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function m(f){var S,C;S=f,C=i&&i.formats;for(var h=(f=S.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(D,q,O){return q||O.slice(1)})})).match(t),v=h.length,y=0;y<v;y+=1){var x=h[y],E=p[x],A=E&&E[0],R=E&&E[1];h[y]=R?{regex:A,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<v;T+=1){var D=h[T];if(typeof D=="string")M+=D.length;else{var q=D.regex,O=D.parser,N=P.slice(M),V=q.exec(N)[0];O.call(b,V),P=P.replace(V,"")}}return function(L){var U=L.afternoon;if(U!==void 0){var z=L.hours;U?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,S,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var h=S.prototype,v=h.parse;h.parse=function(y){var x=y.date,E=y.utc,A=y.args;this.$u=E;var R=A[1];if(typeof R=="string"){var P=A[2]===!0,b=A[3]===!0,T=P||b,M=A[2];b&&(M=A[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,V,L,U){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*N);var z=m(V)(N),J=z.year,te=z.month,G=z.day,X=z.hours,K=z.minutes,Z=z.seconds,pe=z.milliseconds,re=z.zone,de=z.week,ge=new Date,Je=G||(J||te?1:ge.getDate()),ht=J||ge.getFullYear(),Vr=0;J&&!te||(Vr=te>0?te-1:ge.getMonth());var nn,an=X||0,Da=K||0,ol=Z||0,nl=pe||0;return re?new Date(Date.UTC(ht,Vr,Je,an,Da,ol,nl+60*re.offset*1e3)):L?new Date(Date.UTC(ht,Vr,Je,an,Da,ol,nl)):(nn=new Date(ht,Vr,Je,an,Da,ol,nl),de&&(nn=U(nn).week(de).toDate()),nn)}catch{return new Date("")}}(x,R,E,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 D=R.length,q=1;q<=D;q+=1){A[1]=R[q-1];var O=C.apply(this,A);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===D&&(this.$d=new Date(""))}else v.call(this,y)}}})});var rC=Te((f2,tC)=>{"use strict";var wI=/(^|; )Coveo-Pendragon=([^;]*)/;tC.exports=()=>wI.exec(document.cookie)?.pop()||null});var nC=Te((Im,Em)=>{"use strict";(function(e,t){typeof Im=="object"&&typeof Em<"u"?Em.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Im,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(S,C){C===void 0&&(C={});var h=C.timeZoneName||"short",v=S+"|"+h,y=t[v];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[v]=y),y}(d,p);return f.formatToParts(m)},c=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var S=p[f],C=S.type,h=S.value,v=e[C];v>=0&&(m[v]=parseInt(h,10))}var y=m[3],x=y===24?0:y,E=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(E).valueOf()-(A-=A%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),S=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(S))/1e3/60),h=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(h))p=this.utcOffset(0,d);else if(p=n(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),d){var v=p.utcOffset();p=p.add(m-v,"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 s=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return s.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,S=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,E,A){var R=x-60*E*1e3,P=c(R,A);if(E===P)return[R,E];var b=c(R-=60*(P-E)*1e3,A);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),S,f),h=C[0],v=C[1],y=n(h).utcOffset(v);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var aC=Te((Tm,Om)=>{"use strict";(function(e,t){typeof Tm=="object"&&typeof Om<"u"?Om.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Tm,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 c=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.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 s=i.utcOffset;i.utcOffset=function(m,f){var S=this.$utils().u;if(S(m))return this.$u?0:S(this.$offset)?s.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 E=(""+x[0]).match(r)||["-",0,0],A=E[0],R=60*+E[1]+ +E[2];return R===0?0:A==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,h=this;if(f)return h.$offset=C,h.$u=m===0,h;if(m!==0){var v=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(C+v,e)).$offset=C,h.$x.$localOffset=v}else h=this.utc();return h};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,S){if(m&&this.$u===m.$u)return p.call(this,m,f,S);var C=this.local(),h=a(m).local();return p.call(C,h,f,S)}}})});var SC=Te((RY,hC)=>{"use strict";function NI(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}hC.exports=MI;function MI(e,t,r){var o=r&&r.stringify||NI,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 c=1;c<a;c++)i[c]=o(t[c]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",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&&(s+=e.slice(d,m)),s+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=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&&(s+=e.slice(d,m));var f=typeof t[l];if(f==="string"){s+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){s+=t[l].name||"<anonymous>",d=m+2,m++;break}s+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(s+=e.slice(d,m)),s+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(s+=e.slice(d,m)),s+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(s+=e.slice(d)),s)}});var vC=Te((FY,gu)=>{"use strict";var CC=SC();gu.exports=kr;var Qi=XI().console||{},QI={mapHttpRequest:fu,mapHttpResponse:fu,wrapRequestSerializer:qm,wrapResponseSerializer:qm,wrapErrorSerializer:qm,req:fu,res:fu,err:RC,errWithCause:RC};function Ro(e,t){return e==="silent"?1/0:t.levels.values[e]}var Dm=Symbol("pino.logFuncs"),km=Symbol("pino.hierarchy"),LI={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function xC(e,t){let r={logger:t,parent:e[km]};t[km]=r}function UI(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:Qi[n]||Qi[LI[n]||"log"]||Ca}),e[Dm]=o}function BI(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function kr(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||Qi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=BI(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||{}),c=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&c.forEach(function(S){r[S]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=Ca),UI(s,c,r),xC({},s),Object.defineProperty(s,"levelVal",{get:d}),Object.defineProperty(s,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:HI(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ca};s.levels=jI(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=Ca,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...S){return f.call(this,l,...S)},t&&(s._logEvent=Vm());function d(){return Ro(this.level,this)}function p(){return this._level}function m(S){if(S!=="silent"&&!this.levels.values[S])throw Error("unknown level "+S);this._level=S,Yo(this,l,s,"error"),Yo(this,l,s,"fatal"),Yo(this,l,s,"warn"),Yo(this,l,s,"info"),Yo(this,l,s,"debug"),Yo(this,l,s,"trace"),i.forEach(C=>{Yo(this,l,s,C)})}function f(S,C,h){if(!C)throw new Error("missing bindings for child Pino");h=h||{},n&&C.serializers&&(h.serializers=C.serializers);let v=h.serializers;if(n&&v){var y=Object.assign({},o,v),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,Nm([C],x,y,this._stdErrSerialize)}function E(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=Vm([].concat(R._logEvent.bindings,C)))}E.prototype=this;let A=new E(this);return xC(this,A),A.child=function(...R){return f.call(this,S,...R)},A.level=h.level||this.level,S.onChild(A),A}return s}function jI(e){let t=e.customLevels||{},r=Object.assign({},kr.levels.values,t),o=Object.assign({},kr.levels.labels,_I(t));return{values:r,labels:o}}function _I(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}kr.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"}};kr.stdSerializers=QI;kr.stdTimeFunctions=Object.assign({},{nullTime:FC,epochTime:PC,unixTime:YI,isoTime:JI});function $I(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[km];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Yo(e,t,r,o){if(Object.defineProperty(e,o,{value:Ro(e.level,r)>Ro(o,r)?Ca:r[Dm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===Ca){if(!t.transmit)return;let a=t.transmit.level||e.level,i=Ro(a,r);if(Ro(o,r)<i)return}e[o]=WI(e,t,r,o);let n=$I(e);n.length!==0&&(e[o]=zI(n,e[o]))}function zI(e,t){return function(){return t.apply(this,[...e,...arguments])}}function WI(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Qi?Qi:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Nm(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,KI(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=Ro(d,r),m=Ro(o,r);if(m<p)return;GI(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Ro(e._level,r)},c,l)}}}(e[Dm][o])}function KI(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},c=r.slice(),u=c[0],s={};if(o&&(s.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(s,p)}else s.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?CC(c.shift(),c):void 0}else typeof u=="string"&&(u=CC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Nm(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=kr.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 GI(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;o||Nm(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 s.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=c,n(i,e._logEvent,u),e._logEvent=Vm(s)}function Vm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function RC(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 HI(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?FC:PC}function fu(){return{}}function qm(e){return e}function Ca(){}function FC(){return!1}function PC(){return Date.now()}function YI(){return Math.round(Date.now()/1e3)}function JI(){return new Date(Date.now()).toISOString()}function XI(){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)||{}}}gu.exports.default=kr;gu.exports.pino=kr});var xq={};al(xq,{HighlightUtils:()=>Ol,ProductTemplatesHelpers:()=>LR,Selectors:()=>Il,SortBy:()=>St,SortDirection:()=>Qr,buildCart:()=>jf,buildCategoryFilterSuggestions:()=>tl,buildCommerceEngine:()=>OC,buildContext:()=>nx,buildController:()=>W,buildDateRange:()=>Ir,buildFieldSuggestionsGenerator:()=>$R,buildFieldsSortCriterion:()=>Ya,buildFilterSuggestions:()=>rl,buildFilterSuggestionsGenerator:()=>zR,buildInstantProducts:()=>TR,buildNotifyTrigger:()=>UR,buildProductListing:()=>PR,buildProductTemplatesManager:()=>MR,buildProductView:()=>AR,buildQueryTrigger:()=>jR,buildRecentQueriesList:()=>ER,buildRecommendations:()=>vR,buildRedirectionTrigger:()=>BR,buildRelevanceSortCriterion:()=>Dt,buildSearch:()=>xR,buildSearchBox:()=>Xu,buildStandaloneSearchBox:()=>DR,deserializeRelativeDate:()=>Sy,getAnalyticsNextApiBaseUrl:()=>gc,getCommerceApiBaseUrl:()=>hc,getOrganizationEndpoint:()=>ke,getSampleCommerceEngineConfiguration:()=>TC,loadCartActions:()=>lE,loadCategoryFacetSetActions:()=>pE,loadConfigurationActions:()=>FE,loadContextActions:()=>nE,loadCoreFacetActions:()=>mE,loadDateFacetActions:()=>yE,loadInstantProductsActions:()=>TE,loadLocationFacetActions:()=>gE,loadNumericFacetActions:()=>hE,loadPaginationActions:()=>sE,loadProductActions:()=>uE,loadProductListingActions:()=>iE,loadProductListingParametersActions:()=>AE,loadQueryActions:()=>PE,loadQuerySetActions:()=>CE,loadQuerySuggestActions:()=>RE,loadRecentQueriesActions:()=>OE,loadRecommendationsActions:()=>cE,loadRegularFacetActions:()=>fE,loadSearchActions:()=>aE,loadSearchParametersActions:()=>vE,loadSortActions:()=>dE,loadStandaloneSearchBoxSetActions:()=>VE,loadTriggersActions:()=>bE,productListingSerializer:()=>Bu,searchSerializer:()=>Po,validateRelativeDate:()=>eo});module.exports=XR(xq);var Il={};al(Il,{ProductListing:()=>wl,Search:()=>bl});var sp="coveo-headless-internal-state",B=Symbol.for(sp),up=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==B)},get(t,r,o){return typeof r=="symbol"&&r.description===sp&&r!==B&&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 _p=require("@coveo/bueno");function Oe(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 ZR=typeof Symbol=="function"&&Symbol.observable||"@@observable",lp=ZR,il=()=>Math.random().toString(36).substring(7).split("").join("."),eF={INIT:`@@redux/INIT${il()}`,REPLACE:`@@redux/REPLACE${il()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${il()}`},Gi=eF;function zt(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 cl(e,t,r){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(cl)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Oe(3));return n}function d(C){if(typeof C!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Oe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!zt(C))throw new Error(Oe(7));if(typeof C.type>"u")throw new Error(Oe(8));if(typeof C.type!="string")throw new Error(Oe(17));if(u)throw new Error(Oe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Oe(10));o=C,p({type:Gi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Oe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[lp](){return this}}}return p({type:Gi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[lp]:f}}function tF(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Gi.INIT})>"u")throw new Error(Oe(12));if(typeof r(void 0,{type:Gi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function cn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{tF(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Oe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function sn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function dp(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Oe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=sn(...c)(n.dispatch),{...n,dispatch:a}}}function Hi(e){return zt(e)&&"type"in e&&typeof e.type=="string"}var hl=Symbol.for("immer-nothing"),Ma=Symbol.for("immer-draftable"),Ze=Symbol.for("immer-state");function qe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ao=Object.getPrototypeOf;function st(e){return!!e&&!!e[Ze]}function et(e){return e?yp(e)||Array.isArray(e)||!!e[Ma]||!!e.constructor?.[Ma]||ja(e)||_a(e):!1}var rF=Object.prototype.constructor.toString();function yp(e){if(!e||typeof e!="object")return!1;let t=Ao(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)===rF}function Sl(e){return st(e)||qe(15,e),e[Ze].base_}function Qa(e,t){bo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function bo(e){let t=e[Ze];return t?t.type_:Array.isArray(e)?1:ja(e)?2:_a(e)?3:0}function La(e,t){return bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sl(e,t){return bo(e)===2?e.get(t):e[t]}function hp(e,t,r){let o=bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function oF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ja(e){return e instanceof Map}function _a(e){return e instanceof Set}function vo(e){return e.copy_||e.base_}function dl(e,t){if(ja(e))return new Map(e);if(_a(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=yp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ze];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Ao(e),o)}else{let o=Ao(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Xi(e,t=!1){return Zi(e)||st(e)||!et(e)||(bo(e)>1&&(e.set=e.add=e.clear=e.delete=nF),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Xi(o,!0))),e}function nF(){qe(2)}function Zi(e){return Object.isFrozen(e)}var ml={};function wo(e){let t=ml[e];return t||qe(0,e),t}function aF(e,t){ml[e]||(ml[e]=t)}var Ua;function Sp(){return Ua}function iF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mp(e,t){t&&(wo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pl(e){fl(e),e.drafts_.forEach(cF),e.drafts_=null}function fl(e){e===Ua&&(Ua=e.parent_)}function pp(e){return Ua=iF(Ua,e)}function cF(e){let t=e[Ze];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ze].modified_&&(pl(t),qe(4)),et(e)&&(e=Yi(t,e),t.parent_||Ji(t,e)),t.patches_&&wo("Patches").generateReplacementPatches_(r[Ze].base_,e,t.patches_,t.inversePatches_)):e=Yi(t,r,[]),pl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hl?e:void 0}function Yi(e,t,r){if(Zi(t))return t;let o=t[Ze];if(!o)return Qa(t,(n,a)=>gp(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ji(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),Qa(a,(c,u)=>gp(e,o,n,c,u,r,i)),Ji(e,n,!1),r&&e.patches_&&wo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function gp(e,t,r,o,n,a,i){if(st(n)){let c=a&&t&&t.type_!==3&&!La(t.assigned_,o)?a.concat(o):void 0,u=Yi(e,n,c);if(hp(r,o,u),st(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(et(n)&&!Zi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Yi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ji(e,n)}}function Ji(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xi(t,r)}function sF(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Sp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Cl;r&&(n=[o],a=Ba);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Cl={get(e,t){if(t===Ze)return e;let r=vo(e);if(!La(r,t))return uF(e,r,t);let o=r[t];return e.finalized_||!et(o)?o:o===ul(e.base_,t)?(ll(e),e.copy_[t]=yl(o,e)):o},has(e,t){return t in vo(e)},ownKeys(e){return Reflect.ownKeys(vo(e))},set(e,t,r){let o=Cp(vo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=ul(vo(e),t),a=n?.[Ze];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(oF(r,n)&&(r!==void 0||La(e.base_,t)))return!0;ll(e),gl(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 ul(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ll(e),gl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=vo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){qe(11)},getPrototypeOf(e){return Ao(e.base_)},setPrototypeOf(){qe(12)}},Ba={};Qa(Cl,(e,t)=>{Ba[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ba.deleteProperty=function(e,t){return Ba.set.call(this,e,t,void 0)};Ba.set=function(e,t,r){return Cl.set.call(this,e[0],t,r,e[0])};function ul(e,t){let r=e[Ze];return(r?vo(r):e)[t]}function uF(e,t,r){let o=Cp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Cp(e,t){if(!(t in e))return;let r=Ao(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ao(r)}}function gl(e){e.modified_||(e.modified_=!0,e.parent_&&gl(e.parent_))}function ll(e){e.copy_||(e.copy_=dl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lF=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,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&qe(6),o!==void 0&&typeof o!="function"&&qe(7);let n;if(et(t)){let a=pp(this),i=yl(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?pl(a):fl(a)}return mp(a,o),fp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===hl&&(n=void 0),this.autoFreeze_&&Xi(n,!0),o){let a=[],i=[];wo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else qe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){et(e)||qe(8),st(e)&&(e=xp(e));let t=pp(this),r=yl(e,void 0);return r[Ze].isManual_=!0,fl(t),r}finishDraft(e,t){let r=e&&e[Ze];(!r||!r.isManual_)&&qe(9);let{scope_:o}=r;return mp(o,t),fp(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=wo("Patches").applyPatches_;return st(e)?o(e,t):this.produce(e,n=>o(n,t))}};function yl(e,t){let r=ja(e)?wo("MapSet").proxyMap_(e,t):_a(e)?wo("MapSet").proxySet_(e,t):sF(e,t);return(t?t.scope_:Sp()).drafts_.push(r),r}function xp(e){return st(e)||qe(10,e),Rp(e)}function Rp(e){if(!et(e)||Zi(e))return e;let t=e[Ze],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=dl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=dl(e,!0);return Qa(r,(o,n)=>{hp(r,o,Rp(n))}),t&&(t.finalized_=!1),r}function Fp(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;Qa(p.assigned_,(v,y)=>{let x=sl(C,v),E=sl(h,v),A=y?La(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===hl?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=bo(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&qe(19),typeof h=="function"&&R==="prototype"&&qe(19),h=sl(h,R),typeof h!="object"&&qe(18,S.join("/"))}let v=bo(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:qe(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:qe(17,C)}}),p}function l(p){if(!et(p))return p;if(Array.isArray(p))return p.map(l);if(ja(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(_a(p))return new Set(Array.from(p).map(l));let m=Object.create(Ao(p));for(let f in p)m[f]=l(p[f]);return La(p,Ma)&&(m[Ma]=p[Ma]),m}function d(p){return st(p)?l(p):p}aF("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var ut=new lF,hr=ut.produce,ec=ut.produceWithPatches.bind(ut),Aq=ut.setAutoFreeze.bind(ut),bq=ut.setUseStrictShallowCopy.bind(ut),xl=ut.applyPatches.bind(ut),wq=ut.createDraft.bind(ut),Iq=ut.finishDraft.bind(ut);function dF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function pF(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 Pp=e=>Array.isArray(e)?e:[e];function fF(e){let t=Array.isArray(e[0])?e[0]:e;return pF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function gF(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Oq=Symbol();var qq=Object.getPrototypeOf({});var yF=class{constructor(e){this.value=e}deref(){return this.value}},hF=typeof WeakRef<"u"?WeakRef:yF,SF=0,vp=1;function tc(){return{s:SF,v:void 0,o:null,p:null}}function un(e,t={}){let r=tc(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=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=c.o;f===null&&(c.o=f=new WeakMap);let S=f.get(m);S===void 0?(c=tc(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=tc(),f.set(m,c)):c=S}}let s=c,l;if(c.s===vp)l=c.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 hF(l):l}return s.s=vp,s.v=l,l}return i.clearCache=()=>{r=tc(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Ap(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),dF(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=un,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=Pp(p),h=Pp(f),v=fF(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=gF(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Ap(un),CF=Object.assign((e,t=Q)=>{mF(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,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>CF});function bp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var wp=bp(),Ip=bp;var xF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sn:sn.apply(null,arguments)},jq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},RF=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Vt(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=>Hi(o)&&o.type===e,r}var kp=class $a extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$a.prototype)}static get[Symbol.species](){return $a}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $a(...t[0].concat(this)):new $a(...t.concat(this))}};function Ep(e){return et(e)?hr(e,()=>{}):e}function Tp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function FF(e){return typeof e=="boolean"}var PF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new kp;return r&&(FF(r)?i.push(wp):i.push(Ip(r.extraArgument))),i},za="RTK_autoBatch",dn=()=>e=>({payload:e,meta:{[za]:!0}}),Op=e=>t=>{setTimeout(t,e)},vF=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Op(10):e.type==="callback"?e.queueNotification:Op(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[za],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},AF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new kp(e);return o&&n.push(vF(typeof o=="object"?o:void 0)),n};function Vp(e){let t=PF(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(zt(r))c=cn(r);else throw new Error(Vt(1));let u;typeof o=="function"?u=o(t):u=t();let s=sn;n&&(s=xF({trace:!1,...typeof n=="object"&&n}));let l=dp(...u),d=AF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return cl(c,a,m)}function Dp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(Vt(28));if(c in t)throw new Error(Vt(29));return t[c]=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 bF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Dp(t),a;if(bF(e))a=()=>Ep(e());else{let c=Ep(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(st(l)){let m=d(l,u);return m===void 0?l:m}else{if(et(l))return hr(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},c)}return i.getInitialState=a,i}var Np=(e,t)=>RF(e)?e.match(t):e(t);function Wt(...e){return t=>e.some(r=>Np(r,t))}function ln(...e){return t=>e.every(r=>Np(r,t))}function oc(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 Wa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function nc(...e){return e.length===0?t=>oc(t,["pending"]):Wa(e)?Wt(...e.map(t=>t.pending)):nc()(e[0])}function Io(...e){return e.length===0?t=>oc(t,["rejected"]):Wa(e)?Wt(...e.map(t=>t.rejected)):Io()(e[0])}function Ka(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ln(Io(...e),t):Wa(e)?ln(Io(...e),t):Ka()(e[0])}function Sr(...e){return e.length===0?t=>oc(t,["fulfilled"]):Wa(e)?Wt(...e.map(t=>t.fulfilled)):Sr()(e[0])}function ac(...e){return e.length===0?t=>oc(t,["pending","fulfilled","rejected"]):Wa(e)?Wt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):ac()(e[0])}var wF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ic=(e=21)=>{let t="",r=e;for(;r--;)t+=wF[Math.random()*64|0];return t},IF=["name","message","stack","code"],Rl=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},qp=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},EF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of IF)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,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||EF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ic(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(OF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Rl(A,R),fulfillWithValue:(A,R)=>new qp(A,R)})).then(A=>{if(A instanceof Rl)throw A;return A instanceof qp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Rl?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(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(TF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Wt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function TF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function OF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Mp=Symbol.for("rtk-slice-createasyncthunk"),Kq={[Mp]:_};function qF(e,t){return`${e}/${t}`}function kF({creators:e}={}){let t=e?.asyncThunk?.[Mp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Vt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(DF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(Vt(12));if(x in u.sliceCaseReducersByType)throw new Error(Vt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:qF(n,v),createNotation:typeof o.reducers=="function"};MF(y)?LF(x,y,s,t):NF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?Dp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=Tp(p,y,()=>new WeakMap);return Tp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=VF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function VF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Eo=kF();function DF(){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 NF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!QF(o))throw new Error(Vt(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 MF(e){return e._reducerDefinitionType==="asyncThunk"}function QF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function LF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||rc,pending:c||rc,rejected:u||rc,settled:s||rc})}function rc(){}var Qp="listener",Lp="completed",Up="cancelled",Gq=`task-${Up}`,Hq=`task-${Lp}`,Yq=`${Qp}-${Up}`,Jq=`${Qp}-${Lp}`;var{assign:Bp}=Object;var Fl="listenerMiddleware";var UF=Bp(g(`${Fl}/add`),{withTypes:()=>UF}),Xq=g(`${Fl}/removeAll`),BF=Bp(g(`${Fl}/remove`),{withTypes:()=>BF});var Zq=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),cc=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),Nr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),sc=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),uc=Q(e=>e.commercePagination?.principal.page||0,e=>e),jp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var lk=Q(e=>e[B].productListing.responseId,e=>e),Ga=Q(e=>e.productListing.responseId,e=>e),$p=Q(e=>e.productListing.requestId,e=>e),Ha=Q(e=>e.productListing?.products.length||0,e=>e),zp=Q(e=>({total:Nr(e),current:Ha(e)}),({current:e,total:t})=>e<t),Wp=Q(e=>e.productListing?.isLoading,e=>(0,_p.isNullOrUndefined)(e)?!1:e),Kp=Q(e=>e.productListing?.error,e=>e??null);var Al=require("@coveo/bueno");function Pl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function vl(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 c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Gt(e){let{activeValue:t,ancestryMap:r}=_F(e);return t?$F(t,r):[]}function _F(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 $F(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Gp(){return{principal:Mr(),recommendations:{}}}function Mr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var Nt=require("@coveo/bueno");var Ht=require("@coveo/bueno"),St=(r=>(r.Relevance="relevance",r.Fields="fields",r))(St||{}),Qr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Qr||{}),Dt=()=>({by:"relevance"});var fk=new Ht.RecordValue({options:{required:!1},values:{by:new Ht.EnumValue({enum:St,required:!0}),fields:new Ht.ArrayValue({each:new Ht.RecordValue({values:{name:new Ht.StringValue,direction:new Ht.EnumValue({enum:Qr})}})})}});var Ya=e=>({by:"fields",fields:e}),Hp=new Nt.RecordValue({options:{required:!1},values:{by:new Nt.EnumValue({enum:St,required:!0}),fields:new Nt.ArrayValue({each:new Nt.RecordValue({values:{field:new Nt.StringValue({required:!0}),direction:new Nt.EnumValue({enum:Qr}),displayName:new Nt.StringValue}})})}});function To(){return{appliedSort:Dt(),availableSorts:[Dt()]}}function lc(e){return{...zF(e?.commercePagination,t=>t.principal.page,Mr().page),...WF(e?.commercePagination,t=>t.principal.perPage,Mr().perPage),...vl(e?.commerceSort,t=>t.appliedSort,To().appliedSort),...Kt(e.commerceFacetSet,Lr(e,"regular"),KF,"f"),...Kt(e.commerceFacetSet,Lr(e,"regular"),GF,"fExcluded"),...Kt(e.commerceFacetSet,Lr(e,"location"),HF,"lf"),...Kt(e.commerceFacetSet,Lr(e,"hierarchical"),YF,"cf"),...Kt(e.commerceFacetSet,Lr(e,"dateRange"),Yp,"df"),...Kt(e.commerceFacetSet,Lr(e,"dateRange"),Jp,"dfExcluded"),...Kt(e.commerceFacetSet,Lr(e,"numericalRange"),Yp,"nf"),...Kt(e.commerceFacetSet,Lr(e,"numericalRange"),Jp,"nfExcluded"),...Xp("selected",e.manualNumericFacetSet),...Xp("excluded",e.manualNumericFacetSet)}}function zF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function WF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function KF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function GF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function HF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Yp(e){return e.values.filter(t=>t.state==="selected")}function Jp(e){return e.values.filter(t=>t.state==="excluded")}function Xp(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 YF(e){return Gt(e.values).map(r=>r.value)}function Lr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var dc=()=>({query:""});var Mk=Q(e=>e[B].commerceSearch.responseId,e=>e),Ja=Q(e=>e.commerceSearch.responseId,e=>e),Zp=Q(e=>e.commerceSearch.requestId,e=>e),Xa=Q(e=>e.commerceSearch?.products.length||0,e=>e),ef=Q(e=>({total:Nr(e),current:Xa(e)}),({current:e,total:t})=>e<t),tf=Q(e=>e.commerceSearch?.isLoading,e=>(0,Al.isNullOrUndefined)(e)?!1:e),rf=Q(e=>e.commerceSearch?.error,e=>e??null),mc=Q(e=>e.commerceQuery?.query,e=>e??""),JF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),of=(e,t)=>(0,Al.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?mc(e):t.queryCorrection.correctedQuery,nf=e=>({...Pl(e?.commerceQuery,t=>t.query,dc().query),...lc(e)});function af(e){return{query:JF(e)||""}}var bl;(t=>t.responseIdSelector=cf(Ja))(bl||(bl={}));var wl;(t=>t.responseIdSelector=cf(Ga))(wl||(wl={}));function cf(e){return t=>e(t[B])}var Ol={};al(Ol,{escape:()=>mn,getHighlightedSuggestion:()=>Tl,highlightString:()=>ZF});var lf=require("@coveo/bueno");var Oo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function sf(e){return Array.isArray(e)}function pc(e){return e.trim()===""}function uf(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Za(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function ZF(e){if(pc(e.openingDelimiter)||pc(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,lf.isNullOrUndefined)(e.content)||pc(e.content))return e.content;if(e.highlights.length===0)return mn(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=mn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=mn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=mn(e.content.slice(o))),r}function Tl(e,t){return e=mn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?El(o,t.notMatchDelimiters):n?El(n,t.exactMatchDelimiters):a?El(a,t.correctionDelimiters):r)}function El(e,t){return t?t.open+e+t.close:e}function mn(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Ff=$t(Sf(),1);var AP="recommendation-internal-options",Yk=Symbol.for(AP);var $=new Error("Failed to load reducers."),pn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ko=class extends Error{constructor(r,o){super();Xe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Cf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function xf(e){return typeof e!="object"||!e?!1:Object.values(e).every(bP)}function bP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Rf(e){return e===429}var fn=class e{static async call(t){let r=wP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(Rf(u.status))throw u;return u};try{let u=await(0,Ff.backOff)(c,{retry:s=>{let l=s&&Rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new pn;case 404:throw new ko(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ko(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Za(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 s}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ct(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function gc(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function wP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=IP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function IP(e,t){return t==="application/x-www-form-urlencoded"?xf(e)?Cf(e):"":JSON.stringify(e)}function EP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function TP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ul(e,t){if(t&&e.name==="AbortError")return{error:TP(e)};if(e instanceof ko)return{error:EP(e)};throw e}var gn=(e,t)=>({...ri(e,t),requestParams:OP(e)}),OP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},ri=(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 Pf=(e,t)=>({...ri(e,t),requestParams:qP(e)}),qP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var vf=e=>({...ri(e,"search/querySuggest"),requestParams:kP(e)}),kP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Qe=e=>e.error!==void 0,yc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...gn(t,"listing"),...this.options})}async search(t){let r=gn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Pf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=gn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=vf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=gn(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=gn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await fn.call(t);if(r instanceof Error)return Ul(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function hc(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Sc=e=>e;var _l=require("@coveo/bueno");var tt=require("@coveo/bueno"),k=new tt.StringValue({required:!0,emptyAllowed:!1}),ae=new tt.StringValue({required:!1,emptyAllowed:!1}),Ce=new tt.StringValue({required:!0,emptyAllowed:!0}),Af=new tt.StringValue({required:!1,emptyAllowed:!0}),bf=new tt.ArrayValue({each:k,required:!0}),wf=new tt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),We=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new tt.Schema({value:t}).validate({value:e}).value};let n=new tt.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new tt.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:We(r)}}},rt=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return If(e,t,r,n,"Controller initialization error")},Ke=(e,t,r,o)=>{let n=`Check the options of ${o}`;return If(e,t,r,n,"Controller initialization error")},If=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Ge=require("@coveo/bueno");var yn="3.24.2-pre.dc880bbfb8",Ef=["@coveo/atomic","@coveo/quantic"];var Bl=()=>ae,Tf=()=>k,Vo=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Ge.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Of=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Ge.StringValue({required:!1,url:!0}),pipeline:new Ge.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ge.ArrayValue({required:!1,each:k})})),hn={enabled:new Ge.BooleanValue({default:!0}),originContext:Bl(),originLevel2:Bl(),originLevel3:Bl(),proxyBaseUrl:new Ge.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ge.Value,anonymous:new Ge.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Ge.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ge.RecordValue({options:{required:!1},values:Ef.reduce((e,t)=>(e[t]=wf,e),{})})},jl=g("configuration/updateAnalyticsConfiguration",e=>F(e,hn)),Cc=g("configuration/analytics/disable"),xc=g("configuration/analytics/enable"),qf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Tf()})),kf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Tf()}));var Sn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new _l.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Cn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new _l.StringValue({required:!1,url:!0})})),xn=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:hn.enabled,proxyBaseUrl:hn.proxyBaseUrl,source:hn.source,trackingId:hn.trackingId})),Rc=g("commerce/configuration/analytics/disable"),Fc=g("commerce/configuration/analytics/enable");var Ur=require("@coveo/bueno");var Vf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var $l=j(Vf(),e=>e.addCase(Sn,(t,r)=>{Df(t,r.payload)}).addCase(Vo,(t,r)=>{Df(t,r.payload)}).addCase(Cn,(t,r)=>{VP(t,r.payload)}).addCase(xn,(t,r)=>{DP(t,r.payload)}).addCase(Rc,t=>{t.analytics.enabled=!1}).addCase(Fc,t=>{t.analytics.enabled=!0}));function Df(e,t){(0,Ur.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Ur.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function VP(e,t){(0,Ur.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function DP(e,t){(0,Ur.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Ur.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Ur.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Ur.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Rn(e){return e.currency}var Nf=(e,t)=>({currency:Rn(t.commerceContext),products:NP(t.cart),transaction:e}),Mf=(e,t)=>({currency:Rn(t.commerceContext),...e}),Do=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),NP=Q(Do,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Mt=require("@coveo/bueno");var zl={productId:k,quantity:new Mt.NumberValue({required:!0,min:0}),name:new Mt.StringValue({required:!1}),price:new Mt.NumberValue({required:!1,min:0})},Wl=new Mt.ArrayValue({each:new Mt.RecordValue({values:{...zl}})}),Kl={items:Wl},Qf=new Mt.Schema(Kl);var Br=g("commerce/cart/setItems",e=>F(e,Wl)),Fn=g("commerce/cart/updateItemQuantity",e=>F(e,zl)),Pn=g("commerce/cart/purchase"),Pc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Nf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),vc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Mf(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),c=t!==i;return t=i,c}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(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function Lf(e,t){return e.cart[No(t)]}var Uf=Q(Do,e=>e.reduce((t,r)=>t+r.quantity,0)),Bf=Q(Do,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function jf(e,t={}){if(!MP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};rt(e,Qf,a,"buildCart"),a.items!==void 0&&r(Br(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(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 s(l,d){let{quantity:p,...m}=l,f=c(l,d),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of Do(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Pc(l)),r(Pn())},updateItemQuantity(l){let d=Lf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(vc(s(l,d))),r(Fn(l)))},get state(){let l=n();return{items:Do(l),totalQuantity:Uf(l),totalPrice:Bf(l)}}}}function No(e){return`${e.productId},${e.name},${e.price}`}function MP(e){return e.addReducers({cart:vn}),!0}var Ac=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),_f=e=>zf(e.cartItems,e.cart),$f=e=>zf(e.purchasedItems,e.purchased);function zf(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 vn=j(Ac(),e=>{e.addCase(Br,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=No(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Ac());Wf(t,n,o)}).addCase(Fn,(t,{payload:r})=>{let o=No(r);if(!(o in t.cart)){QP(r,t);return}if(r.quantity<=0){LP(r,t);return}t.cart[o]=r}).addCase(Pn,t=>{UP(t);let{cart:r,cartItems:o}=Ac();Wf(t,o,r)})});function Wf(e,t,r){e.cartItems=t,e.cart=r}function QP(e,t){if(e.quantity<=0)return;let r=No(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function LP(e,t){let r=No(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function UP(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]}}var Yt=require("@coveo/bueno");var BP=Intl.supportedValuesOf("currency"),jP=new Yt.StringValue({required:!0,emptyAllowed:!1,constrainTo:BP}),Gl={url:k},Hl={latitude:new Yt.NumberValue({min:-90,max:90,required:!0}),longitude:new Yt.NumberValue({min:-180,max:180,required:!0})},oi={language:k,country:k,currency:jP,view:new Yt.RecordValue({options:{required:!0},values:Gl}),location:new Yt.RecordValue({options:{required:!1},values:Hl})},Kf=new Yt.Schema(oi);var me=g("commerce/context/set",e=>F(e,oi)),fe=g("commerce/context/setView",e=>F(e,Gl)),An=g("commerce/context/setLocation",e=>F(e,Hl));var Gf=()=>({language:"",country:"",currency:"",view:{url:""}});var Jt=j(Gf(),e=>{e.addCase(me,(t,{payload:r})=>r).addCase(fe,(t,{payload:r})=>{t.view=r}).addCase(An,(t,{payload:r})=>{t.location=r})});var bc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Uo=require("@coveo/bueno");var xt=g("breadcrumb/deselectAll"),jr=g("breadcrumb/deselectAllNonBreadcrumbs");var _r=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${yn}`));var $r=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??hc(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:_f(e.cart),source:_r(e.configuration.analytics)}}};var wc=(e,t,r)=>({...$r(e,t),..._P(e,r)}),_P=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var Rt=(e,t)=>({...wc(e,t),facets:[...$P(e)],...e.commerceSort&&{sort:zP(e.commerceSort.appliedSort)}});function $P(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 zP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var bn=require("@coveo/bueno");var Mo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new bn.NumberValue({required:!0,min:1})})),Qo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new bn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),Le=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),Lo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new bn.BooleanValue({required:!0})})),wn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new bn.BooleanValue({required:!0})}));var Yl=require("@coveo/bueno");var Ic={slotId:Af},WP={...Ic,pageSize:new Yl.NumberValue({required:!0,min:0})},xr=g("commerce/pagination/setPageSize",e=>F(e,WP)),KP={...Ic,page:new Yl.NumberValue({required:!0,min:0})},Xt=g("commerce/pagination/selectPage",e=>F(e,KP)),zr=g("commerce/pagination/nextPage",e=>F(e,Ic)),Wr=g("commerce/pagination/previousPage",e=>F(e,Ic)),In=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));var Hf=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Hf.StringValue}));var Jl=require("@coveo/bueno");var Ec=require("@coveo/bueno");var Kr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Ec.StringValue({emptyAllowed:!0,required:!0})})),En=g("commerce/triggers/query/applyModification",e=>F(e,new Ec.RecordValue({values:{originalQuery:ae,modification:ae}})));var ni=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(!(!(0,Jl.isNullOrUndefined)(n)&&!(0,Jl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:of(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Kr({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(En({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Rt(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(Re({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Rt(o,n),i=mc(o),c=new ni(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Gr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!ef(o))return null;let i=Dr(o),u=Xa(o)/i,s=mc(o),l=Rt(o,n),d=new ni(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Tn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Uo.StringValue,clearFilters:new Uo.BooleanValue}),e.clearFilters&&(r(xe()),r(jr())),r(wn({allow:!0})),r(Re({query:e.query})),r(Xt({page:0}))}),On=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...$r(n,i),query:c});return Qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),GP={child:new Uo.RecordValue({options:{required:!0},values:{permanentid:new Uo.StringValue({required:!0})}})},qn=g("commerce/search/promoteChildToParent",e=>F(e,GP));function Yf(){return{wasCorrectedTo:"",queryCorrection:bc(),originalQuery:""}}var Tc=j(Yf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=bc(),t.wasCorrectedTo=""}).addCase(H.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??[]}})});var ye=require("@coveo/bueno");var Y=k;var Zt=require("@coveo/bueno");var HP={state:new Zt.Value({required:!0}),numberOfResults:new Zt.NumberValue({required:!0,min:0}),value:new Zt.StringValue({required:!0,emptyAllowed:!0}),path:new Zt.ArrayValue({required:!0,each:k}),moreValuesAvailable:new Zt.BooleanValue({required:!1})};function ai(e){e.children.forEach(t=>{ai(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},HP)}var kn={facetId:Y,field:k,tabs:new ye.RecordValue({options:{required:!1},values:{included:new ye.ArrayValue({each:new ye.StringValue}),excluded:new ye.ArrayValue({each:new ye.StringValue})}}),activeTab:new ye.StringValue({required:!1}),delimitingCharacter:new ye.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new ye.BooleanValue({required:!1}),injectionDepth:new ye.NumberValue({required:!1,min:0}),numberOfValues:new ye.NumberValue({required:!1,min:1}),sortCriteria:new ye.Value({required:!1}),basePath:new ye.ArrayValue({required:!1,each:k}),filterByBasePath:new ye.BooleanValue({required:!1})},Vn=5,Jf=g("categoryFacet/register",e=>F(e,kn)),Xf=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,k),ai(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:We(t)}}}),Zf=g("categoryFacet/deselectAll",e=>F(e,kn.facetId)),dM=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:kn.facetId,numberOfValues:kn.numberOfValues})),mM=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:kn.facetId,criterion:new ye.Value})),pM=g("categoryFacet/updateBasePath",e=>F(e,{facetId:kn.facetId,basePath:new ye.ArrayValue({each:k})}));var Nn=require("@coveo/bueno");var Dn=require("@coveo/bueno");var ii={facetId:Y,captions:new Dn.RecordValue({options:{required:!1}}),numberOfValues:new Dn.NumberValue({required:!1,min:1}),query:new Dn.StringValue({required:!1,emptyAllowed:!0})};var YP={path:new Nn.ArrayValue({required:!0,each:k}),displayValue:Ce,rawValue:Ce,count:new Nn.NumberValue({required:!0,min:0})},Ft=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new Nn.RecordValue({values:YP})})),Oc=g("categoryFacetSearch/register",e=>F(e,ii));var qc=require("@coveo/bueno");var eg={facetId:Y,value:new qc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new qc.NumberValue({required:!0,min:0})}})},kc=g("facetSearch/register",e=>F(e,ii)),Hr=g("facetSearch/update",e=>F(e,ii)),lt=g("facetSearch/toggleSelectValue",e=>F(e,eg)),Qt=g("facetSearch/toggleExcludeValue",e=>F(e,eg));var tg=require("@coveo/bueno");var Rr=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new tg.BooleanValue({required:!1})})),Xl=g("facetOptions/facet/enable",e=>F(e,Y)),Fr=g("facetOptions/facet/disable",e=>F(e,Y));var JP=g("history/undo"),XP=g("history/redo"),er=g("history/snapshot"),qM=_("history/back",async(e,{dispatch:t})=>{t(JP()),await t(we())}),kM=_("history/forward",async(e,{dispatch:t})=>{t(XP()),await t(we())}),we=_("history/change",async(e,{getState:t})=>t().history.present);var he=require("@coveo/bueno"),Vc={q:new he.StringValue,enableQuerySyntax:new he.BooleanValue,aq:new he.StringValue,cq:new he.StringValue,firstResult:new he.NumberValue({min:0}),numberOfResults:new he.NumberValue({min:0}),sortCriteria:new he.StringValue,f:new he.RecordValue,fExcluded:new he.RecordValue,cf:new he.RecordValue,nf:new he.RecordValue,mnf:new he.RecordValue,df:new he.RecordValue,debug:new he.BooleanValue,sf:new he.RecordValue,tab:new he.StringValue,af:new he.RecordValue};var Ve=g("searchParameters/restore",e=>F(e,Vc)),ZP=g("searchParameters/restoreTab",e=>F(e,k));var so=require("@coveo/bueno");function Pr(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 c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((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 td(){return typeof window<"u"}function fd(){return typeof navigator<"u"}function Mn(){return typeof document<"u"}function rd(){try{return typeof localStorage<"u"}catch{return!1}}function ev(){try{return typeof sessionStorage<"u"}catch{return!1}}function gg(){return fd()&&navigator.cookieEnabled}var tv=[ee.click,ee.custom,ee.search,ee.view],rv=(e,t)=>tv.indexOf(e)!==-1?Object.assign({language:Mn()?document.documentElement.lang:"unknown",userAgent:fd()?navigator.userAgent:"unknown"},t):t,ui=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?rg(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],rg(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 rg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function ov(){return rd()?localStorage:gg()?new li:ev()?sessionStorage:new Ln}var li=class e{getItem(t){return ui.get(`${e.prefix}${t}`)}removeItem(t){ui.erase(`${e.prefix}${t}`)}setItem(t,r,o){ui.set(`${e.prefix}${t}`,r,o)}};li.prefix="coveo_";var od=class{constructor(){this.cookieStorage=new li}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)}},Ln=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ci="__coveo.analytics.history",yg=20,hg=1e3*60,Sg=75,Un=class{constructor(t){this.store=t||ov()}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(ci);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(ci);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ci,JSON.stringify(t.slice(0,yg)))}catch{}}clear(){try{this.store.removeItem(ci)}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,Sg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>hg:!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))}},Cg=Object.freeze({__proto__:null,HistoryStore:Un,MAX_NUMBER_OF_HISTORY_ELEMENTS:yg,MAX_VALUE_SIZE:Sg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:hg,STORE_KEY:ci,default:Un}),nv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield av(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),av=e=>w(void 0,void 0,void 0,function*(){let t=new Un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Dc,iv=new Uint8Array(16);function cv(){if(!Dc&&(Dc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dc(iv)}var sv=/^(?:[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 Mc(e){return typeof e=="string"&&sv.test(e)}var De=[];for(let e=0;e<256;++e)De.push((e+256).toString(16).slice(1));function xg(e,t=0){return(De[e[t+0]]+De[e[t+1]]+De[e[t+2]]+De[e[t+3]]+"-"+De[e[t+4]]+De[e[t+5]]+"-"+De[e[t+6]]+De[e[t+7]]+"-"+De[e[t+8]]+De[e[t+9]]+"-"+De[e[t+10]]+De[e[t+11]]+De[e[t+12]]+De[e[t+13]]+De[e[t+14]]+De[e[t+15]]).toLowerCase()}function uv(e){if(!Mc(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 lv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var dv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",mv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function pv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=lv(n)),typeof a=="string"&&(a=uv(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 s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return xg(s)}try{o.name=e}catch{}return o.DNS=dv,o.URL=mv,o}var fv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),og={randomUUID:fv};function Bo(e,t,r){if(og.randomUUID&&!t&&!e)return og.randomUUID();e=e||{};let o=e.random||(e.rng||cv)();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 xg(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 Zl(e,t){return e<<t|e>>>32-t}function yv(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 c=0;c<i.length;++c)e.push(i.charCodeAt(c))}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 c=new Uint32Array(16);for(let u=0;u<16;++u)c[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]=c}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 c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=Zl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),S=Zl(u,5)+gv(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Zl(s,30)>>>0,s=u,u=S}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>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 hv=pv("v5",80,yv),ng=hv,Rg="2.30.45",ag=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,si={pageview:"pageview",event:"event"},Qc=class{constructor({client:t,uuidGenerator:r=Bo}){this.client=t,this.uuidGenerator=r}},nd=class extends Qc{constructor({client:t,uuidGenerator:r=Bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ag(window.location),this.lastReferrer=Mn()?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:Mn()?document.title:"",encoding:Mn()?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===si.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===si.pageview?this.nextPageViewId:this.pageViewId,referrer:t===si.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===si.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 ag(window.location)}},Yr=class e{constructor(t,r){if(!Mc(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 Mc(a)?new e(a,Number.parseInt(n)*1e3):null}};Yr.cvo_cid="cvo_cid";Yr.expirationTime=120;var ad=class extends Qc{constructor({client:t,uuidGenerator:r=Bo}){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(Yr.cvo_cid,new Yr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ad.Id="link";var vt=Object.keys;function Nc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ed=128,Fg=192,ig=224,cg=240;function Sv(e){return(e&248)===cg?4:(e&cg)===ig?3:(e&ig)===Fg?2:1}function Cv(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&ed)!=ed)break;if(r-=3,(o&Fg)!=ed){t-r>=Sv(o)*3&&(r=t);break}}return e.substring(0,r)}var id={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"},xv=vt(id).map(e=>id[e]),Rv=[...xv].join("|"),Fv=new RegExp(`^(${Rv}$)`),Pv={svcAction:"svc_action",svcActionData:"svc_action_data"},vv=e=>vt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=id[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Av=e=>Fv.test(e),bv=[Av],sg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ug={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ue={action:"pa",list:"pal",listSource:"pls"},Lc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},wv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],cd={id:"quoteId",affiliation:"quoteAffiliation"},sd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Iv={add:Ue,bookmark_add:Ue,bookmark_remove:Ue,click:Ue,checkout:Ue,checkout_option:Ue,detail:Ue,impression:Ue,remove:Ue,refund:Object.assign(Object.assign({},Ue),Lc),purchase:Object.assign(Object.assign({},Ue),Lc),quickview:Ue,quote:Object.assign(Object.assign({},Ue),cd),review:Object.assign(Object.assign({},Ue),sd)},Ev=vt(sg).map(e=>sg[e]),Tv=vt(ug).map(e=>ug[e]),Ov=vt(Ue).map(e=>Ue[e]),qv=vt(Lc).map(e=>Lc[e]),kv=vt(sd).map(e=>sd[e]),Vv=vt(cd).map(e=>cd[e]),Dv=[...Ev,"custom"].join("|"),Nv=[...Tv,"custom"].join("|"),Pg="(pr[0-9]+)",vg="(il[0-9]+pi[0-9]+)",Mv=new RegExp(`^${Pg}(${Dv})$`),Qv=new RegExp(`^(${vg}(${Nv}))|(il[0-9]+nm)$`),Lv=new RegExp(`^(${Ov.join("|")})$`),Uv=new RegExp(`^(${qv.join("|")})$`),Bv=new RegExp(`^${Pg}custom$`),jv=new RegExp(`^${vg}custom$`),_v=new RegExp(`^(${[...wv,...kv,...Vv].join("|")})$`),$v=e=>Mv.test(e),zv=e=>Qv.test(e),Wv=e=>Lv.test(e),Kv=e=>Uv.test(e),Gv=e=>_v.test(e),Hv=[zv,$v,Wv,Kv,Gv],Yv=[Bv,jv],Jv={anonymizeIp:"aip"},Xv={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Zv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},eA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],tA=Object.assign(Object.assign(Object.assign(Object.assign({},Jv),Xv),Zv),eA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ud=Object.assign(Object.assign({},tA),Pv),rA=e=>{let t=!!e.action&&Iv[e.action]||{};return vt(e).reduce((r,o)=>{let n=t[o]||ud[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},oA=vt(ud).map(e=>ud[e]),nA=e=>oA.indexOf(e)!==-1,aA=e=>e==="custom",iA=e=>[...Hv,...bv,nA,aA].some(t=>t(e)),cA=e=>vt(e).reduce((t,r)=>{let o=sA(r);return o?Object.assign(Object.assign({},t),uA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),sA=e=>{let t;return[...Yv].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},uA=(e,t)=>vt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),ld=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:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}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:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}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}},dd=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()})}},lg=globalThis.fetch,Uc=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():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Pr(u,["url"]),d;try{d=yield lg(s,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 lg(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"})}},md=class{constructor(t,r){rd()&&gg()?this.storage=new od:rd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Ln),this.client=new Uc(t),this.beaconClient=new ld(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}},pd=class{constructor(t,r){this.storage=r||new Ln,this.client=new Uc(t)}getClientDependingOnEventType(t){return this.client}},Bc=class{constructor(){this.storage=new Ln,this.client=new dd}getClientDependingOnEventType(t){return this.client}},lA="xx",dA=e=>e?.startsWith(lA)||!1,mA=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var _p=require("@coveo/bueno");function Oe(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 ZR=typeof Symbol=="function"&&Symbol.observable||"@@observable",lp=ZR,il=()=>Math.random().toString(36).substring(7).split("").join("."),eF={INIT:`@@redux/INIT${il()}`,REPLACE:`@@redux/REPLACE${il()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${il()}`},Gi=eF;function zt(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 cl(e,t,r){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(cl)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Oe(3));return n}function d(C){if(typeof C!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Oe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!zt(C))throw new Error(Oe(7));if(typeof C.type>"u")throw new Error(Oe(8));if(typeof C.type!="string")throw new Error(Oe(17));if(u)throw new Error(Oe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Oe(10));o=C,p({type:Gi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Oe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[lp](){return this}}}return p({type:Gi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[lp]:f}}function tF(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Gi.INIT})>"u")throw new Error(Oe(12));if(typeof r(void 0,{type:Gi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function cn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{tF(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Oe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function sn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function dp(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Oe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=sn(...c)(n.dispatch),{...n,dispatch:a}}}function Hi(e){return zt(e)&&"type"in e&&typeof e.type=="string"}var hl=Symbol.for("immer-nothing"),Ma=Symbol.for("immer-draftable"),Ze=Symbol.for("immer-state");function qe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ao=Object.getPrototypeOf;function st(e){return!!e&&!!e[Ze]}function et(e){return e?yp(e)||Array.isArray(e)||!!e[Ma]||!!e.constructor?.[Ma]||ja(e)||_a(e):!1}var rF=Object.prototype.constructor.toString();function yp(e){if(!e||typeof e!="object")return!1;let t=Ao(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)===rF}function Sl(e){return st(e)||qe(15,e),e[Ze].base_}function Qa(e,t){bo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function bo(e){let t=e[Ze];return t?t.type_:Array.isArray(e)?1:ja(e)?2:_a(e)?3:0}function La(e,t){return bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sl(e,t){return bo(e)===2?e.get(t):e[t]}function hp(e,t,r){let o=bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function oF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ja(e){return e instanceof Map}function _a(e){return e instanceof Set}function vo(e){return e.copy_||e.base_}function dl(e,t){if(ja(e))return new Map(e);if(_a(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=yp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ze];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Ao(e),o)}else{let o=Ao(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Xi(e,t=!1){return Zi(e)||st(e)||!et(e)||(bo(e)>1&&(e.set=e.add=e.clear=e.delete=nF),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Xi(o,!0))),e}function nF(){qe(2)}function Zi(e){return Object.isFrozen(e)}var ml={};function wo(e){let t=ml[e];return t||qe(0,e),t}function aF(e,t){ml[e]||(ml[e]=t)}var Ua;function Sp(){return Ua}function iF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mp(e,t){t&&(wo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pl(e){fl(e),e.drafts_.forEach(cF),e.drafts_=null}function fl(e){e===Ua&&(Ua=e.parent_)}function pp(e){return Ua=iF(Ua,e)}function cF(e){let t=e[Ze];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ze].modified_&&(pl(t),qe(4)),et(e)&&(e=Yi(t,e),t.parent_||Ji(t,e)),t.patches_&&wo("Patches").generateReplacementPatches_(r[Ze].base_,e,t.patches_,t.inversePatches_)):e=Yi(t,r,[]),pl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hl?e:void 0}function Yi(e,t,r){if(Zi(t))return t;let o=t[Ze];if(!o)return Qa(t,(n,a)=>gp(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ji(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),Qa(a,(c,u)=>gp(e,o,n,c,u,r,i)),Ji(e,n,!1),r&&e.patches_&&wo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function gp(e,t,r,o,n,a,i){if(st(n)){let c=a&&t&&t.type_!==3&&!La(t.assigned_,o)?a.concat(o):void 0,u=Yi(e,n,c);if(hp(r,o,u),st(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(et(n)&&!Zi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Yi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ji(e,n)}}function Ji(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xi(t,r)}function sF(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Sp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Cl;r&&(n=[o],a=Ba);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Cl={get(e,t){if(t===Ze)return e;let r=vo(e);if(!La(r,t))return uF(e,r,t);let o=r[t];return e.finalized_||!et(o)?o:o===ul(e.base_,t)?(ll(e),e.copy_[t]=yl(o,e)):o},has(e,t){return t in vo(e)},ownKeys(e){return Reflect.ownKeys(vo(e))},set(e,t,r){let o=Cp(vo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=ul(vo(e),t),a=n?.[Ze];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(oF(r,n)&&(r!==void 0||La(e.base_,t)))return!0;ll(e),gl(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 ul(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ll(e),gl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=vo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){qe(11)},getPrototypeOf(e){return Ao(e.base_)},setPrototypeOf(){qe(12)}},Ba={};Qa(Cl,(e,t)=>{Ba[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ba.deleteProperty=function(e,t){return Ba.set.call(this,e,t,void 0)};Ba.set=function(e,t,r){return Cl.set.call(this,e[0],t,r,e[0])};function ul(e,t){let r=e[Ze];return(r?vo(r):e)[t]}function uF(e,t,r){let o=Cp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Cp(e,t){if(!(t in e))return;let r=Ao(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ao(r)}}function gl(e){e.modified_||(e.modified_=!0,e.parent_&&gl(e.parent_))}function ll(e){e.copy_||(e.copy_=dl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lF=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,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&qe(6),o!==void 0&&typeof o!="function"&&qe(7);let n;if(et(t)){let a=pp(this),i=yl(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?pl(a):fl(a)}return mp(a,o),fp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===hl&&(n=void 0),this.autoFreeze_&&Xi(n,!0),o){let a=[],i=[];wo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else qe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){et(e)||qe(8),st(e)&&(e=xp(e));let t=pp(this),r=yl(e,void 0);return r[Ze].isManual_=!0,fl(t),r}finishDraft(e,t){let r=e&&e[Ze];(!r||!r.isManual_)&&qe(9);let{scope_:o}=r;return mp(o,t),fp(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=wo("Patches").applyPatches_;return st(e)?o(e,t):this.produce(e,n=>o(n,t))}};function yl(e,t){let r=ja(e)?wo("MapSet").proxyMap_(e,t):_a(e)?wo("MapSet").proxySet_(e,t):sF(e,t);return(t?t.scope_:Sp()).drafts_.push(r),r}function xp(e){return st(e)||qe(10,e),Rp(e)}function Rp(e){if(!et(e)||Zi(e))return e;let t=e[Ze],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=dl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=dl(e,!0);return Qa(r,(o,n)=>{hp(r,o,Rp(n))}),t&&(t.finalized_=!1),r}function Fp(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;Qa(p.assigned_,(v,y)=>{let x=sl(C,v),E=sl(h,v),A=y?La(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===hl?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=bo(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&qe(19),typeof h=="function"&&R==="prototype"&&qe(19),h=sl(h,R),typeof h!="object"&&qe(18,S.join("/"))}let v=bo(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:qe(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:qe(17,C)}}),p}function l(p){if(!et(p))return p;if(Array.isArray(p))return p.map(l);if(ja(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(_a(p))return new Set(Array.from(p).map(l));let m=Object.create(Ao(p));for(let f in p)m[f]=l(p[f]);return La(p,Ma)&&(m[Ma]=p[Ma]),m}function d(p){return st(p)?l(p):p}aF("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var ut=new lF,hr=ut.produce,ec=ut.produceWithPatches.bind(ut),Aq=ut.setAutoFreeze.bind(ut),bq=ut.setUseStrictShallowCopy.bind(ut),xl=ut.applyPatches.bind(ut),wq=ut.createDraft.bind(ut),Iq=ut.finishDraft.bind(ut);function dF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function pF(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 Pp=e=>Array.isArray(e)?e:[e];function fF(e){let t=Array.isArray(e[0])?e[0]:e;return pF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function gF(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Oq=Symbol();var qq=Object.getPrototypeOf({});var yF=class{constructor(e){this.value=e}deref(){return this.value}},hF=typeof WeakRef<"u"?WeakRef:yF,SF=0,vp=1;function tc(){return{s:SF,v:void 0,o:null,p:null}}function un(e,t={}){let r=tc(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=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=c.o;f===null&&(c.o=f=new WeakMap);let S=f.get(m);S===void 0?(c=tc(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=tc(),f.set(m,c)):c=S}}let s=c,l;if(c.s===vp)l=c.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 hF(l):l}return s.s=vp,s.v=l,l}return i.clearCache=()=>{r=tc(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Ap(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),dF(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=un,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=Pp(p),h=Pp(f),v=fF(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=gF(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Ap(un),CF=Object.assign((e,t=Q)=>{mF(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,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>CF});function bp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var wp=bp(),Ip=bp;var xF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sn:sn.apply(null,arguments)},jq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},RF=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Vt(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=>Hi(o)&&o.type===e,r}var kp=class $a extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$a.prototype)}static get[Symbol.species](){return $a}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $a(...t[0].concat(this)):new $a(...t.concat(this))}};function Ep(e){return et(e)?hr(e,()=>{}):e}function Tp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function FF(e){return typeof e=="boolean"}var PF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new kp;return r&&(FF(r)?i.push(wp):i.push(Ip(r.extraArgument))),i},za="RTK_autoBatch",dn=()=>e=>({payload:e,meta:{[za]:!0}}),Op=e=>t=>{setTimeout(t,e)},vF=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Op(10):e.type==="callback"?e.queueNotification:Op(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[za],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},AF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new kp(e);return o&&n.push(vF(typeof o=="object"?o:void 0)),n};function Vp(e){let t=PF(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(zt(r))c=cn(r);else throw new Error(Vt(1));let u;typeof o=="function"?u=o(t):u=t();let s=sn;n&&(s=xF({trace:!1,...typeof n=="object"&&n}));let l=dp(...u),d=AF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return cl(c,a,m)}function Dp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(Vt(28));if(c in t)throw new Error(Vt(29));return t[c]=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 bF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Dp(t),a;if(bF(e))a=()=>Ep(e());else{let c=Ep(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(st(l)){let m=d(l,u);return m===void 0?l:m}else{if(et(l))return hr(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},c)}return i.getInitialState=a,i}var Np=(e,t)=>RF(e)?e.match(t):e(t);function Wt(...e){return t=>e.some(r=>Np(r,t))}function ln(...e){return t=>e.every(r=>Np(r,t))}function oc(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 Wa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function nc(...e){return e.length===0?t=>oc(t,["pending"]):Wa(e)?Wt(...e.map(t=>t.pending)):nc()(e[0])}function Io(...e){return e.length===0?t=>oc(t,["rejected"]):Wa(e)?Wt(...e.map(t=>t.rejected)):Io()(e[0])}function Ka(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ln(Io(...e),t):Wa(e)?ln(Io(...e),t):Ka()(e[0])}function Sr(...e){return e.length===0?t=>oc(t,["fulfilled"]):Wa(e)?Wt(...e.map(t=>t.fulfilled)):Sr()(e[0])}function ac(...e){return e.length===0?t=>oc(t,["pending","fulfilled","rejected"]):Wa(e)?Wt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):ac()(e[0])}var wF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ic=(e=21)=>{let t="",r=e;for(;r--;)t+=wF[Math.random()*64|0];return t},IF=["name","message","stack","code"],Rl=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},qp=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},EF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of IF)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,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||EF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ic(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(OF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Rl(A,R),fulfillWithValue:(A,R)=>new qp(A,R)})).then(A=>{if(A instanceof Rl)throw A;return A instanceof qp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Rl?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(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(TF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Wt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function TF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function OF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Mp=Symbol.for("rtk-slice-createasyncthunk"),Kq={[Mp]:_};function qF(e,t){return`${e}/${t}`}function kF({creators:e}={}){let t=e?.asyncThunk?.[Mp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Vt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(DF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(Vt(12));if(x in u.sliceCaseReducersByType)throw new Error(Vt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:qF(n,v),createNotation:typeof o.reducers=="function"};MF(y)?LF(x,y,s,t):NF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?Dp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=Tp(p,y,()=>new WeakMap);return Tp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=VF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function VF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Eo=kF();function DF(){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 NF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!QF(o))throw new Error(Vt(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 MF(e){return e._reducerDefinitionType==="asyncThunk"}function QF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function LF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||rc,pending:c||rc,rejected:u||rc,settled:s||rc})}function rc(){}var Qp="listener",Lp="completed",Up="cancelled",Gq=`task-${Up}`,Hq=`task-${Lp}`,Yq=`${Qp}-${Up}`,Jq=`${Qp}-${Lp}`;var{assign:Bp}=Object;var Fl="listenerMiddleware";var UF=Bp(g(`${Fl}/add`),{withTypes:()=>UF}),Xq=g(`${Fl}/removeAll`),BF=Bp(g(`${Fl}/remove`),{withTypes:()=>BF});var Zq=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),cc=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),Nr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),sc=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),uc=Q(e=>e.commercePagination?.principal.page||0,e=>e),jp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var lk=Q(e=>e[B].productListing.responseId,e=>e),Ga=Q(e=>e.productListing.responseId,e=>e),$p=Q(e=>e.productListing.requestId,e=>e),Ha=Q(e=>e.productListing?.products.length||0,e=>e),zp=Q(e=>({total:Nr(e),current:Ha(e)}),({current:e,total:t})=>e<t),Wp=Q(e=>e.productListing?.isLoading,e=>(0,_p.isNullOrUndefined)(e)?!1:e),Kp=Q(e=>e.productListing?.error,e=>e??null);var Al=require("@coveo/bueno");function Pl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function vl(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 c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Gt(e){let{activeValue:t,ancestryMap:r}=_F(e);return t?$F(t,r):[]}function _F(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 $F(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Gp(){return{principal:Mr(),recommendations:{}}}function Mr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var Nt=require("@coveo/bueno");var Ht=require("@coveo/bueno"),St=(r=>(r.Relevance="relevance",r.Fields="fields",r))(St||{}),Qr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Qr||{}),Dt=()=>({by:"relevance"});var fk=new Ht.RecordValue({options:{required:!1},values:{by:new Ht.EnumValue({enum:St,required:!0}),fields:new Ht.ArrayValue({each:new Ht.RecordValue({values:{name:new Ht.StringValue,direction:new Ht.EnumValue({enum:Qr})}})})}});var Ya=e=>({by:"fields",fields:e}),Hp=new Nt.RecordValue({options:{required:!1},values:{by:new Nt.EnumValue({enum:St,required:!0}),fields:new Nt.ArrayValue({each:new Nt.RecordValue({values:{field:new Nt.StringValue({required:!0}),direction:new Nt.EnumValue({enum:Qr}),displayName:new Nt.StringValue}})})}});function To(){return{appliedSort:Dt(),availableSorts:[Dt()]}}function lc(e){return{...zF(e?.commercePagination,t=>t.principal.page,Mr().page),...WF(e?.commercePagination,t=>t.principal.perPage,Mr().perPage),...vl(e?.commerceSort,t=>t.appliedSort,To().appliedSort),...Kt(e.commerceFacetSet,Lr(e,"regular"),KF,"f"),...Kt(e.commerceFacetSet,Lr(e,"regular"),GF,"fExcluded"),...Kt(e.commerceFacetSet,Lr(e,"location"),HF,"lf"),...Kt(e.commerceFacetSet,Lr(e,"hierarchical"),YF,"cf"),...Kt(e.commerceFacetSet,Lr(e,"dateRange"),Yp,"df"),...Kt(e.commerceFacetSet,Lr(e,"dateRange"),Jp,"dfExcluded"),...Kt(e.commerceFacetSet,Lr(e,"numericalRange"),Yp,"nf"),...Kt(e.commerceFacetSet,Lr(e,"numericalRange"),Jp,"nfExcluded"),...Xp("selected",e.manualNumericFacetSet),...Xp("excluded",e.manualNumericFacetSet)}}function zF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function WF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function KF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function GF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function HF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Yp(e){return e.values.filter(t=>t.state==="selected")}function Jp(e){return e.values.filter(t=>t.state==="excluded")}function Xp(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 YF(e){return Gt(e.values).map(r=>r.value)}function Lr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var dc=()=>({query:""});var Mk=Q(e=>e[B].commerceSearch.responseId,e=>e),Ja=Q(e=>e.commerceSearch.responseId,e=>e),Zp=Q(e=>e.commerceSearch.requestId,e=>e),Xa=Q(e=>e.commerceSearch?.products.length||0,e=>e),ef=Q(e=>({total:Nr(e),current:Xa(e)}),({current:e,total:t})=>e<t),tf=Q(e=>e.commerceSearch?.isLoading,e=>(0,Al.isNullOrUndefined)(e)?!1:e),rf=Q(e=>e.commerceSearch?.error,e=>e??null),mc=Q(e=>e.commerceQuery?.query,e=>e??""),JF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),of=(e,t)=>(0,Al.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?mc(e):t.queryCorrection.correctedQuery,nf=e=>({...Pl(e?.commerceQuery,t=>t.query,dc().query),...lc(e)});function af(e){return{query:JF(e)||""}}var bl;(t=>t.responseIdSelector=cf(Ja))(bl||(bl={}));var wl;(t=>t.responseIdSelector=cf(Ga))(wl||(wl={}));function cf(e){return t=>e(t[B])}var Ol={};al(Ol,{escape:()=>mn,getHighlightedSuggestion:()=>Tl,highlightString:()=>ZF});var lf=require("@coveo/bueno");var Oo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function sf(e){return Array.isArray(e)}function pc(e){return e.trim()===""}function uf(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Za(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function ZF(e){if(pc(e.openingDelimiter)||pc(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,lf.isNullOrUndefined)(e.content)||pc(e.content))return e.content;if(e.highlights.length===0)return mn(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=mn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=mn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=mn(e.content.slice(o))),r}function Tl(e,t){return e=mn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?El(o,t.notMatchDelimiters):n?El(n,t.exactMatchDelimiters):a?El(a,t.correctionDelimiters):r)}function El(e,t){return t?t.open+e+t.close:e}function mn(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Ff=$t(Sf(),1);var AP="recommendation-internal-options",Yk=Symbol.for(AP);var $=new Error("Failed to load reducers."),pn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ko=class extends Error{constructor(r,o){super();Xe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Cf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function xf(e){return typeof e!="object"||!e?!1:Object.values(e).every(bP)}function bP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Rf(e){return e===429}var fn=class e{static async call(t){let r=wP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(Rf(u.status))throw u;return u};try{let u=await(0,Ff.backOff)(c,{retry:s=>{let l=s&&Rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new pn;case 404:throw new ko(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ko(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Za(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 s}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ct(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function gc(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function wP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=IP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function IP(e,t){return t==="application/x-www-form-urlencoded"?xf(e)?Cf(e):"":JSON.stringify(e)}function EP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function TP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ul(e,t){if(t&&e.name==="AbortError")return{error:TP(e)};if(e instanceof ko)return{error:EP(e)};throw e}var gn=(e,t)=>({...ri(e,t),requestParams:OP(e)}),OP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},ri=(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 Pf=(e,t)=>({...ri(e,t),requestParams:qP(e)}),qP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var vf=e=>({...ri(e,"search/querySuggest"),requestParams:kP(e)}),kP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Qe=e=>e.error!==void 0,yc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...gn(t,"listing"),...this.options})}async search(t){let r=gn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Pf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=gn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=vf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=gn(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=gn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await fn.call(t);if(r instanceof Error)return Ul(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function hc(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Sc=e=>e;var _l=require("@coveo/bueno");var tt=require("@coveo/bueno"),k=new tt.StringValue({required:!0,emptyAllowed:!1}),ae=new tt.StringValue({required:!1,emptyAllowed:!1}),Ce=new tt.StringValue({required:!0,emptyAllowed:!0}),Af=new tt.StringValue({required:!1,emptyAllowed:!0}),bf=new tt.ArrayValue({each:k,required:!0}),wf=new tt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),We=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new tt.Schema({value:t}).validate({value:e}).value};let n=new tt.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new tt.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:We(r)}}},rt=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return If(e,t,r,n,"Controller initialization error")},Ke=(e,t,r,o)=>{let n=`Check the options of ${o}`;return If(e,t,r,n,"Controller initialization error")},If=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Ge=require("@coveo/bueno");var yn="3.24.2-pre.e4ba2aa040",Ef=["@coveo/atomic","@coveo/quantic"];var Bl=()=>ae,Tf=()=>k,Vo=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Ge.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Of=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Ge.StringValue({required:!1,url:!0}),pipeline:new Ge.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ge.ArrayValue({required:!1,each:k})})),hn={enabled:new Ge.BooleanValue({default:!0}),originContext:Bl(),originLevel2:Bl(),originLevel3:Bl(),proxyBaseUrl:new Ge.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ge.Value,anonymous:new Ge.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Ge.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ge.RecordValue({options:{required:!1},values:Ef.reduce((e,t)=>(e[t]=wf,e),{})})},jl=g("configuration/updateAnalyticsConfiguration",e=>F(e,hn)),Cc=g("configuration/analytics/disable"),xc=g("configuration/analytics/enable"),qf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Tf()})),kf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Tf()}));var Sn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new _l.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Cn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new _l.StringValue({required:!1,url:!0})})),xn=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:hn.enabled,proxyBaseUrl:hn.proxyBaseUrl,source:hn.source,trackingId:hn.trackingId})),Rc=g("commerce/configuration/analytics/disable"),Fc=g("commerce/configuration/analytics/enable");var Ur=require("@coveo/bueno");var Vf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var $l=j(Vf(),e=>e.addCase(Sn,(t,r)=>{Df(t,r.payload)}).addCase(Vo,(t,r)=>{Df(t,r.payload)}).addCase(Cn,(t,r)=>{VP(t,r.payload)}).addCase(xn,(t,r)=>{DP(t,r.payload)}).addCase(Rc,t=>{t.analytics.enabled=!1}).addCase(Fc,t=>{t.analytics.enabled=!0}));function Df(e,t){(0,Ur.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Ur.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function VP(e,t){(0,Ur.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function DP(e,t){(0,Ur.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Ur.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Ur.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Ur.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Rn(e){return e.currency}var Nf=(e,t)=>({currency:Rn(t.commerceContext),products:NP(t.cart),transaction:e}),Mf=(e,t)=>({currency:Rn(t.commerceContext),...e}),Do=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),NP=Q(Do,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Mt=require("@coveo/bueno");var zl={productId:k,quantity:new Mt.NumberValue({required:!0,min:0}),name:new Mt.StringValue({required:!1}),price:new Mt.NumberValue({required:!1,min:0})},Wl=new Mt.ArrayValue({each:new Mt.RecordValue({values:{...zl}})}),Kl={items:Wl},Qf=new Mt.Schema(Kl);var Br=g("commerce/cart/setItems",e=>F(e,Wl)),Fn=g("commerce/cart/updateItemQuantity",e=>F(e,zl)),Pn=g("commerce/cart/purchase"),Pc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Nf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),vc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Mf(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),c=t!==i;return t=i,c}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(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function Lf(e,t){return e.cart[No(t)]}var Uf=Q(Do,e=>e.reduce((t,r)=>t+r.quantity,0)),Bf=Q(Do,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function jf(e,t={}){if(!MP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};rt(e,Qf,a,"buildCart"),a.items!==void 0&&r(Br(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(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 s(l,d){let{quantity:p,...m}=l,f=c(l,d),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of Do(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Pc(l)),r(Pn())},updateItemQuantity(l){let d=Lf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(vc(s(l,d))),r(Fn(l)))},get state(){let l=n();return{items:Do(l),totalQuantity:Uf(l),totalPrice:Bf(l)}}}}function No(e){return`${e.productId},${e.name},${e.price}`}function MP(e){return e.addReducers({cart:vn}),!0}var Ac=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),_f=e=>zf(e.cartItems,e.cart),$f=e=>zf(e.purchasedItems,e.purchased);function zf(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 vn=j(Ac(),e=>{e.addCase(Br,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=No(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Ac());Wf(t,n,o)}).addCase(Fn,(t,{payload:r})=>{let o=No(r);if(!(o in t.cart)){QP(r,t);return}if(r.quantity<=0){LP(r,t);return}t.cart[o]=r}).addCase(Pn,t=>{UP(t);let{cart:r,cartItems:o}=Ac();Wf(t,o,r)})});function Wf(e,t,r){e.cartItems=t,e.cart=r}function QP(e,t){if(e.quantity<=0)return;let r=No(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function LP(e,t){let r=No(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function UP(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]}}var Yt=require("@coveo/bueno");var BP=Intl.supportedValuesOf("currency"),jP=new Yt.StringValue({required:!0,emptyAllowed:!1,constrainTo:BP}),Gl={url:k},Hl={latitude:new Yt.NumberValue({min:-90,max:90,required:!0}),longitude:new Yt.NumberValue({min:-180,max:180,required:!0})},oi={language:k,country:k,currency:jP,view:new Yt.RecordValue({options:{required:!0},values:Gl}),location:new Yt.RecordValue({options:{required:!1},values:Hl})},Kf=new Yt.Schema(oi);var me=g("commerce/context/set",e=>F(e,oi)),fe=g("commerce/context/setView",e=>F(e,Gl)),An=g("commerce/context/setLocation",e=>F(e,Hl));var Gf=()=>({language:"",country:"",currency:"",view:{url:""}});var Jt=j(Gf(),e=>{e.addCase(me,(t,{payload:r})=>r).addCase(fe,(t,{payload:r})=>{t.view=r}).addCase(An,(t,{payload:r})=>{t.location=r})});var bc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Uo=require("@coveo/bueno");var xt=g("breadcrumb/deselectAll"),jr=g("breadcrumb/deselectAllNonBreadcrumbs");var _r=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${yn}`));var $r=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??hc(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:_f(e.cart),source:_r(e.configuration.analytics)}}};var wc=(e,t,r)=>({...$r(e,t),..._P(e,r)}),_P=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var Rt=(e,t)=>({...wc(e,t),facets:[...$P(e)],...e.commerceSort&&{sort:zP(e.commerceSort.appliedSort)}});function $P(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 zP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var bn=require("@coveo/bueno");var Mo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new bn.NumberValue({required:!0,min:1})})),Qo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new bn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),Le=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),Lo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new bn.BooleanValue({required:!0})})),wn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new bn.BooleanValue({required:!0})}));var Yl=require("@coveo/bueno");var Ic={slotId:Af},WP={...Ic,pageSize:new Yl.NumberValue({required:!0,min:0})},xr=g("commerce/pagination/setPageSize",e=>F(e,WP)),KP={...Ic,page:new Yl.NumberValue({required:!0,min:0})},Xt=g("commerce/pagination/selectPage",e=>F(e,KP)),zr=g("commerce/pagination/nextPage",e=>F(e,Ic)),Wr=g("commerce/pagination/previousPage",e=>F(e,Ic)),In=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));var Hf=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Hf.StringValue}));var Jl=require("@coveo/bueno");var Ec=require("@coveo/bueno");var Kr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Ec.StringValue({emptyAllowed:!0,required:!0})})),En=g("commerce/triggers/query/applyModification",e=>F(e,new Ec.RecordValue({values:{originalQuery:ae,modification:ae}})));var ni=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(!(!(0,Jl.isNullOrUndefined)(n)&&!(0,Jl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:of(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Kr({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(En({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Rt(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(Re({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Rt(o,n),i=mc(o),c=new ni(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Gr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!ef(o))return null;let i=Dr(o),u=Xa(o)/i,s=mc(o),l=Rt(o,n),d=new ni(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Tn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Uo.StringValue,clearFilters:new Uo.BooleanValue}),e.clearFilters&&(r(xe()),r(jr())),r(wn({allow:!0})),r(Re({query:e.query})),r(Xt({page:0}))}),On=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...$r(n,i),query:c});return Qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),GP={child:new Uo.RecordValue({options:{required:!0},values:{permanentid:new Uo.StringValue({required:!0})}})},qn=g("commerce/search/promoteChildToParent",e=>F(e,GP));function Yf(){return{wasCorrectedTo:"",queryCorrection:bc(),originalQuery:""}}var Tc=j(Yf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=bc(),t.wasCorrectedTo=""}).addCase(H.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??[]}})});var ye=require("@coveo/bueno");var Y=k;var Zt=require("@coveo/bueno");var HP={state:new Zt.Value({required:!0}),numberOfResults:new Zt.NumberValue({required:!0,min:0}),value:new Zt.StringValue({required:!0,emptyAllowed:!0}),path:new Zt.ArrayValue({required:!0,each:k}),moreValuesAvailable:new Zt.BooleanValue({required:!1})};function ai(e){e.children.forEach(t=>{ai(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},HP)}var kn={facetId:Y,field:k,tabs:new ye.RecordValue({options:{required:!1},values:{included:new ye.ArrayValue({each:new ye.StringValue}),excluded:new ye.ArrayValue({each:new ye.StringValue})}}),activeTab:new ye.StringValue({required:!1}),delimitingCharacter:new ye.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new ye.BooleanValue({required:!1}),injectionDepth:new ye.NumberValue({required:!1,min:0}),numberOfValues:new ye.NumberValue({required:!1,min:1}),sortCriteria:new ye.Value({required:!1}),basePath:new ye.ArrayValue({required:!1,each:k}),filterByBasePath:new ye.BooleanValue({required:!1})},Vn=5,Jf=g("categoryFacet/register",e=>F(e,kn)),Xf=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,k),ai(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:We(t)}}}),Zf=g("categoryFacet/deselectAll",e=>F(e,kn.facetId)),dM=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:kn.facetId,numberOfValues:kn.numberOfValues})),mM=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:kn.facetId,criterion:new ye.Value})),pM=g("categoryFacet/updateBasePath",e=>F(e,{facetId:kn.facetId,basePath:new ye.ArrayValue({each:k})}));var Nn=require("@coveo/bueno");var Dn=require("@coveo/bueno");var ii={facetId:Y,captions:new Dn.RecordValue({options:{required:!1}}),numberOfValues:new Dn.NumberValue({required:!1,min:1}),query:new Dn.StringValue({required:!1,emptyAllowed:!0})};var YP={path:new Nn.ArrayValue({required:!0,each:k}),displayValue:Ce,rawValue:Ce,count:new Nn.NumberValue({required:!0,min:0})},Ft=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new Nn.RecordValue({values:YP})})),Oc=g("categoryFacetSearch/register",e=>F(e,ii));var qc=require("@coveo/bueno");var eg={facetId:Y,value:new qc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new qc.NumberValue({required:!0,min:0})}})},kc=g("facetSearch/register",e=>F(e,ii)),Hr=g("facetSearch/update",e=>F(e,ii)),lt=g("facetSearch/toggleSelectValue",e=>F(e,eg)),Qt=g("facetSearch/toggleExcludeValue",e=>F(e,eg));var tg=require("@coveo/bueno");var Rr=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new tg.BooleanValue({required:!1})})),Xl=g("facetOptions/facet/enable",e=>F(e,Y)),Fr=g("facetOptions/facet/disable",e=>F(e,Y));var JP=g("history/undo"),XP=g("history/redo"),er=g("history/snapshot"),qM=_("history/back",async(e,{dispatch:t})=>{t(JP()),await t(we())}),kM=_("history/forward",async(e,{dispatch:t})=>{t(XP()),await t(we())}),we=_("history/change",async(e,{getState:t})=>t().history.present);var he=require("@coveo/bueno"),Vc={q:new he.StringValue,enableQuerySyntax:new he.BooleanValue,aq:new he.StringValue,cq:new he.StringValue,firstResult:new he.NumberValue({min:0}),numberOfResults:new he.NumberValue({min:0}),sortCriteria:new he.StringValue,f:new he.RecordValue,fExcluded:new he.RecordValue,cf:new he.RecordValue,nf:new he.RecordValue,mnf:new he.RecordValue,df:new he.RecordValue,debug:new he.BooleanValue,sf:new he.RecordValue,tab:new he.StringValue,af:new he.RecordValue};var Ve=g("searchParameters/restore",e=>F(e,Vc)),ZP=g("searchParameters/restoreTab",e=>F(e,k));var so=require("@coveo/bueno");function Pr(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 c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((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 td(){return typeof window<"u"}function fd(){return typeof navigator<"u"}function Mn(){return typeof document<"u"}function rd(){try{return typeof localStorage<"u"}catch{return!1}}function ev(){try{return typeof sessionStorage<"u"}catch{return!1}}function gg(){return fd()&&navigator.cookieEnabled}var tv=[ee.click,ee.custom,ee.search,ee.view],rv=(e,t)=>tv.indexOf(e)!==-1?Object.assign({language:Mn()?document.documentElement.lang:"unknown",userAgent:fd()?navigator.userAgent:"unknown"},t):t,ui=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?rg(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],rg(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 rg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function ov(){return rd()?localStorage:gg()?new li:ev()?sessionStorage:new Ln}var li=class e{getItem(t){return ui.get(`${e.prefix}${t}`)}removeItem(t){ui.erase(`${e.prefix}${t}`)}setItem(t,r,o){ui.set(`${e.prefix}${t}`,r,o)}};li.prefix="coveo_";var od=class{constructor(){this.cookieStorage=new li}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)}},Ln=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ci="__coveo.analytics.history",yg=20,hg=1e3*60,Sg=75,Un=class{constructor(t){this.store=t||ov()}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(ci);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(ci);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ci,JSON.stringify(t.slice(0,yg)))}catch{}}clear(){try{this.store.removeItem(ci)}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,Sg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>hg:!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))}},Cg=Object.freeze({__proto__:null,HistoryStore:Un,MAX_NUMBER_OF_HISTORY_ELEMENTS:yg,MAX_VALUE_SIZE:Sg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:hg,STORE_KEY:ci,default:Un}),nv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield av(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),av=e=>w(void 0,void 0,void 0,function*(){let t=new Un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Dc,iv=new Uint8Array(16);function cv(){if(!Dc&&(Dc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dc(iv)}var sv=/^(?:[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 Mc(e){return typeof e=="string"&&sv.test(e)}var De=[];for(let e=0;e<256;++e)De.push((e+256).toString(16).slice(1));function xg(e,t=0){return(De[e[t+0]]+De[e[t+1]]+De[e[t+2]]+De[e[t+3]]+"-"+De[e[t+4]]+De[e[t+5]]+"-"+De[e[t+6]]+De[e[t+7]]+"-"+De[e[t+8]]+De[e[t+9]]+"-"+De[e[t+10]]+De[e[t+11]]+De[e[t+12]]+De[e[t+13]]+De[e[t+14]]+De[e[t+15]]).toLowerCase()}function uv(e){if(!Mc(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 lv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var dv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",mv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function pv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=lv(n)),typeof a=="string"&&(a=uv(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 s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return xg(s)}try{o.name=e}catch{}return o.DNS=dv,o.URL=mv,o}var fv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),og={randomUUID:fv};function Bo(e,t,r){if(og.randomUUID&&!t&&!e)return og.randomUUID();e=e||{};let o=e.random||(e.rng||cv)();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 xg(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 Zl(e,t){return e<<t|e>>>32-t}function yv(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 c=0;c<i.length;++c)e.push(i.charCodeAt(c))}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 c=new Uint32Array(16);for(let u=0;u<16;++u)c[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]=c}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 c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=Zl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),S=Zl(u,5)+gv(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Zl(s,30)>>>0,s=u,u=S}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>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 hv=pv("v5",80,yv),ng=hv,Rg="2.30.45",ag=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,si={pageview:"pageview",event:"event"},Qc=class{constructor({client:t,uuidGenerator:r=Bo}){this.client=t,this.uuidGenerator=r}},nd=class extends Qc{constructor({client:t,uuidGenerator:r=Bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ag(window.location),this.lastReferrer=Mn()?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:Mn()?document.title:"",encoding:Mn()?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===si.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===si.pageview?this.nextPageViewId:this.pageViewId,referrer:t===si.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===si.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 ag(window.location)}},Yr=class e{constructor(t,r){if(!Mc(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 Mc(a)?new e(a,Number.parseInt(n)*1e3):null}};Yr.cvo_cid="cvo_cid";Yr.expirationTime=120;var ad=class extends Qc{constructor({client:t,uuidGenerator:r=Bo}){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(Yr.cvo_cid,new Yr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ad.Id="link";var vt=Object.keys;function Nc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ed=128,Fg=192,ig=224,cg=240;function Sv(e){return(e&248)===cg?4:(e&cg)===ig?3:(e&ig)===Fg?2:1}function Cv(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&ed)!=ed)break;if(r-=3,(o&Fg)!=ed){t-r>=Sv(o)*3&&(r=t);break}}return e.substring(0,r)}var id={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"},xv=vt(id).map(e=>id[e]),Rv=[...xv].join("|"),Fv=new RegExp(`^(${Rv}$)`),Pv={svcAction:"svc_action",svcActionData:"svc_action_data"},vv=e=>vt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=id[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Av=e=>Fv.test(e),bv=[Av],sg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ug={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ue={action:"pa",list:"pal",listSource:"pls"},Lc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},wv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],cd={id:"quoteId",affiliation:"quoteAffiliation"},sd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Iv={add:Ue,bookmark_add:Ue,bookmark_remove:Ue,click:Ue,checkout:Ue,checkout_option:Ue,detail:Ue,impression:Ue,remove:Ue,refund:Object.assign(Object.assign({},Ue),Lc),purchase:Object.assign(Object.assign({},Ue),Lc),quickview:Ue,quote:Object.assign(Object.assign({},Ue),cd),review:Object.assign(Object.assign({},Ue),sd)},Ev=vt(sg).map(e=>sg[e]),Tv=vt(ug).map(e=>ug[e]),Ov=vt(Ue).map(e=>Ue[e]),qv=vt(Lc).map(e=>Lc[e]),kv=vt(sd).map(e=>sd[e]),Vv=vt(cd).map(e=>cd[e]),Dv=[...Ev,"custom"].join("|"),Nv=[...Tv,"custom"].join("|"),Pg="(pr[0-9]+)",vg="(il[0-9]+pi[0-9]+)",Mv=new RegExp(`^${Pg}(${Dv})$`),Qv=new RegExp(`^(${vg}(${Nv}))|(il[0-9]+nm)$`),Lv=new RegExp(`^(${Ov.join("|")})$`),Uv=new RegExp(`^(${qv.join("|")})$`),Bv=new RegExp(`^${Pg}custom$`),jv=new RegExp(`^${vg}custom$`),_v=new RegExp(`^(${[...wv,...kv,...Vv].join("|")})$`),$v=e=>Mv.test(e),zv=e=>Qv.test(e),Wv=e=>Lv.test(e),Kv=e=>Uv.test(e),Gv=e=>_v.test(e),Hv=[zv,$v,Wv,Kv,Gv],Yv=[Bv,jv],Jv={anonymizeIp:"aip"},Xv={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Zv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},eA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],tA=Object.assign(Object.assign(Object.assign(Object.assign({},Jv),Xv),Zv),eA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ud=Object.assign(Object.assign({},tA),Pv),rA=e=>{let t=!!e.action&&Iv[e.action]||{};return vt(e).reduce((r,o)=>{let n=t[o]||ud[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},oA=vt(ud).map(e=>ud[e]),nA=e=>oA.indexOf(e)!==-1,aA=e=>e==="custom",iA=e=>[...Hv,...bv,nA,aA].some(t=>t(e)),cA=e=>vt(e).reduce((t,r)=>{let o=sA(r);return o?Object.assign(Object.assign({},t),uA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),sA=e=>{let t;return[...Yv].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},uA=(e,t)=>vt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),ld=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:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}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:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}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}},dd=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()})}},lg=globalThis.fetch,Uc=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():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Pr(u,["url"]),d;try{d=yield lg(s,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 lg(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"})}},md=class{constructor(t,r){rd()&&gg()?this.storage=new od:rd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Ln),this.client=new Uc(t),this.beaconClient=new ld(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}},pd=class{constructor(t,r){this.storage=r||new Ln,this.client=new Uc(t)}getClientDependingOnEventType(t){return this.client}},Bc=class{constructor(){this.storage=new Ln,this.client=new dd}getClientDependingOnEventType(t){return this.client}},lA="xx",dA=e=>e?.startsWith(lA)||!1,mA=`
|
|
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
|