@coveo/headless 3.22.5 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
var fR=Object.create;var hi=Object.defineProperty;var gR=Object.getOwnPropertyDescriptor;var yR=Object.getOwnPropertyNames;var hR=Object.getPrototypeOf,SR=Object.prototype.hasOwnProperty;var CR=(e,t,r)=>t in e?hi(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),km=(e,t)=>{for(var r in t)hi(e,r,{get:t[r],enumerable:!0})},xR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yR(t))!SR.call(e,n)&&n!==r&&hi(e,n,{get:()=>t[n],enumerable:!(o=gR(t,n))||o.enumerable});return e};var Pt=(e,t,r)=>(r=e!=null?fR(hR(e)):{},xR(t||!e||!e.__esModule?hi(r,"default",{value:e,enumerable:!0}):r,e));var Be=(e,t,r)=>CR(e,typeof t!="symbol"?t+"":t,r);var jp=Fe(xa=>{"use strict";var Li=xa&&xa.__assign||function(){return Li=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},Li.apply(this,arguments)};Object.defineProperty(xa,"__esModule",{value:!0});var wF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function IF(e){var t=Li(Li({},wF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}xa.getSanitizedOptions=IF});var _p=Fe(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function EF(e){var t=Math.random()*e;return Math.round(t)}zu.fullJitter=EF});var $p=Fe(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});function TF(e){return e}Wu.noJitter=TF});var zp=Fe(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var OF=_p(),qF=$p();function kF(e){switch(e.jitter){case"full":return OF.fullJitter;case"none":default:return qF.noJitter}}Ku.JitterFactory=kF});var Hu=Fe(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var VF=zp(),DF=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=VF.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}();Gu.Delay=DF});var Wp=Fe(Yt=>{"use strict";var NF=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)}}(),MF=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())})},QF=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 LF=Hu(),UF=function(e){NF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return MF(this,void 0,void 0,function(){return QF(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}(LF.Delay);Yt.SkipFirstDelay=UF});var Kp=Fe(Ra=>{"use strict";var BF=Ra&&Ra.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ra,"__esModule",{value:!0});var jF=Hu(),_F=function(e){BF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(jF.Delay);Ra.AlwaysDelay=_F});var Gp=Fe(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var $F=Wp(),zF=Kp();function WF(e,t){var r=KF(e);return r.setAttemptNumber(t),r}Yu.DelayFactory=WF;function KF(e){return e.delayFirstAttempt?new zF.AlwaysDelay(e):new $F.SkipFirstDelay(e)}});var Hp=Fe(oo=>{"use strict";var Ju=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())})},Xu=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 GF=jp(),HF=Gp();function YF(e,t){return t===void 0&&(t={}),Ju(this,void 0,void 0,function(){var r,o;return Xu(this,function(n){switch(n.label){case 0:return r=GF.getSanitizedOptions(t),o=new JF(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}oo.backOff=YF;var JF=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Ju(this,void 0,void 0,function(){var t,r;return Xu(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 Ju(this,void 0,void 0,function(){var t;return Xu(this,function(r){switch(r.label){case 0:return t=HF.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var bc=Fe((Ll,Ul)=>{"use strict";(function(e,t){typeof Ll=="object"&&typeof Ul<"u"?Ul.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Ll,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},A={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",v=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(v(D))return D.clone();var O=typeof q=="object"?q:{};return O.date=D,O.args=arguments,new T(O)},b=A;b.l=R,b.i=v,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=v,P.unix=function(D){return P(1e3*D)},P.en=x[y],P.Ls=x,P.p={},P})});var _g=Fe((Bl,jl)=>{"use strict";(function(e,t){typeof Bl=="object"&&typeof jl<"u"?jl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Bl,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 $g=Fe((_l,$l)=>{"use strict";(function(e,t){typeof _l=="object"&&typeof $l<"u"?$l.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(_l,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 A=1;A<=24;A+=1)if(f.indexOf(h(A,0,S))>-1){C=A>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),A=h.length,y=0;y<A;y+=1){var x=h[y],E=p[x],v=E&&E[0],R=E&&E[1];h[y]=R?{regex:v,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<A;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,A=h.parse;h.parse=function(y){var x=y.date,E=y.utc,v=y.args;this.$u=E;var R=v[1];if(typeof R=="string"){var P=v[2]===!0,b=v[3]===!0,T=P||b,M=v[2];b&&(M=v[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,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,oa=K||0,xu=Z||0,Ru=ue||0;return re?new Date(Date.UTC(et,sr,Ue,Oo,oa,xu,Ru+60*re.offset*1e3)):L?new Date(Date.UTC(et,sr,Ue,Oo,oa,xu,Ru)):(To=new Date(et,sr,Ue,Oo,oa,xu,Ru),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){v[1]=R[q-1];var O=C.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===D&&(this.$d=new Date(""))}else A.call(this,y)}}})});var LS=Fe((q3,QS)=>{"use strict";var vE=/(^|; )Coveo-Pendragon=([^;]*)/;QS.exports=()=>vE.exec(document.cookie)?.pop()||null});var US=Fe((zd,Wd)=>{"use strict";(function(e,t){typeof zd=="object"&&typeof Wd<"u"?Wd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(zd,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",A=S+"|"+h,y=t[A];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[A]=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,A=e[C];A>=0&&(m[A]=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",v=+l;return(n.utc(E).valueOf()-(v-=v%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),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 A=p.utcOffset();p=p.add(m-A,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var 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,v){var R=x-60*E*1e3,P=c(R,v);if(E===P)return[R,E];var b=c(R-=60*(P-E)*1e3,v);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],A=C[1],y=n(h).utcOffset(A);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var BS=Fe((Kd,Gd)=>{"use strict";(function(e,t){typeof Kd=="object"&&typeof Gd<"u"?Gd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Kd,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],v=E[0],R=60*+E[1]+ +E[2];return R===0?0:v==="+"?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 A=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(C+A,e)).$offset=C,h.$x.$localOffset=A}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 eC=Fe((j4,ZS)=>{"use strict";function DE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}ZS.exports=NE;function NE(e,t,r){var o=r&&r.stringify||DE,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 iC=Fe((_4,Bs)=>{"use strict";var tC=eC();Bs.exports=cr;var ci=JE().console||{},ME={mapHttpRequest:Us,mapHttpResponse:Us,wrapRequestSerializer:Jd,wrapResponseSerializer:Jd,wrapErrorSerializer:Jd,req:Us,res:Us,err:oC,errWithCause:oC};function zr(e,t){return e==="silent"?1/0:t.levels.values[e]}var em=Symbol("pino.logFuncs"),Xd=Symbol("pino.hierarchy"),QE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function rC(e,t){let r={logger:t,parent:e[Xd]};t[Xd]=r}function LE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ci[n]||ci[QE[n]||"log"]||jn}),e[em]=o}function UE(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||ci;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=UE(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=jn),LE(s,c,r),rC({},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:GE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||jn};s.levels=BE(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=jn,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...S){return f.call(this,l,...S)},t&&(s._logEvent=Zd());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 A=h.serializers;if(n&&A){var y=Object.assign({},o,A),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,tm([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=Zd([].concat(R._logEvent.bindings,C)))}E.prototype=this;let v=new E(this);return rC(this,v),v.child=function(...R){return f.call(this,S,...R)},v.level=h.level||this.level,S.onChild(v),v}return s}function BE(e){let t=e.customLevels||{},r=Object.assign({},cr.levels.values,t),o=Object.assign({},cr.levels.labels,jE(t));return{values:r,labels:o}}function jE(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=ME;cr.stdTimeFunctions=Object.assign({},{nullTime:nC,epochTime:aC,unixTime:HE,isoTime:YE});function _E(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Xd];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)?jn:r[em][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===jn){if(!t.transmit)return;let a=t.transmit.level||e.level,i=zr(a,r);if(zr(o,r)<i)return}e[o]=zE(e,t,r,o);let n=_E(e);n.length!==0&&(e[o]=$E(n,e[o]))}function $E(e,t){return function(){return t.apply(this,[...e,...arguments])}}function zE(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ci?ci:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(tm(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,WE(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;KE(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[em][o])}function WE(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?tC(c.shift(),c):void 0}else typeof u=="string"&&(u=tC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function tm(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 KE(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||tm(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=Zd(s)}function Zd(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function oC(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 GE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?nC:aC}function Us(){return{}}function Jd(e){return e}function jn(){}function nC(){return!1}function aC(){return Date.now()}function HE(){return Math.round(Date.now()/1e3)}function YE(){return new Date(Date.now()).toISOString()}function JE(){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)||{}}}Bs.exports.default=cr;Bs.exports.pino=cr});var Qp={};km(Qp,{ProductListing:()=>ju,Search:()=>Bu});var Vm="coveo-headless-internal-state",B=Symbol.for(Vm),Dm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==B)},get(t,r,o){return typeof r=="symbol"&&r.description===Vm&&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 lF}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 RR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nm=RR,Fu=()=>Math.random().toString(36).substring(7).split("").join("."),FR={INIT:`@@redux/INIT${Fu()}`,REPLACE:`@@redux/REPLACE${Fu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fu()}`},Si=FR;function At(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 Pu(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(Pu)(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 A=c++;return i.set(A,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(A),a=null}}}function p(C){if(!At(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(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:Si.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function A(){let x=h;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[Nm](){return this}}}return p({type:Si.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Nm]:f}}function PR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Si.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:Si.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{PR(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 Mm(...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 Ci(e){return At(e)&&"type"in e&&typeof e.type=="string"}var ku=Symbol.for("immer-nothing"),na=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function Ae(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?jm(e)||Array.isArray(e)||!!e[na]||!!e.constructor?.[na]||ua(e)||la(e):!1}var AR=Object.prototype.constructor.toString();function jm(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)===AR}function Vu(e){return He(e)||Ae(15,e),e[je].base_}function aa(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:ua(e)?2:la(e)?3:0}function ia(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 _m(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function vR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ua(e){return e instanceof Map}function la(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(ua(e))return new Map(e);if(la(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=jm(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 Fi(e,t=!1){return Pi(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=bR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Fi(o,!0))),e}function bR(){Ae(2)}function Pi(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||Ae(0,e),t}function wR(e,t){Iu[e]||(Iu[e]=t)}var ca;function $m(){return ca}function IR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Eu(e){Tu(e),e.drafts_.forEach(ER),e.drafts_=null}function Tu(e){e===ca&&(ca=e.parent_)}function Lm(e){return ca=IR(ca,e)}function ER(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Um(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Eu(t),Ae(4)),_e(e)&&(e=xi(t,e),t.parent_||Ri(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=xi(t,r,[]),Eu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ku?e:void 0}function xi(e,t,r){if(Pi(t))return t;let o=t[je];if(!o)return aa(t,(n,a)=>Bm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ri(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),aa(a,(c,u)=>Bm(e,o,n,c,u,r,i)),Ri(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Bm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ia(t.assigned_,o)?a.concat(o):void 0,u=xi(e,n,c);if(_m(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Pi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;xi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ri(e,n)}}function Ri(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fi(t,r)}function TR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:$m(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Du;r&&(n=[o],a=sa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Du={get(e,t){if(t===je)return e;let r=Gr(e);if(!ia(r,t))return OR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===vu(e.base_,t)?(bu(e),e.copy_[t]=qu(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=zm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=vu(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(vR(r,n)&&(r!==void 0||ia(e.base_,t)))return!0;bu(e),Ou(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 vu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,bu(e),Ou(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(){Ae(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){Ae(12)}},sa={};aa(Du,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)};sa.set=function(e,t,r){return Du.set.call(this,e[0],t,r,e[0])};function vu(e,t){let r=e[je];return(r?Gr(r):e)[t]}function OR(e,t,r){let o=zm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function zm(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 Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function bu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qR=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"&&Ae(6),o!==void 0&&typeof o!="function"&&Ae(7);let n;if(_e(t)){let a=Lm(this),i=qu(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Eu(a):Tu(a)}return Qm(a,o),Um(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ku&&(n=void 0),this.autoFreeze_&&Fi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ae(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)||Ae(8),He(e)&&(e=Wm(e));let t=Lm(this),r=qu(e,void 0);return r[je].isManual_=!0,Tu(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&Ae(9);let{scope_:o}=r;return Qm(o,t),Um(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 qu(e,t){let r=ua(e)?Jr("MapSet").proxyMap_(e,t):la(e)?Jr("MapSet").proxySet_(e,t):TR(e,t);return(t?t.scope_:$m()).drafts_.push(r),r}function Wm(e){return He(e)||Ae(10,e),Km(e)}function Km(e){if(!_e(e)||Pi(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 aa(r,(o,n)=>{_m(r,o,Km(n))}),t&&(t.finalized_=!1),r}function Gm(){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,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;aa(p.assigned_,(A,y)=>{let x=Au(C,A),E=Au(h,A),v=y?ia(C,A)?t:r:o;if(x===E&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:E}),S.push(v===r?{op:o,path:R}:v===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,A=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}A++}),A=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===ku?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 v=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ae(19),typeof h=="function"&&R==="prototype"&&Ae(19),h=Au(h,R),typeof h!="object"&&Ae(18,S.join("/"))}let A=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(A){case 2:return h.set(x,y);case 3:Ae(16);default:return h[x]=y}case r:switch(A){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(A){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:Ae(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(ua(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(la(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 ia(p,na)&&(m[na]=p[na]),m}function d(p){return He(p)?l(p):p}wR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new qR,Gt=Ye.produce,Ai=Ye.produceWithPatches.bind(Ye),iV=Ye.setAutoFreeze.bind(Ye),cV=Ye.setUseStrictShallowCopy.bind(Ye),Nu=Ye.applyPatches.bind(Ye),sV=Ye.createDraft.bind(Ye),uV=Ye.finishDraft.bind(Ye);function kR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function VR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function DR(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 Hm=e=>Array.isArray(e)?e:[e];function NR(e){let t=Array.isArray(e[0])?e[0]:e;return DR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function MR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var mV=Symbol();var pV=Object.getPrototypeOf({});var QR=class{constructor(e){this.value=e}deref(){return this.value}},LR=typeof WeakRef<"u"?WeakRef:QR,UR=0,Ym=1;function vi(){return{s:UR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=vi(),{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=vi(),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=vi(),f.set(m,c)):c=S}}let s=c,l;if(c.s===Ym)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 LR(l):l}return s.s=Ym,s.v=l,l}return i.clearCache=()=>{r=vi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Jm(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()),kR(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=Hm(p),h=Hm(f),A=NR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=MR(A,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:A,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=Jm(Vo),BR=Object.assign((e,t=Q)=>{VR(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:()=>BR});function Xm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Zm=Xm(),ep=Xm;var jR=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)},PV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},_R=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=>Ci(o)&&o.type===e,r}var ap=class da extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,da.prototype)}static get[Symbol.species](){return da}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new da(...t[0].concat(this)):new da(...t.concat(this))}};function tp(e){return _e(e)?Gt(e,()=>{}):e}function rp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $R(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 ap;return r&&($R(r)?i.push(Zm):i.push(ep(r.extraArgument))),i},ma="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[ma]:!0}}),op=e=>t=>{setTimeout(t,e)},WR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:op(10):e.type==="callback"?e.queueNotification:op(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[ma],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},KR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new ap(e);return o&&n.push(WR(typeof o=="object"?o:void 0)),n};function ip(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(At(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=jR({trace:!1,...typeof n=="object"&&n}));let l=Mm(...u),d=KR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Pu(c,a,m)}function cp(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 GR(e){return typeof e=="function"}function j(e,t){let[r,o,n]=cp(t),a;if(GR(e))a=()=>tp(e());else{let c=tp(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 sp=(e,t)=>_R(e)?e.match(t):e(t);function vt(...e){return t=>e.some(r=>sp(r,t))}function Do(...e){return t=>e.every(r=>sp(r,t))}function wi(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 pa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ii(...e){return e.length===0?t=>wi(t,["pending"]):pa(e)?vt(...e.map(t=>t.pending)):Ii()(e[0])}function Xr(...e){return e.length===0?t=>wi(t,["rejected"]):pa(e)?vt(...e.map(t=>t.rejected)):Xr()(e[0])}function fa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):pa(e)?Do(Xr(...e),t):fa()(e[0])}function Ht(...e){return e.length===0?t=>wi(t,["fulfilled"]):pa(e)?vt(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Ei(...e){return e.length===0?t=>wi(t,["pending","fulfilled","rejected"]):pa(e)?vt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ei()(e[0])}var HR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ti=(e=21)=>{let t="",r=e;for(;r--;)t+=HR[Math.random()*64|0];return t},YR=["name","message","stack","code"],Mu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},np=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},JR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of YR)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||JR)(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):Ti(),m=new AbortController,f,S;function C(A){S=A,m.abort()}let h=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(ZR(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,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}))),A=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new Mu(v,R),fulfillWithValue:(v,R)=>new np(v,R)})).then(v=>{if(v instanceof Mu)throw v;return v instanceof np?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof Mu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||s(A),A}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(XR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:vt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function XR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ZR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var up=Symbol.for("rtk-slice-createasyncthunk"),IV={[up]:_};function eF(e,t){return`${e}/${t}`}function tF({creators:e}={}){let t=e?.asyncThunk?.[up];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(oF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(A,y){let x=typeof A=="string"?A:A.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(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),s},exposeAction(A,y){return u.actionCreators[A]=y,s},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,s}};c.forEach(A=>{let y=i[A],x={reducerName:A,type:eF(n,A),createNotation:typeof o.reducers=="function"};aF(y)?cF(x,y,s,t):nF(x,y,s)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?cp(o.extraReducers):[o.extraReducers],E={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in E)v.addCase(R,E[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function S(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=S()),R}function E(v=d){let R=rp(p,y,()=>new WeakMap);return rp(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=rF(T,v,S,y);return P})}return{reducerPath:A,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(A,{reducerPath:y,...x}={}){let E=y??a;return A.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function rF(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=tF();function oF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function nF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!iF(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 aF(e){return e._reducerDefinitionType==="asyncThunk"}function iF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cF({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||bi,pending:c||bi,rejected:u||bi,settled:s||bi})}function bi(){}var lp="listener",dp="completed",mp="cancelled",EV=`task-${mp}`,TV=`task-${dp}`,OV=`${lp}-${mp}`,qV=`${lp}-${dp}`;var{assign:pp}=Object;var Qu="listenerMiddleware";var sF=pp(g(`${Qu}/add`),{withTypes:()=>sF}),kV=g(`${Qu}/removeAll`),uF=pp(g(`${Qu}/remove`),{withTypes:()=>uF});var VV=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),Oi=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),qi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ki=Q(e=>e.commercePagination?.principal.page||0,e=>e),fp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var WV=Q(e=>e[B].productListing.responseId,e=>e),ga=Q(e=>e.productListing.responseId,e=>e),gp=Q(e=>e.productListing.requestId,e=>e),ya=Q(e=>e.productListing?.products.length||0,e=>e),yp=Q(e=>({total:lr(e),current:ya(e)}),({current:e,total:t})=>e<t),hp=Q(e=>e.productListing?.isLoading,e=>lF(e)?!1:e),Sp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Ep}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Uu(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 wt(e){let{activeValue:t,ancestryMap:r}=mF(e);return t?pF(t,r):[]}function mF(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 pF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Cp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as yF,EnumValue as Fp,StringValue as Pp,RecordValue as Ap}from"@coveo/bueno";import{ArrayValue as fF,EnumValue as xp,RecordValue as Rp,StringValue as gF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),It=()=>({by:"relevance"});var JV=new Rp({options:{required:!1},values:{by:new xp({enum:ht,required:!0}),fields:new fF({each:new Rp({values:{name:new gF,direction:new xp({enum:eo})}})})}});var Vi=e=>({by:"fields",fields:e}),vp=new Ap({options:{required:!1},values:{by:new Fp({enum:ht,required:!0}),fields:new yF({each:new Ap({values:{field:new Pp({required:!0}),direction:new Fp({enum:eo}),displayName:new Pp}})})}});function to(){return{appliedSort:It(),availableSorts:[It()]}}function Di(e){return{...hF(e?.commercePagination,t=>t.principal.page,dr().page),...SF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Uu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),CF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),xF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),RF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),FF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),bp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),wp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),bp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),wp,"nfExcluded"),...Ip("selected",e.manualNumericFacetSet),...Ip("excluded",e.manualNumericFacetSet)}}function hF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function SF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function CF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function xF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function RF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function bp(e){return e.values.filter(t=>t.state==="selected")}function wp(e){return e.values.filter(t=>t.state==="excluded")}function Ip(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 FF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ni=()=>({query:""});var FD=Q(e=>e[B].commerceSearch.responseId,e=>e),ha=Q(e=>e.commerceSearch.responseId,e=>e),Tp=Q(e=>e.commerceSearch.requestId,e=>e),Sa=Q(e=>e.commerceSearch?.products.length||0,e=>e),Op=Q(e=>({total:lr(e),current:Sa(e)}),({current:e,total:t})=>e<t),qp=Q(e=>e.commerceSearch?.isLoading,e=>Ep(e)?!1:e),kp=Q(e=>e.commerceSearch?.error,e=>e??null),Mi=Q(e=>e.commerceQuery?.query,e=>e??""),PF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Vp=(e,t)=>Ep(t.queryCorrection?.correctedQuery)?Mi(e):t.queryCorrection.correctedQuery,Dp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ni().query),...Di(e)});function Np(e){return{query:PF(e)||""}}var Bu;(t=>t.responseIdSelector=Mp(ha))(Bu||(Bu={}));var ju;(t=>t.responseIdSelector=Mp(ga))(ju||(ju={}));function Mp(e){return t=>e(t[B])}var Bp={};km(Bp,{escape:()=>Mo,getHighlightedSuggestion:()=>$u,highlightString:()=>bF});import{isNullOrUndefined as vF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Lp(e){return Array.isArray(e)}function Qi(e){return e.trim()===""}function Up(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ca(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function bF(e){if(Qi(e.openingDelimiter)||Qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(vF(e.content)||Qi(e.content))return e.content;if(e.highlights.length===0)return Mo(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+=Mo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Mo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Mo(e.content.slice(o))),r}function $u(e,t){return e=Mo(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 Mo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Zp=Pt(Hp(),1);var XF="recommendation-internal-options",ND=Symbol.for(XF);var $=new Error("Failed to load reducers."),Qo=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 Yp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Jp(e){return typeof e!="object"||!e?!1:Object.values(e).every(ZF)}function ZF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Xp(e){return e===429}var Lo=class e{static async call(t){let r=eP(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(Xp(u.status))throw u;return u};try{let u=await(0,Zp.backOff)(c,{retry:s=>{let l=s&&Xp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Qo;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=Ca(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 Zu(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function eP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=tP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function tP(e,t){return t==="application/x-www-form-urlencoded"?Jp(e)?Yp(e):"":JSON.stringify(e)}function rP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function oP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function el(e,t){if(t&&e.name==="AbortError")return{error:oP(e)};if(e instanceof no)return{error:rP(e)};throw e}var Uo=(e,t)=>({...Fa(e,t),requestParams:nP(e)}),nP=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}},Fa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var ef=(e,t)=>({...Fa(e,t),requestParams:aP(e)}),aP=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 tf=e=>({...Fa(e,"search/querySuggest"),requestParams:iP(e)}),iP=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,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Uo(t,"listing"),...this.options})}async search(t){let r=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ef(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Uo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=tf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Uo(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=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Lo.call(t);if(r instanceof Error)return el(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function tl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var Bi=e=>e;import{StringValue as pf}from"@coveo/bueno";import{Schema as cP,SchemaValidationError as sP,StringValue as Pa,RecordValue as uP,ArrayValue as lP}from"@coveo/bueno";var k=new Pa({required:!0,emptyAllowed:!1}),ne=new Pa({required:!1,emptyAllowed:!1}),me=new Pa({required:!0,emptyAllowed:!0}),rf=new Pa({required:!1,emptyAllowed:!0}),of=new lP({each:k,required:!0}),nf=new Pa({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 cP({value:t}).validate({value:e}).value};let n=new uP({options:{required:!0},values:t}).validate(e);if(n)throw new sP(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 af(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return af(e,t,r,n,"Controller initialization error")},af=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as dP,BooleanValue as sf,RecordValue as mP,StringValue as Aa,Value as pP}from"@coveo/bueno";var Bo="3.22.5",cf=["@coveo/atomic","@coveo/quantic"];var rl=()=>ne,uf=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Aa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),lf=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 dP({required:!1,each:k})})),jo={enabled:new sf({default:!0}),originContext:rl(),originLevel2:rl(),originLevel3:rl(),proxyBaseUrl:new Aa({required:!1,url:!0}),runtimeEnvironment:new pP,anonymous:new sf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Aa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new mP({options:{required:!1},values:cf.reduce((e,t)=>(e[t]=nf,e),{})})},ol=g("configuration/updateAnalyticsConfiguration",e=>F(e,jo)),ji=g("configuration/analytics/disable"),_i=g("configuration/analytics/enable"),df=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:uf()})),mf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:uf()}));var _o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new pf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),$o=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new pf({required:!1,url:!0})})),zo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:jo.enabled,proxyBaseUrl:jo.proxyBaseUrl,source:jo.source,trackingId:jo.trackingId})),$i=g("commerce/configuration/analytics/disable"),zi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var nl=j(ff(),e=>e.addCase(_o,(t,r)=>{gf(t,r.payload)}).addCase(ao,(t,r)=>{gf(t,r.payload)}).addCase($o,(t,r)=>{fP(t,r.payload)}).addCase(zo,(t,r)=>{gP(t,r.payload)}).addCase($i,t=>{t.analytics.enabled=!1}).addCase(zi,t=>{t.analytics.enabled=!0}));function gf(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 gP(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 Wo(e){return e.currency}var yf=(e,t)=>({currency:Wo(t.commerceContext),products:yP(t.cart),transaction:e}),hf=(e,t)=>({currency:Wo(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),yP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as hP,NumberValue as Sf,RecordValue as SP,Schema as CP,StringValue as xP}from"@coveo/bueno";var al={productId:k,quantity:new Sf({required:!0,min:0}),name:new xP({required:!1}),price:new Sf({required:!1,min:0})},il=new hP({each:new SP({values:{...al}})}),cl={items:il},Cf=new CP(cl);var pr=g("commerce/cart/setItems",e=>F(e,il)),Ko=g("commerce/cart/updateItemQuantity",e=>F(e,al)),Go=g("commerce/cart/purchase"),Wi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=yf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Ki=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=hf(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 xf(e,t){return e.cart[so(t)]}var Rf=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),Ff=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function RP(e,t={}){if(!FP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,Cf,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(Wi(l)),r(Go())},updateItemQuantity(l){let d=xf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Ki(s(l,d))),r(Ko(l)))},get state(){let l=n();return{items:co(l),totalQuantity:Rf(l),totalPrice:Ff(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function FP(e){return e.addReducers({cart:Ho}),!0}var Gi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Pf=e=>vf(e.cartItems,e.cart),Af=e=>vf(e.purchasedItems,e.purchased);function vf(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 Ho=j(Gi(),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:{}}},Gi());bf(t,n,o)}).addCase(Ko,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){PP(r,t);return}if(r.quantity<=0){AP(r,t);return}t.cart[o]=r}).addCase(Go,t=>{vP(t);let{cart:r,cartItems:o}=Gi();bf(t,o,r)})});function bf(e,t,r){e.cartItems=t,e.cart=r}function PP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function AP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function vP(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 wf,RecordValue as If,Schema as bP,StringValue as wP}from"@coveo/bueno";var IP=Intl.supportedValuesOf("currency"),EP=new wP({required:!0,emptyAllowed:!1,constrainTo:IP}),sl={url:k},ul={latitude:new wf({min:-90,max:90,required:!0}),longitude:new wf({min:-180,max:180,required:!0})},va={language:k,country:k,currency:EP,view:new If({options:{required:!0},values:sl}),location:new If({options:{required:!1},values:ul})},Ef=new bP(va);var se=g("commerce/context/set",e=>F(e,va)),le=g("commerce/context/setView",e=>F(e,sl)),Yo=g("commerce/context/setLocation",e=>F(e,ul));var Tf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Tf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Yo,(t,{payload:r})=>{t.location=r})});var Hi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as LP,RecordValue as UP,StringValue as kf}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@${Bo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??tl(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:Pf(e.cart),source:gr(e.configuration.analytics)}}};var Yi=(e,t,r)=>({...yr(e,t),...TP(e,r)}),TP=(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)=>({...Yi(e,t),facets:[...OP(e)],...e.commerceSort&&{sort:qP(e.commerceSort.appliedSort)}});function OP(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 qP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ll,NumberValue as kP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new kP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new ll({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 ll({required:!0})})),Jo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new ll({required:!0})}));import{NumberValue as Of}from"@coveo/bueno";var Ji={slotId:rf},VP={...Ji,pageSize:new Of({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,VP)),DP={...Ji,page:new Of({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,DP)),hr=g("commerce/pagination/nextPage",e=>F(e,Ji)),Sr=g("commerce/pagination/previousPage",e=>F(e,Ji)),Xo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as NP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new NP}));import{isNullOrUndefined as qf}from"@coveo/bueno";import{RecordValue as MP,StringValue as QP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new QP({emptyAllowed:!0,required:!0})})),Zo=g("commerce/triggers/query/applyModification",e=>F(e,new MP({values:{originalQuery:ne,modification:ne}})));var ba=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(!(!qf(n)&&!qf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Vp(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(Zo({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=Mi(o),c=new ba(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(!Op(o))return null;let i=ur(o),u=Sa(o)/i,s=Mi(o),l=ot(o,n),d=new ba(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),en=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new kf,clearFilters:new LP}),e.clearFilters&&(r(pe()),r(fr())),r(Jo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),tn=_("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}}}),BP={child:new UP({options:{required:!0},values:{permanentid:new kf({required:!0})}})},rn=g("commerce/search/promoteChildToParent",e=>F(e,BP));function Vf(){return{wasCorrectedTo:"",queryCorrection:Hi(),originalQuery:""}}var Xi=j(Vf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Hi(),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 Mf,BooleanValue as Df,ArrayValue as ec,StringValue as Zi,NumberValue as Nf,RecordValue as GP}from"@coveo/bueno";var Y=k;import{Value as jP,NumberValue as _P,StringValue as $P,ArrayValue as zP,BooleanValue as WP}from"@coveo/bueno";var KP={state:new jP({required:!0}),numberOfResults:new _P({required:!0,min:0}),value:new $P({required:!0,emptyAllowed:!0}),path:new zP({required:!0,each:k}),moreValuesAvailable:new WP({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},KP)}var on={facetId:Y,field:k,tabs:new GP({options:{required:!1},values:{included:new ec({each:new Zi}),excluded:new ec({each:new Zi})}}),activeTab:new Zi({required:!1}),delimitingCharacter:new Zi({required:!1,emptyAllowed:!0}),filterFacetCount:new Df({required:!1}),injectionDepth:new Nf({required:!1,min:0}),numberOfValues:new Nf({required:!1,min:1}),sortCriteria:new Mf({required:!1}),basePath:new ec({required:!1,each:k}),filterByBasePath:new Df({required:!1})},nn=5,Qf=g("categoryFacet/register",e=>F(e,on)),Lf=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)}}}),Uf=g("categoryFacet/deselectAll",e=>F(e,on.facetId)),dQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:on.facetId,numberOfValues:on.numberOfValues})),mQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:on.facetId,criterion:new Mf})),pQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:on.facetId,basePath:new ec({each:k})}));import{NumberValue as XP,RecordValue as ZP,ArrayValue as eA}from"@coveo/bueno";import{RecordValue as HP,NumberValue as YP,StringValue as JP}from"@coveo/bueno";var Ia={facetId:Y,captions:new HP({options:{required:!1}}),numberOfValues:new YP({required:!1,min:1}),query:new JP({required:!1,emptyAllowed:!0})};var tA={path:new eA({required:!0,each:k}),displayValue:me,rawValue:me,count:new XP({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new ZP({values:tA})})),tc=g("categoryFacetSearch/register",e=>F(e,Ia));import{RecordValue as rA,NumberValue as oA}from"@coveo/bueno";var Bf={facetId:Y,value:new rA({values:{displayValue:me,rawValue:me,count:new oA({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Ia)),Rr=g("facetSearch/update",e=>F(e,Ia)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Bf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Bf));import{BooleanValue as nA}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new nA({required:!1})})),dl=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var aA=g("history/undo"),iA=g("history/redo"),Ot=g("history/snapshot"),NQ=_("history/back",async(e,{dispatch:t})=>{t(aA()),await t(Ce())}),MQ=_("history/forward",async(e,{dispatch:t})=>{t(iA()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as jf,StringValue as Ea,NumberValue as _f,RecordValue as Fr}from"@coveo/bueno";var oc={q:new Ea,enableQuerySyntax:new jf,aq:new Ea,cq:new Ea,firstResult:new _f({min:0}),numberOfResults:new _f({min:0}),sortCriteria:new Ea,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new jf,sf:new Fr,tab:new Ea,af:new Fr};var ve=g("searchParameters/restore",e=>F(e,oc)),cA=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Sy,NumberValue as Cy,StringValue as Cw}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 w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function fl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function an(){return typeof document<"u"}function gl(){try{return typeof localStorage<"u"}catch{return!1}}function sA(){try{return typeof sessionStorage<"u"}catch{return!1}}function og(){return wl()&&navigator.cookieEnabled}var uA=[ee.click,ee.custom,ee.search,ee.view],lA=(e,t)=>uA.indexOf(e)!==-1?Object.assign({language:an()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,qa=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?$f(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],$f(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 $f(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function dA(){return gl()?localStorage:og()?new ka:sA()?sessionStorage:new sn}var ka=class e{getItem(t){return qa.get(`${e.prefix}${t}`)}removeItem(t){qa.erase(`${e.prefix}${t}`)}setItem(t,r,o){qa.set(`${e.prefix}${t}`,r,o)}};ka.prefix="coveo_";var yl=class{constructor(){this.cookieStorage=new ka}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)}},sn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ta="__coveo.analytics.history",ng=20,ag=1e3*60,ig=75,un=class{constructor(t){this.store=t||dA()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ta);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ta);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ta,JSON.stringify(t.slice(0,ng)))}catch{}}clear(){try{this.store.removeItem(Ta)}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,ig)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ag:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},cg=Object.freeze({__proto__:null,HistoryStore:un,MAX_NUMBER_OF_HISTORY_ELEMENTS:ng,MAX_VALUE_SIZE:ig,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ag,STORE_KEY:Ta,default:un}),mA=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield pA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),pA=e=>w(void 0,void 0,void 0,function*(){let t=new un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,fA=new Uint8Array(16);function gA(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(fA)}var yA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ic(e){return typeof e=="string"&&yA.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function sg(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 hA(e){if(!ic(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function SA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var CA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function RA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=SA(n)),typeof a=="string"&&(a=hA(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 sg(s)}try{o.name=e}catch{}return o.DNS=CA,o.URL=xA,o}var FA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zf={randomUUID:FA};function po(e,t,r){if(zf.randomUUID&&!t&&!e)return zf.randomUUID();e=e||{};let o=e.random||(e.rng||gA)();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 sg(o)}function PA(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 ml(e,t){return e<<t|e>>>32-t}function AA(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]=ml(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=ml(u,5)+PA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ml(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 vA=RA("v5",80,AA),Wf=vA,ug="2.30.45",Kf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Oa={pageview:"pageview",event:"event"},cc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},hl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kf(window.location),this.lastReferrer=an()?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:an()?document.title:"",encoding:an()?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===Oa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Oa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Oa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Oa.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 Kf(window.location)}},Pr=class e{constructor(t,r){if(!ic(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return ic(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Sl=class extends cc{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 w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Sl.Id="link";var it=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var pl=128,lg=192,Gf=224,Hf=240;function bA(e){return(e&248)===Hf?4:(e&Hf)===Gf?3:(e&Gf)===lg?2:1}function wA(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&pl)!=pl)break;if(r-=3,(o&lg)!=pl){t-r>=bA(o)*3&&(r=t);break}}return e.substring(0,r)}var Cl={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"},IA=it(Cl).map(e=>Cl[e]),EA=[...IA].join("|"),TA=new RegExp(`^(${EA}$)`),OA={svcAction:"svc_action",svcActionData:"svc_action_data"},qA=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Cl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),kA=e=>TA.test(e),VA=[kA],Yf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},sc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},DA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],xl={id:"quoteId",affiliation:"quoteAffiliation"},Rl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},NA={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),sc),purchase:Object.assign(Object.assign({},qe),sc),quickview:qe,quote:Object.assign(Object.assign({},qe),xl),review:Object.assign(Object.assign({},qe),Rl)},MA=it(Yf).map(e=>Yf[e]),QA=it(Jf).map(e=>Jf[e]),LA=it(qe).map(e=>qe[e]),UA=it(sc).map(e=>sc[e]),BA=it(Rl).map(e=>Rl[e]),jA=it(xl).map(e=>xl[e]),_A=[...MA,"custom"].join("|"),$A=[...QA,"custom"].join("|"),dg="(pr[0-9]+)",mg="(il[0-9]+pi[0-9]+)",zA=new RegExp(`^${dg}(${_A})$`),WA=new RegExp(`^(${mg}(${$A}))|(il[0-9]+nm)$`),KA=new RegExp(`^(${LA.join("|")})$`),GA=new RegExp(`^(${UA.join("|")})$`),HA=new RegExp(`^${dg}custom$`),YA=new RegExp(`^${mg}custom$`),JA=new RegExp(`^(${[...DA,...BA,...jA].join("|")})$`),XA=e=>zA.test(e),ZA=e=>WA.test(e),ev=e=>KA.test(e),tv=e=>GA.test(e),rv=e=>JA.test(e),ov=[ZA,XA,ev,tv,rv],nv=[HA,YA],av={anonymizeIp:"aip"},iv={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},cv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},sv=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],uv=Object.assign(Object.assign(Object.assign(Object.assign({},av),iv),cv),sv.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Fl=Object.assign(Object.assign({},uv),OA),lv=e=>{let t=!!e.action&&NA[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Fl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},dv=it(Fl).map(e=>Fl[e]),mv=e=>dv.indexOf(e)!==-1,pv=e=>e==="custom",fv=e=>[...ov,...VA,mv,pv].some(t=>t(e)),gv=e=>it(e).reduce((t,r)=>{let o=yv(r);return o?Object.assign(Object.assign({},t),hv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),yv=e=>{let t;return[...nv].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},hv=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Al=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},Xf=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=er(u,["url"]),d;try{d=yield Xf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Xf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},vl=class{constructor(t,r){gl()&&og()?this.storage=new yl:gl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new sn),this.client=new uc(t),this.beaconClient=new Pl(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}},bl=class{constructor(t,r){this.storage=r||new sn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new sn,this.client=new Al}getClientDependingOnEventType(t){return this.client}},Sv="xx",Cv=e=>e?.startsWith(Sv)||!1,xv=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as lF}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 RR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nm=RR,Fu=()=>Math.random().toString(36).substring(7).split("").join("."),FR={INIT:`@@redux/INIT${Fu()}`,REPLACE:`@@redux/REPLACE${Fu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fu()}`},Si=FR;function At(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 Pu(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(Pu)(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 A=c++;return i.set(A,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(A),a=null}}}function p(C){if(!At(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(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:Si.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function A(){let x=h;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[Nm](){return this}}}return p({type:Si.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Nm]:f}}function PR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Si.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:Si.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{PR(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 Mm(...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 Ci(e){return At(e)&&"type"in e&&typeof e.type=="string"}var ku=Symbol.for("immer-nothing"),na=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function Ae(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?jm(e)||Array.isArray(e)||!!e[na]||!!e.constructor?.[na]||ua(e)||la(e):!1}var AR=Object.prototype.constructor.toString();function jm(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)===AR}function Vu(e){return He(e)||Ae(15,e),e[je].base_}function aa(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:ua(e)?2:la(e)?3:0}function ia(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 _m(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function vR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ua(e){return e instanceof Map}function la(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(ua(e))return new Map(e);if(la(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=jm(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 Fi(e,t=!1){return Pi(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=bR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Fi(o,!0))),e}function bR(){Ae(2)}function Pi(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||Ae(0,e),t}function wR(e,t){Iu[e]||(Iu[e]=t)}var ca;function $m(){return ca}function IR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Eu(e){Tu(e),e.drafts_.forEach(ER),e.drafts_=null}function Tu(e){e===ca&&(ca=e.parent_)}function Lm(e){return ca=IR(ca,e)}function ER(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Um(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Eu(t),Ae(4)),_e(e)&&(e=xi(t,e),t.parent_||Ri(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=xi(t,r,[]),Eu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ku?e:void 0}function xi(e,t,r){if(Pi(t))return t;let o=t[je];if(!o)return aa(t,(n,a)=>Bm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ri(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),aa(a,(c,u)=>Bm(e,o,n,c,u,r,i)),Ri(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Bm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ia(t.assigned_,o)?a.concat(o):void 0,u=xi(e,n,c);if(_m(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Pi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;xi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ri(e,n)}}function Ri(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fi(t,r)}function TR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:$m(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Du;r&&(n=[o],a=sa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Du={get(e,t){if(t===je)return e;let r=Gr(e);if(!ia(r,t))return OR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===vu(e.base_,t)?(bu(e),e.copy_[t]=qu(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=zm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=vu(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(vR(r,n)&&(r!==void 0||ia(e.base_,t)))return!0;bu(e),Ou(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 vu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,bu(e),Ou(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(){Ae(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){Ae(12)}},sa={};aa(Du,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)};sa.set=function(e,t,r){return Du.set.call(this,e[0],t,r,e[0])};function vu(e,t){let r=e[je];return(r?Gr(r):e)[t]}function OR(e,t,r){let o=zm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function zm(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 Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function bu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qR=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"&&Ae(6),o!==void 0&&typeof o!="function"&&Ae(7);let n;if(_e(t)){let a=Lm(this),i=qu(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Eu(a):Tu(a)}return Qm(a,o),Um(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ku&&(n=void 0),this.autoFreeze_&&Fi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ae(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)||Ae(8),He(e)&&(e=Wm(e));let t=Lm(this),r=qu(e,void 0);return r[je].isManual_=!0,Tu(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&Ae(9);let{scope_:o}=r;return Qm(o,t),Um(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 qu(e,t){let r=ua(e)?Jr("MapSet").proxyMap_(e,t):la(e)?Jr("MapSet").proxySet_(e,t):TR(e,t);return(t?t.scope_:$m()).drafts_.push(r),r}function Wm(e){return He(e)||Ae(10,e),Km(e)}function Km(e){if(!_e(e)||Pi(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 aa(r,(o,n)=>{_m(r,o,Km(n))}),t&&(t.finalized_=!1),r}function Gm(){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,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;aa(p.assigned_,(A,y)=>{let x=Au(C,A),E=Au(h,A),v=y?ia(C,A)?t:r:o;if(x===E&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:E}),S.push(v===r?{op:o,path:R}:v===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,A=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}A++}),A=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===ku?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 v=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ae(19),typeof h=="function"&&R==="prototype"&&Ae(19),h=Au(h,R),typeof h!="object"&&Ae(18,S.join("/"))}let A=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(A){case 2:return h.set(x,y);case 3:Ae(16);default:return h[x]=y}case r:switch(A){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(A){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:Ae(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(ua(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(la(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 ia(p,na)&&(m[na]=p[na]),m}function d(p){return He(p)?l(p):p}wR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new qR,Gt=Ye.produce,Ai=Ye.produceWithPatches.bind(Ye),iV=Ye.setAutoFreeze.bind(Ye),cV=Ye.setUseStrictShallowCopy.bind(Ye),Nu=Ye.applyPatches.bind(Ye),sV=Ye.createDraft.bind(Ye),uV=Ye.finishDraft.bind(Ye);function kR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function VR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function DR(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 Hm=e=>Array.isArray(e)?e:[e];function NR(e){let t=Array.isArray(e[0])?e[0]:e;return DR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function MR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var mV=Symbol();var pV=Object.getPrototypeOf({});var QR=class{constructor(e){this.value=e}deref(){return this.value}},LR=typeof WeakRef<"u"?WeakRef:QR,UR=0,Ym=1;function vi(){return{s:UR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=vi(),{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=vi(),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=vi(),f.set(m,c)):c=S}}let s=c,l;if(c.s===Ym)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 LR(l):l}return s.s=Ym,s.v=l,l}return i.clearCache=()=>{r=vi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Jm(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()),kR(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=Hm(p),h=Hm(f),A=NR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=MR(A,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:A,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=Jm(Vo),BR=Object.assign((e,t=Q)=>{VR(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:()=>BR});function Xm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Zm=Xm(),ep=Xm;var jR=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)},PV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},_R=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=>Ci(o)&&o.type===e,r}var ap=class da extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,da.prototype)}static get[Symbol.species](){return da}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new da(...t[0].concat(this)):new da(...t.concat(this))}};function tp(e){return _e(e)?Gt(e,()=>{}):e}function rp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $R(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 ap;return r&&($R(r)?i.push(Zm):i.push(ep(r.extraArgument))),i},ma="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[ma]:!0}}),op=e=>t=>{setTimeout(t,e)},WR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:op(10):e.type==="callback"?e.queueNotification:op(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[ma],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},KR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new ap(e);return o&&n.push(WR(typeof o=="object"?o:void 0)),n};function ip(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(At(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=jR({trace:!1,...typeof n=="object"&&n}));let l=Mm(...u),d=KR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Pu(c,a,m)}function cp(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 GR(e){return typeof e=="function"}function j(e,t){let[r,o,n]=cp(t),a;if(GR(e))a=()=>tp(e());else{let c=tp(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 sp=(e,t)=>_R(e)?e.match(t):e(t);function vt(...e){return t=>e.some(r=>sp(r,t))}function Do(...e){return t=>e.every(r=>sp(r,t))}function wi(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 pa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ii(...e){return e.length===0?t=>wi(t,["pending"]):pa(e)?vt(...e.map(t=>t.pending)):Ii()(e[0])}function Xr(...e){return e.length===0?t=>wi(t,["rejected"]):pa(e)?vt(...e.map(t=>t.rejected)):Xr()(e[0])}function fa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):pa(e)?Do(Xr(...e),t):fa()(e[0])}function Ht(...e){return e.length===0?t=>wi(t,["fulfilled"]):pa(e)?vt(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Ei(...e){return e.length===0?t=>wi(t,["pending","fulfilled","rejected"]):pa(e)?vt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ei()(e[0])}var HR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ti=(e=21)=>{let t="",r=e;for(;r--;)t+=HR[Math.random()*64|0];return t},YR=["name","message","stack","code"],Mu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},np=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},JR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of YR)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||JR)(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):Ti(),m=new AbortController,f,S;function C(A){S=A,m.abort()}let h=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(ZR(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,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}))),A=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new Mu(v,R),fulfillWithValue:(v,R)=>new np(v,R)})).then(v=>{if(v instanceof Mu)throw v;return v instanceof np?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof Mu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||s(A),A}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(XR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:vt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function XR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ZR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var up=Symbol.for("rtk-slice-createasyncthunk"),IV={[up]:_};function eF(e,t){return`${e}/${t}`}function tF({creators:e}={}){let t=e?.asyncThunk?.[up];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(oF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(A,y){let x=typeof A=="string"?A:A.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(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),s},exposeAction(A,y){return u.actionCreators[A]=y,s},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,s}};c.forEach(A=>{let y=i[A],x={reducerName:A,type:eF(n,A),createNotation:typeof o.reducers=="function"};aF(y)?cF(x,y,s,t):nF(x,y,s)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?cp(o.extraReducers):[o.extraReducers],E={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in E)v.addCase(R,E[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function S(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=S()),R}function E(v=d){let R=rp(p,y,()=>new WeakMap);return rp(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=rF(T,v,S,y);return P})}return{reducerPath:A,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(A,{reducerPath:y,...x}={}){let E=y??a;return A.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function rF(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=tF();function oF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function nF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!iF(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 aF(e){return e._reducerDefinitionType==="asyncThunk"}function iF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cF({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||bi,pending:c||bi,rejected:u||bi,settled:s||bi})}function bi(){}var lp="listener",dp="completed",mp="cancelled",EV=`task-${mp}`,TV=`task-${dp}`,OV=`${lp}-${mp}`,qV=`${lp}-${dp}`;var{assign:pp}=Object;var Qu="listenerMiddleware";var sF=pp(g(`${Qu}/add`),{withTypes:()=>sF}),kV=g(`${Qu}/removeAll`),uF=pp(g(`${Qu}/remove`),{withTypes:()=>uF});var VV=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),Oi=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),qi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ki=Q(e=>e.commercePagination?.principal.page||0,e=>e),fp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var WV=Q(e=>e[B].productListing.responseId,e=>e),ga=Q(e=>e.productListing.responseId,e=>e),gp=Q(e=>e.productListing.requestId,e=>e),ya=Q(e=>e.productListing?.products.length||0,e=>e),yp=Q(e=>({total:lr(e),current:ya(e)}),({current:e,total:t})=>e<t),hp=Q(e=>e.productListing?.isLoading,e=>lF(e)?!1:e),Sp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Ep}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Uu(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 wt(e){let{activeValue:t,ancestryMap:r}=mF(e);return t?pF(t,r):[]}function mF(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 pF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Cp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as yF,EnumValue as Fp,StringValue as Pp,RecordValue as Ap}from"@coveo/bueno";import{ArrayValue as fF,EnumValue as xp,RecordValue as Rp,StringValue as gF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),It=()=>({by:"relevance"});var JV=new Rp({options:{required:!1},values:{by:new xp({enum:ht,required:!0}),fields:new fF({each:new Rp({values:{name:new gF,direction:new xp({enum:eo})}})})}});var Vi=e=>({by:"fields",fields:e}),vp=new Ap({options:{required:!1},values:{by:new Fp({enum:ht,required:!0}),fields:new yF({each:new Ap({values:{field:new Pp({required:!0}),direction:new Fp({enum:eo}),displayName:new Pp}})})}});function to(){return{appliedSort:It(),availableSorts:[It()]}}function Di(e){return{...hF(e?.commercePagination,t=>t.principal.page,dr().page),...SF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Uu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),CF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),xF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),RF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),FF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),bp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),wp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),bp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),wp,"nfExcluded"),...Ip("selected",e.manualNumericFacetSet),...Ip("excluded",e.manualNumericFacetSet)}}function hF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function SF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function CF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function xF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function RF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function bp(e){return e.values.filter(t=>t.state==="selected")}function wp(e){return e.values.filter(t=>t.state==="excluded")}function Ip(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 FF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ni=()=>({query:""});var FD=Q(e=>e[B].commerceSearch.responseId,e=>e),ha=Q(e=>e.commerceSearch.responseId,e=>e),Tp=Q(e=>e.commerceSearch.requestId,e=>e),Sa=Q(e=>e.commerceSearch?.products.length||0,e=>e),Op=Q(e=>({total:lr(e),current:Sa(e)}),({current:e,total:t})=>e<t),qp=Q(e=>e.commerceSearch?.isLoading,e=>Ep(e)?!1:e),kp=Q(e=>e.commerceSearch?.error,e=>e??null),Mi=Q(e=>e.commerceQuery?.query,e=>e??""),PF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Vp=(e,t)=>Ep(t.queryCorrection?.correctedQuery)?Mi(e):t.queryCorrection.correctedQuery,Dp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ni().query),...Di(e)});function Np(e){return{query:PF(e)||""}}var Bu;(t=>t.responseIdSelector=Mp(ha))(Bu||(Bu={}));var ju;(t=>t.responseIdSelector=Mp(ga))(ju||(ju={}));function Mp(e){return t=>e(t[B])}var Bp={};km(Bp,{escape:()=>Mo,getHighlightedSuggestion:()=>$u,highlightString:()=>bF});import{isNullOrUndefined as vF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Lp(e){return Array.isArray(e)}function Qi(e){return e.trim()===""}function Up(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ca(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function bF(e){if(Qi(e.openingDelimiter)||Qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(vF(e.content)||Qi(e.content))return e.content;if(e.highlights.length===0)return Mo(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+=Mo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Mo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Mo(e.content.slice(o))),r}function $u(e,t){return e=Mo(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 Mo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Zp=Pt(Hp(),1);var XF="recommendation-internal-options",ND=Symbol.for(XF);var $=new Error("Failed to load reducers."),Qo=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 Yp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Jp(e){return typeof e!="object"||!e?!1:Object.values(e).every(ZF)}function ZF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Xp(e){return e===429}var Lo=class e{static async call(t){let r=eP(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(Xp(u.status))throw u;return u};try{let u=await(0,Zp.backOff)(c,{retry:s=>{let l=s&&Xp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Qo;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=Ca(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 Zu(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function eP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=tP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function tP(e,t){return t==="application/x-www-form-urlencoded"?Jp(e)?Yp(e):"":JSON.stringify(e)}function rP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function oP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function el(e,t){if(t&&e.name==="AbortError")return{error:oP(e)};if(e instanceof no)return{error:rP(e)};throw e}var Uo=(e,t)=>({...Fa(e,t),requestParams:nP(e)}),nP=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}},Fa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var ef=(e,t)=>({...Fa(e,t),requestParams:aP(e)}),aP=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 tf=e=>({...Fa(e,"search/querySuggest"),requestParams:iP(e)}),iP=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,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Uo(t,"listing"),...this.options})}async search(t){let r=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ef(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Uo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=tf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Uo(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=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Lo.call(t);if(r instanceof Error)return el(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function tl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var Bi=e=>e;import{StringValue as pf}from"@coveo/bueno";import{Schema as cP,SchemaValidationError as sP,StringValue as Pa,RecordValue as uP,ArrayValue as lP}from"@coveo/bueno";var k=new Pa({required:!0,emptyAllowed:!1}),ne=new Pa({required:!1,emptyAllowed:!1}),me=new Pa({required:!0,emptyAllowed:!0}),rf=new Pa({required:!1,emptyAllowed:!0}),of=new lP({each:k,required:!0}),nf=new Pa({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 cP({value:t}).validate({value:e}).value};let n=new uP({options:{required:!0},values:t}).validate(e);if(n)throw new sP(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 af(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return af(e,t,r,n,"Controller initialization error")},af=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as dP,BooleanValue as sf,RecordValue as mP,StringValue as Aa,Value as pP}from"@coveo/bueno";var Bo="3.23.0",cf=["@coveo/atomic","@coveo/quantic"];var rl=()=>ne,uf=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Aa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),lf=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 dP({required:!1,each:k})})),jo={enabled:new sf({default:!0}),originContext:rl(),originLevel2:rl(),originLevel3:rl(),proxyBaseUrl:new Aa({required:!1,url:!0}),runtimeEnvironment:new pP,anonymous:new sf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new Aa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new mP({options:{required:!1},values:cf.reduce((e,t)=>(e[t]=nf,e),{})})},ol=g("configuration/updateAnalyticsConfiguration",e=>F(e,jo)),ji=g("configuration/analytics/disable"),_i=g("configuration/analytics/enable"),df=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:uf()})),mf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:uf()}));var _o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new pf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),$o=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new pf({required:!1,url:!0})})),zo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:jo.enabled,proxyBaseUrl:jo.proxyBaseUrl,source:jo.source,trackingId:jo.trackingId})),$i=g("commerce/configuration/analytics/disable"),zi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var nl=j(ff(),e=>e.addCase(_o,(t,r)=>{gf(t,r.payload)}).addCase(ao,(t,r)=>{gf(t,r.payload)}).addCase($o,(t,r)=>{fP(t,r.payload)}).addCase(zo,(t,r)=>{gP(t,r.payload)}).addCase($i,t=>{t.analytics.enabled=!1}).addCase(zi,t=>{t.analytics.enabled=!0}));function gf(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 gP(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 Wo(e){return e.currency}var yf=(e,t)=>({currency:Wo(t.commerceContext),products:yP(t.cart),transaction:e}),hf=(e,t)=>({currency:Wo(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),yP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as hP,NumberValue as Sf,RecordValue as SP,Schema as CP,StringValue as xP}from"@coveo/bueno";var al={productId:k,quantity:new Sf({required:!0,min:0}),name:new xP({required:!1}),price:new Sf({required:!1,min:0})},il=new hP({each:new SP({values:{...al}})}),cl={items:il},Cf=new CP(cl);var pr=g("commerce/cart/setItems",e=>F(e,il)),Ko=g("commerce/cart/updateItemQuantity",e=>F(e,al)),Go=g("commerce/cart/purchase"),Wi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=yf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Ki=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=hf(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 xf(e,t){return e.cart[so(t)]}var Rf=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),Ff=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function RP(e,t={}){if(!FP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,Cf,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(Wi(l)),r(Go())},updateItemQuantity(l){let d=xf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Ki(s(l,d))),r(Ko(l)))},get state(){let l=n();return{items:co(l),totalQuantity:Rf(l),totalPrice:Ff(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function FP(e){return e.addReducers({cart:Ho}),!0}var Gi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Pf=e=>vf(e.cartItems,e.cart),Af=e=>vf(e.purchasedItems,e.purchased);function vf(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 Ho=j(Gi(),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:{}}},Gi());bf(t,n,o)}).addCase(Ko,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){PP(r,t);return}if(r.quantity<=0){AP(r,t);return}t.cart[o]=r}).addCase(Go,t=>{vP(t);let{cart:r,cartItems:o}=Gi();bf(t,o,r)})});function bf(e,t,r){e.cartItems=t,e.cart=r}function PP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function AP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function vP(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 wf,RecordValue as If,Schema as bP,StringValue as wP}from"@coveo/bueno";var IP=Intl.supportedValuesOf("currency"),EP=new wP({required:!0,emptyAllowed:!1,constrainTo:IP}),sl={url:k},ul={latitude:new wf({min:-90,max:90,required:!0}),longitude:new wf({min:-180,max:180,required:!0})},va={language:k,country:k,currency:EP,view:new If({options:{required:!0},values:sl}),location:new If({options:{required:!1},values:ul})},Ef=new bP(va);var se=g("commerce/context/set",e=>F(e,va)),le=g("commerce/context/setView",e=>F(e,sl)),Yo=g("commerce/context/setLocation",e=>F(e,ul));var Tf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Tf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Yo,(t,{payload:r})=>{t.location=r})});var Hi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as LP,RecordValue as UP,StringValue as kf}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@${Bo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??tl(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:Pf(e.cart),source:gr(e.configuration.analytics)}}};var Yi=(e,t,r)=>({...yr(e,t),...TP(e,r)}),TP=(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)=>({...Yi(e,t),facets:[...OP(e)],...e.commerceSort&&{sort:qP(e.commerceSort.appliedSort)}});function OP(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 qP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ll,NumberValue as kP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new kP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new ll({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 ll({required:!0})})),Jo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new ll({required:!0})}));import{NumberValue as Of}from"@coveo/bueno";var Ji={slotId:rf},VP={...Ji,pageSize:new Of({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,VP)),DP={...Ji,page:new Of({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,DP)),hr=g("commerce/pagination/nextPage",e=>F(e,Ji)),Sr=g("commerce/pagination/previousPage",e=>F(e,Ji)),Xo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as NP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new NP}));import{isNullOrUndefined as qf}from"@coveo/bueno";import{RecordValue as MP,StringValue as QP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new QP({emptyAllowed:!0,required:!0})})),Zo=g("commerce/triggers/query/applyModification",e=>F(e,new MP({values:{originalQuery:ne,modification:ne}})));var ba=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(!(!qf(n)&&!qf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Vp(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(Zo({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=Mi(o),c=new ba(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(!Op(o))return null;let i=ur(o),u=Sa(o)/i,s=Mi(o),l=ot(o,n),d=new ba(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),en=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new kf,clearFilters:new LP}),e.clearFilters&&(r(pe()),r(fr())),r(Jo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),tn=_("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}}}),BP={child:new UP({options:{required:!0},values:{permanentid:new kf({required:!0})}})},rn=g("commerce/search/promoteChildToParent",e=>F(e,BP));function Vf(){return{wasCorrectedTo:"",queryCorrection:Hi(),originalQuery:""}}var Xi=j(Vf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Hi(),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 Mf,BooleanValue as Df,ArrayValue as ec,StringValue as Zi,NumberValue as Nf,RecordValue as GP}from"@coveo/bueno";var Y=k;import{Value as jP,NumberValue as _P,StringValue as $P,ArrayValue as zP,BooleanValue as WP}from"@coveo/bueno";var KP={state:new jP({required:!0}),numberOfResults:new _P({required:!0,min:0}),value:new $P({required:!0,emptyAllowed:!0}),path:new zP({required:!0,each:k}),moreValuesAvailable:new WP({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},KP)}var on={facetId:Y,field:k,tabs:new GP({options:{required:!1},values:{included:new ec({each:new Zi}),excluded:new ec({each:new Zi})}}),activeTab:new Zi({required:!1}),delimitingCharacter:new Zi({required:!1,emptyAllowed:!0}),filterFacetCount:new Df({required:!1}),injectionDepth:new Nf({required:!1,min:0}),numberOfValues:new Nf({required:!1,min:1}),sortCriteria:new Mf({required:!1}),basePath:new ec({required:!1,each:k}),filterByBasePath:new Df({required:!1})},nn=5,Qf=g("categoryFacet/register",e=>F(e,on)),Lf=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)}}}),Uf=g("categoryFacet/deselectAll",e=>F(e,on.facetId)),dQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:on.facetId,numberOfValues:on.numberOfValues})),mQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:on.facetId,criterion:new Mf})),pQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:on.facetId,basePath:new ec({each:k})}));import{NumberValue as XP,RecordValue as ZP,ArrayValue as eA}from"@coveo/bueno";import{RecordValue as HP,NumberValue as YP,StringValue as JP}from"@coveo/bueno";var Ia={facetId:Y,captions:new HP({options:{required:!1}}),numberOfValues:new YP({required:!1,min:1}),query:new JP({required:!1,emptyAllowed:!0})};var tA={path:new eA({required:!0,each:k}),displayValue:me,rawValue:me,count:new XP({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new ZP({values:tA})})),tc=g("categoryFacetSearch/register",e=>F(e,Ia));import{RecordValue as rA,NumberValue as oA}from"@coveo/bueno";var Bf={facetId:Y,value:new rA({values:{displayValue:me,rawValue:me,count:new oA({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Ia)),Rr=g("facetSearch/update",e=>F(e,Ia)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Bf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Bf));import{BooleanValue as nA}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new nA({required:!1})})),dl=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var aA=g("history/undo"),iA=g("history/redo"),Ot=g("history/snapshot"),NQ=_("history/back",async(e,{dispatch:t})=>{t(aA()),await t(Ce())}),MQ=_("history/forward",async(e,{dispatch:t})=>{t(iA()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as jf,StringValue as Ea,NumberValue as _f,RecordValue as Fr}from"@coveo/bueno";var oc={q:new Ea,enableQuerySyntax:new jf,aq:new Ea,cq:new Ea,firstResult:new _f({min:0}),numberOfResults:new _f({min:0}),sortCriteria:new Ea,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new jf,sf:new Fr,tab:new Ea,af:new Fr};var ve=g("searchParameters/restore",e=>F(e,oc)),cA=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Sy,NumberValue as Cy,StringValue as Cw}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 w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function fl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function an(){return typeof document<"u"}function gl(){try{return typeof localStorage<"u"}catch{return!1}}function sA(){try{return typeof sessionStorage<"u"}catch{return!1}}function og(){return wl()&&navigator.cookieEnabled}var uA=[ee.click,ee.custom,ee.search,ee.view],lA=(e,t)=>uA.indexOf(e)!==-1?Object.assign({language:an()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,qa=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?$f(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],$f(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 $f(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function dA(){return gl()?localStorage:og()?new ka:sA()?sessionStorage:new sn}var ka=class e{getItem(t){return qa.get(`${e.prefix}${t}`)}removeItem(t){qa.erase(`${e.prefix}${t}`)}setItem(t,r,o){qa.set(`${e.prefix}${t}`,r,o)}};ka.prefix="coveo_";var yl=class{constructor(){this.cookieStorage=new ka}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)}},sn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ta="__coveo.analytics.history",ng=20,ag=1e3*60,ig=75,un=class{constructor(t){this.store=t||dA()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ta);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ta);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ta,JSON.stringify(t.slice(0,ng)))}catch{}}clear(){try{this.store.removeItem(Ta)}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,ig)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ag:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},cg=Object.freeze({__proto__:null,HistoryStore:un,MAX_NUMBER_OF_HISTORY_ELEMENTS:ng,MAX_VALUE_SIZE:ig,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ag,STORE_KEY:Ta,default:un}),mA=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield pA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),pA=e=>w(void 0,void 0,void 0,function*(){let t=new un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,fA=new Uint8Array(16);function gA(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(fA)}var yA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ic(e){return typeof e=="string"&&yA.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function sg(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 hA(e){if(!ic(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function SA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var CA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function RA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=SA(n)),typeof a=="string"&&(a=hA(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 sg(s)}try{o.name=e}catch{}return o.DNS=CA,o.URL=xA,o}var FA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zf={randomUUID:FA};function po(e,t,r){if(zf.randomUUID&&!t&&!e)return zf.randomUUID();e=e||{};let o=e.random||(e.rng||gA)();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 sg(o)}function PA(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 ml(e,t){return e<<t|e>>>32-t}function AA(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]=ml(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=ml(u,5)+PA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ml(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 vA=RA("v5",80,AA),Wf=vA,ug="2.30.45",Kf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Oa={pageview:"pageview",event:"event"},cc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},hl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kf(window.location),this.lastReferrer=an()?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:an()?document.title:"",encoding:an()?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===Oa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Oa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Oa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Oa.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 Kf(window.location)}},Pr=class e{constructor(t,r){if(!ic(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return ic(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Sl=class extends cc{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 w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Sl.Id="link";var it=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var pl=128,lg=192,Gf=224,Hf=240;function bA(e){return(e&248)===Hf?4:(e&Hf)===Gf?3:(e&Gf)===lg?2:1}function wA(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&pl)!=pl)break;if(r-=3,(o&lg)!=pl){t-r>=bA(o)*3&&(r=t);break}}return e.substring(0,r)}var Cl={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"},IA=it(Cl).map(e=>Cl[e]),EA=[...IA].join("|"),TA=new RegExp(`^(${EA}$)`),OA={svcAction:"svc_action",svcActionData:"svc_action_data"},qA=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Cl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),kA=e=>TA.test(e),VA=[kA],Yf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},sc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},DA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],xl={id:"quoteId",affiliation:"quoteAffiliation"},Rl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},NA={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),sc),purchase:Object.assign(Object.assign({},qe),sc),quickview:qe,quote:Object.assign(Object.assign({},qe),xl),review:Object.assign(Object.assign({},qe),Rl)},MA=it(Yf).map(e=>Yf[e]),QA=it(Jf).map(e=>Jf[e]),LA=it(qe).map(e=>qe[e]),UA=it(sc).map(e=>sc[e]),BA=it(Rl).map(e=>Rl[e]),jA=it(xl).map(e=>xl[e]),_A=[...MA,"custom"].join("|"),$A=[...QA,"custom"].join("|"),dg="(pr[0-9]+)",mg="(il[0-9]+pi[0-9]+)",zA=new RegExp(`^${dg}(${_A})$`),WA=new RegExp(`^(${mg}(${$A}))|(il[0-9]+nm)$`),KA=new RegExp(`^(${LA.join("|")})$`),GA=new RegExp(`^(${UA.join("|")})$`),HA=new RegExp(`^${dg}custom$`),YA=new RegExp(`^${mg}custom$`),JA=new RegExp(`^(${[...DA,...BA,...jA].join("|")})$`),XA=e=>zA.test(e),ZA=e=>WA.test(e),ev=e=>KA.test(e),tv=e=>GA.test(e),rv=e=>JA.test(e),ov=[ZA,XA,ev,tv,rv],nv=[HA,YA],av={anonymizeIp:"aip"},iv={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},cv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},sv=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],uv=Object.assign(Object.assign(Object.assign(Object.assign({},av),iv),cv),sv.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Fl=Object.assign(Object.assign({},uv),OA),lv=e=>{let t=!!e.action&&NA[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Fl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},dv=it(Fl).map(e=>Fl[e]),mv=e=>dv.indexOf(e)!==-1,pv=e=>e==="custom",fv=e=>[...ov,...VA,mv,pv].some(t=>t(e)),gv=e=>it(e).reduce((t,r)=>{let o=yv(r);return o?Object.assign(Object.assign({},t),hv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),yv=e=>{let t;return[...nv].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},hv=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Al=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},Xf=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=er(u,["url"]),d;try{d=yield Xf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Xf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},vl=class{constructor(t,r){gl()&&og()?this.storage=new yl:gl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new sn),this.client=new uc(t),this.beaconClient=new Pl(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}},bl=class{constructor(t,r){this.storage=r||new sn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new sn,this.client=new Al}getClientDependingOnEventType(t){return this.client}},Sv="xx",Cv=e=>e?.startsWith(Sv)||!1,xv=`
|
|
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
|