@coveo/headless 3.22.5 → 3.23.0
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 +2 -2
|
@@ -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("CoveoHeadlessCommerceSSR",["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["CoveoHeadlessCommerceSSR"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
|
|
18
18
|
"use strict";var sP=Object.create;var Xa=Object.defineProperty;var cP=Object.getOwnPropertyDescriptor;var uP=Object.getOwnPropertyNames;var lP=Object.getPrototypeOf,dP=Object.prototype.hasOwnProperty;var mP=(e,t,r)=>t in e?Xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pP=(e,t)=>{for(var r in t)Xa(e,r,{get:t[r],enumerable:!0})},Yp=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of uP(t))!dP.call(e,n)&&n!==r&&Xa(e,n,{get:()=>t[n],enumerable:!(o=cP(t,n))||o.enumerable});return e};var Ht=(e,t,r)=>(r=e!=null?sP(lP(e)):{},Yp(t||!e||!e.__esModule?Xa(r,"default",{value:e,enumerable:!0}):r,e)),fP=e=>Yp(Xa({},"__esModule",{value:!0}),e);var ot=(e,t,r)=>mP(e,typeof t!="symbol"?t+"":t,r);var of=qe(Za=>{"use strict";var gs=Za&&Za.__assign||function(){return gs=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},gs.apply(this,arguments)};Object.defineProperty(Za,"__esModule",{value:!0});var yP={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function SP(e){var t=gs(gs({},yP),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Za.getSanitizedOptions=SP});var nf=qe(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});function hP(e){var t=Math.random()*e;return Math.round(t)}Bl.fullJitter=hP});var af=qe(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});function CP(e){return e}Ul.noJitter=CP});var sf=qe(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var xP=nf(),RP=af();function FP(e){switch(e.jitter){case"full":return xP.fullJitter;case"none":default:return RP.noJitter}}jl.JitterFactory=FP});var $l=qe(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var PP=sf(),AP=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=PP.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}();_l.Delay=AP});var cf=qe(Ar=>{"use strict";var vP=Ar&&Ar.__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)}}(),bP=Ar&&Ar.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},wP=Ar&&Ar.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Ar,"__esModule",{value:!0});var EP=$l(),IP=function(e){vP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return bP(this,void 0,void 0,function(){return wP(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}(EP.Delay);Ar.SkipFirstDelay=IP});var uf=qe(ei=>{"use strict";var TP=ei&&ei.__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(ei,"__esModule",{value:!0});var OP=$l(),qP=function(e){TP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OP.Delay);ei.AlwaysDelay=qP});var lf=qe(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var DP=cf(),kP=uf();function VP(e,t){var r=NP(e);return r.setAttemptNumber(t),r}zl.DelayFactory=VP;function NP(e){return e.delayFirstAttempt?new kP.AlwaysDelay(e):new DP.SkipFirstDelay(e)}});var df=qe(No=>{"use strict";var Wl=No&&No.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},Kl=No&&No.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(No,"__esModule",{value:!0});var MP=of(),QP=lf();function LP(e,t){return t===void 0&&(t={}),Wl(this,void 0,void 0,function(){var r,o;return Kl(this,function(n){switch(n.label){case 0:return r=MP.getSanitizedOptions(t),o=new BP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}No.backOff=LP;var BP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Wl(this,void 0,void 0,function(){var t,r;return Kl(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 Wl(this,void 0,void 0,function(){var t;return Kl(this,function(r){switch(r.label){case 0:return t=QP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Ic=qe((rm,om)=>{"use strict";(function(e,t){typeof rm=="object"&&typeof om<"u"?om.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(rm,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",s="day",u="week",c="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var q=["th","st","nd","rd"],O=V%100;return"["+V+(q[(O-20)%10]||q[O]||q[0])+"]"}},S=function(V,q,O){var N=String(V);return!N||N.length>=q?V:""+Array(q+1-N.length).join(O)+V},A={s:S,z:function(V){var q=-V.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),k=O%60;return(q<=0?"+":"-")+S(N,2,"0")+":"+S(k,2,"0")},m:function V(q,O){if(q.date()<O.date())return-V(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),k=q.clone().add(N,c),L=O-k<0,B=q.clone().add(N+(L?-1:1),c);return+(-(N+(O-k)/(L?k-B:B-k))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:c,y:d,w:u,d:s,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",x={};x[y]=C;var I="$isDayjsObject",v=function(V){return V instanceof T||!(!V||!V[I])},R=function V(q,O,N){var k;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(k=L),O&&(x[L]=O,k=L);var B=q.split("-");if(!k&&B.length>1)return V(B[0])}else{var z=q.name;x[z]=q,k=z}return!N&&k&&(y=k),k||!N&&y},P=function(V,q){if(v(V))return V.clone();var O=typeof q=="object"?q:{};return O.date=V,O.args=arguments,new T(O)},b=A;b.l=R,b.i=v,b.w=function(V,q){return P(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function V(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[I]=!0}var q=V.prototype;return q.parse=function(O){this.$d=function(N){var k=N.date,L=N.utc;if(k===null)return new Date(NaN);if(b.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var B=k.match(f);if(B){var z=B[2]-1||0,Y=(B[7]||"0").substring(0,3);return L?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)}}return new Date(k)}(O),this.init()},q.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var k=P(O);return this.startOf(N)<=k&&k<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,k){return b.u(O)?this[N]:this.set(k,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var k=this,L=!!b.u(N)||N,B=b.p(O),z=function(re,de){var ge=b.w(k.$u?Date.UTC(k.$y,de,re):new Date(k.$y,de,re),k);return L?ge:ge.endOf(s)},Y=function(re,de){return b.w(k.toDate()[re].apply(k.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(de)),k)},te=this.$W,G=this.$M,J=this.$D,K="set"+(this.$u?"UTC":"");switch(B){case d:return L?z(1,0):z(31,11);case c:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,pe=(te<Z?te+7:te)-Z;return z(L?J-pe:J+(6-pe),G);case s:case p:return Y(K+"Hours",0);case i:return Y(K+"Minutes",1);case a:return Y(K+"Seconds",2);case n:return Y(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var k,L=b.p(O),B="set"+(this.$u?"UTC":""),z=(k={},k[s]=B+"Date",k[p]=B+"Date",k[c]=B+"Month",k[d]=B+"FullYear",k[i]=B+"Hours",k[a]=B+"Minutes",k[n]=B+"Seconds",k[o]=B+"Milliseconds",k)[L],Y=L===s?this.$D+(N-this.$W):N;if(L===c||L===d){var te=this.clone().set(p,1);te.$d[z](Y),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](Y);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var k,L=this;O=Number(O);var B=b.p(N),z=function(G){var J=P(L);return b.w(J.date(J.date()+Math.round(G*O)),L)};if(B===c)return this.set(c,this.$M+O);if(B===d)return this.set(d,this.$y+O);if(B===s)return z(1);if(B===u)return z(7);var Y=(k={},k[a]=t,k[i]=r,k[n]=e,k)[B]||1,te=this.$d.getTime()+O*Y;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,k=this.$locale();if(!this.isValid())return k.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",B=b.z(this),z=this.$H,Y=this.$m,te=this.$M,G=k.weekdays,J=k.months,K=k.meridiem,Z=function(de,ge,rt,At){return de&&(de[ge]||de(N,L))||rt[ge].slice(0,At)},pe=function(de){return b.s(z%12||12,de,"0")},re=K||function(de,ge,rt){var At=de<12?"AM":"PM";return rt?At.toLowerCase():At};return L.replace(h,function(de,ge){return ge||function(rt){switch(rt){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return Z(k.monthsShort,te,J,3);case"MMMM":return Z(J,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(k.weekdaysMin,N.$W,G,2);case"ddd":return Z(k.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return re(z,Y,!0);case"A":return re(z,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return B}return null}(de)||B.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,k){var L,B=this,z=b.p(N),Y=P(O),te=(Y.utcOffset()-this.utcOffset())*t,G=this-Y,J=function(){return b.m(B,Y)};switch(z){case d:L=J()/12;break;case c:L=J();break;case l:L=J()/3;break;case u:L=(G-te)/6048e5;break;case s:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return k?L:b.a(L)},q.daysInMonth=function(){return this.endOf(c).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var k=this.clone(),L=R(O,N,!0);return L&&(k.$L=L),k},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},V}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",s],["$M",c],["$y",d],["$D",p]].forEach(function(V){M[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),P.extend=function(V,q){return V.$i||(V(q,T,P),V.$i=!0),P},P.locale=R,P.isDayjs=v,P.unix=function(V){return P(1e3*V)},P.en=x[y],P.Ls=x,P.p={},P})});var Qy=qe((nm,am)=>{"use strict";(function(e,t){typeof nm=="object"&&typeof am<"u"?am.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(nm,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=n.add;n.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):a.bind(this)(s,u)};var i=n.startOf;n.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===t){var d=this.quarter()-1;return l?this.month(3*d).startOf(e).startOf("day"):this.month(3*d+2).endOf(e).endOf("day")}return i.bind(this)(s,u)}}})});var Ly=qe((im,sm)=>{"use strict";(function(e,t){typeof im=="object"&&typeof sm<"u"?sm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(im,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},s=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(h){this[f]=+h}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var C=h.match(/([+-]|\d\d)/g),S=60*C[1]+(+C[2]||0);return S===0?0:C[0]==="+"?-S:S}(f)}],l=function(f){var h=i[f];return h&&(h.indexOf?h:h.s.concat(h.f))},d=function(f,h){var C,S=i.meridiem;if(S){for(var A=1;A<=24;A+=1)if(f.indexOf(S(A,0,h))>-1){C=A>12;break}}else C=f===(h?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var h=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],h)for(var S=1;S<=31;S+=1)h(S).replace(/\[|\]/g,"")===f&&(this.day=S)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var h=l("months"),C=(l("monthsShort")||h.map(function(S){return S.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var h=l("months").indexOf(f)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=s(f)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function m(f){var h,C;h=f,C=i&&i.formats;for(var S=(f=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,q,O){return q||O.slice(1)})})).match(t),A=S.length,y=0;y<A;y+=1){var x=S[y],I=p[x],v=I&&I[0],R=I&&I[1];S[y]=R?{regex:v,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<A;T+=1){var V=S[T];if(typeof V=="string")M+=V.length;else{var q=V.regex,O=V.parser,N=P.slice(M),k=q.exec(N)[0];O.call(b,k),P=P.replace(k,"")}}return function(L){var B=L.afternoon;if(B!==void 0){var z=L.hours;B?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,h,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var S=h.prototype,A=S.parse;S.parse=function(y){var x=y.date,I=y.utc,v=y.args;this.$u=I;var R=v[1];if(typeof R=="string"){var P=v[2]===!0,b=v[3]===!0,T=P||b,M=v[2];b&&(M=v[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,k,L,B){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*N);var z=m(k)(N),Y=z.year,te=z.month,G=z.day,J=z.hours,K=z.minutes,Z=z.seconds,pe=z.milliseconds,re=z.zone,de=z.week,ge=new Date,rt=G||(Y||te?1:ge.getDate()),At=Y||ge.getFullYear(),$r=0;Y&&!te||($r=te>0?te-1:ge.getMonth());var yn,Sn=J||0,Ja=K||0,Ql=Z||0,Ll=pe||0;return re?new Date(Date.UTC(At,$r,rt,Sn,Ja,Ql,Ll+60*re.offset*1e3)):L?new Date(Date.UTC(At,$r,rt,Sn,Ja,Ql,Ll)):(yn=new Date(At,$r,rt,Sn,Ja,Ql,Ll),de&&(yn=B(yn).week(de).toDate()),yn)}catch{return new Date("")}}(x,R,I,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var V=R.length,q=1;q<=V;q+=1){v[1]=R[q-1];var O=C.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===V&&(this.$d=new Date(""))}else A.call(this,y)}}})});var NC=qe((vY,VC)=>{"use strict";var $I=/(^|; )Coveo-Pendragon=([^;]*)/;VC.exports=()=>$I.exec(document.cookie)?.pop()||null});var QC=qe((ep,tp)=>{"use strict";(function(e,t){typeof ep=="object"&&typeof tp<"u"?tp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(ep,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(h,C){C===void 0&&(C={});var S=C.timeZoneName||"short",A=h+"|"+S,y=t[A];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),t[A]=y),y}(d,p);return f.formatToParts(m)},s=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var h=p[f],C=h.type,S=h.value,A=e[C];A>=0&&(m[A]=parseInt(S,10))}var y=m[3],x=y===24?0:y,I=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",v=+l;return(n.utc(I).valueOf()-(v-=v%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),h=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(h))/1e3/60),S=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(S))p=this.utcOffset(0,d);else if(p=n(h,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),d){var A=p.utcOffset();p=p.add(m-A,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var c=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return c.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,h=s(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,I,v){var R=x-60*I*1e3,P=s(R,v);if(I===P)return[R,I];var b=s(R-=60*(P-I)*1e3,v);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),h,f),S=C[0],A=C[1],y=n(S).utcOffset(A);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var LC=qe((rp,op)=>{"use strict";(function(e,t){typeof rp=="object"&&typeof op<"u"?op.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(rp,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),s.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var c=i.utcOffset;i.utcOffset=function(m,f){var h=this.$utils().u;if(h(m))return this.$u?0:h(this.$offset)?c.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var I=(""+x[0]).match(r)||["-",0,0],v=I[0],R=60*+I[1]+ +I[2];return R===0?0:v==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,S=this;if(f)return S.$offset=C,S.$u=m===0,S;if(m!==0){var A=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(S=this.local().add(C+A,e)).$offset=C,S.$x.$localOffset=A}else S=this.utc();return S};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,h){if(m&&this.$u===m.$u)return p.call(this,m,f,h);var C=this.local(),S=a(m).local();return p.call(C,S,f,h)}}})});var XC=qe((D3,JC)=>{"use strict";function ZI(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}JC.exports=eT;function eT(e,t,r){var o=r&&r.stringify||ZI,n=1;if(typeof e=="object"&&e!==null){var a=t.length+n;if(a===1)return e;var i=new Array(a);i[0]=o(e);for(var s=1;s<a;s++)i[s]=o(t[s]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-n,d=-1,p=e&&e.length||0,m=0;m<p;){if(e.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=Math.floor(Number(t[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<m&&(c+=e.slice(d,m));var f=typeof t[l];if(f==="string"){c+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){c+=t[l].name||"<anonymous>",d=m+2,m++;break}c+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(c+=e.slice(d,m)),c+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(c+=e.slice(d,m)),c+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(c+=e.slice(d)),c)}});var nx=qe((k3,Lu)=>{"use strict";var ZC=XC();Lu.exports=Br;var Yi=gT().console||{},tT={mapHttpRequest:Qu,mapHttpResponse:Qu,wrapRequestSerializer:ip,wrapResponseSerializer:ip,wrapErrorSerializer:ip,req:Qu,res:Qu,err:tx,errWithCause:tx};function qo(e,t){return e==="silent"?1/0:t.levels.values[e]}var up=Symbol("pino.logFuncs"),sp=Symbol("pino.hierarchy"),rT={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ex(e,t){let r={logger:t,parent:e[sp]};t[sp]=r}function oT(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:Yi[n]||Yi[rT[n]||"log"]||ka}),e[up]=o}function nT(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Br(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||Yi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=nT(e.browser.serialize,o),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),s=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&s.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=ka),oT(c,s,r),ex({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:mT(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ka};c.levels=aT(e),c.level=u,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=ka,c.serializers=o,c._serialize=n,c._stdErrSerialize=a,c.child=function(...h){return f.call(this,l,...h)},t&&(c._logEvent=cp());function d(){return qo(this.level,this)}function p(){return this._level}function m(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,un(this,l,c,"error"),un(this,l,c,"fatal"),un(this,l,c,"warn"),un(this,l,c,"info"),un(this,l,c,"debug"),un(this,l,c,"trace"),i.forEach(C=>{un(this,l,c,C)})}function f(h,C,S){if(!C)throw new Error("missing bindings for child Pino");S=S||{},n&&C.serializers&&(S.serializers=C.serializers);let A=S.serializers;if(n&&A){var y=Object.assign({},o,A),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,lp([C],x,y,this._stdErrSerialize)}function I(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=cp([].concat(R._logEvent.bindings,C)))}I.prototype=this;let v=new I(this);return ex(this,v),v.child=function(...R){return f.call(this,h,...R)},v.level=S.level||this.level,h.onChild(v),v}return c}function aT(e){let t=e.customLevels||{},r=Object.assign({},Br.levels.values,t),o=Object.assign({},Br.levels.labels,iT(t));return{values:r,labels:o}}function iT(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Br.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"}};Br.stdSerializers=tT;Br.stdTimeFunctions=Object.assign({},{nullTime:rx,epochTime:ox,unixTime:pT,isoTime:fT});function sT(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[sp];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function un(e,t,r,o){if(Object.defineProperty(e,o,{value:qo(e.level,r)>qo(o,r)?ka:r[up][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ka){if(!t.transmit)return;let a=t.transmit.level||e.level,i=qo(a,r);if(qo(o,r)<i)return}e[o]=uT(e,t,r,o);let n=sT(e);n.length!==0&&(e[o]=cT(n,e[o]))}function cT(e,t){return function(){return t.apply(this,[...e,...arguments])}}function uT(e,t,r,o){return function(n){return function(){let i=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Yi?Yi:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(lp(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,lT(this,o,s,i,t)):n.apply(u,s),t.transmit){let d=t.transmit.level||e._level,p=qo(d,r),m=qo(o,r);if(m<p)return;dT(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:qo(e._level,r)},s,l)}}}(e[up][o])}function lT(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},s=r.slice(),u=s[0],c={};if(o&&(c.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(c,p)}else c.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(c,s.shift());u=s.length?ZC(s.shift(),s):void 0}else typeof u=="string"&&(u=ZC(s.shift(),s));return u!==void 0&&(c[n.messageKey]=u),i(c)}function lp(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=Br.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 dT(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;o||lp(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,u),e._logEvent=cp(c)}function cp(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function tx(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 mT(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?rx:ox}function Qu(){return{}}function ip(e){return e}function ka(){}function rx(){return!1}function ox(){return Date.now()}function pT(){return Math.round(Date.now()/1e3)}function fT(){return new Date(Date.now()).toISOString()}function gT(){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)||{}}}Lu.exports.default=Br;Lu.exports.pino=Br});var uk={};pP(uk,{Kind:()=>mn,ProductTemplatesHelpers:()=>GF,SolutionType:()=>De,SortBy:()=>bt,SortOrder:()=>bi,VERSION:()=>zr,buildCriterionExpression:()=>wi,buildDateSortCriterion:()=>Rc,buildFieldSortCriterion:()=>Fc,buildNoSortCriterion:()=>Ac,buildParameterSerializer:()=>HF,buildQueryExpression:()=>sk,buildQueryRankingExpressionSortCriterion:()=>Pc,buildRelevanceSortCriterion:()=>na,buildResultTemplatesManager:()=>zF,defineBreadcrumbManager:()=>XR,defineCart:()=>QR,defineCommerceEngine:()=>FR,defineContext:()=>BR,defineDidYouMean:()=>PR,defineFacetGenerator:()=>AR,defineFilterSuggestionsGenerator:()=>aF,defineInstantProducts:()=>EF,defineNotifyTrigger:()=>sF,definePagination:()=>vR,defineParameterManager:()=>OR,defineProductList:()=>DR,defineProductView:()=>VR,defineQueryTrigger:()=>uF,defineRecentQueriesList:()=>tF,defineRecommendations:()=>MR,defineRedirectionTrigger:()=>dF,defineSearchBox:()=>YR,defineSort:()=>JR,defineStandaloneSearchBox:()=>hF,defineSummary:()=>ZR,deserializeRelativeDate:()=>Hy,getAnalyticsNextApiBaseUrl:()=>hs,getCommerceApiBaseUrl:()=>xs,getOrganizationEndpoint:()=>ke,getSampleCommerceEngineConfiguration:()=>ux,loadCartActions:()=>dD,loadCategoryFacetSetActions:()=>fD,loadConfigurationActions:()=>xD,loadContextActions:()=>aD,loadCoreFacetActions:()=>pD,loadDateFacetActions:()=>yD,loadInstantProductsActions:()=>vD,loadNumericFacetActions:()=>SD,loadPaginationActions:()=>uD,loadProductActions:()=>lD,loadProductListingActions:()=>sD,loadProductListingParametersActions:()=>PD,loadQueryActions:()=>RD,loadQuerySetActions:()=>hD,loadQuerySuggestActions:()=>CD,loadRecentQueriesActions:()=>bD,loadRecommendationsActions:()=>cD,loadRegularFacetActions:()=>gD,loadSearchActions:()=>iD,loadSearchParametersActions:()=>FD,loadSortActions:()=>mD,loadStandaloneSearchBoxSetActions:()=>ID,loadTriggersActions:()=>AD,parseCriterionExpression:()=>WF,validateRelativeDate:()=>lo});module.exports=fP(uk);var Jp="coveo-headless-internal-state",U=Symbol.for(Jp),Xp=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==U)},get(t,r,o){return typeof r=="symbol"&&r.description===Jp&&r!==U&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
|
|
19
|
-
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Vo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Zp(e){return Array.isArray(e)}function ds(e){return e.trim()===""}function ef(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ms(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function ps(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function Pr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function tf(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function fs(e){let{promise:t,resolve:r}=tf();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function gP(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function rf(e,t){let{promise:r,resolve:o}=tf(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&gP(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var gf=Ht(df(),1);var De=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(De||{}),UP="recommendation-internal-options",hn=Symbol.for(UP);var $=new Error("Failed to load reducers."),Cn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},ys=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(De).map(t=>t.toLowerCase()).join(", ")}`}},xn=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Ss=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},Mo=class extends Error{constructor(r,o){super();ot(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function mf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function pf(e){return typeof e!="object"||!e?!1:Object.values(e).every(jP)}function jP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ff(e){return e===429}var Rn=class e{static async call(t){let r=_P(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(ff(u.status))throw u;return u};try{let u=await(0,gf.backOff)(s,{retry:c=>{let l=c&&ff(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Cn;case 404:throw new Mo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=Pr(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function nt(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function hs(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function _P(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=$P(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function $P(e,t){return t==="application/x-www-form-urlencoded"?pf(e)?mf(e):"":JSON.stringify(e)}function zP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function WP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gl(e,t){if(t&&e.name==="AbortError")return{error:WP(e)};if(e instanceof Mo)return{error:zP(e)};throw e}var Fn=(e,t)=>({...ti(e,t),requestParams:KP(e)}),KP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},ti=(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 yf=(e,t)=>({...ti(e,t),requestParams:GP(e)}),GP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var Sf=e=>({...ti(e,"search/querySuggest"),requestParams:HP(e)}),HP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var Be=e=>e.error!==void 0,Cs=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Fn(t,"listing"),...this.options})}async search(t){let r=Fn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...yf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Fn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Sf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Fn(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=Fn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Rn.call(t);if(r instanceof Error)return Gl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function xs(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Rs=e=>e;var fd=require("@coveo/bueno");function Ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var YP=typeof Symbol=="function"&&Symbol.observable||"@@observable",hf=YP,Hl=()=>Math.random().toString(36).substring(7).split("").join("."),JP={INIT:`@@redux/INIT${Hl()}`,REPLACE:`@@redux/REPLACE${Hl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hl()}`},Fs=JP;function Yt(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 Yl(e,t,r){if(typeof e!="function")throw new Error(Ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Yl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(Ve(3));return n}function d(C){if(typeof C!="function")throw new Error(Ve(4));if(u)throw new Error(Ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(Ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Yt(C))throw new Error(Ve(7));if(typeof C.type>"u")throw new Error(Ve(8));if(typeof C.type!="string")throw new Error(Ve(17));if(u)throw new Error(Ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Ve(10));o=C,p({type:Fs.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(Ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[hf](){return this}}}return p({type:Fs.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[hf]:f}}function XP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Fs.INIT})>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:Fs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function Pn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{XP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(Ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function An(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Cf(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=An(...s)(n.dispatch),{...n,dispatch:a}}}function Ps(e){return Yt(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ri=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Ne(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[at]}function it(e){return e?Af(e)||Array.isArray(e)||!!e[ri]||!!e.constructor?.[ri]||si(e)||ci(e):!1}var ZP=Object.prototype.constructor.toString();function Af(e){if(!e||typeof e!="object")return!1;let t=Lo(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)===ZP}function sd(e){return gt(e)||Ne(15,e),e[at].base_}function oi(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[at];return t?t.type_:Array.isArray(e)?1:si(e)?2:ci(e)?3:0}function ni(e,t){return Bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jl(e,t){return Bo(e)===2?e.get(t):e[t]}function vf(e,t,r){let o=Bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function eA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function si(e){return e instanceof Map}function ci(e){return e instanceof Set}function Qo(e){return e.copy_||e.base_}function ed(e,t){if(si(e))return new Map(e);if(ci(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Af(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[at];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Lo(e),o)}else{let o=Lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function bs(e,t=!1){return ws(e)||gt(e)||!it(e)||(Bo(e)>1&&(e.set=e.add=e.clear=e.delete=tA),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>bs(o,!0))),e}function tA(){Ne(2)}function ws(e){return Object.isFrozen(e)}var td={};function Uo(e){let t=td[e];return t||Ne(0,e),t}function rA(e,t){td[e]||(td[e]=t)}var ai;function bf(){return ai}function oA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function xf(e,t){t&&(Uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rd(e){od(e),e.drafts_.forEach(nA),e.drafts_=null}function od(e){e===ai&&(ai=e.parent_)}function Rf(e){return ai=oA(ai,e)}function nA(e){let t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ff(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[at].modified_&&(rd(t),Ne(4)),it(e)&&(e=As(t,e),t.parent_||vs(t,e)),t.patches_&&Uo("Patches").generateReplacementPatches_(r[at].base_,e,t.patches_,t.inversePatches_)):e=As(t,r,[]),rd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function As(e,t,r){if(ws(t))return t;let o=t[at];if(!o)return oi(t,(n,a)=>Pf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return vs(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),oi(a,(s,u)=>Pf(e,o,n,s,u,r,i)),vs(e,n,!1),r&&e.patches_&&Uo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Pf(e,t,r,o,n,a,i){if(gt(n)){let s=a&&t&&t.type_!==3&&!ni(t.assigned_,o)?a.concat(o):void 0,u=As(e,n,s);if(vf(r,o,u),gt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(it(n)&&!ws(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;As(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&vs(e,n)}}function vs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bs(t,r)}function aA(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:bf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=cd;r&&(n=[o],a=ii);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var cd={get(e,t){if(t===at)return e;let r=Qo(e);if(!ni(r,t))return iA(e,r,t);let o=r[t];return e.finalized_||!it(o)?o:o===Xl(e.base_,t)?(Zl(e),e.copy_[t]=ad(o,e)):o},has(e,t){return t in Qo(e)},ownKeys(e){return Reflect.ownKeys(Qo(e))},set(e,t,r){let o=wf(Qo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Xl(Qo(e),t),a=n?.[at];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eA(r,n)&&(r!==void 0||ni(e.base_,t)))return!0;Zl(e),nd(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 Xl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zl(e),nd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ne(11)},getPrototypeOf(e){return Lo(e.base_)},setPrototypeOf(){Ne(12)}},ii={};oi(cd,(e,t)=>{ii[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ii.deleteProperty=function(e,t){return ii.set.call(this,e,t,void 0)};ii.set=function(e,t,r){return cd.set.call(this,e[0],t,r,e[0])};function Xl(e,t){let r=e[at];return(r?Qo(r):e)[t]}function iA(e,t,r){let o=wf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function wf(e,t){if(!(t in e))return;let r=Lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Lo(r)}}function nd(e){e.modified_||(e.modified_=!0,e.parent_&&nd(e.parent_))}function Zl(e){e.copy_||(e.copy_=ed(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Ne(6),o!==void 0&&typeof o!="function"&&Ne(7);let n;if(it(t)){let a=Rf(this),i=ad(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?rd(a):od(a)}return xf(a,o),Ff(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===id&&(n=void 0),this.autoFreeze_&&bs(n,!0),o){let a=[],i=[];Uo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ne(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){it(e)||Ne(8),gt(e)&&(e=Ef(e));let t=Rf(this),r=ad(e,void 0);return r[at].isManual_=!0,od(t),r}finishDraft(e,t){let r=e&&e[at];(!r||!r.isManual_)&&Ne(9);let{scope_:o}=r;return xf(o,t),Ff(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=Uo("Patches").applyPatches_;return gt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ad(e,t){let r=si(e)?Uo("MapSet").proxyMap_(e,t):ci(e)?Uo("MapSet").proxySet_(e,t):aA(e,t);return(t?t.scope_:bf()).drafts_.push(r),r}function Ef(e){return gt(e)||Ne(10,e),If(e)}function If(e){if(!it(e)||ws(e))return e;let t=e[at],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ed(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ed(e,!0);return oi(r,(o,n)=>{vf(r,o,If(n))}),t&&(t.finalized_=!1),r}function Tf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;oi(p.assigned_,(A,y)=>{let x=Jl(C,A),I=Jl(S,A),v=y?ni(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===id?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=Bo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ne(19),typeof S=="function"&&R==="prototype"&&Ne(19),S=Jl(S,R),typeof S!="object"&&Ne(18,h.join("/"))}let A=Bo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:Ne(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:Ne(17,C)}}),p}function l(p){if(!it(p))return p;if(Array.isArray(p))return p.map(l);if(si(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(ci(p))return new Set(Array.from(p).map(l));let m=Object.create(Lo(p));for(let f in p)m[f]=l(p[f]);return ni(p,ri)&&(m[ri]=p[ri]),m}function d(p){return gt(p)?l(p):p}rA("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var yt=new sA,vr=yt.produce,Es=yt.produceWithPatches.bind(yt),Xk=yt.setAutoFreeze.bind(yt),Zk=yt.setUseStrictShallowCopy.bind(yt),ud=yt.applyPatches.bind(yt),eV=yt.createDraft.bind(yt),tV=yt.finishDraft.bind(yt);function cA(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uA(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lA(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 Of=e=>Array.isArray(e)?e:[e];function dA(e){let t=Array.isArray(e[0])?e[0]:e;return lA(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mA(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var nV=Symbol();var aV=Object.getPrototypeOf({});var pA=class{constructor(e){this.value=e}deref(){return this.value}},fA=typeof WeakRef<"u"?WeakRef:pA,gA=0,qf=1;function Is(){return{s:gA,v:void 0,o:null,p:null}}function vn(e,t={}){let r=Is(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}}let c=s,l;if(s.s===qf)l=s.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new fA(l):l}return c.s=qf,c.v=l,l}return i.clearCache=()=>{r=Is(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Df(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),cA(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=vn,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=Of(p),S=Of(f),A=dA(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=mA(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Df(vn),yA=Object.assign((e,t=Q)=>{uA(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>yA});function kf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Vf=kf(),Nf=kf;var SA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?An:An.apply(null,arguments)},gV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Bt(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=>Ps(o)&&o.type===e,r}var Uf=class ui extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ui.prototype)}static get[Symbol.species](){return ui}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ui(...t[0].concat(this)):new ui(...t.concat(this))}};function Mf(e){return it(e)?vr(e,()=>{}):e}function Qf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function CA(e){return typeof e=="boolean"}var xA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Uf;return r&&(CA(r)?i.push(Vf):i.push(Nf(r.extraArgument))),i},li="RTK_autoBatch",wn=()=>e=>({payload:e,meta:{[li]:!0}}),Lf=e=>t=>{setTimeout(t,e)},RA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Lf(10):e.type==="callback"?e.queueNotification:Lf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[li],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},FA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Uf(e);return o&&n.push(RA(typeof o=="object"?o:void 0)),n};function jf(e){let t=xA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Yt(r))s=Pn(r);else throw new Error(Bt(1));let u;typeof o=="function"?u=o(t):u=t();let c=An;n&&(c=SA({trace:!1,...typeof n=="object"&&n}));let l=Cf(...u),d=FA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Yl(s,a,m)}function _f(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Bt(28));if(s in t)throw new Error(Bt(29));return t[s]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function PA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=_f(t),a;if(PA(e))a=()=>Mf(e());else{let s=Mf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(gt(l)){let m=d(l,u);return m===void 0?l:m}else{if(it(l))return vr(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return i.getInitialState=a,i}var $f=(e,t)=>hA(e)?e.match(t):e(t);function Jt(...e){return t=>e.some(r=>$f(r,t))}function bn(...e){return t=>e.every(r=>$f(r,t))}function Os(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 di(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function qs(...e){return e.length===0?t=>Os(t,["pending"]):di(e)?Jt(...e.map(t=>t.pending)):qs()(e[0])}function jo(...e){return e.length===0?t=>Os(t,["rejected"]):di(e)?Jt(...e.map(t=>t.rejected)):jo()(e[0])}function mi(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?bn(jo(...e),t):di(e)?bn(jo(...e),t):mi()(e[0])}function br(...e){return e.length===0?t=>Os(t,["fulfilled"]):di(e)?Jt(...e.map(t=>t.fulfilled)):br()(e[0])}function Ds(...e){return e.length===0?t=>Os(t,["pending","fulfilled","rejected"]):di(e)?Jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ds()(e[0])}var AA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ks=(e=21)=>{let t="",r=e;for(;r--;)t+=AA[Math.random()*64|0];return t},vA=["name","message","stack","code"],ld=class{constructor(e,t){ot(this,"_type");this.payload=e,this.meta=t}},Bf=class{constructor(e,t){ot(this,"_type");this.payload=e,this.meta=t}},bA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vA)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||bA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ks(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(EA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new ld(v,R),fulfillWithValue:(v,R)=>new Bf(v,R)})).then(v=>{if(v instanceof ld)throw v;return v instanceof Bf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof ld?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(wA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Jt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function wA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function EA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zf=Symbol.for("rtk-slice-createasyncthunk"),xV={[zf]:_};function IA(e,t){return`${e}/${t}`}function TA({creators:e}={}){let t=e?.asyncThunk?.[zf];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Bt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(qA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Bt(12));if(x in u.sliceCaseReducersByType)throw new Error(Bt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:IA(n,A),createNotation:typeof o.reducers=="function"};kA(y)?NA(x,y,c,t):DA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?_f(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Qf(p,y,()=>new WeakMap);return Qf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=OA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function OA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var _o=TA();function qA(){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 DA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!VA(o))throw new Error(Bt(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 kA(e){return e._reducerDefinitionType==="asyncThunk"}function VA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function NA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Bt(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ts,pending:s||Ts,rejected:u||Ts,settled:c||Ts})}function Ts(){}var Wf="listener",Kf="completed",Gf="cancelled",RV=`task-${Gf}`,FV=`task-${Kf}`,PV=`${Wf}-${Gf}`,AV=`${Wf}-${Kf}`;var{assign:Hf}=Object;var dd="listenerMiddleware";var MA=Hf(g(`${dd}/add`),{withTypes:()=>MA}),vV=g(`${dd}/removeAll`),QA=Hf(g(`${dd}/remove`),{withTypes:()=>QA});var bV=Symbol.for("rtk-state-proxy-original");function Bt(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 st=require("@coveo/bueno"),D=new st.StringValue({required:!0,emptyAllowed:!1}),ae=new st.StringValue({required:!1,emptyAllowed:!1}),Ce=new st.StringValue({required:!0,emptyAllowed:!0}),Yf=new st.StringValue({required:!1,emptyAllowed:!0}),Vs=new st.ArrayValue({each:D,required:!0}),Jf=new st.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ye=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new st.Schema({value:t}).validate({value:e}).value};let n=new st.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new st.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:Ye(r)}}},ct=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Xf(e,t,r,n,"Controller initialization error")},Je=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Xf(e,t,r,n,"Controller initialization error")},Xf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Xe=require("@coveo/bueno");var zr="3.22.5",Zf=["@coveo/atomic","@coveo/quantic"];var md=()=>ae,eg=()=>D,$o=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Xe.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),tg=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Xe.StringValue({required:!1,url:!0}),pipeline:new Xe.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Xe.ArrayValue({required:!1,each:D})})),En={enabled:new Xe.BooleanValue({default:!0}),originContext:md(),originLevel2:md(),originLevel3:md(),proxyBaseUrl:new Xe.StringValue({required:!1,url:!0}),runtimeEnvironment:new Xe.Value,anonymous:new Xe.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Xe.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Xe.RecordValue({options:{required:!1},values:Zf.reduce((e,t)=>(e[t]=Jf,e),{})})},pd=g("configuration/updateAnalyticsConfiguration",e=>F(e,En)),Ns=g("configuration/analytics/disable"),Ms=g("configuration/analytics/enable"),rg=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:eg()})),og=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:eg()}));var In=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new fd.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Tn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new fd.StringValue({required:!1,url:!0})})),On=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:En.enabled,proxyBaseUrl:En.proxyBaseUrl,source:En.source,trackingId:En.trackingId})),Qs=g("commerce/configuration/analytics/disable"),Ls=g("commerce/configuration/analytics/enable");var Wr=require("@coveo/bueno");var ng=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var gd=j(ng(),e=>e.addCase(In,(t,r)=>{ag(t,r.payload)}).addCase($o,(t,r)=>{ag(t,r.payload)}).addCase(Tn,(t,r)=>{LA(t,r.payload)}).addCase(On,(t,r)=>{BA(t,r.payload)}).addCase(Qs,t=>{t.analytics.enabled=!1}).addCase(Ls,t=>{t.analytics.enabled=!0}));function ag(e,t){(0,Wr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Wr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function LA(e,t){(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function BA(e,t){(0,Wr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Wr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Wr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function qn(e){return e.currency}var ig=(e,t)=>({currency:qn(t.commerceContext),products:UA(t.cart),transaction:e}),sg=(e,t)=>({currency:qn(t.commerceContext),...e}),zo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),UA=Q(zo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Ut=require("@coveo/bueno");var yd={productId:D,quantity:new Ut.NumberValue({required:!0,min:0}),name:new Ut.StringValue({required:!1}),price:new Ut.NumberValue({required:!1,min:0})},Sd=new Ut.ArrayValue({each:new Ut.RecordValue({values:{...yd}})}),hd={items:Sd},cg=new Ut.Schema(hd);var Kr=g("commerce/cart/setItems",e=>F(e,Sd)),Dn=g("commerce/cart/updateItemQuantity",e=>F(e,yd)),kn=g("commerce/cart/purchase"),Bs=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=ig(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Us=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=sg(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function ug(e,t){return e.cart[Wo(t)]}var lg=Q(zo,e=>e.reduce((t,r)=>t+r.quantity,0)),dg=Q(zo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function mg(e,t={}){if(!jA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};ct(e,cg,a,"buildCart"),a.items!==void 0&&r(Kr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of zo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bs(l)),r(kn())},updateItemQuantity(l){let d=ug(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Us(c(l,d))),r(Dn(l)))},get state(){let l=n();return{items:zo(l),totalQuantity:lg(l),totalPrice:dg(l)}}}}function Wo(e){return`${e.productId},${e.name},${e.price}`}function jA(e){return e.addReducers({cart:Vn}),!0}var js=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),pg=e=>gg(e.cartItems,e.cart),fg=e=>gg(e.purchasedItems,e.purchased);function gg(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(js(),e=>{e.addCase(Kr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Wo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},js());yg(t,n,o)}).addCase(Dn,(t,{payload:r})=>{let o=Wo(r);if(!(o in t.cart)){_A(r,t);return}if(r.quantity<=0){$A(r,t);return}t.cart[o]=r}).addCase(kn,t=>{zA(t);let{cart:r,cartItems:o}=js();yg(t,o,r)})});function yg(e,t,r){e.cartItems=t,e.cart=r}function _A(e,t){if(e.quantity<=0)return;let r=Wo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function $A(e,t){let r=Wo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function zA(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 Xt=require("@coveo/bueno");var WA=Intl.supportedValuesOf("currency"),KA=new Xt.StringValue({required:!0,emptyAllowed:!1,constrainTo:WA}),Cd={url:D},xd={latitude:new Xt.NumberValue({min:-90,max:90,required:!0}),longitude:new Xt.NumberValue({min:-180,max:180,required:!0})},pi={language:D,country:D,currency:KA,view:new Xt.RecordValue({options:{required:!0},values:Cd}),location:new Xt.RecordValue({options:{required:!1},values:xd})},Sg=new Xt.Schema(pi);var me=g("commerce/context/set",e=>F(e,pi)),fe=g("commerce/context/setView",e=>F(e,Cd)),Nn=g("commerce/context/setLocation",e=>F(e,xd));var hg=()=>({language:"",country:"",currency:"",view:{url:""}});var Zt=j(hg(),e=>{e.addCase(me,(t,{payload:r})=>r).addCase(fe,(t,{payload:r})=>{t.view=r}).addCase(Nn,(t,{payload:r})=>{t.location=r})});var _s=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Jo=require("@coveo/bueno");var vt=g("breadcrumb/deselectAll"),Gr=g("breadcrumb/deselectAllNonBreadcrumbs");var Hr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${zr}`));var Yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??xs(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:pg(e.cart),source:Hr(e.configuration.analytics)}}};var jt=require("@coveo/bueno");var er=require("@coveo/bueno"),bt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(bt||{}),Mn=(r=>(r.Ascending="asc",r.Descending="desc",r))(Mn||{}),wr=()=>({by:"relevance"});var dM=new er.RecordValue({options:{required:!1},values:{by:new er.EnumValue({enum:bt,required:!0}),fields:new er.ArrayValue({each:new er.RecordValue({values:{name:new er.StringValue,direction:new er.EnumValue({enum:Mn})}})})}});var Rd=e=>({by:"fields",fields:e}),Cg=new jt.RecordValue({options:{required:!1},values:{by:new jt.EnumValue({enum:bt,required:!0}),fields:new jt.ArrayValue({each:new jt.RecordValue({values:{field:new jt.StringValue({required:!0}),direction:new jt.EnumValue({enum:Mn}),displayName:new jt.StringValue}})})}});var $s=(e,t,r)=>({...Yr(e,t),...GA(e,r)}),GA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var wt=(e,t)=>({...$s(e,t),facets:[...HA(e)],...e.commerceSort&&{sort:YA(e.commerceSort.appliedSort)}});function HA(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 YA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Qn=require("@coveo/bueno");var Ko=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new Qn.NumberValue({required:!0,min:1})})),Go=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new Qn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),Ue=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ho=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new Qn.BooleanValue({required:!0})})),Ln=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new Qn.BooleanValue({required:!0})}));var Fd=require("@coveo/bueno");var zs={slotId:Yf},JA={...zs,pageSize:new Fd.NumberValue({required:!0,min:0})},Er=g("commerce/pagination/setPageSize",e=>F(e,JA)),XA={...zs,page:new Fd.NumberValue({required:!0,min:0})},tr=g("commerce/pagination/selectPage",e=>F(e,XA)),Jr=g("commerce/pagination/nextPage",e=>F(e,zs)),Xr=g("commerce/pagination/previousPage",e=>F(e,zs)),Bn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var Zr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Ws=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),eo=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ks=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),xg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Rg=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Rg.StringValue}));var wd=require("@coveo/bueno");var Hs=require("@coveo/bueno");var to=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Hs.StringValue({emptyAllowed:!0,required:!0})})),Un=g("commerce/triggers/query/applyModification",e=>F(e,new Hs.RecordValue({values:{originalQuery:ae,modification:ae}})));var vd=require("@coveo/bueno");function Pd(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Ad(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function rr(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function or(e){let{activeValue:t,ancestryMap:r}=ZA(e);return t?ev(t,r):[]}function ZA(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 ev(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Fg(){return{principal:ro(),recommendations:{}}}function ro(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function Yo(){return{appliedSort:wr(),availableSorts:[wr()]}}function Ys(e){return{...tv(e?.commercePagination,t=>t.principal.page,ro().page),...rv(e?.commercePagination,t=>t.principal.perPage,ro().perPage),...Ad(e?.commerceSort,t=>t.appliedSort,Yo().appliedSort),...rr(e.commerceFacetSet,oo(e,"regular"),ov,"f"),...rr(e.commerceFacetSet,oo(e,"regular"),nv,"fExcluded"),...rr(e.commerceFacetSet,oo(e,"location"),av,"lf"),...rr(e.commerceFacetSet,oo(e,"hierarchical"),iv,"cf"),...rr(e.commerceFacetSet,oo(e,"dateRange"),Pg,"df"),...rr(e.commerceFacetSet,oo(e,"dateRange"),Ag,"dfExcluded"),...rr(e.commerceFacetSet,oo(e,"numericalRange"),Pg,"nf"),...rr(e.commerceFacetSet,oo(e,"numericalRange"),Ag,"nfExcluded"),...vg("selected",e.manualNumericFacetSet),...vg("excluded",e.manualNumericFacetSet)}}function tv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function rv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function ov(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function nv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Pg(e){return e.values.filter(t=>t.state==="selected")}function Ag(e){return e.values.filter(t=>t.state==="excluded")}function vg(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 iv(e){return or(e.values).map(r=>r.value)}function oo(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Js=()=>({query:""});var a0=Q(e=>e[U].commerceSearch.responseId,e=>e),bd=Q(e=>e.commerceSearch.responseId,e=>e),bg=Q(e=>e.commerceSearch.requestId,e=>e),fi=Q(e=>e.commerceSearch?.products.length||0,e=>e),wg=Q(e=>({total:eo(e),current:fi(e)}),({current:e,total:t})=>e<t),Eg=Q(e=>e.commerceSearch?.isLoading,e=>(0,vd.isNullOrUndefined)(e)?!1:e),Ig=Q(e=>e.commerceSearch?.error,e=>e??null),Xs=Q(e=>e.commerceQuery?.query,e=>e??""),sv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Tg=(e,t)=>(0,vd.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?Xs(e):t.queryCorrection.correctedQuery,Og=e=>({...Pd(e?.commerceQuery,t=>t.query,Js().query),...Ys(e)});function qg(e){return{query:sv(e)||""}}var gi=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 Be(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,wd.isNullOrUndefined)(n)&&!(0,wd.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Tg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(to({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Be(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Un({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...wt(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 Be(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Re({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=wt(o,n),i=Xs(o),s=new gi(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),no=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!wg(o))return null;let i=Zr(o),u=fi(o)/i,c=Xs(o),l=wt(o,n),d=new gi(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),jn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Jo.StringValue,clearFilters:new Jo.BooleanValue}),e.clearFilters&&(r(xe()),r(Gr())),r(Ln({allow:!0})),r(Re({query:e.query})),r(tr({page:0}))}),_n=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Yr(n,i),query:s});return Be(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),cv={child:new Jo.RecordValue({options:{required:!0},values:{permanentid:new Jo.StringValue({required:!0})}})},$n=g("commerce/search/promoteChildToParent",e=>F(e,cv));function Dg(){return{wasCorrectedTo:"",queryCorrection:_s(),originalQuery:""}}var Zs=j(Dg(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=_s(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var ye=require("@coveo/bueno");var H=D;var nr=require("@coveo/bueno");var uv={state:new nr.Value({required:!0}),numberOfResults:new nr.NumberValue({required:!0,min:0}),value:new nr.StringValue({required:!0,emptyAllowed:!0}),path:new nr.ArrayValue({required:!0,each:D}),moreValuesAvailable:new nr.BooleanValue({required:!1})};function yi(e){e.children.forEach(t=>{yi(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},uv)}var zn={facetId:H,field:D,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:D}),filterByBasePath:new ye.BooleanValue({required:!1})},Wn=5,kg=g("categoryFacet/register",e=>F(e,zn)),Vg=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,D),yi(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ye(t)}}}),Ng=g("categoryFacet/deselectAll",e=>F(e,zn.facetId)),K0=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:zn.facetId,numberOfValues:zn.numberOfValues})),G0=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:zn.facetId,criterion:new ye.Value})),H0=g("categoryFacet/updateBasePath",e=>F(e,{facetId:zn.facetId,basePath:new ye.ArrayValue({each:D})}));var Gn=require("@coveo/bueno");var Kn=require("@coveo/bueno");var Si={facetId:H,captions:new Kn.RecordValue({options:{required:!1}}),numberOfValues:new Kn.NumberValue({required:!1,min:1}),query:new Kn.StringValue({required:!1,emptyAllowed:!0})};var lv={path:new Gn.ArrayValue({required:!0,each:D}),displayValue:Ce,rawValue:Ce,count:new Gn.NumberValue({required:!0,min:0})},ar=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Gn.RecordValue({values:lv})})),ec=g("categoryFacetSearch/register",e=>F(e,Si));var tc=require("@coveo/bueno");var Mg={facetId:H,value:new tc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new tc.NumberValue({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Si)),ao=g("facetSearch/update",e=>F(e,Si)),St=g("facetSearch/toggleSelectValue",e=>F(e,Mg)),_t=g("facetSearch/toggleExcludeValue",e=>F(e,Mg));var Qg=require("@coveo/bueno");var Ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Qg.BooleanValue({required:!1})})),Ed=g("facetOptions/facet/enable",e=>F(e,H)),Tr=g("facetOptions/facet/disable",e=>F(e,H));var dv=g("history/undo"),mv=g("history/redo"),ir=g("history/snapshot"),fQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(Ee())}),gQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(Ee())}),Ee=_("history/change",async(e,{getState:t})=>t().history.present);var Se=require("@coveo/bueno"),oc={q:new Se.StringValue,enableQuerySyntax:new Se.BooleanValue,aq:new Se.StringValue,cq:new Se.StringValue,firstResult:new Se.NumberValue({min:0}),numberOfResults:new Se.NumberValue({min:0}),sortCriteria:new Se.StringValue,f:new Se.RecordValue,fExcluded:new Se.RecordValue,cf:new Se.RecordValue,nf:new Se.RecordValue,mnf:new Se.RecordValue,df:new Se.RecordValue,debug:new Se.BooleanValue,sf:new Se.RecordValue,tab:new Se.StringValue,af:new Se.RecordValue};var Me=g("searchParameters/restore",e=>F(e,oc)),pv=g("searchParameters/restoreTab",e=>F(e,D));var Co=require("@coveo/bueno");function Or(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Od(){return typeof window<"u"}function $d(){return typeof navigator<"u"}function Hn(){return typeof document<"u"}function qd(){try{return typeof localStorage<"u"}catch{return!1}}function fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Xg(){return $d()&&navigator.cookieEnabled}var gv=[ee.click,ee.custom,ee.search,ee.view],yv=(e,t)=>gv.indexOf(e)!==-1?Object.assign({language:Hn()?document.documentElement.lang:"unknown",userAgent:$d()?navigator.userAgent:"unknown"},t):t,xi=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Lg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Lg(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 Lg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Sv(){return qd()?localStorage:Xg()?new Ri:fv()?sessionStorage:new Jn}var Ri=class e{getItem(t){return xi.get(`${e.prefix}${t}`)}removeItem(t){xi.erase(`${e.prefix}${t}`)}setItem(t,r,o){xi.set(`${e.prefix}${t}`,r,o)}};Ri.prefix="coveo_";var Dd=class{constructor(){this.cookieStorage=new Ri}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)}},Jn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hi="__coveo.analytics.history",Zg=20,ey=1e3*60,ty=75,Xn=class{constructor(t){this.store=t||Sv()}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(hi);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(hi);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hi,JSON.stringify(t.slice(0,Zg)))}catch{}}clear(){try{this.store.removeItem(hi)}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,ty)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ey:!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))}},ry=Object.freeze({__proto__:null,HistoryStore:Xn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Zg,MAX_VALUE_SIZE:ty,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ey,STORE_KEY:hi,default:Xn}),hv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Cv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Cv=e=>w(void 0,void 0,void 0,function*(){let t=new Xn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,xv=new Uint8Array(16);function Rv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(xv)}var Fv=/^(?:[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 ic(e){return typeof e=="string"&&Fv.test(e)}var Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function oy(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}function Pv(e){if(!ic(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 Av(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var vv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=Av(n)),typeof a=="string"&&(a=Pv(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return oy(c)}try{o.name=e}catch{}return o.DNS=vv,o.URL=bv,o}var Ev=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bg={randomUUID:Ev};function Xo(e,t,r){if(Bg.randomUUID&&!t&&!e)return Bg.randomUUID();e=e||{};let o=e.random||(e.rng||Rv)();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 oy(o)}function Iv(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 Id(e,t){return e<<t|e>>>32-t}function Tv(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let s=0;s<i.length;++s)e.push(i.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=s}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Id(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Id(u,5)+Iv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Id(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Ov=wv("v5",80,Tv),Ug=Ov,ny="2.30.45",jg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ci={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=Xo}){this.client=t,this.uuidGenerator=r}},kd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=jg(window.location),this.lastReferrer=Hn()?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:Hn()?document.title:"",encoding:Hn()?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===Ci.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ci.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ci.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ci.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 jg(window.location)}},io=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};io.cvo_cid="cvo_cid";io.expirationTime=120;var Vd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){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(io.cvo_cid,new io(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Vd.Id="link";var It=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Td=128,ay=192,_g=224,$g=240;function qv(e){return(e&248)===$g?4:(e&$g)===_g?3:(e&_g)===ay?2:1}function Dv(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&Td)!=Td)break;if(r-=3,(o&ay)!=Td){t-r>=qv(o)*3&&(r=t);break}}return e.substring(0,r)}var Nd={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"},kv=It(Nd).map(e=>Nd[e]),Vv=[...kv].join("|"),Nv=new RegExp(`^(${Vv}$)`),Mv={svcAction:"svc_action",svcActionData:"svc_action_data"},Qv=e=>It(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Nd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Lv=e=>Nv.test(e),Bv=[Lv],zg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Wg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},je={action:"pa",list:"pal",listSource:"pls"},cc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Uv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Md={id:"quoteId",affiliation:"quoteAffiliation"},Qd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},jv={add:je,bookmark_add:je,bookmark_remove:je,click:je,checkout:je,checkout_option:je,detail:je,impression:je,remove:je,refund:Object.assign(Object.assign({},je),cc),purchase:Object.assign(Object.assign({},je),cc),quickview:je,quote:Object.assign(Object.assign({},je),Md),review:Object.assign(Object.assign({},je),Qd)},_v=It(zg).map(e=>zg[e]),$v=It(Wg).map(e=>Wg[e]),zv=It(je).map(e=>je[e]),Wv=It(cc).map(e=>cc[e]),Kv=It(Qd).map(e=>Qd[e]),Gv=It(Md).map(e=>Md[e]),Hv=[..._v,"custom"].join("|"),Yv=[...$v,"custom"].join("|"),iy="(pr[0-9]+)",sy="(il[0-9]+pi[0-9]+)",Jv=new RegExp(`^${iy}(${Hv})$`),Xv=new RegExp(`^(${sy}(${Yv}))|(il[0-9]+nm)$`),Zv=new RegExp(`^(${zv.join("|")})$`),eb=new RegExp(`^(${Wv.join("|")})$`),tb=new RegExp(`^${iy}custom$`),rb=new RegExp(`^${sy}custom$`),ob=new RegExp(`^(${[...Uv,...Kv,...Gv].join("|")})$`),nb=e=>Jv.test(e),ab=e=>Xv.test(e),ib=e=>Zv.test(e),sb=e=>eb.test(e),cb=e=>ob.test(e),ub=[ab,nb,ib,sb,cb],lb=[tb,rb],db={anonymizeIp:"aip"},mb={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},pb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},fb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],gb=Object.assign(Object.assign(Object.assign(Object.assign({},db),mb),pb),fb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ld=Object.assign(Object.assign({},gb),Mv),yb=e=>{let t=!!e.action&&jv[e.action]||{};return It(e).reduce((r,o)=>{let n=t[o]||Ld[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},Sb=It(Ld).map(e=>Ld[e]),hb=e=>Sb.indexOf(e)!==-1,Cb=e=>e==="custom",xb=e=>[...ub,...Bv,hb,Cb].some(t=>t(e)),Rb=e=>It(e).reduce((t,r)=>{let o=Fb(r);return o?Object.assign(Object.assign({},t),Pb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Fb=e=>{let t;return[...lb].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Pb=(e,t)=>It(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bd=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Ud=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()})}},Kg=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():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=Or(u,["url"]),d;try{d=yield Kg(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Kg(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"})}},jd=class{constructor(t,r){qd()&&Xg()?this.storage=new Dd:qd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Jn),this.client=new uc(t),this.beaconClient=new Bd(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}},_d=class{constructor(t,r){this.storage=r||new Jn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new Jn,this.client=new Ud}getClientDependingOnEventType(t){return this.client}},Ab="xx",vb=e=>e?.startsWith(Ab)||!1,bb=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Vo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Zp(e){return Array.isArray(e)}function ds(e){return e.trim()===""}function ef(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ms(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function ps(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function Pr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function tf(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function fs(e){let{promise:t,resolve:r}=tf();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function gP(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function rf(e,t){let{promise:r,resolve:o}=tf(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&gP(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var gf=Ht(df(),1);var De=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(De||{}),UP="recommendation-internal-options",hn=Symbol.for(UP);var $=new Error("Failed to load reducers."),Cn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},ys=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(De).map(t=>t.toLowerCase()).join(", ")}`}},xn=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Ss=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},Mo=class extends Error{constructor(r,o){super();ot(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function mf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function pf(e){return typeof e!="object"||!e?!1:Object.values(e).every(jP)}function jP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ff(e){return e===429}var Rn=class e{static async call(t){let r=_P(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(ff(u.status))throw u;return u};try{let u=await(0,gf.backOff)(s,{retry:c=>{let l=c&&ff(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Cn;case 404:throw new Mo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=Pr(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function nt(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function hs(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function _P(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=$P(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function $P(e,t){return t==="application/x-www-form-urlencoded"?pf(e)?mf(e):"":JSON.stringify(e)}function zP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function WP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gl(e,t){if(t&&e.name==="AbortError")return{error:WP(e)};if(e instanceof Mo)return{error:zP(e)};throw e}var Fn=(e,t)=>({...ti(e,t),requestParams:KP(e)}),KP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},ti=(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 yf=(e,t)=>({...ti(e,t),requestParams:GP(e)}),GP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var Sf=e=>({...ti(e,"search/querySuggest"),requestParams:HP(e)}),HP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var Be=e=>e.error!==void 0,Cs=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Fn(t,"listing"),...this.options})}async search(t){let r=Fn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...yf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Fn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Sf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Fn(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=Fn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Rn.call(t);if(r instanceof Error)return Gl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function xs(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Rs=e=>e;var fd=require("@coveo/bueno");function Ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var YP=typeof Symbol=="function"&&Symbol.observable||"@@observable",hf=YP,Hl=()=>Math.random().toString(36).substring(7).split("").join("."),JP={INIT:`@@redux/INIT${Hl()}`,REPLACE:`@@redux/REPLACE${Hl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hl()}`},Fs=JP;function Yt(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 Yl(e,t,r){if(typeof e!="function")throw new Error(Ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Yl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(Ve(3));return n}function d(C){if(typeof C!="function")throw new Error(Ve(4));if(u)throw new Error(Ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(Ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Yt(C))throw new Error(Ve(7));if(typeof C.type>"u")throw new Error(Ve(8));if(typeof C.type!="string")throw new Error(Ve(17));if(u)throw new Error(Ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Ve(10));o=C,p({type:Fs.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(Ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[hf](){return this}}}return p({type:Fs.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[hf]:f}}function XP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Fs.INIT})>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:Fs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function Pn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{XP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(Ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function An(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Cf(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=An(...s)(n.dispatch),{...n,dispatch:a}}}function Ps(e){return Yt(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ri=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Ne(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[at]}function it(e){return e?Af(e)||Array.isArray(e)||!!e[ri]||!!e.constructor?.[ri]||si(e)||ci(e):!1}var ZP=Object.prototype.constructor.toString();function Af(e){if(!e||typeof e!="object")return!1;let t=Lo(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)===ZP}function sd(e){return gt(e)||Ne(15,e),e[at].base_}function oi(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[at];return t?t.type_:Array.isArray(e)?1:si(e)?2:ci(e)?3:0}function ni(e,t){return Bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jl(e,t){return Bo(e)===2?e.get(t):e[t]}function vf(e,t,r){let o=Bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function eA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function si(e){return e instanceof Map}function ci(e){return e instanceof Set}function Qo(e){return e.copy_||e.base_}function ed(e,t){if(si(e))return new Map(e);if(ci(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Af(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[at];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Lo(e),o)}else{let o=Lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function bs(e,t=!1){return ws(e)||gt(e)||!it(e)||(Bo(e)>1&&(e.set=e.add=e.clear=e.delete=tA),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>bs(o,!0))),e}function tA(){Ne(2)}function ws(e){return Object.isFrozen(e)}var td={};function Uo(e){let t=td[e];return t||Ne(0,e),t}function rA(e,t){td[e]||(td[e]=t)}var ai;function bf(){return ai}function oA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function xf(e,t){t&&(Uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rd(e){od(e),e.drafts_.forEach(nA),e.drafts_=null}function od(e){e===ai&&(ai=e.parent_)}function Rf(e){return ai=oA(ai,e)}function nA(e){let t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ff(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[at].modified_&&(rd(t),Ne(4)),it(e)&&(e=As(t,e),t.parent_||vs(t,e)),t.patches_&&Uo("Patches").generateReplacementPatches_(r[at].base_,e,t.patches_,t.inversePatches_)):e=As(t,r,[]),rd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function As(e,t,r){if(ws(t))return t;let o=t[at];if(!o)return oi(t,(n,a)=>Pf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return vs(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),oi(a,(s,u)=>Pf(e,o,n,s,u,r,i)),vs(e,n,!1),r&&e.patches_&&Uo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Pf(e,t,r,o,n,a,i){if(gt(n)){let s=a&&t&&t.type_!==3&&!ni(t.assigned_,o)?a.concat(o):void 0,u=As(e,n,s);if(vf(r,o,u),gt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(it(n)&&!ws(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;As(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&vs(e,n)}}function vs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bs(t,r)}function aA(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:bf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=cd;r&&(n=[o],a=ii);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var cd={get(e,t){if(t===at)return e;let r=Qo(e);if(!ni(r,t))return iA(e,r,t);let o=r[t];return e.finalized_||!it(o)?o:o===Xl(e.base_,t)?(Zl(e),e.copy_[t]=ad(o,e)):o},has(e,t){return t in Qo(e)},ownKeys(e){return Reflect.ownKeys(Qo(e))},set(e,t,r){let o=wf(Qo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Xl(Qo(e),t),a=n?.[at];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eA(r,n)&&(r!==void 0||ni(e.base_,t)))return!0;Zl(e),nd(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 Xl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zl(e),nd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ne(11)},getPrototypeOf(e){return Lo(e.base_)},setPrototypeOf(){Ne(12)}},ii={};oi(cd,(e,t)=>{ii[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ii.deleteProperty=function(e,t){return ii.set.call(this,e,t,void 0)};ii.set=function(e,t,r){return cd.set.call(this,e[0],t,r,e[0])};function Xl(e,t){let r=e[at];return(r?Qo(r):e)[t]}function iA(e,t,r){let o=wf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function wf(e,t){if(!(t in e))return;let r=Lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Lo(r)}}function nd(e){e.modified_||(e.modified_=!0,e.parent_&&nd(e.parent_))}function Zl(e){e.copy_||(e.copy_=ed(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Ne(6),o!==void 0&&typeof o!="function"&&Ne(7);let n;if(it(t)){let a=Rf(this),i=ad(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?rd(a):od(a)}return xf(a,o),Ff(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===id&&(n=void 0),this.autoFreeze_&&bs(n,!0),o){let a=[],i=[];Uo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ne(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){it(e)||Ne(8),gt(e)&&(e=Ef(e));let t=Rf(this),r=ad(e,void 0);return r[at].isManual_=!0,od(t),r}finishDraft(e,t){let r=e&&e[at];(!r||!r.isManual_)&&Ne(9);let{scope_:o}=r;return xf(o,t),Ff(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=Uo("Patches").applyPatches_;return gt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ad(e,t){let r=si(e)?Uo("MapSet").proxyMap_(e,t):ci(e)?Uo("MapSet").proxySet_(e,t):aA(e,t);return(t?t.scope_:bf()).drafts_.push(r),r}function Ef(e){return gt(e)||Ne(10,e),If(e)}function If(e){if(!it(e)||ws(e))return e;let t=e[at],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ed(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ed(e,!0);return oi(r,(o,n)=>{vf(r,o,If(n))}),t&&(t.finalized_=!1),r}function Tf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;oi(p.assigned_,(A,y)=>{let x=Jl(C,A),I=Jl(S,A),v=y?ni(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===id?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=Bo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ne(19),typeof S=="function"&&R==="prototype"&&Ne(19),S=Jl(S,R),typeof S!="object"&&Ne(18,h.join("/"))}let A=Bo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:Ne(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:Ne(17,C)}}),p}function l(p){if(!it(p))return p;if(Array.isArray(p))return p.map(l);if(si(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(ci(p))return new Set(Array.from(p).map(l));let m=Object.create(Lo(p));for(let f in p)m[f]=l(p[f]);return ni(p,ri)&&(m[ri]=p[ri]),m}function d(p){return gt(p)?l(p):p}rA("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var yt=new sA,vr=yt.produce,Es=yt.produceWithPatches.bind(yt),Xk=yt.setAutoFreeze.bind(yt),Zk=yt.setUseStrictShallowCopy.bind(yt),ud=yt.applyPatches.bind(yt),eV=yt.createDraft.bind(yt),tV=yt.finishDraft.bind(yt);function cA(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uA(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lA(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 Of=e=>Array.isArray(e)?e:[e];function dA(e){let t=Array.isArray(e[0])?e[0]:e;return lA(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mA(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var nV=Symbol();var aV=Object.getPrototypeOf({});var pA=class{constructor(e){this.value=e}deref(){return this.value}},fA=typeof WeakRef<"u"?WeakRef:pA,gA=0,qf=1;function Is(){return{s:gA,v:void 0,o:null,p:null}}function vn(e,t={}){let r=Is(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}}let c=s,l;if(s.s===qf)l=s.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new fA(l):l}return c.s=qf,c.v=l,l}return i.clearCache=()=>{r=Is(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Df(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),cA(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=vn,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=Of(p),S=Of(f),A=dA(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=mA(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Df(vn),yA=Object.assign((e,t=Q)=>{uA(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>yA});function kf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Vf=kf(),Nf=kf;var SA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?An:An.apply(null,arguments)},gV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Bt(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=>Ps(o)&&o.type===e,r}var Uf=class ui extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ui.prototype)}static get[Symbol.species](){return ui}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ui(...t[0].concat(this)):new ui(...t.concat(this))}};function Mf(e){return it(e)?vr(e,()=>{}):e}function Qf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function CA(e){return typeof e=="boolean"}var xA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Uf;return r&&(CA(r)?i.push(Vf):i.push(Nf(r.extraArgument))),i},li="RTK_autoBatch",wn=()=>e=>({payload:e,meta:{[li]:!0}}),Lf=e=>t=>{setTimeout(t,e)},RA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Lf(10):e.type==="callback"?e.queueNotification:Lf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[li],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},FA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Uf(e);return o&&n.push(RA(typeof o=="object"?o:void 0)),n};function jf(e){let t=xA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Yt(r))s=Pn(r);else throw new Error(Bt(1));let u;typeof o=="function"?u=o(t):u=t();let c=An;n&&(c=SA({trace:!1,...typeof n=="object"&&n}));let l=Cf(...u),d=FA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Yl(s,a,m)}function _f(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Bt(28));if(s in t)throw new Error(Bt(29));return t[s]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function PA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=_f(t),a;if(PA(e))a=()=>Mf(e());else{let s=Mf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(gt(l)){let m=d(l,u);return m===void 0?l:m}else{if(it(l))return vr(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return i.getInitialState=a,i}var $f=(e,t)=>hA(e)?e.match(t):e(t);function Jt(...e){return t=>e.some(r=>$f(r,t))}function bn(...e){return t=>e.every(r=>$f(r,t))}function Os(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 di(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function qs(...e){return e.length===0?t=>Os(t,["pending"]):di(e)?Jt(...e.map(t=>t.pending)):qs()(e[0])}function jo(...e){return e.length===0?t=>Os(t,["rejected"]):di(e)?Jt(...e.map(t=>t.rejected)):jo()(e[0])}function mi(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?bn(jo(...e),t):di(e)?bn(jo(...e),t):mi()(e[0])}function br(...e){return e.length===0?t=>Os(t,["fulfilled"]):di(e)?Jt(...e.map(t=>t.fulfilled)):br()(e[0])}function Ds(...e){return e.length===0?t=>Os(t,["pending","fulfilled","rejected"]):di(e)?Jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ds()(e[0])}var AA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ks=(e=21)=>{let t="",r=e;for(;r--;)t+=AA[Math.random()*64|0];return t},vA=["name","message","stack","code"],ld=class{constructor(e,t){ot(this,"_type");this.payload=e,this.meta=t}},Bf=class{constructor(e,t){ot(this,"_type");this.payload=e,this.meta=t}},bA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vA)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||bA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ks(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(EA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new ld(v,R),fulfillWithValue:(v,R)=>new Bf(v,R)})).then(v=>{if(v instanceof ld)throw v;return v instanceof Bf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof ld?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(wA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Jt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function wA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function EA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zf=Symbol.for("rtk-slice-createasyncthunk"),xV={[zf]:_};function IA(e,t){return`${e}/${t}`}function TA({creators:e}={}){let t=e?.asyncThunk?.[zf];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Bt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(qA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Bt(12));if(x in u.sliceCaseReducersByType)throw new Error(Bt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:IA(n,A),createNotation:typeof o.reducers=="function"};kA(y)?NA(x,y,c,t):DA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?_f(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Qf(p,y,()=>new WeakMap);return Qf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=OA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function OA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var _o=TA();function qA(){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 DA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!VA(o))throw new Error(Bt(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 kA(e){return e._reducerDefinitionType==="asyncThunk"}function VA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function NA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Bt(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ts,pending:s||Ts,rejected:u||Ts,settled:c||Ts})}function Ts(){}var Wf="listener",Kf="completed",Gf="cancelled",RV=`task-${Gf}`,FV=`task-${Kf}`,PV=`${Wf}-${Gf}`,AV=`${Wf}-${Kf}`;var{assign:Hf}=Object;var dd="listenerMiddleware";var MA=Hf(g(`${dd}/add`),{withTypes:()=>MA}),vV=g(`${dd}/removeAll`),QA=Hf(g(`${dd}/remove`),{withTypes:()=>QA});var bV=Symbol.for("rtk-state-proxy-original");function Bt(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 st=require("@coveo/bueno"),D=new st.StringValue({required:!0,emptyAllowed:!1}),ae=new st.StringValue({required:!1,emptyAllowed:!1}),Ce=new st.StringValue({required:!0,emptyAllowed:!0}),Yf=new st.StringValue({required:!1,emptyAllowed:!0}),Vs=new st.ArrayValue({each:D,required:!0}),Jf=new st.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ye=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new st.Schema({value:t}).validate({value:e}).value};let n=new st.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new st.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:Ye(r)}}},ct=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Xf(e,t,r,n,"Controller initialization error")},Je=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Xf(e,t,r,n,"Controller initialization error")},Xf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Xe=require("@coveo/bueno");var zr="3.23.0",Zf=["@coveo/atomic","@coveo/quantic"];var md=()=>ae,eg=()=>D,$o=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Xe.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),tg=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Xe.StringValue({required:!1,url:!0}),pipeline:new Xe.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Xe.ArrayValue({required:!1,each:D})})),En={enabled:new Xe.BooleanValue({default:!0}),originContext:md(),originLevel2:md(),originLevel3:md(),proxyBaseUrl:new Xe.StringValue({required:!1,url:!0}),runtimeEnvironment:new Xe.Value,anonymous:new Xe.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Xe.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Xe.RecordValue({options:{required:!1},values:Zf.reduce((e,t)=>(e[t]=Jf,e),{})})},pd=g("configuration/updateAnalyticsConfiguration",e=>F(e,En)),Ns=g("configuration/analytics/disable"),Ms=g("configuration/analytics/enable"),rg=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:eg()})),og=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:eg()}));var In=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new fd.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Tn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new fd.StringValue({required:!1,url:!0})})),On=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:En.enabled,proxyBaseUrl:En.proxyBaseUrl,source:En.source,trackingId:En.trackingId})),Qs=g("commerce/configuration/analytics/disable"),Ls=g("commerce/configuration/analytics/enable");var Wr=require("@coveo/bueno");var ng=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var gd=j(ng(),e=>e.addCase(In,(t,r)=>{ag(t,r.payload)}).addCase($o,(t,r)=>{ag(t,r.payload)}).addCase(Tn,(t,r)=>{LA(t,r.payload)}).addCase(On,(t,r)=>{BA(t,r.payload)}).addCase(Qs,t=>{t.analytics.enabled=!1}).addCase(Ls,t=>{t.analytics.enabled=!0}));function ag(e,t){(0,Wr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Wr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function LA(e,t){(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function BA(e,t){(0,Wr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Wr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Wr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function qn(e){return e.currency}var ig=(e,t)=>({currency:qn(t.commerceContext),products:UA(t.cart),transaction:e}),sg=(e,t)=>({currency:qn(t.commerceContext),...e}),zo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),UA=Q(zo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Ut=require("@coveo/bueno");var yd={productId:D,quantity:new Ut.NumberValue({required:!0,min:0}),name:new Ut.StringValue({required:!1}),price:new Ut.NumberValue({required:!1,min:0})},Sd=new Ut.ArrayValue({each:new Ut.RecordValue({values:{...yd}})}),hd={items:Sd},cg=new Ut.Schema(hd);var Kr=g("commerce/cart/setItems",e=>F(e,Sd)),Dn=g("commerce/cart/updateItemQuantity",e=>F(e,yd)),kn=g("commerce/cart/purchase"),Bs=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=ig(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Us=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=sg(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function ug(e,t){return e.cart[Wo(t)]}var lg=Q(zo,e=>e.reduce((t,r)=>t+r.quantity,0)),dg=Q(zo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function mg(e,t={}){if(!jA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};ct(e,cg,a,"buildCart"),a.items!==void 0&&r(Kr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of zo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bs(l)),r(kn())},updateItemQuantity(l){let d=ug(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Us(c(l,d))),r(Dn(l)))},get state(){let l=n();return{items:zo(l),totalQuantity:lg(l),totalPrice:dg(l)}}}}function Wo(e){return`${e.productId},${e.name},${e.price}`}function jA(e){return e.addReducers({cart:Vn}),!0}var js=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),pg=e=>gg(e.cartItems,e.cart),fg=e=>gg(e.purchasedItems,e.purchased);function gg(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(js(),e=>{e.addCase(Kr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Wo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},js());yg(t,n,o)}).addCase(Dn,(t,{payload:r})=>{let o=Wo(r);if(!(o in t.cart)){_A(r,t);return}if(r.quantity<=0){$A(r,t);return}t.cart[o]=r}).addCase(kn,t=>{zA(t);let{cart:r,cartItems:o}=js();yg(t,o,r)})});function yg(e,t,r){e.cartItems=t,e.cart=r}function _A(e,t){if(e.quantity<=0)return;let r=Wo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function $A(e,t){let r=Wo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function zA(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 Xt=require("@coveo/bueno");var WA=Intl.supportedValuesOf("currency"),KA=new Xt.StringValue({required:!0,emptyAllowed:!1,constrainTo:WA}),Cd={url:D},xd={latitude:new Xt.NumberValue({min:-90,max:90,required:!0}),longitude:new Xt.NumberValue({min:-180,max:180,required:!0})},pi={language:D,country:D,currency:KA,view:new Xt.RecordValue({options:{required:!0},values:Cd}),location:new Xt.RecordValue({options:{required:!1},values:xd})},Sg=new Xt.Schema(pi);var me=g("commerce/context/set",e=>F(e,pi)),fe=g("commerce/context/setView",e=>F(e,Cd)),Nn=g("commerce/context/setLocation",e=>F(e,xd));var hg=()=>({language:"",country:"",currency:"",view:{url:""}});var Zt=j(hg(),e=>{e.addCase(me,(t,{payload:r})=>r).addCase(fe,(t,{payload:r})=>{t.view=r}).addCase(Nn,(t,{payload:r})=>{t.location=r})});var _s=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Jo=require("@coveo/bueno");var vt=g("breadcrumb/deselectAll"),Gr=g("breadcrumb/deselectAllNonBreadcrumbs");var Hr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${zr}`));var Yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??xs(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:pg(e.cart),source:Hr(e.configuration.analytics)}}};var jt=require("@coveo/bueno");var er=require("@coveo/bueno"),bt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(bt||{}),Mn=(r=>(r.Ascending="asc",r.Descending="desc",r))(Mn||{}),wr=()=>({by:"relevance"});var dM=new er.RecordValue({options:{required:!1},values:{by:new er.EnumValue({enum:bt,required:!0}),fields:new er.ArrayValue({each:new er.RecordValue({values:{name:new er.StringValue,direction:new er.EnumValue({enum:Mn})}})})}});var Rd=e=>({by:"fields",fields:e}),Cg=new jt.RecordValue({options:{required:!1},values:{by:new jt.EnumValue({enum:bt,required:!0}),fields:new jt.ArrayValue({each:new jt.RecordValue({values:{field:new jt.StringValue({required:!0}),direction:new jt.EnumValue({enum:Mn}),displayName:new jt.StringValue}})})}});var $s=(e,t,r)=>({...Yr(e,t),...GA(e,r)}),GA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var wt=(e,t)=>({...$s(e,t),facets:[...HA(e)],...e.commerceSort&&{sort:YA(e.commerceSort.appliedSort)}});function HA(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 YA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Qn=require("@coveo/bueno");var Ko=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new Qn.NumberValue({required:!0,min:1})})),Go=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new Qn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),Ue=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ho=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new Qn.BooleanValue({required:!0})})),Ln=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new Qn.BooleanValue({required:!0})}));var Fd=require("@coveo/bueno");var zs={slotId:Yf},JA={...zs,pageSize:new Fd.NumberValue({required:!0,min:0})},Er=g("commerce/pagination/setPageSize",e=>F(e,JA)),XA={...zs,page:new Fd.NumberValue({required:!0,min:0})},tr=g("commerce/pagination/selectPage",e=>F(e,XA)),Jr=g("commerce/pagination/nextPage",e=>F(e,zs)),Xr=g("commerce/pagination/previousPage",e=>F(e,zs)),Bn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var Zr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Ws=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),eo=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ks=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),xg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Rg=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Rg.StringValue}));var wd=require("@coveo/bueno");var Hs=require("@coveo/bueno");var to=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Hs.StringValue({emptyAllowed:!0,required:!0})})),Un=g("commerce/triggers/query/applyModification",e=>F(e,new Hs.RecordValue({values:{originalQuery:ae,modification:ae}})));var vd=require("@coveo/bueno");function Pd(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Ad(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function rr(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function or(e){let{activeValue:t,ancestryMap:r}=ZA(e);return t?ev(t,r):[]}function ZA(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 ev(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Fg(){return{principal:ro(),recommendations:{}}}function ro(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function Yo(){return{appliedSort:wr(),availableSorts:[wr()]}}function Ys(e){return{...tv(e?.commercePagination,t=>t.principal.page,ro().page),...rv(e?.commercePagination,t=>t.principal.perPage,ro().perPage),...Ad(e?.commerceSort,t=>t.appliedSort,Yo().appliedSort),...rr(e.commerceFacetSet,oo(e,"regular"),ov,"f"),...rr(e.commerceFacetSet,oo(e,"regular"),nv,"fExcluded"),...rr(e.commerceFacetSet,oo(e,"location"),av,"lf"),...rr(e.commerceFacetSet,oo(e,"hierarchical"),iv,"cf"),...rr(e.commerceFacetSet,oo(e,"dateRange"),Pg,"df"),...rr(e.commerceFacetSet,oo(e,"dateRange"),Ag,"dfExcluded"),...rr(e.commerceFacetSet,oo(e,"numericalRange"),Pg,"nf"),...rr(e.commerceFacetSet,oo(e,"numericalRange"),Ag,"nfExcluded"),...vg("selected",e.manualNumericFacetSet),...vg("excluded",e.manualNumericFacetSet)}}function tv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function rv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function ov(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function nv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Pg(e){return e.values.filter(t=>t.state==="selected")}function Ag(e){return e.values.filter(t=>t.state==="excluded")}function vg(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 iv(e){return or(e.values).map(r=>r.value)}function oo(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Js=()=>({query:""});var a0=Q(e=>e[U].commerceSearch.responseId,e=>e),bd=Q(e=>e.commerceSearch.responseId,e=>e),bg=Q(e=>e.commerceSearch.requestId,e=>e),fi=Q(e=>e.commerceSearch?.products.length||0,e=>e),wg=Q(e=>({total:eo(e),current:fi(e)}),({current:e,total:t})=>e<t),Eg=Q(e=>e.commerceSearch?.isLoading,e=>(0,vd.isNullOrUndefined)(e)?!1:e),Ig=Q(e=>e.commerceSearch?.error,e=>e??null),Xs=Q(e=>e.commerceQuery?.query,e=>e??""),sv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Tg=(e,t)=>(0,vd.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?Xs(e):t.queryCorrection.correctedQuery,Og=e=>({...Pd(e?.commerceQuery,t=>t.query,Js().query),...Ys(e)});function qg(e){return{query:sv(e)||""}}var gi=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 Be(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,wd.isNullOrUndefined)(n)&&!(0,wd.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Tg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(to({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Be(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Un({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...wt(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 Be(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Re({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=wt(o,n),i=Xs(o),s=new gi(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),no=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!wg(o))return null;let i=Zr(o),u=fi(o)/i,c=Xs(o),l=wt(o,n),d=new gi(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),jn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Jo.StringValue,clearFilters:new Jo.BooleanValue}),e.clearFilters&&(r(xe()),r(Gr())),r(Ln({allow:!0})),r(Re({query:e.query})),r(tr({page:0}))}),_n=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Yr(n,i),query:s});return Be(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),cv={child:new Jo.RecordValue({options:{required:!0},values:{permanentid:new Jo.StringValue({required:!0})}})},$n=g("commerce/search/promoteChildToParent",e=>F(e,cv));function Dg(){return{wasCorrectedTo:"",queryCorrection:_s(),originalQuery:""}}var Zs=j(Dg(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=_s(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var ye=require("@coveo/bueno");var H=D;var nr=require("@coveo/bueno");var uv={state:new nr.Value({required:!0}),numberOfResults:new nr.NumberValue({required:!0,min:0}),value:new nr.StringValue({required:!0,emptyAllowed:!0}),path:new nr.ArrayValue({required:!0,each:D}),moreValuesAvailable:new nr.BooleanValue({required:!1})};function yi(e){e.children.forEach(t=>{yi(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},uv)}var zn={facetId:H,field:D,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:D}),filterByBasePath:new ye.BooleanValue({required:!1})},Wn=5,kg=g("categoryFacet/register",e=>F(e,zn)),Vg=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,D),yi(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ye(t)}}}),Ng=g("categoryFacet/deselectAll",e=>F(e,zn.facetId)),K0=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:zn.facetId,numberOfValues:zn.numberOfValues})),G0=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:zn.facetId,criterion:new ye.Value})),H0=g("categoryFacet/updateBasePath",e=>F(e,{facetId:zn.facetId,basePath:new ye.ArrayValue({each:D})}));var Gn=require("@coveo/bueno");var Kn=require("@coveo/bueno");var Si={facetId:H,captions:new Kn.RecordValue({options:{required:!1}}),numberOfValues:new Kn.NumberValue({required:!1,min:1}),query:new Kn.StringValue({required:!1,emptyAllowed:!0})};var lv={path:new Gn.ArrayValue({required:!0,each:D}),displayValue:Ce,rawValue:Ce,count:new Gn.NumberValue({required:!0,min:0})},ar=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Gn.RecordValue({values:lv})})),ec=g("categoryFacetSearch/register",e=>F(e,Si));var tc=require("@coveo/bueno");var Mg={facetId:H,value:new tc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new tc.NumberValue({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Si)),ao=g("facetSearch/update",e=>F(e,Si)),St=g("facetSearch/toggleSelectValue",e=>F(e,Mg)),_t=g("facetSearch/toggleExcludeValue",e=>F(e,Mg));var Qg=require("@coveo/bueno");var Ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Qg.BooleanValue({required:!1})})),Ed=g("facetOptions/facet/enable",e=>F(e,H)),Tr=g("facetOptions/facet/disable",e=>F(e,H));var dv=g("history/undo"),mv=g("history/redo"),ir=g("history/snapshot"),fQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(Ee())}),gQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(Ee())}),Ee=_("history/change",async(e,{getState:t})=>t().history.present);var Se=require("@coveo/bueno"),oc={q:new Se.StringValue,enableQuerySyntax:new Se.BooleanValue,aq:new Se.StringValue,cq:new Se.StringValue,firstResult:new Se.NumberValue({min:0}),numberOfResults:new Se.NumberValue({min:0}),sortCriteria:new Se.StringValue,f:new Se.RecordValue,fExcluded:new Se.RecordValue,cf:new Se.RecordValue,nf:new Se.RecordValue,mnf:new Se.RecordValue,df:new Se.RecordValue,debug:new Se.BooleanValue,sf:new Se.RecordValue,tab:new Se.StringValue,af:new Se.RecordValue};var Me=g("searchParameters/restore",e=>F(e,oc)),pv=g("searchParameters/restoreTab",e=>F(e,D));var Co=require("@coveo/bueno");function Or(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Od(){return typeof window<"u"}function $d(){return typeof navigator<"u"}function Hn(){return typeof document<"u"}function qd(){try{return typeof localStorage<"u"}catch{return!1}}function fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Xg(){return $d()&&navigator.cookieEnabled}var gv=[ee.click,ee.custom,ee.search,ee.view],yv=(e,t)=>gv.indexOf(e)!==-1?Object.assign({language:Hn()?document.documentElement.lang:"unknown",userAgent:$d()?navigator.userAgent:"unknown"},t):t,xi=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Lg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Lg(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 Lg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Sv(){return qd()?localStorage:Xg()?new Ri:fv()?sessionStorage:new Jn}var Ri=class e{getItem(t){return xi.get(`${e.prefix}${t}`)}removeItem(t){xi.erase(`${e.prefix}${t}`)}setItem(t,r,o){xi.set(`${e.prefix}${t}`,r,o)}};Ri.prefix="coveo_";var Dd=class{constructor(){this.cookieStorage=new Ri}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)}},Jn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hi="__coveo.analytics.history",Zg=20,ey=1e3*60,ty=75,Xn=class{constructor(t){this.store=t||Sv()}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(hi);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(hi);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hi,JSON.stringify(t.slice(0,Zg)))}catch{}}clear(){try{this.store.removeItem(hi)}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,ty)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ey:!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))}},ry=Object.freeze({__proto__:null,HistoryStore:Xn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Zg,MAX_VALUE_SIZE:ty,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ey,STORE_KEY:hi,default:Xn}),hv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Cv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Cv=e=>w(void 0,void 0,void 0,function*(){let t=new Xn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,xv=new Uint8Array(16);function Rv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(xv)}var Fv=/^(?:[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 ic(e){return typeof e=="string"&&Fv.test(e)}var Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function oy(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}function Pv(e){if(!ic(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 Av(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var vv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=Av(n)),typeof a=="string"&&(a=Pv(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return oy(c)}try{o.name=e}catch{}return o.DNS=vv,o.URL=bv,o}var Ev=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bg={randomUUID:Ev};function Xo(e,t,r){if(Bg.randomUUID&&!t&&!e)return Bg.randomUUID();e=e||{};let o=e.random||(e.rng||Rv)();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 oy(o)}function Iv(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 Id(e,t){return e<<t|e>>>32-t}function Tv(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let s=0;s<i.length;++s)e.push(i.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=s}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Id(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Id(u,5)+Iv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Id(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Ov=wv("v5",80,Tv),Ug=Ov,ny="2.30.45",jg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ci={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=Xo}){this.client=t,this.uuidGenerator=r}},kd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=jg(window.location),this.lastReferrer=Hn()?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:Hn()?document.title:"",encoding:Hn()?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===Ci.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ci.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ci.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ci.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 jg(window.location)}},io=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};io.cvo_cid="cvo_cid";io.expirationTime=120;var Vd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){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(io.cvo_cid,new io(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Vd.Id="link";var It=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Td=128,ay=192,_g=224,$g=240;function qv(e){return(e&248)===$g?4:(e&$g)===_g?3:(e&_g)===ay?2:1}function Dv(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&Td)!=Td)break;if(r-=3,(o&ay)!=Td){t-r>=qv(o)*3&&(r=t);break}}return e.substring(0,r)}var Nd={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"},kv=It(Nd).map(e=>Nd[e]),Vv=[...kv].join("|"),Nv=new RegExp(`^(${Vv}$)`),Mv={svcAction:"svc_action",svcActionData:"svc_action_data"},Qv=e=>It(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Nd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Lv=e=>Nv.test(e),Bv=[Lv],zg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Wg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},je={action:"pa",list:"pal",listSource:"pls"},cc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Uv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Md={id:"quoteId",affiliation:"quoteAffiliation"},Qd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},jv={add:je,bookmark_add:je,bookmark_remove:je,click:je,checkout:je,checkout_option:je,detail:je,impression:je,remove:je,refund:Object.assign(Object.assign({},je),cc),purchase:Object.assign(Object.assign({},je),cc),quickview:je,quote:Object.assign(Object.assign({},je),Md),review:Object.assign(Object.assign({},je),Qd)},_v=It(zg).map(e=>zg[e]),$v=It(Wg).map(e=>Wg[e]),zv=It(je).map(e=>je[e]),Wv=It(cc).map(e=>cc[e]),Kv=It(Qd).map(e=>Qd[e]),Gv=It(Md).map(e=>Md[e]),Hv=[..._v,"custom"].join("|"),Yv=[...$v,"custom"].join("|"),iy="(pr[0-9]+)",sy="(il[0-9]+pi[0-9]+)",Jv=new RegExp(`^${iy}(${Hv})$`),Xv=new RegExp(`^(${sy}(${Yv}))|(il[0-9]+nm)$`),Zv=new RegExp(`^(${zv.join("|")})$`),eb=new RegExp(`^(${Wv.join("|")})$`),tb=new RegExp(`^${iy}custom$`),rb=new RegExp(`^${sy}custom$`),ob=new RegExp(`^(${[...Uv,...Kv,...Gv].join("|")})$`),nb=e=>Jv.test(e),ab=e=>Xv.test(e),ib=e=>Zv.test(e),sb=e=>eb.test(e),cb=e=>ob.test(e),ub=[ab,nb,ib,sb,cb],lb=[tb,rb],db={anonymizeIp:"aip"},mb={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},pb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},fb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],gb=Object.assign(Object.assign(Object.assign(Object.assign({},db),mb),pb),fb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ld=Object.assign(Object.assign({},gb),Mv),yb=e=>{let t=!!e.action&&jv[e.action]||{};return It(e).reduce((r,o)=>{let n=t[o]||Ld[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},Sb=It(Ld).map(e=>Ld[e]),hb=e=>Sb.indexOf(e)!==-1,Cb=e=>e==="custom",xb=e=>[...ub,...Bv,hb,Cb].some(t=>t(e)),Rb=e=>It(e).reduce((t,r)=>{let o=Fb(r);return o?Object.assign(Object.assign({},t),Pb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Fb=e=>{let t;return[...lb].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Pb=(e,t)=>It(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bd=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Ud=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()})}},Kg=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():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=Or(u,["url"]),d;try{d=yield Kg(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Kg(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"})}},jd=class{constructor(t,r){qd()&&Xg()?this.storage=new Dd:qd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Jn),this.client=new uc(t),this.beaconClient=new Bd(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}},_d=class{constructor(t,r){this.storage=r||new Jn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new Jn,this.client=new Ud}getClientDependingOnEventType(t){return this.client}},Ab="xx",vb=e=>e?.startsWith(Ab)||!1,bb=`
|
|
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
|
|
@@ -8921,7 +8921,7 @@ var setSearchHub = createAction(
|
|
|
8921
8921
|
);
|
|
8922
8922
|
|
|
8923
8923
|
// src/utils/version.ts
|
|
8924
|
-
var VERSION = "3.
|
|
8924
|
+
var VERSION = "3.23.0";
|
|
8925
8925
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
8926
8926
|
|
|
8927
8927
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -4515,7 +4515,7 @@ var setSearchHub = createAction(
|
|
|
4515
4515
|
);
|
|
4516
4516
|
|
|
4517
4517
|
// src/utils/version.ts
|
|
4518
|
-
var VERSION = "3.
|
|
4518
|
+
var VERSION = "3.23.0";
|
|
4519
4519
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
4520
4520
|
|
|
4521
4521
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -9293,7 +9293,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
9293
9293
|
};
|
|
9294
9294
|
|
|
9295
9295
|
// src/utils/version.ts
|
|
9296
|
-
var VERSION = "3.
|
|
9296
|
+
var VERSION = "3.23.0";
|
|
9297
9297
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
9298
9298
|
|
|
9299
9299
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -4847,7 +4847,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
4847
4847
|
};
|
|
4848
4848
|
|
|
4849
4849
|
// src/utils/version.ts
|
|
4850
|
-
var VERSION = "3.
|
|
4850
|
+
var VERSION = "3.23.0";
|
|
4851
4851
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
4852
4852
|
|
|
4853
4853
|
// src/features/configuration/configuration-actions.ts
|
package/dist/headless.cjs
CHANGED
|
@@ -9816,7 +9816,7 @@ function createRelay(initialConfig) {
|
|
|
9816
9816
|
}
|
|
9817
9817
|
|
|
9818
9818
|
// src/utils/version.ts
|
|
9819
|
-
var VERSION = "3.
|
|
9819
|
+
var VERSION = "3.23.0";
|
|
9820
9820
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
9821
9821
|
|
|
9822
9822
|
// src/api/analytics/analytics-selectors.ts
|
package/dist/headless.esm.js
CHANGED
|
@@ -5308,7 +5308,7 @@ function createRelay(initialConfig) {
|
|
|
5308
5308
|
}
|
|
5309
5309
|
|
|
5310
5310
|
// src/utils/version.ts
|
|
5311
|
-
var VERSION = "3.
|
|
5311
|
+
var VERSION = "3.23.0";
|
|
5312
5312
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
5313
5313
|
|
|
5314
5314
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -9723,7 +9723,7 @@ function createRelay(initialConfig) {
|
|
|
9723
9723
|
}
|
|
9724
9724
|
|
|
9725
9725
|
// src/utils/version.ts
|
|
9726
|
-
var VERSION = "3.
|
|
9726
|
+
var VERSION = "3.23.0";
|
|
9727
9727
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
9728
9728
|
|
|
9729
9729
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -5274,7 +5274,7 @@ function createRelay(initialConfig) {
|
|
|
5274
5274
|
}
|
|
5275
5275
|
|
|
5276
5276
|
// src/utils/version.ts
|
|
5277
|
-
var VERSION = "3.
|
|
5277
|
+
var VERSION = "3.23.0";
|
|
5278
5278
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
5279
5279
|
|
|
5280
5280
|
// src/api/analytics/analytics-selectors.ts
|