@coveo/headless 3.23.2-pre.d35ebef42a → 3.23.2-pre.e3734b4a39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  var FR=Object.create;var Ci=Object.defineProperty;var PR=Object.getOwnPropertyDescriptor;var vR=Object.getOwnPropertyNames;var AR=Object.getPrototypeOf,bR=Object.prototype.hasOwnProperty;var IR=(e,t,r)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qm=(e,t)=>{for(var r in t)Ci(e,r,{get:t[r],enumerable:!0})},wR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of vR(t))!bR.call(e,n)&&n!==r&&Ci(e,n,{get:()=>t[n],enumerable:!(o=PR(t,n))||o.enumerable});return e};var Pt=(e,t,r)=>(r=e!=null?FR(AR(e)):{},wR(t||!e||!e.__esModule?Ci(r,"default",{value:e,enumerable:!0}):r,e));var Be=(e,t,r)=>IR(e,typeof t!="symbol"?t+"":t,r);var Kp=Fe(Ra=>{"use strict";var Ui=Ra&&Ra.__assign||function(){return Ui=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},Ui.apply(this,arguments)};Object.defineProperty(Ra,"__esModule",{value:!0});var DF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function NF(e){var t=Ui(Ui({},DF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ra.getSanitizedOptions=NF});var Gp=Fe(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});function MF(e){var t=Math.random()*e;return Math.round(t)}Wu.fullJitter=MF});var Hp=Fe(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});function QF(e){return e}Ku.noJitter=QF});var Yp=Fe(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var LF=Gp(),UF=Hp();function BF(e){switch(e.jitter){case"full":return LF.fullJitter;case"none":default:return UF.noJitter}}Gu.JitterFactory=BF});var Yu=Fe(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var jF=Yp(),_F=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=jF.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}();Hu.Delay=_F});var Jp=Fe(Yt=>{"use strict";var $F=Yt&&Yt.__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)}}(),zF=Yt&&Yt.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},WF=Yt&&Yt.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Yt,"__esModule",{value:!0});var KF=Yu(),GF=function(e){$F(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return zF(this,void 0,void 0,function(){return WF(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}(KF.Delay);Yt.SkipFirstDelay=GF});var Xp=Fe(Fa=>{"use strict";var HF=Fa&&Fa.__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(Fa,"__esModule",{value:!0});var YF=Yu(),JF=function(e){HF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(YF.Delay);Fa.AlwaysDelay=JF});var Zp=Fe(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var XF=Jp(),ZF=Xp();function eP(e,t){var r=tP(e);return r.setAttemptNumber(t),r}Ju.DelayFactory=eP;function tP(e){return e.delayFirstAttempt?new ZF.AlwaysDelay(e):new XF.SkipFirstDelay(e)}});var ef=Fe(oo=>{"use strict";var Xu=oo&&oo.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},Zu=oo&&oo.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(oo,"__esModule",{value:!0});var rP=Kp(),oP=Zp();function nP(e,t){return t===void 0&&(t={}),Xu(this,void 0,void 0,function(){var r,o;return Zu(this,function(n){switch(n.label){case 0:return r=rP.getSanitizedOptions(t),o=new aP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}oo.backOff=nP;var aP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Xu(this,void 0,void 0,function(){var t,r;return Zu(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 Xu(this,void 0,void 0,function(){var t;return Zu(this,function(r){switch(r.label){case 0:return t=oP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Ic=Fe(($l,zl)=>{"use strict";(function(e,t){typeof $l=="object"&&typeof zl<"u"?zl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})($l,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",c="day",u="week",s="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var q=["th","st","nd","rd"],O=D%100;return"["+D+(q[(O-20)%10]||q[O]||q[0])+"]"}},h=function(D,q,O){var N=String(D);return!N||N.length>=q?D:""+Array(q+1-N.length).join(O)+D},v={s:h,z:function(D){var q=-D.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),V=O%60;return(q<=0?"+":"-")+h(N,2,"0")+":"+h(V,2,"0")},m:function D(q,O){if(q.date()<O.date())return-D(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),V=q.clone().add(N,s),L=O-V<0,U=q.clone().add(N+(L?-1:1),s);return+(-(N+(O-V)/(L?V-U:U-V))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},y="en",x={};x[y]=C;var E="$isDayjsObject",A=function(D){return D instanceof T||!(!D||!D[E])},R=function D(q,O,N){var V;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(V=L),O&&(x[L]=O,V=L);var U=q.split("-");if(!V&&U.length>1)return D(U[0])}else{var z=q.name;x[z]=q,V=z}return!N&&V&&(y=V),V||!N&&y},P=function(D,q){if(A(D))return D.clone();var O=typeof q=="object"?q:{};return O.date=D,O.args=arguments,new T(O)},b=v;b.l=R,b.i=A,b.w=function(D,q){return P(D,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function D(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var q=D.prototype;return q.parse=function(O){this.$d=function(N){var V=N.date,L=N.utc;if(V===null)return new Date(NaN);if(b.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var U=V.match(f);if(U){var z=U[2]-1||0,J=(U[7]||"0").substring(0,3);return L?new Date(Date.UTC(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)):new Date(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)}}return new Date(V)}(O),this.init()},q.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var V=P(O);return this.startOf(N)<=V&&V<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,V){return b.u(O)?this[N]:this.set(V,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var V=this,L=!!b.u(N)||N,U=b.p(O),z=function(re,ce){var de=b.w(V.$u?Date.UTC(V.$y,ce,re):new Date(V.$y,ce,re),V);return L?de:de.endOf(c)},J=function(re,ce){return b.w(V.toDate()[re].apply(V.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ce)),V)},te=this.$W,G=this.$M,X=this.$D,K="set"+(this.$u?"UTC":"");switch(U){case d:return L?z(1,0):z(31,11);case s:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,ue=(te<Z?te+7:te)-Z;return z(L?X-ue:X+(6-ue),G);case c:case p:return J(K+"Hours",0);case i:return J(K+"Minutes",1);case a:return J(K+"Seconds",2);case n:return J(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var V,L=b.p(O),U="set"+(this.$u?"UTC":""),z=(V={},V[c]=U+"Date",V[p]=U+"Date",V[s]=U+"Month",V[d]=U+"FullYear",V[i]=U+"Hours",V[a]=U+"Minutes",V[n]=U+"Seconds",V[o]=U+"Milliseconds",V)[L],J=L===c?this.$D+(N-this.$W):N;if(L===s||L===d){var te=this.clone().set(p,1);te.$d[z](J),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](J);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var V,L=this;O=Number(O);var U=b.p(N),z=function(G){var X=P(L);return b.w(X.date(X.date()+Math.round(G*O)),L)};if(U===s)return this.set(s,this.$M+O);if(U===d)return this.set(d,this.$y+O);if(U===c)return z(1);if(U===u)return z(7);var J=(V={},V[a]=t,V[i]=r,V[n]=e,V)[U]||1,te=this.$d.getTime()+O*J;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),z=this.$H,J=this.$m,te=this.$M,G=V.weekdays,X=V.months,K=V.meridiem,Z=function(ce,de,Ue,et){return ce&&(ce[de]||ce(N,L))||Ue[de].slice(0,et)},ue=function(ce){return b.s(z%12||12,ce,"0")},re=K||function(ce,de,Ue){var et=ce<12?"AM":"PM";return Ue?et.toLowerCase():et};return L.replace(S,function(ce,de){return de||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return Z(V.monthsShort,te,X,3);case"MMMM":return Z(X,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(V.weekdaysMin,N.$W,G,2);case"ddd":return Z(V.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(z,J,!0);case"A":return re(z,J,!1);case"m":return String(J);case"mm":return b.s(J,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return U}return null}(ce)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,V){var L,U=this,z=b.p(N),J=P(O),te=(J.utcOffset()-this.utcOffset())*t,G=this-J,X=function(){return b.m(U,J)};switch(z){case d:L=X()/12;break;case s:L=X();break;case l:L=X()/3;break;case u:L=(G-te)/6048e5;break;case c:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return V?L:b.a(L)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var V=this.clone(),L=R(O,N,!0);return L&&(V.$L=L),V},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},D}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(D){M[D[1]]=function(q){return this.$g(q,D[0],D[1])}}),P.extend=function(D,q){return D.$i||(D(q,T,P),D.$i=!0),P},P.locale=R,P.isDayjs=A,P.unix=function(D){return P(1e3*D)},P.en=x[y],P.Ls=x,P.p={},P})});var Yg=Fe((Wl,Kl)=>{"use strict";(function(e,t){typeof Wl=="object"&&typeof Kl<"u"?Kl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Wl,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var a=n.add;n.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):a.bind(this)(c,u)};var i=n.startOf;n.startOf=function(c,u){var s=this.$utils(),l=!!s.u(u)||u;if(s.p(c)===t){var d=this.quarter()-1;return l?this.month(3*d).startOf(e).startOf("day"):this.month(3*d+2).endOf(e).endOf("day")}return i.bind(this)(c,u)}}})});var Jg=Fe((Gl,Hl)=>{"use strict";(function(e,t){typeof Gl=="object"&&typeof Hl<"u"?Hl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Gl,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},c=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(S){this[f]=+S}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var C=S.match(/([+-]|\d\d)/g),h=60*C[1]+(+C[2]||0);return h===0?0:C[0]==="+"?-h:h}(f)}],l=function(f){var S=i[f];return S&&(S.indexOf?S:S.s.concat(S.f))},d=function(f,S){var C,h=i.meridiem;if(h){for(var v=1;v<=24;v+=1)if(f.indexOf(h(v,0,S))>-1){C=v>12;break}}else C=f===(S?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var S=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],S)for(var h=1;h<=31;h+=1)S(h).replace(/\[|\]/g,"")===f&&(this.day=h)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var S=l("months"),C=(l("monthsShort")||S.map(function(h){return h.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var S=l("months").indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=c(f)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function m(f){var S,C;S=f,C=i&&i.formats;for(var h=(f=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,q,O){return q||O.slice(1)})})).match(t),v=h.length,y=0;y<v;y+=1){var x=h[y],E=p[x],A=E&&E[0],R=E&&E[1];h[y]=R?{regex:A,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<v;T+=1){var D=h[T];if(typeof D=="string")M+=D.length;else{var q=D.regex,O=D.parser,N=P.slice(M),V=q.exec(N)[0];O.call(b,V),P=P.replace(V,"")}}return function(L){var U=L.afternoon;if(U!==void 0){var z=L.hours;U?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,S,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var h=S.prototype,v=h.parse;h.parse=function(y){var x=y.date,E=y.utc,A=y.args;this.$u=E;var R=A[1];if(typeof R=="string"){var P=A[2]===!0,b=A[3]===!0,T=P||b,M=A[2];b&&(M=A[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,V,L,U){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*N);var z=m(V)(N),J=z.year,te=z.month,G=z.day,X=z.hours,K=z.minutes,Z=z.seconds,ue=z.milliseconds,re=z.zone,ce=z.week,de=new Date,Ue=G||(J||te?1:de.getDate()),et=J||de.getFullYear(),sr=0;J&&!te||(sr=te>0?te-1:de.getMonth());var To,Oo=X||0,na=K||0,Ru=Z||0,Fu=ue||0;return re?new Date(Date.UTC(et,sr,Ue,Oo,na,Ru,Fu+60*re.offset*1e3)):L?new Date(Date.UTC(et,sr,Ue,Oo,na,Ru,Fu)):(To=new Date(et,sr,Ue,Oo,na,Ru,Fu),ce&&(To=U(To).week(ce).toDate()),To)}catch{return new Date("")}}(x,R,E,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var D=R.length,q=1;q<=D;q+=1){A[1]=R[q-1];var O=C.apply(this,A);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===D&&(this.$d=new Date(""))}else v.call(this,y)}}})});var GS=Fe((i4,KS)=>{"use strict";var TE=/(^|; )Coveo-Pendragon=([^;]*)/;KS.exports=()=>TE.exec(document.cookie)?.pop()||null});var HS=Fe((Yd,Jd)=>{"use strict";(function(e,t){typeof Yd=="object"&&typeof Jd<"u"?Jd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Yd,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(S,C){C===void 0&&(C={});var h=C.timeZoneName||"short",v=S+"|"+h,y=t[v];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[v]=y),y}(d,p);return f.formatToParts(m)},c=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var S=p[f],C=S.type,h=S.value,v=e[C];v>=0&&(m[v]=parseInt(h,10))}var y=m[3],x=y===24?0:y,E=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(E).valueOf()-(A-=A%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),S=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(S))/1e3/60),h=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(h))p=this.utcOffset(0,d);else if(p=n(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),d){var v=p.utcOffset();p=p.add(m-v,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var s=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return s.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,S=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,E,A){var R=x-60*E*1e3,P=c(R,A);if(E===P)return[R,E];var b=c(R-=60*(P-E)*1e3,A);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),S,f),h=C[0],v=C[1],y=n(h).utcOffset(v);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var YS=Fe((Xd,Zd)=>{"use strict";(function(e,t){typeof Xd=="object"&&typeof Zd<"u"?Zd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Xd,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=i.utcOffset;i.utcOffset=function(m,f){var S=this.$utils().u;if(S(m))return this.$u?0:S(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var E=(""+x[0]).match(r)||["-",0,0],A=E[0],R=60*+E[1]+ +E[2];return R===0?0:A==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,h=this;if(f)return h.$offset=C,h.$u=m===0,h;if(m!==0){var v=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(C+v,e)).$offset=C,h.$x.$localOffset=v}else h=this.utc();return h};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,S){if(m&&this.$u===m.$u)return p.call(this,m,f,S);var C=this.local(),h=a(m).local();return p.call(C,h,f,S)}}})});var uC=Fe((y6,sC)=>{"use strict";function UE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}sC.exports=BE;function BE(e,t,r){var o=r&&r.stringify||UE,n=1;if(typeof e=="object"&&e!==null){var a=t.length+n;if(a===1)return e;var i=new Array(a);i[0]=o(e);for(var c=1;c<a;c++)i[c]=o(t[c]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",l=1-n,d=-1,p=e&&e.length||0,m=0;m<p;){if(e.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Math.floor(Number(t[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<m&&(s+=e.slice(d,m));var f=typeof t[l];if(f==="string"){s+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){s+=t[l].name||"<anonymous>",d=m+2,m++;break}s+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(s+=e.slice(d,m)),s+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(s+=e.slice(d,m)),s+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(s+=e.slice(d)),s)}});var gC=Fe((h6,js)=>{"use strict";var lC=uC();js.exports=cr;var ui=rT().console||{},jE={mapHttpRequest:Bs,mapHttpResponse:Bs,wrapRequestSerializer:rm,wrapResponseSerializer:rm,wrapErrorSerializer:rm,req:Bs,res:Bs,err:mC,errWithCause:mC};function zr(e,t){return e==="silent"?1/0:t.levels.values[e]}var am=Symbol("pino.logFuncs"),om=Symbol("pino.hierarchy"),_E={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function dC(e,t){let r={logger:t,parent:e[om]};t[om]=r}function $E(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ui[n]||ui[_E[n]||"log"]||_n}),e[am]=o}function zE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function cr(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||ui;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=zE(e.browser.serialize,o),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&c.forEach(function(S){r[S]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=_n),$E(s,c,r),dC({},s),Object.defineProperty(s,"levelVal",{get:d}),Object.defineProperty(s,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:ZE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||_n};s.levels=WE(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=_n,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...S){return f.call(this,l,...S)},t&&(s._logEvent=nm());function d(){return zr(this.level,this)}function p(){return this._level}function m(S){if(S!=="silent"&&!this.levels.values[S])throw Error("unknown level "+S);this._level=S,Fo(this,l,s,"error"),Fo(this,l,s,"fatal"),Fo(this,l,s,"warn"),Fo(this,l,s,"info"),Fo(this,l,s,"debug"),Fo(this,l,s,"trace"),i.forEach(C=>{Fo(this,l,s,C)})}function f(S,C,h){if(!C)throw new Error("missing bindings for child Pino");h=h||{},n&&C.serializers&&(h.serializers=C.serializers);let v=h.serializers;if(n&&v){var y=Object.assign({},o,v),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,im([C],x,y,this._stdErrSerialize)}function E(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=nm([].concat(R._logEvent.bindings,C)))}E.prototype=this;let A=new E(this);return dC(this,A),A.child=function(...R){return f.call(this,S,...R)},A.level=h.level||this.level,S.onChild(A),A}return s}function WE(e){let t=e.customLevels||{},r=Object.assign({},cr.levels.values,t),o=Object.assign({},cr.levels.labels,KE(t));return{values:r,labels:o}}function KE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}cr.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"}};cr.stdSerializers=jE;cr.stdTimeFunctions=Object.assign({},{nullTime:pC,epochTime:fC,unixTime:eT,isoTime:tT});function GE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[om];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Fo(e,t,r,o){if(Object.defineProperty(e,o,{value:zr(e.level,r)>zr(o,r)?_n:r[am][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===_n){if(!t.transmit)return;let a=t.transmit.level||e.level,i=zr(a,r);if(zr(o,r)<i)return}e[o]=YE(e,t,r,o);let n=GE(e);n.length!==0&&(e[o]=HE(n,e[o]))}function HE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function YE(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ui?ui:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(im(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,JE(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=zr(d,r),m=zr(o,r);if(m<p)return;XE(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:zr(e._level,r)},c,l)}}}(e[am][o])}function JE(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},c=r.slice(),u=c[0],s={};if(o&&(s.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(s,p)}else s.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?lC(c.shift(),c):void 0}else typeof u=="string"&&(u=lC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function im(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=cr.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 XE(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;o||im(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return s.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=c,n(i,e._logEvent,u),e._logEvent=nm(s)}function nm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function mC(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 ZE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?pC:fC}function Bs(){return{}}function rm(e){return e}function _n(){}function pC(){return!1}function fC(){return Date.now()}function eT(){return Math.round(Date.now()/1e3)}function tT(){return new Date(Date.now()).toISOString()}function rT(){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)||{}}}js.exports.default=cr;js.exports.pino=cr});var _p={};Qm(_p,{ProductListing:()=>_u,Search:()=>ju});var Lm="coveo-headless-internal-state",B=Symbol.for(Lm),Um=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==B)},get(t,r,o){return typeof r=="symbol"&&r.description===Lm&&r!==B&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
19
- If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as SF}from"@coveo/bueno";function Pe(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 ER=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bm=ER,Pu=()=>Math.random().toString(36).substring(7).split("").join("."),TR={INIT:`@@redux/INIT${Pu()}`,REPLACE:`@@redux/REPLACE${Pu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pu()}`},xi=TR;function vt(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 vu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(vu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:xi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[Bm](){return this}}}return p({type:xi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Bm]:f}}function OR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xi.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:xi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function qo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{OR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function ko(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function jm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=ko(...c)(n.dispatch),{...n,dispatch:a}}}function Ri(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var Vu=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Km(e)||Array.isArray(e)||!!e[aa]||!!e.constructor?.[aa]||la(e)||da(e):!1}var qR=Object.prototype.constructor.toString();function Km(e){if(!e||typeof e!="object")return!1;let t=Hr(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)===qR}function Du(e){return He(e)||ve(15,e),e[je].base_}function ia(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:la(e)?2:da(e)?3:0}function ca(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Au(e,t){return Yr(e)===2?e.get(t):e[t]}function Gm(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function kR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function la(e){return e instanceof Map}function da(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(la(e))return new Map(e);if(da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Km(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function vi(e,t=!1){return Ai(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=VR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>vi(o,!0))),e}function VR(){ve(2)}function Ai(e){return Object.isFrozen(e)}var Eu={};function Jr(e){let t=Eu[e];return t||ve(0,e),t}function DR(e,t){Eu[e]||(Eu[e]=t)}var sa;function Hm(){return sa}function NR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _m(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tu(e){Ou(e),e.drafts_.forEach(MR),e.drafts_=null}function Ou(e){e===sa&&(sa=e.parent_)}function $m(e){return sa=NR(sa,e)}function MR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Tu(t),ve(4)),_e(e)&&(e=Fi(t,e),t.parent_||Pi(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=Fi(t,r,[]),Tu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Vu?e:void 0}function Fi(e,t,r){if(Ai(t))return t;let o=t[je];if(!o)return ia(t,(n,a)=>Wm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Pi(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),ia(a,(c,u)=>Wm(e,o,n,c,u,r,i)),Pi(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Wm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ca(t.assigned_,o)?a.concat(o):void 0,u=Fi(e,n,c);if(Gm(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Ai(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Pi(e,n)}}function Pi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vi(t,r)}function QR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Hm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Nu;r&&(n=[o],a=ua);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Nu={get(e,t){if(t===je)return e;let r=Gr(e);if(!ca(r,t))return LR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===bu(e.base_,t)?(Iu(e),e.copy_[t]=ku(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Ym(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=bu(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kR(r,n)&&(r!==void 0||ca(e.base_,t)))return!0;Iu(e),qu(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 bu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Iu(e),qu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){ve(12)}},ua={};ia(Nu,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)};ua.set=function(e,t,r){return Nu.set.call(this,e[0],t,r,e[0])};function bu(e,t){let r=e[je];return(r?Gr(r):e)[t]}function LR(e,t,r){let o=Ym(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Ym(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function qu(e){e.modified_||(e.modified_=!0,e.parent_&&qu(e.parent_))}function Iu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=$m(this),i=ku(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Tu(a):Ou(a)}return _m(a,o),zm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Vu&&(n=void 0),this.autoFreeze_&&vi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){_e(e)||ve(8),He(e)&&(e=Jm(e));let t=$m(this),r=ku(e,void 0);return r[je].isManual_=!0,Ou(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return _m(o,t),zm(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=Jr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ku(e,t){let r=la(e)?Jr("MapSet").proxyMap_(e,t):da(e)?Jr("MapSet").proxySet_(e,t):QR(e,t);return(t?t.scope_:Hm()).drafts_.push(r),r}function Jm(e){return He(e)||ve(10,e),Xm(e)}function Xm(e){if(!_e(e)||Ai(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wu(e,!0);return ia(r,(o,n)=>{Gm(r,o,Xm(n))}),t&&(t.finalized_=!1),r}function Zm(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;ia(p.assigned_,(v,y)=>{let x=Au(C,v),E=Au(h,v),A=y?ca(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===Vu?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=Au(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(la(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(da(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return ca(p,aa)&&(m[aa]=p[aa]),m}function d(p){return He(p)?l(p):p}DR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new UR,Gt=Ye.produce,bi=Ye.produceWithPatches.bind(Ye),dV=Ye.setAutoFreeze.bind(Ye),mV=Ye.setUseStrictShallowCopy.bind(Ye),Mu=Ye.applyPatches.bind(Ye),pV=Ye.createDraft.bind(Ye),fV=Ye.finishDraft.bind(Ye);function BR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function jR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function _R(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 ep=e=>Array.isArray(e)?e:[e];function $R(e){let t=Array.isArray(e[0])?e[0]:e;return _R(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function zR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var hV=Symbol();var SV=Object.getPrototypeOf({});var WR=class{constructor(e){this.value=e}deref(){return this.value}},KR=typeof WeakRef<"u"?WeakRef:WR,GR=0,tp=1;function Ii(){return{s:GR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=Ii(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let S=f.get(m);S===void 0?(c=Ii(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=Ii(),f.set(m,c)):c=S}}let s=c,l;if(c.s===tp)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new KR(l):l}return s.s=tp,s.v=l,l}return i.clearCache=()=>{r=Ii(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function rp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),BR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Vo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=ep(p),h=ep(f),v=$R(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=zR(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=rp(Vo),HR=Object.assign((e,t=Q)=>{jR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>HR});function op(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var np=op(),ap=op;var YR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ko:ko.apply(null,arguments)},wV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},JR=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ri(o)&&o.type===e,r}var lp=class ma extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ma.prototype)}static get[Symbol.species](){return ma}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ma(...t[0].concat(this)):new ma(...t.concat(this))}};function ip(e){return _e(e)?Gt(e,()=>{}):e}function cp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function XR(e){return typeof e=="boolean"}var ZR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new lp;return r&&(XR(r)?i.push(np):i.push(ap(r.extraArgument))),i},pa="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[pa]:!0}}),sp=e=>t=>{setTimeout(t,e)},eF=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sp(10):e.type==="callback"?e.queueNotification:sp(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[pa],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},tF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new lp(e);return o&&n.push(eF(typeof o=="object"?o:void 0)),n};function dp(e){let t=ZR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(vt(r))c=qo(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=ko;n&&(s=YR({trace:!1,...typeof n=="object"&&n}));let l=jm(...u),d=tF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return vu(c,a,m)}function mp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function rF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=mp(t),a;if(rF(e))a=()=>ip(e());else{let c=ip(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var pp=(e,t)=>JR(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>pp(r,t))}function Do(...e){return t=>e.every(r=>pp(r,t))}function Ei(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 fa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ti(...e){return e.length===0?t=>Ei(t,["pending"]):fa(e)?At(...e.map(t=>t.pending)):Ti()(e[0])}function Xr(...e){return e.length===0?t=>Ei(t,["rejected"]):fa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function ga(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):fa(e)?Do(Xr(...e),t):ga()(e[0])}function Ht(...e){return e.length===0?t=>Ei(t,["fulfilled"]):fa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Oi(...e){return e.length===0?t=>Ei(t,["pending","fulfilled","rejected"]):fa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Oi()(e[0])}var oF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=(e=21)=>{let t="",r=e;for(;r--;)t+=oF[Math.random()*64|0];return t},nF=["name","message","stack","code"],Qu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},up=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},aF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of nF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||aF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):qi(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(cF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Qu(A,R),fulfillWithValue:(A,R)=>new up(A,R)})).then(A=>{if(A instanceof Qu)throw A;return A instanceof up?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Qu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(iF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function iF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fp=Symbol.for("rtk-slice-createasyncthunk"),kV={[fp]:_};function sF(e,t){return`${e}/${t}`}function uF({creators:e}={}){let t=e?.asyncThunk?.[fp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(dF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:sF(n,v),createNotation:typeof o.reducers=="function"};pF(y)?gF(x,y,s,t):mF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?mp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=cp(p,y,()=>new WeakMap);return cp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=lF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function lF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=uF();function dF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function mF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!fF(o))throw new Error(yt(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 pF(e){return e._reducerDefinitionType==="asyncThunk"}function fF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||wi,pending:c||wi,rejected:u||wi,settled:s||wi})}function wi(){}var gp="listener",yp="completed",hp="cancelled",VV=`task-${hp}`,DV=`task-${yp}`,NV=`${gp}-${hp}`,MV=`${gp}-${yp}`;var{assign:Sp}=Object;var Lu="listenerMiddleware";var yF=Sp(g(`${Lu}/add`),{withTypes:()=>yF}),QV=g(`${Lu}/removeAll`),hF=Sp(g(`${Lu}/remove`),{withTypes:()=>hF});var LV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ki=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Vi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Di=Q(e=>e.commercePagination?.principal.page||0,e=>e),Cp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var JV=Q(e=>e[B].productListing.responseId,e=>e),ya=Q(e=>e.productListing.responseId,e=>e),xp=Q(e=>e.productListing.requestId,e=>e),ha=Q(e=>e.productListing?.products.length||0,e=>e),Rp=Q(e=>({total:lr(e),current:ha(e)}),({current:e,total:t})=>e<t),Fp=Q(e=>e.productListing?.isLoading,e=>SF(e)?!1:e),Pp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Vp}from"@coveo/bueno";function Uu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Bu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function It(e){let{activeValue:t,ancestryMap:r}=xF(e);return t?RF(t,r):[]}function xF(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 RF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function vp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as vF,EnumValue as Ip,StringValue as wp,RecordValue as Ep}from"@coveo/bueno";import{ArrayValue as FF,EnumValue as Ap,RecordValue as bp,StringValue as PF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),wt=()=>({by:"relevance"});var rD=new bp({options:{required:!1},values:{by:new Ap({enum:ht,required:!0}),fields:new FF({each:new bp({values:{name:new PF,direction:new Ap({enum:eo})}})})}});var Ni=e=>({by:"fields",fields:e}),Tp=new Ep({options:{required:!1},values:{by:new Ip({enum:ht,required:!0}),fields:new vF({each:new Ep({values:{field:new wp({required:!0}),direction:new Ip({enum:eo}),displayName:new wp}})})}});function to(){return{appliedSort:wt(),availableSorts:[wt()]}}function Mi(e){return{...AF(e?.commercePagination,t=>t.principal.page,dr().page),...bF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Bu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),IF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),wF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),EF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),TF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Op,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),qp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Op,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),qp,"nfExcluded"),...kp("selected",e.manualNumericFacetSet),...kp("excluded",e.manualNumericFacetSet)}}function AF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function bF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function IF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function wF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function EF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Op(e){return e.values.filter(t=>t.state==="selected")}function qp(e){return e.values.filter(t=>t.state==="excluded")}function kp(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 TF(e){return It(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Qi=()=>({query:""});var ID=Q(e=>e[B].commerceSearch.responseId,e=>e),Sa=Q(e=>e.commerceSearch.responseId,e=>e),Dp=Q(e=>e.commerceSearch.requestId,e=>e),Ca=Q(e=>e.commerceSearch?.products.length||0,e=>e),Np=Q(e=>({total:lr(e),current:Ca(e)}),({current:e,total:t})=>e<t),Mp=Q(e=>e.commerceSearch?.isLoading,e=>Vp(e)?!1:e),Qp=Q(e=>e.commerceSearch?.error,e=>e??null),Li=Q(e=>e.commerceQuery?.query,e=>e??""),OF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Lp=(e,t)=>Vp(t.queryCorrection?.correctedQuery)?Li(e):t.queryCorrection.correctedQuery,Up=e=>({...Uu(e?.commerceQuery,t=>t.query,Qi().query),...Mi(e)});function Bp(e){return{query:OF(e)||""}}var ju;(t=>t.responseIdSelector=jp(Sa))(ju||(ju={}));var _u;(t=>t.responseIdSelector=jp(ya))(_u||(_u={}));function jp(e){return t=>e(t[B])}var Wp={};Qm(Wp,{escape:()=>Qo,getHighlightedSuggestion:()=>zu,highlightString:()=>VF});import{isNullOrUndefined as kF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function $p(e){return Array.isArray(e)}function Mo(e){return e.trim()===""}function zp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function xa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function VF(e){if(Mo(e.openingDelimiter)||Mo(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(kF(e.content)||Mo(e.content))return e.content;if(e.highlights.length===0)return Qo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=Qo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Qo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Qo(e.content.slice(o))),r}function zu(e,t){return e=Qo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?$u(o,t.notMatchDelimiters):n?$u(n,t.exactMatchDelimiters):a?$u(a,t.correctionDelimiters):r)}function $u(e,t){return t?t.open+e+t.close:e}function Qo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var nf=Pt(ef(),1);var iP="recommendation-internal-options",BD=Symbol.for(iP);var $=new Error("Failed to load reducers."),Lo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function tf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function rf(e){return typeof e!="object"||!e?!1:Object.values(e).every(cP)}function cP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function of(e){return e===429}var Uo=class e{static async call(t){let r=sP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(of(u.status))throw u;return u};try{let u=await(0,nf.backOff)(c,{retry:s=>{let l=s&&of(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Lo;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=xa(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function el(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function sP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=uP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function uP(e,t){return t==="application/x-www-form-urlencoded"?rf(e)?tf(e):"":JSON.stringify(e)}function lP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function dP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function tl(e,t){if(t&&e.name==="AbortError")return{error:dP(e)};if(e instanceof no)return{error:lP(e)};throw e}var Bo=(e,t)=>({...Pa(e,t),requestParams:mP(e)}),mP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},Pa=(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 af=(e,t)=>({...Pa(e,t),requestParams:pP(e)}),pP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var cf=e=>({...Pa(e,"search/querySuggest"),requestParams:fP(e)}),fP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Te=e=>e.error!==void 0,Bi=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Bo(t,"listing"),...this.options})}async search(t){let r=Bo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...af(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Bo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=cf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Bo(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=Bo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Uo.call(t);if(r instanceof Error)return tl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function rl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var ji=e=>e;import{StringValue as Sf}from"@coveo/bueno";import{Schema as gP,SchemaValidationError as yP,StringValue as va,RecordValue as hP,ArrayValue as SP}from"@coveo/bueno";var k=new va({required:!0,emptyAllowed:!1}),ne=new va({required:!1,emptyAllowed:!1}),me=new va({required:!0,emptyAllowed:!0}),sf=new va({required:!1,emptyAllowed:!0}),uf=new SP({each:k,required:!0}),lf=new va({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new gP({value:t}).validate({value:e}).value};let n=new hP({options:{required:!0},values:t}).validate(e);if(n)throw new yP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return df(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return df(e,t,r,n,"Controller initialization error")},df=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as CP,BooleanValue as pf,RecordValue as xP,StringValue as Aa,Value as RP}from"@coveo/bueno";var jo="3.23.2-pre.d35ebef42a",mf=["@coveo/atomic","@coveo/quantic"];var ol=()=>ne,ff=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Aa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),gf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Aa({required:!1,url:!0}),pipeline:new Aa({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new CP({required:!1,each:k})})),_o={enabled:new pf({default:!0}),originContext:ol(),originLevel2:ol(),originLevel3:ol(),proxyBaseUrl:new Aa({required:!1,url:!0}),runtimeEnvironment:new RP,anonymous:new pf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Aa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new xP({options:{required:!1},values:mf.reduce((e,t)=>(e[t]=lf,e),{})})},nl=g("configuration/updateAnalyticsConfiguration",e=>F(e,_o)),_i=g("configuration/analytics/disable"),$i=g("configuration/analytics/enable"),yf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:ff()})),hf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:ff()}));var $o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Sf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),zo=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Sf({required:!1,url:!0})})),Wo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:_o.enabled,proxyBaseUrl:_o.proxyBaseUrl,source:_o.source,trackingId:_o.trackingId})),zi=g("commerce/configuration/analytics/disable"),Wi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var Cf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var al=j(Cf(),e=>e.addCase($o,(t,r)=>{xf(t,r.payload)}).addCase(ao,(t,r)=>{xf(t,r.payload)}).addCase(zo,(t,r)=>{FP(t,r.payload)}).addCase(Wo,(t,r)=>{PP(t,r.payload)}).addCase(zi,t=>{t.analytics.enabled=!1}).addCase(Wi,t=>{t.analytics.enabled=!0}));function xf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function FP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function PP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Ko(e){return e.currency}var Rf=(e,t)=>({currency:Ko(t.commerceContext),products:vP(t.cart),transaction:e}),Ff=(e,t)=>({currency:Ko(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),vP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as AP,NumberValue as Pf,RecordValue as bP,Schema as IP,StringValue as wP}from"@coveo/bueno";var il={productId:k,quantity:new Pf({required:!0,min:0}),name:new wP({required:!1}),price:new Pf({required:!1,min:0})},cl=new AP({each:new bP({values:{...il}})}),sl={items:cl},vf=new IP(sl);var pr=g("commerce/cart/setItems",e=>F(e,cl)),Go=g("commerce/cart/updateItemQuantity",e=>F(e,il)),Ho=g("commerce/cart/purchase"),Ki=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Rf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Gi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Ff(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function Af(e,t){return e.cart[so(t)]}var bf=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),If=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function EP(e,t={}){if(!TP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,vf,a,"buildCart"),a.items!==void 0&&r(pr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Ki(l)),r(Ho())},updateItemQuantity(l){let d=Af(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Gi(s(l,d))),r(Go(l)))},get state(){let l=n();return{items:co(l),totalQuantity:bf(l),totalPrice:If(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function TP(e){return e.addReducers({cart:Yo}),!0}var Hi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),wf=e=>Tf(e.cartItems,e.cart),Ef=e=>Tf(e.purchasedItems,e.purchased);function Tf(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 Yo=j(Hi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Hi());Of(t,n,o)}).addCase(Go,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){OP(r,t);return}if(r.quantity<=0){qP(r,t);return}t.cart[o]=r}).addCase(Ho,t=>{kP(t);let{cart:r,cartItems:o}=Hi();Of(t,o,r)})});function Of(e,t,r){e.cartItems=t,e.cart=r}function OP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function qP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function kP(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as qf,RecordValue as kf,Schema as VP,StringValue as DP}from"@coveo/bueno";var NP=Intl.supportedValuesOf("currency"),MP=new DP({required:!0,emptyAllowed:!1,constrainTo:NP}),ul={url:k},ll={latitude:new qf({min:-90,max:90,required:!0}),longitude:new qf({min:-180,max:180,required:!0})},ba={language:k,country:k,currency:MP,view:new kf({options:{required:!0},values:ul}),location:new kf({options:{required:!1},values:ll})},Vf=new VP(ba);var se=g("commerce/context/set",e=>F(e,ba)),le=g("commerce/context/setView",e=>F(e,ul)),Jo=g("commerce/context/setLocation",e=>F(e,ll));var Df=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Df(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Jo,(t,{payload:r})=>{t.location=r})});var Yi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as KP,RecordValue as GP,StringValue as Qf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${jo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??rl(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:wf(e.cart),source:gr(e.configuration.analytics)}}};var Ji=(e,t,r)=>({...yr(e,t),...QP(e,r)}),QP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Ji(e,t),facets:[...LP(e)],...e.commerceSort&&{sort:UP(e.commerceSort.appliedSort)}});function LP(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 UP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as dl,NumberValue as BP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new BP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new dl({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),mo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new dl({required:!0})})),Xo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new dl({required:!0})}));import{NumberValue as Nf}from"@coveo/bueno";var Xi={slotId:sf},jP={...Xi,pageSize:new Nf({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,jP)),_P={...Xi,page:new Nf({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,_P)),hr=g("commerce/pagination/nextPage",e=>F(e,Xi)),Sr=g("commerce/pagination/previousPage",e=>F(e,Xi)),Zo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as $P}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new $P}));import{isNullOrUndefined as Mf}from"@coveo/bueno";import{RecordValue as zP,StringValue as WP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new WP({emptyAllowed:!0,required:!0})})),en=g("commerce/triggers/query/applyModification",e=>F(e,new zP({values:{originalQuery:ne,modification:ne}})));var Ia=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 Te(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(!(!Mf(n)&&!Mf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Lp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(en({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Li(o),c=new Ia(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Np(o))return null;let i=ur(o),u=Ca(o)/i,s=Li(o),l=ot(o,n),d=new Ia(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),tn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Qf,clearFilters:new KP}),e.clearFilters&&(r(pe()),r(fr())),r(Xo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),rn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),HP={child:new GP({options:{required:!0},values:{permanentid:new Qf({required:!0})}})},on=g("commerce/search/promoteChildToParent",e=>F(e,HP));function Lf(){return{wasCorrectedTo:"",queryCorrection:Yi(),originalQuery:""}}var Zi=j(Lf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Yi(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as jf,BooleanValue as Uf,ArrayValue as tc,StringValue as ec,NumberValue as Bf,RecordValue as rv}from"@coveo/bueno";var Y=k;import{Value as YP,NumberValue as JP,StringValue as XP,ArrayValue as ZP,BooleanValue as ev}from"@coveo/bueno";var tv={state:new YP({required:!0}),numberOfResults:new JP({required:!0,min:0}),value:new XP({required:!0,emptyAllowed:!0}),path:new ZP({required:!0,each:k}),moreValuesAvailable:new ev({required:!1})};function wa(e){e.children.forEach(t=>{wa(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},tv)}var nn={facetId:Y,field:k,tabs:new rv({options:{required:!1},values:{included:new tc({each:new ec}),excluded:new tc({each:new ec})}}),activeTab:new ec({required:!1}),delimitingCharacter:new ec({required:!1,emptyAllowed:!0}),filterFacetCount:new Uf({required:!1}),injectionDepth:new Bf({required:!1,min:0}),numberOfValues:new Bf({required:!1,min:1}),sortCriteria:new jf({required:!1}),basePath:new tc({required:!1,each:k}),filterByBasePath:new Uf({required:!1})},an=5,_f=g("categoryFacet/register",e=>F(e,nn)),$f=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),wa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),zf=g("categoryFacet/deselectAll",e=>F(e,nn.facetId)),yQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:nn.facetId,numberOfValues:nn.numberOfValues})),hQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:nn.facetId,criterion:new jf})),SQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:nn.facetId,basePath:new tc({each:k})}));import{NumberValue as iv,RecordValue as cv,ArrayValue as sv}from"@coveo/bueno";import{RecordValue as ov,NumberValue as nv,StringValue as av}from"@coveo/bueno";var Ea={facetId:Y,captions:new ov({options:{required:!1}}),numberOfValues:new nv({required:!1,min:1}),query:new av({required:!1,emptyAllowed:!0})};var uv={path:new sv({required:!0,each:k}),displayValue:me,rawValue:me,count:new iv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new cv({values:uv})})),rc=g("categoryFacetSearch/register",e=>F(e,Ea));import{RecordValue as lv,NumberValue as dv}from"@coveo/bueno";var Wf={facetId:Y,value:new lv({values:{displayValue:me,rawValue:me,count:new dv({required:!0,min:0})}})},oc=g("facetSearch/register",e=>F(e,Ea)),Rr=g("facetSearch/update",e=>F(e,Ea)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Wf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Wf));import{BooleanValue as mv}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new mv({required:!1})})),ml=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var pv=g("history/undo"),fv=g("history/redo"),Ot=g("history/snapshot"),BQ=_("history/back",async(e,{dispatch:t})=>{t(pv()),await t(Ce())}),jQ=_("history/forward",async(e,{dispatch:t})=>{t(fv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Kf,StringValue as Ta,NumberValue as Gf,RecordValue as Fr}from"@coveo/bueno";var nc={q:new Ta,enableQuerySyntax:new Kf,aq:new Ta,cq:new Ta,firstResult:new Gf({min:0}),numberOfResults:new Gf({min:0}),sortCriteria:new Ta,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Kf,sf:new Fr,tab:new Ta,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,nc)),gv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Ay,NumberValue as by,StringValue as PI}from"@coveo/bueno";function er(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 I(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function gl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function cn(){return typeof document<"u"}function yl(){try{return typeof localStorage<"u"}catch{return!1}}function yv(){try{return typeof sessionStorage<"u"}catch{return!1}}function sg(){return wl()&&navigator.cookieEnabled}var hv=[ee.click,ee.custom,ee.search,ee.view],Sv=(e,t)=>hv.indexOf(e)!==-1?Object.assign({language:cn()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,ka=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Hf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Hf(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 Hf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Cv(){return yl()?localStorage:sg()?new Va:yv()?sessionStorage:new un}var Va=class e{getItem(t){return ka.get(`${e.prefix}${t}`)}removeItem(t){ka.erase(`${e.prefix}${t}`)}setItem(t,r,o){ka.set(`${e.prefix}${t}`,r,o)}};Va.prefix="coveo_";var hl=class{constructor(){this.cookieStorage=new Va}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)}},un=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Oa="__coveo.analytics.history",ug=20,lg=1e3*60,dg=75,ln=class{constructor(t){this.store=t||Cv()}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 I(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 I(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return I(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Oa,JSON.stringify(t.slice(0,ug)))}catch{}}clear(){try{this.store.removeItem(Oa)}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,dg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>lg:!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))}},mg=Object.freeze({__proto__:null,HistoryStore:ln,MAX_NUMBER_OF_HISTORY_ELEMENTS:ug,MAX_VALUE_SIZE:dg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:lg,STORE_KEY:Oa,default:ln}),xv=(e,t)=>I(void 0,void 0,void 0,function*(){return e===ee.view?(yield Rv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Rv=e=>I(void 0,void 0,void 0,function*(){let t=new ln,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ac,Fv=new Uint8Array(16);function Pv(){if(!ac&&(ac=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ac))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ac(Fv)}var vv=/^(?:[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 cc(e){return typeof e=="string"&&vv.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function pg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Av(e){if(!cc(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 bv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Iv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",wv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Ev(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=bv(n)),typeof a=="string"&&(a=Av(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return pg(s)}try{o.name=e}catch{}return o.DNS=Iv,o.URL=wv,o}var Tv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yf={randomUUID:Tv};function po(e,t,r){if(Yf.randomUUID&&!t&&!e)return Yf.randomUUID();e=e||{};let o=e.random||(e.rng||Pv)();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 pg(o)}function Ov(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 pl(e,t){return e<<t|e>>>32-t}function qv(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=pl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),S=pl(u,5)+Ov(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=pl(s,30)>>>0,s=u,u=S}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var kv=Ev("v5",80,qv),Jf=kv,fg="2.30.45",Xf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,qa={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},Sl=class extends sc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Xf(window.location),this.lastReferrer=cn()?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:cn()?document.title:"",encoding:cn()?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===qa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===qa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===qa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===qa.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 Xf(window.location)}},Pr=class e{constructor(t,r){if(!cc(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 cc(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Cl=class extends sc{constructor({client:t,uuidGenerator:r=po}){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 I(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Cl.Id="link";var it=Object.keys;function ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var fl=128,gg=192,Zf=224,eg=240;function Vv(e){return(e&248)===eg?4:(e&eg)===Zf?3:(e&Zf)===gg?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&fl)!=fl)break;if(r-=3,(o&gg)!=fl){t-r>=Vv(o)*3&&(r=t);break}}return e.substring(0,r)}var xl={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"},Nv=it(xl).map(e=>xl[e]),Mv=[...Nv].join("|"),Qv=new RegExp(`^(${Mv}$)`),Lv={svcAction:"svc_action",svcActionData:"svc_action_data"},Uv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=xl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Bv=e=>Qv.test(e),jv=[Bv],tg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},rg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},uc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},_v=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Rl={id:"quoteId",affiliation:"quoteAffiliation"},Fl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},$v={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),uc),purchase:Object.assign(Object.assign({},qe),uc),quickview:qe,quote:Object.assign(Object.assign({},qe),Rl),review:Object.assign(Object.assign({},qe),Fl)},zv=it(tg).map(e=>tg[e]),Wv=it(rg).map(e=>rg[e]),Kv=it(qe).map(e=>qe[e]),Gv=it(uc).map(e=>uc[e]),Hv=it(Fl).map(e=>Fl[e]),Yv=it(Rl).map(e=>Rl[e]),Jv=[...zv,"custom"].join("|"),Xv=[...Wv,"custom"].join("|"),yg="(pr[0-9]+)",hg="(il[0-9]+pi[0-9]+)",Zv=new RegExp(`^${yg}(${Jv})$`),eA=new RegExp(`^(${hg}(${Xv}))|(il[0-9]+nm)$`),tA=new RegExp(`^(${Kv.join("|")})$`),rA=new RegExp(`^(${Gv.join("|")})$`),oA=new RegExp(`^${yg}custom$`),nA=new RegExp(`^${hg}custom$`),aA=new RegExp(`^(${[..._v,...Hv,...Yv].join("|")})$`),iA=e=>Zv.test(e),cA=e=>eA.test(e),sA=e=>tA.test(e),uA=e=>rA.test(e),lA=e=>aA.test(e),dA=[cA,iA,sA,uA,lA],mA=[oA,nA],pA={anonymizeIp:"aip"},fA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},gA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},yA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],hA=Object.assign(Object.assign(Object.assign(Object.assign({},pA),fA),gA),yA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pl=Object.assign(Object.assign({},hA),Lv),SA=e=>{let t=!!e.action&&$v[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Pl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},CA=it(Pl).map(e=>Pl[e]),xA=e=>CA.indexOf(e)!==-1,RA=e=>e==="custom",FA=e=>[...dA,...jv,xA,RA].some(t=>t(e)),PA=e=>it(e).reduce((t,r)=>{let o=vA(r);return o?Object.assign(Object.assign({},t),AA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),vA=e=>{let t;return[...mA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},AA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),vl=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return I(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return I(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}},Al=class{sendEvent(t,r){return I(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){return Promise.resolve()})}},og=globalThis.fetch,lc=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=er(u,["url"]),d;try{d=yield og(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield og(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return I(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"})}},bl=class{constructor(t,r){yl()&&sg()?this.storage=new hl:yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new un),this.client=new lc(t),this.beaconClient=new vl(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}},Il=class{constructor(t,r){this.storage=r||new un,this.client=new lc(t)}getClientDependingOnEventType(t){return this.client}},dc=class{constructor(){this.storage=new un,this.client=new Al}getClientDependingOnEventType(t){return this.client}},bA="xx",IA=e=>e?.startsWith(bA)||!1,wA=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as SF}from"@coveo/bueno";function Pe(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 ER=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bm=ER,Pu=()=>Math.random().toString(36).substring(7).split("").join("."),TR={INIT:`@@redux/INIT${Pu()}`,REPLACE:`@@redux/REPLACE${Pu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pu()}`},xi=TR;function vt(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 vu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(vu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:xi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[Bm](){return this}}}return p({type:xi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Bm]:f}}function OR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xi.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:xi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function qo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{OR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function ko(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function jm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=ko(...c)(n.dispatch),{...n,dispatch:a}}}function Ri(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var Vu=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Km(e)||Array.isArray(e)||!!e[aa]||!!e.constructor?.[aa]||la(e)||da(e):!1}var qR=Object.prototype.constructor.toString();function Km(e){if(!e||typeof e!="object")return!1;let t=Hr(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)===qR}function Du(e){return He(e)||ve(15,e),e[je].base_}function ia(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:la(e)?2:da(e)?3:0}function ca(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Au(e,t){return Yr(e)===2?e.get(t):e[t]}function Gm(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function kR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function la(e){return e instanceof Map}function da(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(la(e))return new Map(e);if(da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Km(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function vi(e,t=!1){return Ai(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=VR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>vi(o,!0))),e}function VR(){ve(2)}function Ai(e){return Object.isFrozen(e)}var Eu={};function Jr(e){let t=Eu[e];return t||ve(0,e),t}function DR(e,t){Eu[e]||(Eu[e]=t)}var sa;function Hm(){return sa}function NR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _m(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tu(e){Ou(e),e.drafts_.forEach(MR),e.drafts_=null}function Ou(e){e===sa&&(sa=e.parent_)}function $m(e){return sa=NR(sa,e)}function MR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Tu(t),ve(4)),_e(e)&&(e=Fi(t,e),t.parent_||Pi(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=Fi(t,r,[]),Tu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Vu?e:void 0}function Fi(e,t,r){if(Ai(t))return t;let o=t[je];if(!o)return ia(t,(n,a)=>Wm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Pi(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),ia(a,(c,u)=>Wm(e,o,n,c,u,r,i)),Pi(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Wm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ca(t.assigned_,o)?a.concat(o):void 0,u=Fi(e,n,c);if(Gm(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Ai(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Pi(e,n)}}function Pi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vi(t,r)}function QR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Hm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Nu;r&&(n=[o],a=ua);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Nu={get(e,t){if(t===je)return e;let r=Gr(e);if(!ca(r,t))return LR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===bu(e.base_,t)?(Iu(e),e.copy_[t]=ku(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Ym(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=bu(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kR(r,n)&&(r!==void 0||ca(e.base_,t)))return!0;Iu(e),qu(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 bu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Iu(e),qu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){ve(12)}},ua={};ia(Nu,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)};ua.set=function(e,t,r){return Nu.set.call(this,e[0],t,r,e[0])};function bu(e,t){let r=e[je];return(r?Gr(r):e)[t]}function LR(e,t,r){let o=Ym(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Ym(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function qu(e){e.modified_||(e.modified_=!0,e.parent_&&qu(e.parent_))}function Iu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=$m(this),i=ku(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Tu(a):Ou(a)}return _m(a,o),zm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Vu&&(n=void 0),this.autoFreeze_&&vi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){_e(e)||ve(8),He(e)&&(e=Jm(e));let t=$m(this),r=ku(e,void 0);return r[je].isManual_=!0,Ou(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return _m(o,t),zm(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=Jr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ku(e,t){let r=la(e)?Jr("MapSet").proxyMap_(e,t):da(e)?Jr("MapSet").proxySet_(e,t):QR(e,t);return(t?t.scope_:Hm()).drafts_.push(r),r}function Jm(e){return He(e)||ve(10,e),Xm(e)}function Xm(e){if(!_e(e)||Ai(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wu(e,!0);return ia(r,(o,n)=>{Gm(r,o,Xm(n))}),t&&(t.finalized_=!1),r}function Zm(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;ia(p.assigned_,(v,y)=>{let x=Au(C,v),E=Au(h,v),A=y?ca(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===Vu?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=Au(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(la(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(da(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return ca(p,aa)&&(m[aa]=p[aa]),m}function d(p){return He(p)?l(p):p}DR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new UR,Gt=Ye.produce,bi=Ye.produceWithPatches.bind(Ye),dV=Ye.setAutoFreeze.bind(Ye),mV=Ye.setUseStrictShallowCopy.bind(Ye),Mu=Ye.applyPatches.bind(Ye),pV=Ye.createDraft.bind(Ye),fV=Ye.finishDraft.bind(Ye);function BR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function jR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function _R(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 ep=e=>Array.isArray(e)?e:[e];function $R(e){let t=Array.isArray(e[0])?e[0]:e;return _R(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function zR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var hV=Symbol();var SV=Object.getPrototypeOf({});var WR=class{constructor(e){this.value=e}deref(){return this.value}},KR=typeof WeakRef<"u"?WeakRef:WR,GR=0,tp=1;function Ii(){return{s:GR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=Ii(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let S=f.get(m);S===void 0?(c=Ii(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=Ii(),f.set(m,c)):c=S}}let s=c,l;if(c.s===tp)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new KR(l):l}return s.s=tp,s.v=l,l}return i.clearCache=()=>{r=Ii(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function rp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),BR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Vo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=ep(p),h=ep(f),v=$R(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=zR(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=rp(Vo),HR=Object.assign((e,t=Q)=>{jR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>HR});function op(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var np=op(),ap=op;var YR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ko:ko.apply(null,arguments)},wV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},JR=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ri(o)&&o.type===e,r}var lp=class ma extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ma.prototype)}static get[Symbol.species](){return ma}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ma(...t[0].concat(this)):new ma(...t.concat(this))}};function ip(e){return _e(e)?Gt(e,()=>{}):e}function cp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function XR(e){return typeof e=="boolean"}var ZR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new lp;return r&&(XR(r)?i.push(np):i.push(ap(r.extraArgument))),i},pa="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[pa]:!0}}),sp=e=>t=>{setTimeout(t,e)},eF=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sp(10):e.type==="callback"?e.queueNotification:sp(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[pa],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},tF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new lp(e);return o&&n.push(eF(typeof o=="object"?o:void 0)),n};function dp(e){let t=ZR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(vt(r))c=qo(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=ko;n&&(s=YR({trace:!1,...typeof n=="object"&&n}));let l=jm(...u),d=tF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return vu(c,a,m)}function mp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function rF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=mp(t),a;if(rF(e))a=()=>ip(e());else{let c=ip(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var pp=(e,t)=>JR(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>pp(r,t))}function Do(...e){return t=>e.every(r=>pp(r,t))}function Ei(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 fa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ti(...e){return e.length===0?t=>Ei(t,["pending"]):fa(e)?At(...e.map(t=>t.pending)):Ti()(e[0])}function Xr(...e){return e.length===0?t=>Ei(t,["rejected"]):fa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function ga(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):fa(e)?Do(Xr(...e),t):ga()(e[0])}function Ht(...e){return e.length===0?t=>Ei(t,["fulfilled"]):fa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Oi(...e){return e.length===0?t=>Ei(t,["pending","fulfilled","rejected"]):fa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Oi()(e[0])}var oF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=(e=21)=>{let t="",r=e;for(;r--;)t+=oF[Math.random()*64|0];return t},nF=["name","message","stack","code"],Qu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},up=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},aF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of nF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||aF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):qi(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(cF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Qu(A,R),fulfillWithValue:(A,R)=>new up(A,R)})).then(A=>{if(A instanceof Qu)throw A;return A instanceof up?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Qu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(iF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function iF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fp=Symbol.for("rtk-slice-createasyncthunk"),kV={[fp]:_};function sF(e,t){return`${e}/${t}`}function uF({creators:e}={}){let t=e?.asyncThunk?.[fp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(dF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:sF(n,v),createNotation:typeof o.reducers=="function"};pF(y)?gF(x,y,s,t):mF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?mp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=cp(p,y,()=>new WeakMap);return cp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=lF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function lF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=uF();function dF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function mF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!fF(o))throw new Error(yt(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 pF(e){return e._reducerDefinitionType==="asyncThunk"}function fF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||wi,pending:c||wi,rejected:u||wi,settled:s||wi})}function wi(){}var gp="listener",yp="completed",hp="cancelled",VV=`task-${hp}`,DV=`task-${yp}`,NV=`${gp}-${hp}`,MV=`${gp}-${yp}`;var{assign:Sp}=Object;var Lu="listenerMiddleware";var yF=Sp(g(`${Lu}/add`),{withTypes:()=>yF}),QV=g(`${Lu}/removeAll`),hF=Sp(g(`${Lu}/remove`),{withTypes:()=>hF});var LV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ki=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Vi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Di=Q(e=>e.commercePagination?.principal.page||0,e=>e),Cp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var JV=Q(e=>e[B].productListing.responseId,e=>e),ya=Q(e=>e.productListing.responseId,e=>e),xp=Q(e=>e.productListing.requestId,e=>e),ha=Q(e=>e.productListing?.products.length||0,e=>e),Rp=Q(e=>({total:lr(e),current:ha(e)}),({current:e,total:t})=>e<t),Fp=Q(e=>e.productListing?.isLoading,e=>SF(e)?!1:e),Pp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Vp}from"@coveo/bueno";function Uu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Bu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function It(e){let{activeValue:t,ancestryMap:r}=xF(e);return t?RF(t,r):[]}function xF(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 RF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function vp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as vF,EnumValue as Ip,StringValue as wp,RecordValue as Ep}from"@coveo/bueno";import{ArrayValue as FF,EnumValue as Ap,RecordValue as bp,StringValue as PF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),wt=()=>({by:"relevance"});var rD=new bp({options:{required:!1},values:{by:new Ap({enum:ht,required:!0}),fields:new FF({each:new bp({values:{name:new PF,direction:new Ap({enum:eo})}})})}});var Ni=e=>({by:"fields",fields:e}),Tp=new Ep({options:{required:!1},values:{by:new Ip({enum:ht,required:!0}),fields:new vF({each:new Ep({values:{field:new wp({required:!0}),direction:new Ip({enum:eo}),displayName:new wp}})})}});function to(){return{appliedSort:wt(),availableSorts:[wt()]}}function Mi(e){return{...AF(e?.commercePagination,t=>t.principal.page,dr().page),...bF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Bu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),IF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),wF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),EF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),TF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Op,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),qp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Op,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),qp,"nfExcluded"),...kp("selected",e.manualNumericFacetSet),...kp("excluded",e.manualNumericFacetSet)}}function AF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function bF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function IF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function wF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function EF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Op(e){return e.values.filter(t=>t.state==="selected")}function qp(e){return e.values.filter(t=>t.state==="excluded")}function kp(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 TF(e){return It(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Qi=()=>({query:""});var ID=Q(e=>e[B].commerceSearch.responseId,e=>e),Sa=Q(e=>e.commerceSearch.responseId,e=>e),Dp=Q(e=>e.commerceSearch.requestId,e=>e),Ca=Q(e=>e.commerceSearch?.products.length||0,e=>e),Np=Q(e=>({total:lr(e),current:Ca(e)}),({current:e,total:t})=>e<t),Mp=Q(e=>e.commerceSearch?.isLoading,e=>Vp(e)?!1:e),Qp=Q(e=>e.commerceSearch?.error,e=>e??null),Li=Q(e=>e.commerceQuery?.query,e=>e??""),OF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Lp=(e,t)=>Vp(t.queryCorrection?.correctedQuery)?Li(e):t.queryCorrection.correctedQuery,Up=e=>({...Uu(e?.commerceQuery,t=>t.query,Qi().query),...Mi(e)});function Bp(e){return{query:OF(e)||""}}var ju;(t=>t.responseIdSelector=jp(Sa))(ju||(ju={}));var _u;(t=>t.responseIdSelector=jp(ya))(_u||(_u={}));function jp(e){return t=>e(t[B])}var Wp={};Qm(Wp,{escape:()=>Qo,getHighlightedSuggestion:()=>zu,highlightString:()=>VF});import{isNullOrUndefined as kF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function $p(e){return Array.isArray(e)}function Mo(e){return e.trim()===""}function zp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function xa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function VF(e){if(Mo(e.openingDelimiter)||Mo(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(kF(e.content)||Mo(e.content))return e.content;if(e.highlights.length===0)return Qo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=Qo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Qo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Qo(e.content.slice(o))),r}function zu(e,t){return e=Qo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?$u(o,t.notMatchDelimiters):n?$u(n,t.exactMatchDelimiters):a?$u(a,t.correctionDelimiters):r)}function $u(e,t){return t?t.open+e+t.close:e}function Qo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var nf=Pt(ef(),1);var iP="recommendation-internal-options",BD=Symbol.for(iP);var $=new Error("Failed to load reducers."),Lo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function tf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function rf(e){return typeof e!="object"||!e?!1:Object.values(e).every(cP)}function cP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function of(e){return e===429}var Uo=class e{static async call(t){let r=sP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(of(u.status))throw u;return u};try{let u=await(0,nf.backOff)(c,{retry:s=>{let l=s&&of(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Lo;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=xa(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function el(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function sP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=uP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function uP(e,t){return t==="application/x-www-form-urlencoded"?rf(e)?tf(e):"":JSON.stringify(e)}function lP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function dP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function tl(e,t){if(t&&e.name==="AbortError")return{error:dP(e)};if(e instanceof no)return{error:lP(e)};throw e}var Bo=(e,t)=>({...Pa(e,t),requestParams:mP(e)}),mP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},Pa=(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 af=(e,t)=>({...Pa(e,t),requestParams:pP(e)}),pP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var cf=e=>({...Pa(e,"search/querySuggest"),requestParams:fP(e)}),fP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Te=e=>e.error!==void 0,Bi=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Bo(t,"listing"),...this.options})}async search(t){let r=Bo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...af(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Bo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=cf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Bo(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=Bo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Uo.call(t);if(r instanceof Error)return tl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function rl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var ji=e=>e;import{StringValue as Sf}from"@coveo/bueno";import{Schema as gP,SchemaValidationError as yP,StringValue as va,RecordValue as hP,ArrayValue as SP}from"@coveo/bueno";var k=new va({required:!0,emptyAllowed:!1}),ne=new va({required:!1,emptyAllowed:!1}),me=new va({required:!0,emptyAllowed:!0}),sf=new va({required:!1,emptyAllowed:!0}),uf=new SP({each:k,required:!0}),lf=new va({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new gP({value:t}).validate({value:e}).value};let n=new hP({options:{required:!0},values:t}).validate(e);if(n)throw new yP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return df(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return df(e,t,r,n,"Controller initialization error")},df=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as CP,BooleanValue as pf,RecordValue as xP,StringValue as Aa,Value as RP}from"@coveo/bueno";var jo="3.23.2-pre.e3734b4a39",mf=["@coveo/atomic","@coveo/quantic"];var ol=()=>ne,ff=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Aa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),gf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Aa({required:!1,url:!0}),pipeline:new Aa({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new CP({required:!1,each:k})})),_o={enabled:new pf({default:!0}),originContext:ol(),originLevel2:ol(),originLevel3:ol(),proxyBaseUrl:new Aa({required:!1,url:!0}),runtimeEnvironment:new RP,anonymous:new pf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Aa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new xP({options:{required:!1},values:mf.reduce((e,t)=>(e[t]=lf,e),{})})},nl=g("configuration/updateAnalyticsConfiguration",e=>F(e,_o)),_i=g("configuration/analytics/disable"),$i=g("configuration/analytics/enable"),yf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:ff()})),hf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:ff()}));var $o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Sf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),zo=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Sf({required:!1,url:!0})})),Wo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:_o.enabled,proxyBaseUrl:_o.proxyBaseUrl,source:_o.source,trackingId:_o.trackingId})),zi=g("commerce/configuration/analytics/disable"),Wi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var Cf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var al=j(Cf(),e=>e.addCase($o,(t,r)=>{xf(t,r.payload)}).addCase(ao,(t,r)=>{xf(t,r.payload)}).addCase(zo,(t,r)=>{FP(t,r.payload)}).addCase(Wo,(t,r)=>{PP(t,r.payload)}).addCase(zi,t=>{t.analytics.enabled=!1}).addCase(Wi,t=>{t.analytics.enabled=!0}));function xf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function FP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function PP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Ko(e){return e.currency}var Rf=(e,t)=>({currency:Ko(t.commerceContext),products:vP(t.cart),transaction:e}),Ff=(e,t)=>({currency:Ko(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),vP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as AP,NumberValue as Pf,RecordValue as bP,Schema as IP,StringValue as wP}from"@coveo/bueno";var il={productId:k,quantity:new Pf({required:!0,min:0}),name:new wP({required:!1}),price:new Pf({required:!1,min:0})},cl=new AP({each:new bP({values:{...il}})}),sl={items:cl},vf=new IP(sl);var pr=g("commerce/cart/setItems",e=>F(e,cl)),Go=g("commerce/cart/updateItemQuantity",e=>F(e,il)),Ho=g("commerce/cart/purchase"),Ki=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Rf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Gi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Ff(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function Af(e,t){return e.cart[so(t)]}var bf=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),If=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function EP(e,t={}){if(!TP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,vf,a,"buildCart"),a.items!==void 0&&r(pr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Ki(l)),r(Ho())},updateItemQuantity(l){let d=Af(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Gi(s(l,d))),r(Go(l)))},get state(){let l=n();return{items:co(l),totalQuantity:bf(l),totalPrice:If(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function TP(e){return e.addReducers({cart:Yo}),!0}var Hi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),wf=e=>Tf(e.cartItems,e.cart),Ef=e=>Tf(e.purchasedItems,e.purchased);function Tf(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 Yo=j(Hi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Hi());Of(t,n,o)}).addCase(Go,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){OP(r,t);return}if(r.quantity<=0){qP(r,t);return}t.cart[o]=r}).addCase(Ho,t=>{kP(t);let{cart:r,cartItems:o}=Hi();Of(t,o,r)})});function Of(e,t,r){e.cartItems=t,e.cart=r}function OP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function qP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function kP(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as qf,RecordValue as kf,Schema as VP,StringValue as DP}from"@coveo/bueno";var NP=Intl.supportedValuesOf("currency"),MP=new DP({required:!0,emptyAllowed:!1,constrainTo:NP}),ul={url:k},ll={latitude:new qf({min:-90,max:90,required:!0}),longitude:new qf({min:-180,max:180,required:!0})},ba={language:k,country:k,currency:MP,view:new kf({options:{required:!0},values:ul}),location:new kf({options:{required:!1},values:ll})},Vf=new VP(ba);var se=g("commerce/context/set",e=>F(e,ba)),le=g("commerce/context/setView",e=>F(e,ul)),Jo=g("commerce/context/setLocation",e=>F(e,ll));var Df=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Df(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Jo,(t,{payload:r})=>{t.location=r})});var Yi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as KP,RecordValue as GP,StringValue as Qf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${jo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??rl(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:wf(e.cart),source:gr(e.configuration.analytics)}}};var Ji=(e,t,r)=>({...yr(e,t),...QP(e,r)}),QP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Ji(e,t),facets:[...LP(e)],...e.commerceSort&&{sort:UP(e.commerceSort.appliedSort)}});function LP(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 UP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as dl,NumberValue as BP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new BP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new dl({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),mo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new dl({required:!0})})),Xo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new dl({required:!0})}));import{NumberValue as Nf}from"@coveo/bueno";var Xi={slotId:sf},jP={...Xi,pageSize:new Nf({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,jP)),_P={...Xi,page:new Nf({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,_P)),hr=g("commerce/pagination/nextPage",e=>F(e,Xi)),Sr=g("commerce/pagination/previousPage",e=>F(e,Xi)),Zo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as $P}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new $P}));import{isNullOrUndefined as Mf}from"@coveo/bueno";import{RecordValue as zP,StringValue as WP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new WP({emptyAllowed:!0,required:!0})})),en=g("commerce/triggers/query/applyModification",e=>F(e,new zP({values:{originalQuery:ne,modification:ne}})));var Ia=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 Te(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(!(!Mf(n)&&!Mf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Lp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(en({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Li(o),c=new Ia(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Np(o))return null;let i=ur(o),u=Ca(o)/i,s=Li(o),l=ot(o,n),d=new Ia(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),tn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Qf,clearFilters:new KP}),e.clearFilters&&(r(pe()),r(fr())),r(Xo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),rn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),HP={child:new GP({options:{required:!0},values:{permanentid:new Qf({required:!0})}})},on=g("commerce/search/promoteChildToParent",e=>F(e,HP));function Lf(){return{wasCorrectedTo:"",queryCorrection:Yi(),originalQuery:""}}var Zi=j(Lf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Yi(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as jf,BooleanValue as Uf,ArrayValue as tc,StringValue as ec,NumberValue as Bf,RecordValue as rv}from"@coveo/bueno";var Y=k;import{Value as YP,NumberValue as JP,StringValue as XP,ArrayValue as ZP,BooleanValue as ev}from"@coveo/bueno";var tv={state:new YP({required:!0}),numberOfResults:new JP({required:!0,min:0}),value:new XP({required:!0,emptyAllowed:!0}),path:new ZP({required:!0,each:k}),moreValuesAvailable:new ev({required:!1})};function wa(e){e.children.forEach(t=>{wa(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},tv)}var nn={facetId:Y,field:k,tabs:new rv({options:{required:!1},values:{included:new tc({each:new ec}),excluded:new tc({each:new ec})}}),activeTab:new ec({required:!1}),delimitingCharacter:new ec({required:!1,emptyAllowed:!0}),filterFacetCount:new Uf({required:!1}),injectionDepth:new Bf({required:!1,min:0}),numberOfValues:new Bf({required:!1,min:1}),sortCriteria:new jf({required:!1}),basePath:new tc({required:!1,each:k}),filterByBasePath:new Uf({required:!1})},an=5,_f=g("categoryFacet/register",e=>F(e,nn)),$f=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),wa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),zf=g("categoryFacet/deselectAll",e=>F(e,nn.facetId)),yQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:nn.facetId,numberOfValues:nn.numberOfValues})),hQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:nn.facetId,criterion:new jf})),SQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:nn.facetId,basePath:new tc({each:k})}));import{NumberValue as iv,RecordValue as cv,ArrayValue as sv}from"@coveo/bueno";import{RecordValue as ov,NumberValue as nv,StringValue as av}from"@coveo/bueno";var Ea={facetId:Y,captions:new ov({options:{required:!1}}),numberOfValues:new nv({required:!1,min:1}),query:new av({required:!1,emptyAllowed:!0})};var uv={path:new sv({required:!0,each:k}),displayValue:me,rawValue:me,count:new iv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new cv({values:uv})})),rc=g("categoryFacetSearch/register",e=>F(e,Ea));import{RecordValue as lv,NumberValue as dv}from"@coveo/bueno";var Wf={facetId:Y,value:new lv({values:{displayValue:me,rawValue:me,count:new dv({required:!0,min:0})}})},oc=g("facetSearch/register",e=>F(e,Ea)),Rr=g("facetSearch/update",e=>F(e,Ea)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Wf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Wf));import{BooleanValue as mv}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new mv({required:!1})})),ml=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var pv=g("history/undo"),fv=g("history/redo"),Ot=g("history/snapshot"),BQ=_("history/back",async(e,{dispatch:t})=>{t(pv()),await t(Ce())}),jQ=_("history/forward",async(e,{dispatch:t})=>{t(fv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Kf,StringValue as Ta,NumberValue as Gf,RecordValue as Fr}from"@coveo/bueno";var nc={q:new Ta,enableQuerySyntax:new Kf,aq:new Ta,cq:new Ta,firstResult:new Gf({min:0}),numberOfResults:new Gf({min:0}),sortCriteria:new Ta,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Kf,sf:new Fr,tab:new Ta,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,nc)),gv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Ay,NumberValue as by,StringValue as PI}from"@coveo/bueno";function er(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 I(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function gl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function cn(){return typeof document<"u"}function yl(){try{return typeof localStorage<"u"}catch{return!1}}function yv(){try{return typeof sessionStorage<"u"}catch{return!1}}function sg(){return wl()&&navigator.cookieEnabled}var hv=[ee.click,ee.custom,ee.search,ee.view],Sv=(e,t)=>hv.indexOf(e)!==-1?Object.assign({language:cn()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,ka=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Hf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Hf(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 Hf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function Cv(){return yl()?localStorage:sg()?new Va:yv()?sessionStorage:new un}var Va=class e{getItem(t){return ka.get(`${e.prefix}${t}`)}removeItem(t){ka.erase(`${e.prefix}${t}`)}setItem(t,r,o){ka.set(`${e.prefix}${t}`,r,o)}};Va.prefix="coveo_";var hl=class{constructor(){this.cookieStorage=new Va}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)}},un=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Oa="__coveo.analytics.history",ug=20,lg=1e3*60,dg=75,ln=class{constructor(t){this.store=t||Cv()}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 I(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 I(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return I(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Oa,JSON.stringify(t.slice(0,ug)))}catch{}}clear(){try{this.store.removeItem(Oa)}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,dg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>lg:!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))}},mg=Object.freeze({__proto__:null,HistoryStore:ln,MAX_NUMBER_OF_HISTORY_ELEMENTS:ug,MAX_VALUE_SIZE:dg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:lg,STORE_KEY:Oa,default:ln}),xv=(e,t)=>I(void 0,void 0,void 0,function*(){return e===ee.view?(yield Rv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Rv=e=>I(void 0,void 0,void 0,function*(){let t=new ln,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ac,Fv=new Uint8Array(16);function Pv(){if(!ac&&(ac=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ac))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ac(Fv)}var vv=/^(?:[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 cc(e){return typeof e=="string"&&vv.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function pg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Av(e){if(!cc(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 bv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Iv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",wv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Ev(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=bv(n)),typeof a=="string"&&(a=Av(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return pg(s)}try{o.name=e}catch{}return o.DNS=Iv,o.URL=wv,o}var Tv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yf={randomUUID:Tv};function po(e,t,r){if(Yf.randomUUID&&!t&&!e)return Yf.randomUUID();e=e||{};let o=e.random||(e.rng||Pv)();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 pg(o)}function Ov(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 pl(e,t){return e<<t|e>>>32-t}function qv(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=pl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),S=pl(u,5)+Ov(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=pl(s,30)>>>0,s=u,u=S}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var kv=Ev("v5",80,qv),Jf=kv,fg="2.30.45",Xf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,qa={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},Sl=class extends sc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Xf(window.location),this.lastReferrer=cn()?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:cn()?document.title:"",encoding:cn()?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===qa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===qa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===qa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===qa.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 Xf(window.location)}},Pr=class e{constructor(t,r){if(!cc(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 cc(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Cl=class extends sc{constructor({client:t,uuidGenerator:r=po}){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 I(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Cl.Id="link";var it=Object.keys;function ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var fl=128,gg=192,Zf=224,eg=240;function Vv(e){return(e&248)===eg?4:(e&eg)===Zf?3:(e&Zf)===gg?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&fl)!=fl)break;if(r-=3,(o&gg)!=fl){t-r>=Vv(o)*3&&(r=t);break}}return e.substring(0,r)}var xl={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"},Nv=it(xl).map(e=>xl[e]),Mv=[...Nv].join("|"),Qv=new RegExp(`^(${Mv}$)`),Lv={svcAction:"svc_action",svcActionData:"svc_action_data"},Uv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=xl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Bv=e=>Qv.test(e),jv=[Bv],tg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},rg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},uc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},_v=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Rl={id:"quoteId",affiliation:"quoteAffiliation"},Fl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},$v={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),uc),purchase:Object.assign(Object.assign({},qe),uc),quickview:qe,quote:Object.assign(Object.assign({},qe),Rl),review:Object.assign(Object.assign({},qe),Fl)},zv=it(tg).map(e=>tg[e]),Wv=it(rg).map(e=>rg[e]),Kv=it(qe).map(e=>qe[e]),Gv=it(uc).map(e=>uc[e]),Hv=it(Fl).map(e=>Fl[e]),Yv=it(Rl).map(e=>Rl[e]),Jv=[...zv,"custom"].join("|"),Xv=[...Wv,"custom"].join("|"),yg="(pr[0-9]+)",hg="(il[0-9]+pi[0-9]+)",Zv=new RegExp(`^${yg}(${Jv})$`),eA=new RegExp(`^(${hg}(${Xv}))|(il[0-9]+nm)$`),tA=new RegExp(`^(${Kv.join("|")})$`),rA=new RegExp(`^(${Gv.join("|")})$`),oA=new RegExp(`^${yg}custom$`),nA=new RegExp(`^${hg}custom$`),aA=new RegExp(`^(${[..._v,...Hv,...Yv].join("|")})$`),iA=e=>Zv.test(e),cA=e=>eA.test(e),sA=e=>tA.test(e),uA=e=>rA.test(e),lA=e=>aA.test(e),dA=[cA,iA,sA,uA,lA],mA=[oA,nA],pA={anonymizeIp:"aip"},fA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},gA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},yA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],hA=Object.assign(Object.assign(Object.assign(Object.assign({},pA),fA),gA),yA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pl=Object.assign(Object.assign({},hA),Lv),SA=e=>{let t=!!e.action&&$v[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Pl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},CA=it(Pl).map(e=>Pl[e]),xA=e=>CA.indexOf(e)!==-1,RA=e=>e==="custom",FA=e=>[...dA,...jv,xA,RA].some(t=>t(e)),PA=e=>it(e).reduce((t,r)=>{let o=vA(r);return o?Object.assign(Object.assign({},t),AA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),vA=e=>{let t;return[...mA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},AA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),vl=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return I(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return I(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}},Al=class{sendEvent(t,r){return I(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){return Promise.resolve()})}},og=globalThis.fetch,lc=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=er(u,["url"]),d;try{d=yield og(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield og(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return I(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"})}},bl=class{constructor(t,r){yl()&&sg()?this.storage=new hl:yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new un),this.client=new lc(t),this.beaconClient=new vl(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}},Il=class{constructor(t,r){this.storage=r||new un,this.client=new lc(t)}getClientDependingOnEventType(t){return this.client}},dc=class{constructor(){this.storage=new un,this.client=new Al}getClientDependingOnEventType(t){return this.client}},bA="xx",IA=e=>e?.startsWith(bA)||!1,wA=`
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