@coveo/headless 3.23.2-pre.d35ebef42a → 3.23.2-pre.e3734b4a39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});l()
|
|
|
25
25
|
`)}
|
|
26
26
|
|
|
27
27
|
${t}
|
|
28
|
-
`;return new va(r)}var va=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},o=[];for(let n in this.definition){let a=this.definition[n].validate(r[n]);a&&o.push(`${n}: ${a}`)}if(o.length)throw $R(o,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},Ce=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&te(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function $o(e){return e===void 0}function zR(e){return e===null}function te(e){return $o(e)||zR(e)}var G=class{constructor(e={}){be(this,"value");this.config=e,this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t||(WR(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function WR(e){return $o(e)||tp(e)}function tp(e){return typeof e=="number"&&!isNaN(e)}var Z=class{constructor(e={}){be(this,"value");this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t||(HR(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function HR(e){return $o(e)||rp(e)}function rp(e){return typeof e=="boolean"}var KR=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,D=class{constructor(e={}){be(this,"value");be(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Ce(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:o,constrainTo:n,ISODate:a}=this.config,d=this.value.validate(e);if(d)return d;if($o(e))return null;if(!Di(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return o&&!o.test(e)?`value did not match provided regex ${o}`:n&&!n.includes(e)?`value should be one of: ${n.join(", ")}.`:a&&!(KR.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Di(e){return Object.prototype.toString.call(e)==="[object String]"}var L=class{constructor(e={}){be(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if($o(e))return this.config.options.required?"value is required and is currently undefined":null;if(!op(e))return"value is not an object";for(let[r,o]of Object.entries(this.config.values))if(o.required&&te(e[r]))return`value does not contain ${r}`;let t="";for(let[r,o]of Object.entries(this.config.values)){let n=e[r],a=o.validate(n);a!==null&&(t+=" "+a)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function op(e){return e!==void 0&&typeof e=="object"}var ae=class{constructor(e={}){be(this,"value");this.config=e,this.value=new Ce(this.config)}validate(e){if(!te(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(te(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(o=>{this.config.each.required&&te(o)&&(r=`value is null or undefined: ${e.join(",")}`);let n=this.validatePrimitiveValue(o,this.config.each);n!==null&&(r+=" "+n)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return rp(e)||Di(e)||tp(e)||op(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ni(e){return Array.isArray(e)}var kt=class{constructor(e){be(this,"value");this.config=e,this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t!==null?t:$o(e)||Object.values(this.config.enum).find(o=>o===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};l();c();u();s();l();c();u();s();function Qe(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 GR=typeof Symbol=="function"&&Symbol.observable||"@@observable",np=GR,Bu=()=>Math.random().toString(36).substring(7).split("").join("."),YR={INIT:`@@redux/INIT${Bu()}`,REPLACE:`@@redux/REPLACE${Bu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bu()}`},Mi=YR;function Ut(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 _u(e,t,r){if(typeof e!="function")throw new Error(Qe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Qe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Qe(1));return r(_u)(e,t)}let o=e,n=t,a=new Map,d=a,m=0,f=!1;function p(){d===a&&(d=new Map,a.forEach((w,A)=>{d.set(A,w)}))}function g(){if(f)throw new Error(Qe(3));return n}function h(w){if(typeof w!="function")throw new Error(Qe(4));if(f)throw new Error(Qe(5));let A=!0;p();let O=m++;return d.set(O,w),function(){if(A){if(f)throw new Error(Qe(6));A=!1,p(),d.delete(O),a=null}}}function R(w){if(!Ut(w))throw new Error(Qe(7));if(typeof w.type>"u")throw new Error(Qe(8));if(typeof w.type!="string")throw new Error(Qe(17));if(f)throw new Error(Qe(9));try{f=!0,n=o(n,w)}finally{f=!1}return(a=d).forEach(O=>{O()}),w}function x(w){if(typeof w!="function")throw new Error(Qe(10));o=w,R({type:Mi.REPLACE})}function v(){let w=h;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(Qe(11));function O(){let I=A;I.next&&I.next(g())}return O(),{unsubscribe:w(O)}},[np](){return this}}}return R({type:Mi.INIT}),{dispatch:R,subscribe:h,getState:g,replaceReducer:x,[np]:v}}function JR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Mi.INIT})>"u")throw new Error(Qe(12));if(typeof r(void 0,{type:Mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Qe(13))})}function zo(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let m=t[d];typeof e[m]=="function"&&(r[m]=e[m])}let o=Object.keys(r),n,a;try{JR(r)}catch(d){a=d}return function(m={},f){if(a)throw a;let p=!1,g={};for(let h=0;h<o.length;h++){let R=o[h],x=r[R],v=m[R],P=x(v,f);if(typeof P>"u"){let w=f&&f.type;throw new Error(Qe(14))}g[R]=P,p=p||P!==v}return p=p||o.length!==Object.keys(m).length,p?g:m}}function Wo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function ap(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Qe(15))},d={getState:n.getState,dispatch:(f,...p)=>a(f,...p)},m=e.map(f=>f(d));return a=Wo(...m)(n.dispatch),{...n,dispatch:a}}}function Li(e){return Ut(e)&&"type"in e&&typeof e.type=="string"}l();c();u();s();var Xu=Symbol.for("immer-nothing"),Fa=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Ue(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lo=Object.getPrototypeOf;function lt(e){return!!e&&!!e[ot]}function nt(e){return e?lp(e)||Array.isArray(e)||!!e[Fa]||!!e.constructor?.[Fa]||Ia(e)||Ea(e):!1}var XR=Object.prototype.constructor.toString();function lp(e){if(!e||typeof e!="object")return!1;let t=lo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===XR}function Zu(e){return lt(e)||Ue(15,e),e[ot].base_}function Pa(e,t){mo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function mo(e){let t=e[ot];return t?t.type_:Array.isArray(e)?1:Ia(e)?2:Ea(e)?3:0}function Aa(e,t){return mo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ju(e,t){return mo(e)===2?e.get(t):e[t]}function dp(e,t,r){let o=mo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function ZR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ia(e){return e instanceof Map}function Ea(e){return e instanceof Set}function uo(e){return e.copy_||e.base_}function Wu(e,t){if(Ia(e))return new Map(e);if(Ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=lp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[ot];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let d=n[a],m=o[d];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(o[d]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[d]})}return Object.create(lo(e),o)}else{let o=lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Bi(e,t=!1){return _i(e)||lt(e)||!nt(e)||(mo(e)>1&&(e.set=e.add=e.clear=e.delete=ev),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Bi(o,!0))),e}function ev(){Ue(2)}function _i(e){return Object.isFrozen(e)}var Hu={};function po(e){let t=Hu[e];return t||Ue(0,e),t}function tv(e,t){Hu[e]||(Hu[e]=t)}var ba;function mp(){return ba}function rv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ip(e,t){t&&(po("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ku(e){Gu(e),e.drafts_.forEach(ov),e.drafts_=null}function Gu(e){e===ba&&(ba=e.parent_)}function cp(e){return ba=rv(ba,e)}function ov(e){let t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[ot].modified_&&(Ku(t),Ue(4)),nt(e)&&(e=Qi(t,e),t.parent_||Ui(t,e)),t.patches_&&po("Patches").generateReplacementPatches_(r[ot].base_,e,t.patches_,t.inversePatches_)):e=Qi(t,r,[]),Ku(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xu?e:void 0}function Qi(e,t,r){if(_i(t))return t;let o=t[ot];if(!o)return Pa(t,(n,a)=>up(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ui(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,d=!1;o.type_===3&&(a=new Set(n),n.clear(),d=!0),Pa(a,(m,f)=>up(e,o,n,m,f,r,d)),Ui(e,n,!1),r&&e.patches_&&po("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function up(e,t,r,o,n,a,d){if(lt(n)){let m=a&&t&&t.type_!==3&&!Aa(t.assigned_,o)?a.concat(o):void 0,f=Qi(e,n,m);if(dp(r,o,f),lt(f))e.canAutoFreeze_=!1;else return}else d&&r.add(n);if(nt(n)&&!_i(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Qi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ui(e,n)}}function Ui(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bi(t,r)}function nv(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:mp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=el;r&&(n=[o],a=wa);let{revoke:d,proxy:m}=Proxy.revocable(n,a);return o.draft_=m,o.revoke_=d,m}var el={get(e,t){if(t===ot)return e;let r=uo(e);if(!Aa(r,t))return av(e,r,t);let o=r[t];return e.finalized_||!nt(o)?o:o===$u(e.base_,t)?(zu(e),e.copy_[t]=Ju(o,e)):o},has(e,t){return t in uo(e)},ownKeys(e){return Reflect.ownKeys(uo(e))},set(e,t,r){let o=pp(uo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=$u(uo(e),t),a=n?.[ot];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ZR(r,n)&&(r!==void 0||Aa(e.base_,t)))return!0;zu(e),Yu(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 $u(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zu(e),Yu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=uo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ue(11)},getPrototypeOf(e){return lo(e.base_)},setPrototypeOf(){Ue(12)}},wa={};Pa(el,(e,t)=>{wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wa.deleteProperty=function(e,t){return wa.set.call(this,e,t,void 0)};wa.set=function(e,t,r){return el.set.call(this,e[0],t,r,e[0])};function $u(e,t){let r=e[ot];return(r?uo(r):e)[t]}function av(e,t,r){let o=pp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function pp(e,t){if(!(t in e))return;let r=lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=lo(r)}}function Yu(e){e.modified_||(e.modified_=!0,e.parent_&&Yu(e.parent_))}function zu(e){e.copy_||(e.copy_=Wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iv=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 d=this;return function(f=a,...p){return d.produce(f,g=>r.call(this,g,...p))}}typeof r!="function"&&Ue(6),o!==void 0&&typeof o!="function"&&Ue(7);let n;if(nt(t)){let a=cp(this),d=Ju(t,void 0),m=!0;try{n=r(d),m=!1}finally{m?Ku(a):Gu(a)}return ip(a,o),sp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Xu&&(n=void 0),this.autoFreeze_&&Bi(n,!0),o){let a=[],d=[];po("Patches").generateReplacementPatches_(t,n,a,d),o(a,d)}return n}else Ue(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...m)=>this.produceWithPatches(d,f=>t(f,...m));let o,n;return[this.produce(t,r,(d,m)=>{o=d,n=m}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Ue(8),lt(e)&&(e=fp(e));let t=cp(this),r=Ju(e,void 0);return r[ot].isManual_=!0,Gu(t),r}finishDraft(e,t){let r=e&&e[ot];(!r||!r.isManual_)&&Ue(9);let{scope_:o}=r;return ip(o,t),sp(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=po("Patches").applyPatches_;return lt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ju(e,t){let r=Ia(e)?po("MapSet").proxyMap_(e,t):Ea(e)?po("MapSet").proxySet_(e,t):nv(e,t);return(t?t.scope_:mp()).drafts_.push(r),r}function fp(e){return lt(e)||Ue(10,e),gp(e)}function gp(e){if(!nt(e)||_i(e))return e;let t=e[ot],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 Pa(r,(o,n)=>{dp(r,o,gp(n))}),t&&(t.finalized_=!1),r}function yp(){let t="replace",r="add",o="remove";function n(R,x,v,P){switch(R.type_){case 0:case 2:return d(R,x,v,P);case 1:return a(R,x,v,P);case 3:return m(R,x,v,P)}}function a(R,x,v,P){let{base_:w,assigned_:A}=R,O=R.copy_;O.length<w.length&&([w,O]=[O,w],[v,P]=[P,v]);for(let b=0;b<w.length;b++)if(A[b]&&O[b]!==w[b]){let I=x.concat([b]);v.push({op:t,path:I,value:h(O[b])}),P.push({op:t,path:I,value:h(w[b])})}for(let b=w.length;b<O.length;b++){let I=x.concat([b]);v.push({op:r,path:I,value:h(O[b])})}for(let b=O.length-1;w.length<=b;--b){let I=x.concat([b]);P.push({op:o,path:I})}}function d(R,x,v,P){let{base_:w,copy_:A}=R;Pa(R.assigned_,(O,b)=>{let I=ju(w,O),Q=ju(A,O),k=b?Aa(w,O)?t:r:o;if(I===Q&&k===t)return;let E=x.concat(O);v.push(k===o?{op:k,path:E}:{op:k,path:E,value:Q}),P.push(k===r?{op:o,path:E}:k===o?{op:r,path:E,value:h(I)}:{op:t,path:E,value:h(I)})})}function m(R,x,v,P){let{base_:w,copy_:A}=R,O=0;w.forEach(b=>{if(!A.has(b)){let I=x.concat([O]);v.push({op:o,path:I,value:b}),P.unshift({op:r,path:I,value:b})}O++}),O=0,A.forEach(b=>{if(!w.has(b)){let I=x.concat([O]);v.push({op:r,path:I,value:b}),P.unshift({op:o,path:I,value:b})}O++})}function f(R,x,v,P){v.push({op:t,path:[],value:x===Xu?void 0:x}),P.push({op:t,path:[],value:R})}function p(R,x){return x.forEach(v=>{let{path:P,op:w}=v,A=R;for(let Q=0;Q<P.length-1;Q++){let k=mo(A),E=P[Q];typeof E!="string"&&typeof E!="number"&&(E=""+E),(k===0||k===1)&&(E==="__proto__"||E==="constructor")&&Ue(19),typeof A=="function"&&E==="prototype"&&Ue(19),A=ju(A,E),typeof A!="object"&&Ue(18,P.join("/"))}let O=mo(A),b=g(v.value),I=P[P.length-1];switch(w){case t:switch(O){case 2:return A.set(I,b);case 3:Ue(16);default:return A[I]=b}case r:switch(O){case 1:return I==="-"?A.push(b):A.splice(I,0,b);case 2:return A.set(I,b);case 3:return A.add(b);default:return A[I]=b}case o:switch(O){case 1:return A.splice(I,1);case 2:return A.delete(I);case 3:return A.delete(v.value);default:return delete A[I]}default:Ue(17,w)}}),R}function g(R){if(!nt(R))return R;if(Array.isArray(R))return R.map(g);if(Ia(R))return new Map(Array.from(R.entries()).map(([v,P])=>[v,g(P)]));if(Ea(R))return new Set(Array.from(R).map(g));let x=Object.create(lo(R));for(let v in R)x[v]=g(R[v]);return Aa(R,Fa)&&(x[Fa]=R[Fa]),x}function h(R){return lt(R)?g(R):R}tv("Patches",{applyPatches_:p,generatePatches_:n,generateReplacementPatches_:f})}var dt=new iv,ur=dt.produce,ji=dt.produceWithPatches.bind(dt),ek=dt.setAutoFreeze.bind(dt),tk=dt.setUseStrictShallowCopy.bind(dt),tl=dt.applyPatches.bind(dt),rk=dt.createDraft.bind(dt),ok=dt.finishDraft.bind(dt);l();c();u();s();function cv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function uv(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 hp=e=>Array.isArray(e)?e:[e];function lv(e){let t=Array.isArray(e[0])?e[0]:e;return uv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function dv(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var lk=Symbol();var dk=Object.getPrototypeOf({});var mv=class{constructor(e){this.value=e}deref(){return this.value}},pv=typeof WeakRef<"u"?WeakRef:mv,fv=0,Sp=1;function $i(){return{s:fv,v:void 0,o:null,p:null}}function Ho(e,t={}){let r=$i(),{resultEqualityCheck:o}=t,n,a=0;function d(){let m=r,{length:f}=arguments;for(let h=0,R=f;h<R;h++){let x=arguments[h];if(typeof x=="function"||typeof x=="object"&&x!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let P=v.get(x);P===void 0?(m=$i(),v.set(x,m)):m=P}else{let v=m.p;v===null&&(m.p=v=new Map);let P=v.get(x);P===void 0?(m=$i(),v.set(x,m)):m=P}}let p=m,g;if(m.s===Sp)g=m.v;else if(g=e.apply(null,arguments),a++,o){let h=n?.deref?.()??n;h!=null&&o(h,g)&&(g=h,a!==0&&a--),n=typeof g=="object"&&g!==null||typeof g=="function"?new pv(g):g}return p.s=Sp,p.v=g,g}return d.clearCache=()=>{r=$i(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function Cp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,d=0,m,f={},p=n.pop();typeof p=="object"&&(f=p,p=n.pop()),cv(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let g={...r,...f},{memoize:h,memoizeOptions:R=[],argsMemoize:x=Ho,argsMemoizeOptions:v=[],devModeChecks:P={}}=g,w=hp(R),A=hp(v),O=lv(n),b=h(function(){return a++,p.apply(null,arguments)},...w),I=!0,Q=x(function(){d++;let E=dv(O,arguments);return m=b.apply(null,E),m},...A);return Object.assign(Q,{resultFunc:p,memoizedResultFunc:b,dependencies:O,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>m,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:h,argsMemoize:x})};return Object.assign(o,{withTypes:()=>o}),o}var K=Cp(Ho),gv=Object.assign((e,t=K)=>{sv(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((d,m,f)=>(d[r[f]]=m,d),{}))},{withTypes:()=>gv});l();c();u();s();function xp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Rp=xp(),vp=xp;var yv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wo:Wo.apply(null,arguments)},Ek=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hv=e=>e&&typeof e.match=="function";function F(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Vt(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Li(o)&&o.type===e,r}var wp=class Ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ta.prototype)}static get[Symbol.species](){return Ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ta(...t[0].concat(this)):new Ta(...t.concat(this))}};function Fp(e){return nt(e)?ur(e,()=>{}):e}function Pp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Sv(e){return typeof e=="boolean"}var Cv=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},d=new wp;return r&&(Sv(r)?d.push(Rp):d.push(vp(r.extraArgument))),d},Oa="RTK_autoBatch",Go=()=>e=>({payload:e,meta:{[Oa]:!0}}),Ap=e=>t=>{setTimeout(t,e)},xv=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,d=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ap(10):e.type==="callback"?e.queueNotification:Ap(e.timeout),p=()=>{d=!1,a&&(a=!1,m.forEach(g=>g()))};return Object.assign({},o,{subscribe(g){let h=()=>n&&g(),R=o.subscribe(h);return m.add(g),()=>{R(),m.delete(g)}},dispatch(g){try{return n=!g?.meta?.[Oa],a=!n,a&&(d||(d=!0,f(p))),o.dispatch(g)}finally{n=!0}}})},Rv=e=>function(r){let{autoBatch:o=!0}=r??{},n=new wp(e);return o&&n.push(xv(typeof o=="object"?o:void 0)),n};function Ip(e){let t=Cv(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ut(r))m=zo(r);else throw new Error(Vt(1));let f;typeof o=="function"?f=o(t):f=t();let p=Wo;n&&(p=yv({trace:!1,...typeof n=="object"&&n}));let g=ap(...f),h=Rv(g),R=typeof d=="function"?d(h):h(),x=p(...R);return _u(m,a,x)}function Ep(e){let t={},r=[],o,n={addCase(a,d){let m=typeof a=="string"?a:a.type;if(!m)throw new Error(Vt(28));if(m in t)throw new Error(Vt(29));return t[m]=d,n},addMatcher(a,d){return r.push({matcher:a,reducer:d}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function vv(e){return typeof e=="function"}function ee(e,t){let[r,o,n]=Ep(t),a;if(vv(e))a=()=>Fp(e());else{let m=Fp(e);a=()=>m}function d(m=a(),f){let p=[r[f.type],...o.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return p.filter(g=>!!g).length===0&&(p=[n]),p.reduce((g,h)=>{if(h)if(lt(g)){let x=h(g,f);return x===void 0?g:x}else{if(nt(g))return ur(g,R=>h(R,f));{let R=h(g,f);if(R===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}}return g},m)}return d.getInitialState=a,d}var Tp=(e,t)=>hv(e)?e.match(t):e(t);function Bt(...e){return t=>e.some(r=>Tp(r,t))}function Ko(...e){return t=>e.every(r=>Tp(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 qa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Hi(...e){return e.length===0?t=>Wi(t,["pending"]):qa(e)?Bt(...e.map(t=>t.pending)):Hi()(e[0])}function fo(...e){return e.length===0?t=>Wi(t,["rejected"]):qa(e)?Bt(...e.map(t=>t.rejected)):fo()(e[0])}function ka(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ko(fo(...e),t):qa(e)?Ko(fo(...e),t):ka()(e[0])}function lr(...e){return e.length===0?t=>Wi(t,["fulfilled"]):qa(e)?Bt(...e.map(t=>t.fulfilled)):lr()(e[0])}function Ki(...e){return e.length===0?t=>Wi(t,["pending","fulfilled","rejected"]):qa(e)?Bt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ki()(e[0])}var Fv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gi=(e=21)=>{let t="",r=e;for(;r--;)t+=Fv[Math.random()*64|0];return t},Pv=["name","message","stack","code"],rl=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},bp=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},Av=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Pv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},re=(()=>{function e(t,r,o){let n=F(t+"/fulfilled",(f,p,g,h)=>({payload:f,meta:{...h||{},arg:g,requestId:p,requestStatus:"fulfilled"}})),a=F(t+"/pending",(f,p,g)=>({payload:void 0,meta:{...g||{},arg:p,requestId:f,requestStatus:"pending"}})),d=F(t+"/rejected",(f,p,g,h,R)=>({payload:h,error:(o&&o.serializeError||Av)(f||"Rejected"),meta:{...R||{},arg:g,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,g,h)=>{let R=o?.idGenerator?o.idGenerator(f):Gi(),x=new i.AbortController,v,P;function w(O){P=O,x.abort()}let A=async function(){let O;try{let I=o?.condition?.(f,{getState:g,extra:h});if(wv(I)&&(I=await I),I===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let Q=new Promise((k,E)=>{v=()=>{E({name:"AbortError",message:P||"Aborted"})},x.signal.addEventListener("abort",v)});p(a(R,f,o?.getPendingMeta?.({requestId:R,arg:f},{getState:g,extra:h}))),O=await Promise.race([Q,Promise.resolve(r(f,{dispatch:p,getState:g,extra:h,requestId:R,signal:x.signal,abort:w,rejectWithValue:(k,E)=>new rl(k,E),fulfillWithValue:(k,E)=>new bp(k,E)})).then(k=>{if(k instanceof rl)throw k;return k instanceof bp?n(k.payload,R,f,k.meta):n(k,R,f)})])}catch(I){O=I instanceof rl?d(null,R,f,I.payload,I.meta):d(I,R,f)}finally{v&&x.signal.removeEventListener("abort",v)}return o&&!o.dispatchConditionRejection&&d.match(O)&&O.meta.condition||p(O),O}();return Object.assign(A,{abort:w,requestId:R,arg:f,unwrap(){return A.then(bv)}})}}return Object.assign(m,{pending:a,rejected:d,fulfilled:n,settled:Bt(d,n),typePrefix:t})}return e.withTypes=()=>e,e})();function bv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function wv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Op=Symbol.for("rtk-slice-createasyncthunk"),Vk={[Op]:re};function Iv(e,t){return`${e}/${t}`}function Ev({creators:e}={}){let t=e?.asyncThunk?.[Op];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Vt(11));typeof process<"u";let d=(typeof o.reducers=="function"?o.reducers(Ov()):o.reducers)||{},m=Object.keys(d),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(O,b){let I=typeof O=="string"?O:O.type;if(!I)throw new Error(Vt(12));if(I in f.sliceCaseReducersByType)throw new Error(Vt(13));return f.sliceCaseReducersByType[I]=b,p},addMatcher(O,b){return f.sliceMatchers.push({matcher:O,reducer:b}),p},exposeAction(O,b){return f.actionCreators[O]=b,p},exposeCaseReducer(O,b){return f.sliceCaseReducersByName[O]=b,p}};m.forEach(O=>{let b=d[O],I={reducerName:O,type:Iv(n,O),createNotation:typeof o.reducers=="function"};kv(b)?Dv(I,b,p,t):qv(I,b,p)});function g(){let[O={},b=[],I=void 0]=typeof o.extraReducers=="function"?Ep(o.extraReducers):[o.extraReducers],Q={...O,...f.sliceCaseReducersByType};return ee(o.initialState,k=>{for(let E in Q)k.addCase(E,Q[E]);for(let E of f.sliceMatchers)k.addMatcher(E.matcher,E.reducer);for(let E of b)k.addMatcher(E.matcher,E.reducer);I&&k.addDefaultCase(I)})}let h=O=>O,R=new Map,x;function v(O,b){return x||(x=g()),x(O,b)}function P(){return x||(x=g()),x.getInitialState()}function w(O,b=!1){function I(k){let E=k[O];return typeof E>"u"&&b&&(E=P()),E}function Q(k=h){let E=Pp(R,b,()=>new WeakMap);return Pp(E,k,()=>{let q={};for(let[V,U]of Object.entries(o.selectors??{}))q[V]=Tv(U,k,P,b);return q})}return{reducerPath:O,getSelectors:Q,get selectors(){return Q(I)},selectSlice:I}}let A={name:n,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:P,...w(a),injectInto(O,{reducerPath:b,...I}={}){let Q=b??a;return O.inject({reducerPath:Q,reducer:v},I),{...A,...w(Q,!0)}}};return A}}function Tv(e,t,r,o){function n(a,...d){let m=t(a);return typeof m>"u"&&o&&(m=r()),e(m,...d)}return n.unwrapped=e,n}var go=Ev();function Ov(){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 qv({type:e,reducerName:t,createNotation:r},o,n){let a,d;if("reducer"in o){if(r&&!Vv(o))throw new Error(Vt(17));a=o.reducer,d=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?F(e,d):F(e))}function kv(e){return e._reducerDefinitionType==="asyncThunk"}function Vv(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dv({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:d,pending:m,rejected:f,settled:p,options:g}=r,h=n(e,a,g);o.exposeAction(t,h),d&&o.addCase(h.fulfilled,d),m&&o.addCase(h.pending,m),f&&o.addCase(h.rejected,f),p&&o.addMatcher(h.settled,p),o.exposeCaseReducer(t,{fulfilled:d||zi,pending:m||zi,rejected:f||zi,settled:p||zi})}function zi(){}var qp="listener",kp="completed",Vp="cancelled",Dk=`task-${Vp}`,Nk=`task-${kp}`,Mk=`${qp}-${Vp}`,Lk=`${qp}-${kp}`;var{assign:Dp}=Object;var ol="listenerMiddleware";var Nv=Dp(F(`${ol}/add`),{withTypes:()=>Nv}),Qk=F(`${ol}/removeAll`),Mv=Dp(F(`${ol}/remove`),{withTypes:()=>Mv});var Uk=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();c();u();s();var Ar=K(e=>e.commercePagination?.principal.perPage||0,e=>e),Yi=K((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),br=K(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ji=K((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Xi=K(e=>e.commercePagination?.principal.page||0,e=>e),Np=K((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var iV=K(e=>e[X].productListing.responseId,e=>e),Va=K(e=>e.productListing.responseId,e=>e),Mp=K(e=>e.productListing.requestId,e=>e),Da=K(e=>e.productListing?.products.length||0,e=>e),Lp=K(e=>({total:br(e),current:Da(e)}),({current:e,total:t})=>e<t),Qp=K(e=>e.productListing?.isLoading,e=>te(e)?!1:e),Up=K(e=>e.productListing?.error,e=>e??null);l();c();u();s();l();c();u();s();function nl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function al(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function _t(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:d}])=>{let m=r(d);return m.length?{[a]:m}:{}}).reduce((a,d)=>({...a,...d}),{});return Object.keys(n).length?{[o]:n}:{}}l();c();u();s();l();c();u();s();function jt(e){let{activeValue:t,ancestryMap:r}=Qv(e);return t?Uv(t,r):[]}function Qv(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 Uv(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}l();c();u();s();function Bp(){return{principal:wr(),recommendations:{}}}function wr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}l();c();u();s();l();c();u();s();l();c();u();s();var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),Ir=(r=>(r.Ascending="asc",r.Descending="desc",r))(Ir||{}),Dt=()=>({by:"relevance"});var wV=new L({options:{required:!1},values:{by:new kt({enum:ht,required:!0}),fields:new ae({each:new L({values:{name:new D,direction:new kt({enum:Ir})}})})}});var Na=e=>({by:"fields",fields:e}),_p=new L({options:{required:!1},values:{by:new kt({enum:ht,required:!0}),fields:new ae({each:new L({values:{field:new D({required:!0}),direction:new kt({enum:Ir}),displayName:new D}})})}});function yo(){return{appliedSort:Dt(),availableSorts:[Dt()]}}function Zi(e){return{...Bv(e?.commercePagination,t=>t.principal.page,wr().page),..._v(e?.commercePagination,t=>t.principal.perPage,wr().perPage),...al(e?.commerceSort,t=>t.appliedSort,yo().appliedSort),..._t(e.commerceFacetSet,Er(e,"regular"),jv,"f"),..._t(e.commerceFacetSet,Er(e,"regular"),$v,"fExcluded"),..._t(e.commerceFacetSet,Er(e,"location"),zv,"lf"),..._t(e.commerceFacetSet,Er(e,"hierarchical"),Wv,"cf"),..._t(e.commerceFacetSet,Er(e,"dateRange"),jp,"df"),..._t(e.commerceFacetSet,Er(e,"dateRange"),$p,"dfExcluded"),..._t(e.commerceFacetSet,Er(e,"numericalRange"),jp,"nf"),..._t(e.commerceFacetSet,Er(e,"numericalRange"),$p,"nfExcluded"),...zp("selected",e.manualNumericFacetSet),...zp("excluded",e.manualNumericFacetSet)}}function Bv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function _v(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function jv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function $v(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function zv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function jp(e){return e.values.filter(t=>t.state==="selected")}function $p(e){return e.values.filter(t=>t.state==="excluded")}function zp(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 Wv(e){return jt(e.values).map(r=>r.value)}function Er(e,t){return r=>e.commerceFacetSet[r].request.type===t}l();c();u();s();var ec=()=>({query:""});var SD=K(e=>e[X].commerceSearch.responseId,e=>e),Ma=K(e=>e.commerceSearch.responseId,e=>e),Wp=K(e=>e.commerceSearch.requestId,e=>e),La=K(e=>e.commerceSearch?.products.length||0,e=>e),Hp=K(e=>({total:br(e),current:La(e)}),({current:e,total:t})=>e<t),Kp=K(e=>e.commerceSearch?.isLoading,e=>te(e)?!1:e),Gp=K(e=>e.commerceSearch?.error,e=>e??null),tc=K(e=>e.commerceQuery?.query,e=>e??""),Hv=K(e=>e.commerceSearch?.queryExecuted,e=>e),Yp=(e,t)=>te(t.queryCorrection?.correctedQuery)?tc(e):t.queryCorrection.correctedQuery,Jp=e=>({...nl(e?.commerceQuery,t=>t.query,ec().query),...Zi(e)});function Xp(e){return{query:Hv(e)||""}}var il;(t=>t.responseIdSelector=Zp(Ma))(il||(il={}));var cl;(t=>t.responseIdSelector=Zp(Va))(cl||(cl={}));function Zp(e){return t=>e(t[X])}var dl={};qu(dl,{escape:()=>Jo,getHighlightedSuggestion:()=>ll,highlightString:()=>Gv});l();c();u();s();l();c();u();s();var ho=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ef(e){return Array.isArray(e)}function Yo(e){return e.trim()===""}function tf(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Qa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Gv(e){if(Yo(e.openingDelimiter)||Yo(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(te(e.content)||Yo(e.content))return e.content;if(e.highlights.length===0)return Jo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],d=a.offset,m=d+a.length;if(m>t)break;r+=Jo(e.content.slice(o,d)),r+=e.openingDelimiter,r+=Jo(e.content.slice(d,m)),r+=e.closingDelimiter,o=m}return o!==t&&(r+=Jo(e.content.slice(o))),r}function ll(e,t){return e=Jo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ul(o,t.notMatchDelimiters):n?ul(n,t.exactMatchDelimiters):a?ul(a,t.correctionDelimiters):r)}function ul(e,t){return t?t.open+e+t.close:e}function Jo(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}l();c();u();s();var ff=yt(lf(),1);l();c();u();s();l();c();u();s();var RF="recommendation-internal-options",TN=Symbol.for(RF);var oe=new Error("Failed to load reducers."),Xo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Co=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}};l();c();u();s();function df(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function mf(e){return typeof e!="object"||!e?!1:Object.values(e).every(vF)}function vF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function pf(e){return e===429}var Zo=class e{static async call(t){let r=FF(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...d}=n,m=async()=>{let f=await S(a,d);if(pf(f.status))throw f;return f};try{let f=await(0,ff.backOff)(m,{retry:p=>{let g=p&&pf(p.status);return g&&o.info("Platform retrying request"),g}});switch(f.status){case 419:case 401:throw o.info("Platform renewing token"),new Xo;case 404:throw new Co(a,f.status);default:return o.info({response:f,requestInfo:n},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Co(a):f}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:d}=r,{signal:m,...f}=t,p=Qa(f);try{let g=await n(t,o,d);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return p}};function Be(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function St(e,t="prod"){return`${Be(e,t)}/rest/search/v2`}function oc(e,t="prod"){return`${Be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function FF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:d}=e,m=e.method==="POST"||e.method==="PUT",f=PF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...m&&{body:f},signal:d}}function PF(e,t){return t==="application/x-www-form-urlencoded"?mf(e)?df(e):"":JSON.stringify(e)}l();c();u();s();l();c();u();s();function AF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function bF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xl(e,t){if(t&&e.name==="AbortError")return{error:bF(e)};if(e instanceof Co)return{error:AF(e)};throw e}l();c();u();s();var en=(e,t)=>({..._a(e,t),requestParams:wF(e)}),wF=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:d,page:m,perPage:f,facets:p,sort:g}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:d,page:m,perPage:f,facets:p,sort:g}},_a=(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}}};l();c();u();s();var gf=(e,t)=>({..._a(e,t),requestParams:IF(e)}),IF=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:d,currency:m,page:f,perPage:p}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:d,currency:m,page:f,perPage:p}};l();c();u();s();var yf=e=>({..._a(e,"search/querySuggest"),requestParams:EF(e)}),EF=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:d,currency:m}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:d,currency:m}};var We=e=>e.error!==void 0,nc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...en(t,"listing"),...this.options})}async search(t){let r=en(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...gf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=en(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=yf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=en(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=en(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Zo.call(t);if(r instanceof Error)return xl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function ac(e,t="prod"){return`${Be(e,t)}/rest/organizations/${e}/commerce/v2`}l();c();u();s();l();c();u();s();var ic=e=>e;l();c();u();s();l();c();u();s();var j=new D({required:!0,emptyAllowed:!1}),xe=new D({required:!1,emptyAllowed:!1}),Ee=new D({required:!0,emptyAllowed:!0}),hf=new D({required:!1,emptyAllowed:!0}),Sf=new ae({each:j,required:!0}),Cf=new D({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),et=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ke=(e,t)=>{if("required"in t)return{payload:new fe({value:t}).validate({value:e}).value};let n=new L({options:{required:!0},values:t}).validate(e);if(n)throw new va(n);return{payload:e}},T=(e,t)=>{try{return ke(e,t)}catch(r){return{payload:e,error:et(r)}}},at=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return xf(e,t,r,n,"Controller initialization error")},tt=(e,t,r,o)=>{let n=`Check the options of ${o}`;return xf(e,t,r,n,"Controller initialization error")},xf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};l();c();u();s();l();c();u();s();var tn="3.23.2-pre.d35ebef42a",Rf=["@coveo/atomic","@coveo/quantic"];var Rl=()=>xe,vf=()=>j,xo=F("configuration/updateBasicConfiguration",e=>T(e,{accessToken:xe,environment:new D({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:xe})),Ff=F("configuration/updateSearchConfiguration",e=>T(e,{proxyBaseUrl:new D({required:!1,url:!0}),pipeline:new D({required:!1,emptyAllowed:!0}),searchHub:xe,timezone:xe,locale:xe,authenticationProviders:new ae({required:!1,each:j})})),rn={enabled:new Z({default:!0}),originContext:Rl(),originLevel2:Rl(),originLevel3:Rl(),proxyBaseUrl:new D({required:!1,url:!0}),runtimeEnvironment:new Ce,anonymous:new Z({default:!1}),deviceId:xe,userDisplayName:xe,documentLocation:xe,trackingId:xe,analyticsMode:new D({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new L({options:{required:!1},values:Rf.reduce((e,t)=>(e[t]=Cf,e),{})})},vl=F("configuration/updateAnalyticsConfiguration",e=>T(e,rn)),cc=F("configuration/analytics/disable"),sc=F("configuration/analytics/enable"),Pf=F("configuration/analytics/originlevel2",e=>T(e,{originLevel2:vf()})),Af=F("configuration/analytics/originlevel3",e=>T(e,{originLevel3:vf()}));var on=F("commerce/configuration/updateBasicConfiguration",e=>T(e,{accessToken:xe,environment:new D({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:xe})),nn=F("commerce/configuration/updateProxyBaseUrl",e=>T(e,{proxyBaseUrl:new D({required:!1,url:!0})})),an=F("commerce/configuration/updateAnalyticsConfiguration",e=>T(e,{enabled:rn.enabled,proxyBaseUrl:rn.proxyBaseUrl,source:rn.source,trackingId:rn.trackingId})),uc=F("commerce/configuration/analytics/disable"),lc=F("commerce/configuration/analytics/enable");l();c();u();s();l();c();u();s();var bf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Fl=ee(bf(),e=>e.addCase(on,(t,r)=>{wf(t,r.payload)}).addCase(xo,(t,r)=>{wf(t,r.payload)}).addCase(nn,(t,r)=>{TF(t,r.payload)}).addCase(an,(t,r)=>{OF(t,r.payload)}).addCase(uc,t=>{t.analytics.enabled=!1}).addCase(lc,t=>{t.analytics.enabled=!0}));function wf(e,t){te(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",te(t.organizationId)||(e.organizationId=t.organizationId)}function TF(e,t){te(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function OF(e,t){te(t.enabled)||(e.analytics.enabled=t.enabled),te(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),te(t.source)||(e.analytics.source=t.source),te(t.trackingId)||(e.analytics.trackingId=t.trackingId)}l();c();u();s();l();c();u();s();l();c();u();s();function cn(e){return e.currency}var If=(e,t)=>({currency:cn(t.commerceContext),products:qF(t.cart),transaction:e}),Ef=(e,t)=>({currency:cn(t.commerceContext),...e}),Ro=K(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),qF=K(Ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));l();c();u();s();var Pl={productId:j,quantity:new G({required:!0,min:0}),name:new D({required:!1}),price:new G({required:!1,min:0})},Al=new ae({each:new L({values:{...Pl}})}),bl={items:Al},Tf=new fe(bl);var Tr=F("commerce/cart/setItems",e=>T(e,Al)),sn=F("commerce/cart/updateItemQuantity",e=>T(e,Pl)),un=F("commerce/cart/purchase"),dc=re("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=If(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),mc=re("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Ef(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});l();c();u();s();l();c();u();s();l();c();u();s();function ie(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let d=JSON.stringify(a),m=t!==d;return t=d,m}catch(d){return console.warn('Could not detect if state has changed, check the controller "get state method"',d),!0}};return{subscribe(a){a();let d=Symbol(),m;return o()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{n(this.state)&&r.forEach(f=>f())})),r.set(d,a),()=>{r.delete(d),o()&&m&&m()}},get state(){return{}}}}l();c();u();s();function Of(e,t){return e.cart[vo(t)]}var qf=K(Ro,e=>e.reduce((t,r)=>t+r.quantity,0)),kf=K(Ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Vf(e,t={}){if(!kF(e))throw oe;let{dispatch:r}=e,o=ie(e),n=()=>e[X].cart,a={...t.initialState};at(e,Tf,a,"buildCart"),a.items!==void 0&&r(Tr(a.items));function d(g,h){return h?h.quantity!==g.quantity:!0}function m(g,h){return!h||g.quantity>h.quantity?"add":"remove"}function f(g,h){return h?g.name===h.name&&g.price===h.price&&g.quantity===h.quantity:!1}function p(g,h){let{quantity:R,...x}=g,v=m(g,h),P=h?Math.abs(R-h.quantity):R;return{action:v,quantity:P,product:x}}return{...o,empty:function(){for(let g of Ro(n()))this.updateItemQuantity({...g,quantity:0})},purchase(g){r(dc(g)),r(un())},updateItemQuantity(g){let h=Of(n(),g);!h&&g.quantity<=0||f(g,h)||(d(g,h)&&r(mc(p(g,h))),r(sn(g)))},get state(){let g=n();return{items:Ro(g),totalQuantity:qf(g),totalPrice:kf(g)}}}}function vo(e){return`${e.productId},${e.name},${e.price}`}function kF(e){return e.addReducers({cart:ln}),!0}l();c();u();s();var pc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Df=e=>Mf(e.cartItems,e.cart),Nf=e=>Mf(e.purchasedItems,e.purchased);function Mf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:d}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=d,o},{});return[...Object.values(r)]}var ln=ee(pc(),e=>{e.addCase(Tr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,d)=>{let m=vo(d);return{cartItems:[...a.cartItems,m],cart:{...a.cart,[m]:d},purchasedItems:[],purchased:{}}},pc());Lf(t,n,o)}).addCase(sn,(t,{payload:r})=>{let o=vo(r);if(!(o in t.cart)){VF(r,t);return}if(r.quantity<=0){DF(r,t);return}t.cart[o]=r}).addCase(un,t=>{NF(t);let{cart:r,cartItems:o}=pc();Lf(t,o,r)})});function Lf(e,t,r){e.cartItems=t,e.cart=r}function VF(e,t){if(e.quantity<=0)return;let r=vo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function DF(e,t){let r=vo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function NF(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]}}l();c();u();s();l();c();u();s();var MF=Intl.supportedValuesOf("currency"),LF=new D({required:!0,emptyAllowed:!1,constrainTo:MF}),wl={url:j},Il={latitude:new G({min:-90,max:90,required:!0}),longitude:new G({min:-180,max:180,required:!0})},ja={language:j,country:j,currency:LF,view:new L({options:{required:!0},values:wl}),location:new L({options:{required:!1},values:Il})},Qf=new fe(ja);var Pe=F("commerce/context/set",e=>T(e,ja)),we=F("commerce/context/setView",e=>T(e,wl)),dn=F("commerce/context/setLocation",e=>T(e,Il));l();c();u();s();l();c();u();s();var Uf=()=>({language:"",country:"",currency:"",view:{url:""}});var $t=ee(Uf(),e=>{e.addCase(Pe,(t,{payload:r})=>r).addCase(we,(t,{payload:r})=>{t.view=r}).addCase(dn,(t,{payload:r})=>{t.location=r})});l();c();u();s();l();c();u();s();var fc=()=>({correctedQuery:"",corrections:[],originalQuery:""});l();c();u();s();l();c();u();s();var Ct=F("breadcrumb/deselectAll"),Or=F("breadcrumb/deselectAllNonBreadcrumbs");l();c();u();s();l();c();u();s();var qr=K(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${tn}`));var kr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??ac(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:Df(e.cart),source:qr(e.configuration.analytics)}}};l();c();u();s();l();c();u();s();var gc=(e,t,r)=>({...kr(e,t),...QF(e,r)}),QF=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var xt=(e,t)=>({...gc(e,t),facets:[...UF(e)],...e.commerceSort&&{sort:BF(e.commerceSort.appliedSort)}});function UF(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 BF(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}l();c();u();s();var Fo=F("commerce/facets/core/updateNumberOfValues",e=>T(e,{facetId:j,numberOfValues:new G({required:!0,min:1})})),Po=F("commerce/facets/core/updateIsFieldExpanded",e=>T(e,{facetId:j,isFieldExpanded:new Z({required:!0})})),Te=F("commerce/facets/core/clearAll"),He=F("commerce/facets/core/deselectAllValues",e=>T(e,{facetId:j})),Ao=F("commerce/facets/core/updateFreezeCurrentValues",e=>T(e,{facetId:j,freezeCurrentValues:new Z({required:!0})})),mn=F("commerce/facets/core/updateAutoSelectionForAll",e=>T(e,{allow:new Z({required:!0})}));l();c();u();s();var yc={slotId:hf},_F={...yc,pageSize:new G({required:!0,min:0})},mr=F("commerce/pagination/setPageSize",e=>T(e,_F)),jF={...yc,page:new G({required:!0,min:0})},zt=F("commerce/pagination/selectPage",e=>T(e,jF)),Vr=F("commerce/pagination/nextPage",e=>T(e,yc)),Dr=F("commerce/pagination/previousPage",e=>T(e,yc)),pn=F("commerce/pagination/registerRecommendationsSlot",e=>T(e,{slotId:j}));l();c();u();s();var Oe=F("commerce/query/update",e=>T(e,{query:new D}));l();c();u();s();l();c();u();s();var Nr=F("commerce/triggers/query/updateIgnore",e=>T(e,{q:new D({emptyAllowed:!0,required:!0})})),fn=F("commerce/triggers/query/applyModification",e=>T(e,new L({values:{originalQuery:xe,modification:xe}})));var $a=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 We(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(!(!te(n)&&!te(n.correctedQuery)))return null;let{correctedQuery:d,originalQuery:m}=o.queryCorrection;return this.onUpdateQueryForCorrection(d??""),{...t,response:{...o},queryExecuted:Yp(r,o),originalQuery:m??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(m=>m.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Nr({q:""})),null;let a=this.getCurrentQuery(),d=await this.automaticallyRetryQueryWithTriggerModification(o);return We(d.response)?this.rejectWithValue(d.response.error):{...d,response:{...d.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(fn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...xt(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 We(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Oe({query:t}))}};var ue=re("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=xt(o,n),d=tc(o),m=new $a(t),f=await m.fetchFromAPI({...a,query:d});return m.process(f)}),Mr=re("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Hp(o))return null;let d=Ar(o),f=La(o)/d,p=tc(o),g=xt(o,n),h=new $a(t),R=await h.fetchFromAPI({...g,query:p,page:f});return h.process(R)}),gn=re("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;T(e,{query:new D,clearFilters:new Z}),e.clearFilters&&(r(Te()),r(Or())),r(mn({allow:!0})),r(Oe({query:e.query})),r(zt({page:0}))}),yn=re("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:d}=o,{q:m}=e,f=await a.productSuggestions({...kr(n,d),query:m});return We(f)?r(f.error):{response:{...f.success,products:f.success.products}}}),$F={child:new L({options:{required:!0},values:{permanentid:new D({required:!0})}})},hn=F("commerce/search/promoteChildToParent",e=>T(e,$F));l();c();u();s();function Bf(){return{wasCorrectedTo:"",queryCorrection:fc(),originalQuery:""}}var hc=ee(Bf(),e=>{e.addCase(ue.pending,t=>{t.queryCorrection=fc(),t.wasCorrectedTo=""}).addCase(ue.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??[]}})});l();c();u();s();l();c();u();s();l();c();u();s();var le=j;l();c();u();s();var zF={state:new Ce({required:!0}),numberOfResults:new G({required:!0,min:0}),value:new D({required:!0,emptyAllowed:!0}),path:new ae({required:!0,each:j}),moreValuesAvailable:new Z({required:!1})};function za(e){e.children.forEach(t=>{za(t)}),ke({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},zF)}var Sn={facetId:le,field:j,tabs:new L({options:{required:!1},values:{included:new ae({each:new D}),excluded:new ae({each:new D})}}),activeTab:new D({required:!1}),delimitingCharacter:new D({required:!1,emptyAllowed:!0}),filterFacetCount:new Z({required:!1}),injectionDepth:new G({required:!1,min:0}),numberOfValues:new G({required:!1,min:1}),sortCriteria:new Ce({required:!1}),basePath:new ae({required:!1,each:j}),filterByBasePath:new Z({required:!1})},Cn=5,_f=F("categoryFacet/register",e=>T(e,Sn)),jf=F("categoryFacet/toggleSelectValue",e=>{try{return ke(e.facetId,j),za(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:et(t)}}}),$f=F("categoryFacet/deselectAll",e=>T(e,Sn.facetId)),F_=F("categoryFacet/updateNumberOfValues",e=>T(e,{facetId:Sn.facetId,numberOfValues:Sn.numberOfValues})),P_=F("categoryFacet/updateSortCriterion",e=>T(e,{facetId:Sn.facetId,criterion:new Ce})),A_=F("categoryFacet/updateBasePath",e=>T(e,{facetId:Sn.facetId,basePath:new ae({each:j})}));l();c();u();s();l();c();u();s();var Wa={facetId:le,captions:new L({options:{required:!1}}),numberOfValues:new G({required:!1,min:1}),query:new D({required:!1,emptyAllowed:!0})};var WF={path:new ae({required:!0,each:j}),displayValue:Ee,rawValue:Ee,count:new G({required:!0,min:0})},Rt=F("categoryFacet/selectSearchResult",e=>T(e,{facetId:le,value:new L({values:WF})})),Sc=F("categoryFacetSearch/register",e=>T(e,Wa));l();c();u();s();var zf={facetId:le,value:new L({values:{displayValue:Ee,rawValue:Ee,count:new G({required:!0,min:0})}})},Cc=F("facetSearch/register",e=>T(e,Wa)),Lr=F("facetSearch/update",e=>T(e,Wa)),mt=F("facetSearch/toggleSelectValue",e=>T(e,zf)),Nt=F("facetSearch/toggleExcludeValue",e=>T(e,zf));l();c();u();s();l();c();u();s();var pr=F("facetOptions/update",(e={freezeFacetOrder:!0})=>T(e,{freezeFacetOrder:new Z({required:!1})})),El=F("facetOptions/facet/enable",e=>T(e,le)),fr=F("facetOptions/facet/disable",e=>T(e,le));l();c();u();s();var HF=F("history/undo"),KF=F("history/redo"),Wt=F("history/snapshot"),fj=re("history/back",async(e,{dispatch:t})=>{t(HF()),await t(Ne())}),gj=re("history/forward",async(e,{dispatch:t})=>{t(KF()),await t(Ne())}),Ne=re("history/change",async(e,{getState:t})=>t().history.present);l();c();u();s();l();c();u();s();var xc={q:new D,enableQuerySyntax:new Z,aq:new D,cq:new D,firstResult:new G({min:0}),numberOfResults:new G({min:0}),sortCriteria:new D,f:new L,fExcluded:new L,cf:new L,nf:new L,mnf:new L,df:new L,debug:new Z,sf:new L,tab:new D,af:new L};var _e=F("searchParameters/restore",e=>T(e,xc)),GF=F("searchParameters/restoreTab",e=>T(e,j));l();c();u();s();l();c();u();s();l();c();u();s();function gr(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 N(e,t,r,o){function n(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function m(g){try{p(o.next(g))}catch(h){d(h)}}function f(g){try{p(o.throw(g))}catch(h){d(h)}}function p(g){g.done?a(g.value):n(g.value).then(m,f)}p((o=o.apply(e,t||[])).next())})}var ge;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ge||(ge={}));function ql(){return typeof window<"u"}function zl(){return typeof navigator<"u"}function xn(){return typeof document<"u"}function kl(){try{return typeof localStorage<"u"}catch{return!1}}function YF(){try{return typeof sessionStorage<"u"}catch{return!1}}function ag(){return zl()&&navigator.cookieEnabled}var JF=[ge.click,ge.custom,ge.search,ge.view],XF=(e,t)=>JF.indexOf(e)!==-1?Object.assign({language:xn()?document.documentElement.lang:"unknown",userAgent:zl()?navigator.userAgent:"unknown"},t):t,Ga=class e{static set(t,r,o){var n,a,d,m;o&&(a=new Date,a.setTime(a.getTime()+o)),m=window.location.hostname,m.indexOf(".")===-1?Wf(t,r,a):(d=m.split("."),n=d[d.length-2]+"."+d[d.length-1],Wf(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 Wf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function ZF(){return kl()?localStorage:ag()?new Ya:YF()?sessionStorage:new vn}var Ya=class e{getItem(t){return Ga.get(`${e.prefix}${t}`)}removeItem(t){Ga.erase(`${e.prefix}${t}`)}setItem(t,r,o){Ga.set(`${e.prefix}${t}`,r,o)}};Ya.prefix="coveo_";var Vl=class{constructor(){this.cookieStorage=new Ya}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)}},vn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ha="__coveo.analytics.history",ig=20,cg=1e3*60,sg=75,Fn=class{constructor(t){this.store=t||ZF()}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 N(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 N(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ha);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return N(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ha);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ha,JSON.stringify(t.slice(0,ig)))}catch{}}clear(){try{this.store.removeItem(Ha)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,sg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>cg:!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))}},ug=Object.freeze({__proto__:null,HistoryStore:Fn,MAX_NUMBER_OF_HISTORY_ELEMENTS:ig,MAX_VALUE_SIZE:sg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:cg,STORE_KEY:Ha,default:Fn}),eP=(e,t)=>N(void 0,void 0,void 0,function*(){return e===ge.view?(yield tP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),tP=e=>N(void 0,void 0,void 0,function*(){let t=new Fn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Rc,rP=new Uint8Array(16);function oP(){if(!Rc&&(Rc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rc(rP)}var nP=/^(?:[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 Fc(e){return typeof e=="string"&&nP.test(e)}var je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function lg(e,t=0){return(je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]).toLowerCase()}function aP(e){if(!Fc(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 iP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var cP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",sP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function uP(e,t,r){function o(n,a,d,m){var f;if(typeof n=="string"&&(n=iP(n)),typeof a=="string"&&(a=aP(a)),((f=a)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+n.length);if(p.set(a),p.set(n,a.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,d){m=m||0;for(let g=0;g<16;++g)d[m+g]=p[g];return d}return lg(p)}try{o.name=e}catch{}return o.DNS=cP,o.URL=sP,o}var lP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hf={randomUUID:lP};function bo(e,t,r){if(Hf.randomUUID&&!t&&!e)return Hf.randomUUID();e=e||{};let o=e.random||(e.rng||oP)();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 lg(o)}function dP(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 Tl(e,t){return e<<t|e>>>32-t}function mP(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let m=0;m<d.length;++m)e.push(d.charCodeAt(m))}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 d=0;d<n;++d){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[d*64+f*4]<<24|e[d*64+f*4+1]<<16|e[d*64+f*4+2]<<8|e[d*64+f*4+3];a[d]=m}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 d=0;d<n;++d){let m=new Uint32Array(80);for(let x=0;x<16;++x)m[x]=a[d][x];for(let x=16;x<80;++x)m[x]=Tl(m[x-3]^m[x-8]^m[x-14]^m[x-16],1);let f=r[0],p=r[1],g=r[2],h=r[3],R=r[4];for(let x=0;x<80;++x){let v=Math.floor(x/20),P=Tl(f,5)+dP(v,p,g,h)+R+t[v]+m[x]>>>0;R=h,h=g,g=Tl(p,30)>>>0,p=f,f=P}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+R>>>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 pP=uP("v5",80,mP),Kf=pP,dg="2.30.45",Gf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ka={pageview:"pageview",event:"event"},Pc=class{constructor({client:t,uuidGenerator:r=bo}){this.client=t,this.uuidGenerator=r}},Dl=class extends Pc{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Gf(window.location),this.lastReferrer=xn()?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:xn()?document.title:"",encoding:xn()?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===Ka.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ka.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ka.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ka.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 Gf(window.location)}},Qr=class e{constructor(t,r){if(!Fc(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 Fc(a)?new e(a,Number.parseInt(n)*1e3):null}};Qr.cvo_cid="cvo_cid";Qr.expirationTime=120;var Nl=class extends Pc{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return N(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(Qr.cvo_cid,new Qr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Nl.Id="link";var Ft=Object.keys;function vc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Ol=128,mg=192,Yf=224,Jf=240;function fP(e){return(e&248)===Jf?4:(e&Jf)===Yf?3:(e&Yf)===mg?2:1}function gP(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&Ol)!=Ol)break;if(r-=3,(o&mg)!=Ol){t-r>=fP(o)*3&&(r=t);break}}return e.substring(0,r)}var Ml={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"},yP=Ft(Ml).map(e=>Ml[e]),hP=[...yP].join("|"),SP=new RegExp(`^(${hP}$)`),CP={svcAction:"svc_action",svcActionData:"svc_action_data"},xP=e=>Ft(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Ml[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),RP=e=>SP.test(e),vP=[RP],Xf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Zf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ke={action:"pa",list:"pal",listSource:"pls"},Ac={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},FP=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ll={id:"quoteId",affiliation:"quoteAffiliation"},Ql={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},PP={add:Ke,bookmark_add:Ke,bookmark_remove:Ke,click:Ke,checkout:Ke,checkout_option:Ke,detail:Ke,impression:Ke,remove:Ke,refund:Object.assign(Object.assign({},Ke),Ac),purchase:Object.assign(Object.assign({},Ke),Ac),quickview:Ke,quote:Object.assign(Object.assign({},Ke),Ll),review:Object.assign(Object.assign({},Ke),Ql)},AP=Ft(Xf).map(e=>Xf[e]),bP=Ft(Zf).map(e=>Zf[e]),wP=Ft(Ke).map(e=>Ke[e]),IP=Ft(Ac).map(e=>Ac[e]),EP=Ft(Ql).map(e=>Ql[e]),TP=Ft(Ll).map(e=>Ll[e]),OP=[...AP,"custom"].join("|"),qP=[...bP,"custom"].join("|"),pg="(pr[0-9]+)",fg="(il[0-9]+pi[0-9]+)",kP=new RegExp(`^${pg}(${OP})$`),VP=new RegExp(`^(${fg}(${qP}))|(il[0-9]+nm)$`),DP=new RegExp(`^(${wP.join("|")})$`),NP=new RegExp(`^(${IP.join("|")})$`),MP=new RegExp(`^${pg}custom$`),LP=new RegExp(`^${fg}custom$`),QP=new RegExp(`^(${[...FP,...EP,...TP].join("|")})$`),UP=e=>kP.test(e),BP=e=>VP.test(e),_P=e=>DP.test(e),jP=e=>NP.test(e),$P=e=>QP.test(e),zP=[BP,UP,_P,jP,$P],WP=[MP,LP],HP={anonymizeIp:"aip"},KP={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},GP={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},YP=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],JP=Object.assign(Object.assign(Object.assign(Object.assign({},HP),KP),GP),YP.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ul=Object.assign(Object.assign({},JP),CP),XP=e=>{let t=!!e.action&&PP[e.action]||{};return Ft(e).reduce((r,o)=>{let n=t[o]||Ul[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},ZP=Ft(Ul).map(e=>Ul[e]),eA=e=>ZP.indexOf(e)!==-1,tA=e=>e==="custom",rA=e=>[...zP,...vP,eA,tA].some(t=>t(e)),oA=e=>Ft(e).reduce((t,r)=>{let o=nA(r);return o?Object.assign(Object.assign({},t),aA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),nA=e=>{let t;return[...WP].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},aA=(e,t)=>Ft(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bl=class{constructor(t){this.opts=t}sendEvent(t,r){return N(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:d,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return N(this,void 0,void 0,function*(){let n=t,a=r;if(o){let d=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=d;n=m||t;try{a=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}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 N(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[ge.click,ge.custom,ge.search,ge.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}},_l=class{sendEvent(t,r){return N(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return N(this,void 0,void 0,function*(){return Promise.resolve()})}},eg=y.fetch,bc=class{constructor(t){this.opts=t}sendEvent(t,r){return N(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${o}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),a?yield a(m,"analyticsFetch"):{}),{url:p}=f,g=gr(f,["url"]),h;try{h=yield eg(p,g)}catch(R){console.error("An error has occured when sending the event.",R);return}if(h.ok){let R=yield h.json();return R.visitorId&&n.setCurrentVisitorId(R.visitorId),R}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return N(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield eg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ge.click,ge.custom,ge.search,ge.view].indexOf(t)!==-1}getVisitorIdParam(){return N(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"})}},jl=class{constructor(t,r){kl()&&ag()?this.storage=new Vl:kl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vn),this.client=new bc(t),this.beaconClient=new Bl(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}},$l=class{constructor(t,r){this.storage=r||new vn,this.client=new bc(t)}getClientDependingOnEventType(t){return this.client}},wc=class{constructor(){this.storage=new vn,this.client=new _l}getClientDependingOnEventType(t){return this.client}},iA="xx",cA=e=>e?.startsWith(iA)||!1,sA=`
|
|
28
|
+
`;return new va(r)}var va=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},o=[];for(let n in this.definition){let a=this.definition[n].validate(r[n]);a&&o.push(`${n}: ${a}`)}if(o.length)throw $R(o,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},Ce=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&te(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function $o(e){return e===void 0}function zR(e){return e===null}function te(e){return $o(e)||zR(e)}var G=class{constructor(e={}){be(this,"value");this.config=e,this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t||(WR(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function WR(e){return $o(e)||tp(e)}function tp(e){return typeof e=="number"&&!isNaN(e)}var Z=class{constructor(e={}){be(this,"value");this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t||(HR(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function HR(e){return $o(e)||rp(e)}function rp(e){return typeof e=="boolean"}var KR=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,D=class{constructor(e={}){be(this,"value");be(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Ce(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:o,constrainTo:n,ISODate:a}=this.config,d=this.value.validate(e);if(d)return d;if($o(e))return null;if(!Di(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return o&&!o.test(e)?`value did not match provided regex ${o}`:n&&!n.includes(e)?`value should be one of: ${n.join(", ")}.`:a&&!(KR.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Di(e){return Object.prototype.toString.call(e)==="[object String]"}var L=class{constructor(e={}){be(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if($o(e))return this.config.options.required?"value is required and is currently undefined":null;if(!op(e))return"value is not an object";for(let[r,o]of Object.entries(this.config.values))if(o.required&&te(e[r]))return`value does not contain ${r}`;let t="";for(let[r,o]of Object.entries(this.config.values)){let n=e[r],a=o.validate(n);a!==null&&(t+=" "+a)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function op(e){return e!==void 0&&typeof e=="object"}var ae=class{constructor(e={}){be(this,"value");this.config=e,this.value=new Ce(this.config)}validate(e){if(!te(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(te(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(o=>{this.config.each.required&&te(o)&&(r=`value is null or undefined: ${e.join(",")}`);let n=this.validatePrimitiveValue(o,this.config.each);n!==null&&(r+=" "+n)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return rp(e)||Di(e)||tp(e)||op(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ni(e){return Array.isArray(e)}var kt=class{constructor(e){be(this,"value");this.config=e,this.value=new Ce(e)}validate(e){let t=this.value.validate(e);return t!==null?t:$o(e)||Object.values(this.config.enum).find(o=>o===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};l();c();u();s();l();c();u();s();function Qe(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 GR=typeof Symbol=="function"&&Symbol.observable||"@@observable",np=GR,Bu=()=>Math.random().toString(36).substring(7).split("").join("."),YR={INIT:`@@redux/INIT${Bu()}`,REPLACE:`@@redux/REPLACE${Bu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bu()}`},Mi=YR;function Ut(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 _u(e,t,r){if(typeof e!="function")throw new Error(Qe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Qe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Qe(1));return r(_u)(e,t)}let o=e,n=t,a=new Map,d=a,m=0,f=!1;function p(){d===a&&(d=new Map,a.forEach((w,A)=>{d.set(A,w)}))}function g(){if(f)throw new Error(Qe(3));return n}function h(w){if(typeof w!="function")throw new Error(Qe(4));if(f)throw new Error(Qe(5));let A=!0;p();let O=m++;return d.set(O,w),function(){if(A){if(f)throw new Error(Qe(6));A=!1,p(),d.delete(O),a=null}}}function R(w){if(!Ut(w))throw new Error(Qe(7));if(typeof w.type>"u")throw new Error(Qe(8));if(typeof w.type!="string")throw new Error(Qe(17));if(f)throw new Error(Qe(9));try{f=!0,n=o(n,w)}finally{f=!1}return(a=d).forEach(O=>{O()}),w}function x(w){if(typeof w!="function")throw new Error(Qe(10));o=w,R({type:Mi.REPLACE})}function v(){let w=h;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(Qe(11));function O(){let I=A;I.next&&I.next(g())}return O(),{unsubscribe:w(O)}},[np](){return this}}}return R({type:Mi.INIT}),{dispatch:R,subscribe:h,getState:g,replaceReducer:x,[np]:v}}function JR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Mi.INIT})>"u")throw new Error(Qe(12));if(typeof r(void 0,{type:Mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Qe(13))})}function zo(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let m=t[d];typeof e[m]=="function"&&(r[m]=e[m])}let o=Object.keys(r),n,a;try{JR(r)}catch(d){a=d}return function(m={},f){if(a)throw a;let p=!1,g={};for(let h=0;h<o.length;h++){let R=o[h],x=r[R],v=m[R],P=x(v,f);if(typeof P>"u"){let w=f&&f.type;throw new Error(Qe(14))}g[R]=P,p=p||P!==v}return p=p||o.length!==Object.keys(m).length,p?g:m}}function Wo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function ap(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Qe(15))},d={getState:n.getState,dispatch:(f,...p)=>a(f,...p)},m=e.map(f=>f(d));return a=Wo(...m)(n.dispatch),{...n,dispatch:a}}}function Li(e){return Ut(e)&&"type"in e&&typeof e.type=="string"}l();c();u();s();var Xu=Symbol.for("immer-nothing"),Fa=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Ue(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lo=Object.getPrototypeOf;function lt(e){return!!e&&!!e[ot]}function nt(e){return e?lp(e)||Array.isArray(e)||!!e[Fa]||!!e.constructor?.[Fa]||Ia(e)||Ea(e):!1}var XR=Object.prototype.constructor.toString();function lp(e){if(!e||typeof e!="object")return!1;let t=lo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===XR}function Zu(e){return lt(e)||Ue(15,e),e[ot].base_}function Pa(e,t){mo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function mo(e){let t=e[ot];return t?t.type_:Array.isArray(e)?1:Ia(e)?2:Ea(e)?3:0}function Aa(e,t){return mo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ju(e,t){return mo(e)===2?e.get(t):e[t]}function dp(e,t,r){let o=mo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function ZR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ia(e){return e instanceof Map}function Ea(e){return e instanceof Set}function uo(e){return e.copy_||e.base_}function Wu(e,t){if(Ia(e))return new Map(e);if(Ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=lp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[ot];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let d=n[a],m=o[d];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(o[d]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[d]})}return Object.create(lo(e),o)}else{let o=lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Bi(e,t=!1){return _i(e)||lt(e)||!nt(e)||(mo(e)>1&&(e.set=e.add=e.clear=e.delete=ev),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Bi(o,!0))),e}function ev(){Ue(2)}function _i(e){return Object.isFrozen(e)}var Hu={};function po(e){let t=Hu[e];return t||Ue(0,e),t}function tv(e,t){Hu[e]||(Hu[e]=t)}var ba;function mp(){return ba}function rv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ip(e,t){t&&(po("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ku(e){Gu(e),e.drafts_.forEach(ov),e.drafts_=null}function Gu(e){e===ba&&(ba=e.parent_)}function cp(e){return ba=rv(ba,e)}function ov(e){let t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[ot].modified_&&(Ku(t),Ue(4)),nt(e)&&(e=Qi(t,e),t.parent_||Ui(t,e)),t.patches_&&po("Patches").generateReplacementPatches_(r[ot].base_,e,t.patches_,t.inversePatches_)):e=Qi(t,r,[]),Ku(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xu?e:void 0}function Qi(e,t,r){if(_i(t))return t;let o=t[ot];if(!o)return Pa(t,(n,a)=>up(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ui(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,d=!1;o.type_===3&&(a=new Set(n),n.clear(),d=!0),Pa(a,(m,f)=>up(e,o,n,m,f,r,d)),Ui(e,n,!1),r&&e.patches_&&po("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function up(e,t,r,o,n,a,d){if(lt(n)){let m=a&&t&&t.type_!==3&&!Aa(t.assigned_,o)?a.concat(o):void 0,f=Qi(e,n,m);if(dp(r,o,f),lt(f))e.canAutoFreeze_=!1;else return}else d&&r.add(n);if(nt(n)&&!_i(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Qi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ui(e,n)}}function Ui(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bi(t,r)}function nv(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:mp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=el;r&&(n=[o],a=wa);let{revoke:d,proxy:m}=Proxy.revocable(n,a);return o.draft_=m,o.revoke_=d,m}var el={get(e,t){if(t===ot)return e;let r=uo(e);if(!Aa(r,t))return av(e,r,t);let o=r[t];return e.finalized_||!nt(o)?o:o===$u(e.base_,t)?(zu(e),e.copy_[t]=Ju(o,e)):o},has(e,t){return t in uo(e)},ownKeys(e){return Reflect.ownKeys(uo(e))},set(e,t,r){let o=pp(uo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=$u(uo(e),t),a=n?.[ot];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ZR(r,n)&&(r!==void 0||Aa(e.base_,t)))return!0;zu(e),Yu(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 $u(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zu(e),Yu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=uo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ue(11)},getPrototypeOf(e){return lo(e.base_)},setPrototypeOf(){Ue(12)}},wa={};Pa(el,(e,t)=>{wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wa.deleteProperty=function(e,t){return wa.set.call(this,e,t,void 0)};wa.set=function(e,t,r){return el.set.call(this,e[0],t,r,e[0])};function $u(e,t){let r=e[ot];return(r?uo(r):e)[t]}function av(e,t,r){let o=pp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function pp(e,t){if(!(t in e))return;let r=lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=lo(r)}}function Yu(e){e.modified_||(e.modified_=!0,e.parent_&&Yu(e.parent_))}function zu(e){e.copy_||(e.copy_=Wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iv=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 d=this;return function(f=a,...p){return d.produce(f,g=>r.call(this,g,...p))}}typeof r!="function"&&Ue(6),o!==void 0&&typeof o!="function"&&Ue(7);let n;if(nt(t)){let a=cp(this),d=Ju(t,void 0),m=!0;try{n=r(d),m=!1}finally{m?Ku(a):Gu(a)}return ip(a,o),sp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Xu&&(n=void 0),this.autoFreeze_&&Bi(n,!0),o){let a=[],d=[];po("Patches").generateReplacementPatches_(t,n,a,d),o(a,d)}return n}else Ue(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...m)=>this.produceWithPatches(d,f=>t(f,...m));let o,n;return[this.produce(t,r,(d,m)=>{o=d,n=m}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Ue(8),lt(e)&&(e=fp(e));let t=cp(this),r=Ju(e,void 0);return r[ot].isManual_=!0,Gu(t),r}finishDraft(e,t){let r=e&&e[ot];(!r||!r.isManual_)&&Ue(9);let{scope_:o}=r;return ip(o,t),sp(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=po("Patches").applyPatches_;return lt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ju(e,t){let r=Ia(e)?po("MapSet").proxyMap_(e,t):Ea(e)?po("MapSet").proxySet_(e,t):nv(e,t);return(t?t.scope_:mp()).drafts_.push(r),r}function fp(e){return lt(e)||Ue(10,e),gp(e)}function gp(e){if(!nt(e)||_i(e))return e;let t=e[ot],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 Pa(r,(o,n)=>{dp(r,o,gp(n))}),t&&(t.finalized_=!1),r}function yp(){let t="replace",r="add",o="remove";function n(R,x,v,P){switch(R.type_){case 0:case 2:return d(R,x,v,P);case 1:return a(R,x,v,P);case 3:return m(R,x,v,P)}}function a(R,x,v,P){let{base_:w,assigned_:A}=R,O=R.copy_;O.length<w.length&&([w,O]=[O,w],[v,P]=[P,v]);for(let b=0;b<w.length;b++)if(A[b]&&O[b]!==w[b]){let I=x.concat([b]);v.push({op:t,path:I,value:h(O[b])}),P.push({op:t,path:I,value:h(w[b])})}for(let b=w.length;b<O.length;b++){let I=x.concat([b]);v.push({op:r,path:I,value:h(O[b])})}for(let b=O.length-1;w.length<=b;--b){let I=x.concat([b]);P.push({op:o,path:I})}}function d(R,x,v,P){let{base_:w,copy_:A}=R;Pa(R.assigned_,(O,b)=>{let I=ju(w,O),Q=ju(A,O),k=b?Aa(w,O)?t:r:o;if(I===Q&&k===t)return;let E=x.concat(O);v.push(k===o?{op:k,path:E}:{op:k,path:E,value:Q}),P.push(k===r?{op:o,path:E}:k===o?{op:r,path:E,value:h(I)}:{op:t,path:E,value:h(I)})})}function m(R,x,v,P){let{base_:w,copy_:A}=R,O=0;w.forEach(b=>{if(!A.has(b)){let I=x.concat([O]);v.push({op:o,path:I,value:b}),P.unshift({op:r,path:I,value:b})}O++}),O=0,A.forEach(b=>{if(!w.has(b)){let I=x.concat([O]);v.push({op:r,path:I,value:b}),P.unshift({op:o,path:I,value:b})}O++})}function f(R,x,v,P){v.push({op:t,path:[],value:x===Xu?void 0:x}),P.push({op:t,path:[],value:R})}function p(R,x){return x.forEach(v=>{let{path:P,op:w}=v,A=R;for(let Q=0;Q<P.length-1;Q++){let k=mo(A),E=P[Q];typeof E!="string"&&typeof E!="number"&&(E=""+E),(k===0||k===1)&&(E==="__proto__"||E==="constructor")&&Ue(19),typeof A=="function"&&E==="prototype"&&Ue(19),A=ju(A,E),typeof A!="object"&&Ue(18,P.join("/"))}let O=mo(A),b=g(v.value),I=P[P.length-1];switch(w){case t:switch(O){case 2:return A.set(I,b);case 3:Ue(16);default:return A[I]=b}case r:switch(O){case 1:return I==="-"?A.push(b):A.splice(I,0,b);case 2:return A.set(I,b);case 3:return A.add(b);default:return A[I]=b}case o:switch(O){case 1:return A.splice(I,1);case 2:return A.delete(I);case 3:return A.delete(v.value);default:return delete A[I]}default:Ue(17,w)}}),R}function g(R){if(!nt(R))return R;if(Array.isArray(R))return R.map(g);if(Ia(R))return new Map(Array.from(R.entries()).map(([v,P])=>[v,g(P)]));if(Ea(R))return new Set(Array.from(R).map(g));let x=Object.create(lo(R));for(let v in R)x[v]=g(R[v]);return Aa(R,Fa)&&(x[Fa]=R[Fa]),x}function h(R){return lt(R)?g(R):R}tv("Patches",{applyPatches_:p,generatePatches_:n,generateReplacementPatches_:f})}var dt=new iv,ur=dt.produce,ji=dt.produceWithPatches.bind(dt),ek=dt.setAutoFreeze.bind(dt),tk=dt.setUseStrictShallowCopy.bind(dt),tl=dt.applyPatches.bind(dt),rk=dt.createDraft.bind(dt),ok=dt.finishDraft.bind(dt);l();c();u();s();function cv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function uv(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 hp=e=>Array.isArray(e)?e:[e];function lv(e){let t=Array.isArray(e[0])?e[0]:e;return uv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function dv(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var lk=Symbol();var dk=Object.getPrototypeOf({});var mv=class{constructor(e){this.value=e}deref(){return this.value}},pv=typeof WeakRef<"u"?WeakRef:mv,fv=0,Sp=1;function $i(){return{s:fv,v:void 0,o:null,p:null}}function Ho(e,t={}){let r=$i(),{resultEqualityCheck:o}=t,n,a=0;function d(){let m=r,{length:f}=arguments;for(let h=0,R=f;h<R;h++){let x=arguments[h];if(typeof x=="function"||typeof x=="object"&&x!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let P=v.get(x);P===void 0?(m=$i(),v.set(x,m)):m=P}else{let v=m.p;v===null&&(m.p=v=new Map);let P=v.get(x);P===void 0?(m=$i(),v.set(x,m)):m=P}}let p=m,g;if(m.s===Sp)g=m.v;else if(g=e.apply(null,arguments),a++,o){let h=n?.deref?.()??n;h!=null&&o(h,g)&&(g=h,a!==0&&a--),n=typeof g=="object"&&g!==null||typeof g=="function"?new pv(g):g}return p.s=Sp,p.v=g,g}return d.clearCache=()=>{r=$i(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function Cp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,d=0,m,f={},p=n.pop();typeof p=="object"&&(f=p,p=n.pop()),cv(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let g={...r,...f},{memoize:h,memoizeOptions:R=[],argsMemoize:x=Ho,argsMemoizeOptions:v=[],devModeChecks:P={}}=g,w=hp(R),A=hp(v),O=lv(n),b=h(function(){return a++,p.apply(null,arguments)},...w),I=!0,Q=x(function(){d++;let E=dv(O,arguments);return m=b.apply(null,E),m},...A);return Object.assign(Q,{resultFunc:p,memoizedResultFunc:b,dependencies:O,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>m,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:h,argsMemoize:x})};return Object.assign(o,{withTypes:()=>o}),o}var K=Cp(Ho),gv=Object.assign((e,t=K)=>{sv(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((d,m,f)=>(d[r[f]]=m,d),{}))},{withTypes:()=>gv});l();c();u();s();function xp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Rp=xp(),vp=xp;var yv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wo:Wo.apply(null,arguments)},Ek=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hv=e=>e&&typeof e.match=="function";function F(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Vt(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Li(o)&&o.type===e,r}var wp=class Ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ta.prototype)}static get[Symbol.species](){return Ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ta(...t[0].concat(this)):new Ta(...t.concat(this))}};function Fp(e){return nt(e)?ur(e,()=>{}):e}function Pp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Sv(e){return typeof e=="boolean"}var Cv=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},d=new wp;return r&&(Sv(r)?d.push(Rp):d.push(vp(r.extraArgument))),d},Oa="RTK_autoBatch",Go=()=>e=>({payload:e,meta:{[Oa]:!0}}),Ap=e=>t=>{setTimeout(t,e)},xv=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,d=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ap(10):e.type==="callback"?e.queueNotification:Ap(e.timeout),p=()=>{d=!1,a&&(a=!1,m.forEach(g=>g()))};return Object.assign({},o,{subscribe(g){let h=()=>n&&g(),R=o.subscribe(h);return m.add(g),()=>{R(),m.delete(g)}},dispatch(g){try{return n=!g?.meta?.[Oa],a=!n,a&&(d||(d=!0,f(p))),o.dispatch(g)}finally{n=!0}}})},Rv=e=>function(r){let{autoBatch:o=!0}=r??{},n=new wp(e);return o&&n.push(xv(typeof o=="object"?o:void 0)),n};function Ip(e){let t=Cv(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ut(r))m=zo(r);else throw new Error(Vt(1));let f;typeof o=="function"?f=o(t):f=t();let p=Wo;n&&(p=yv({trace:!1,...typeof n=="object"&&n}));let g=ap(...f),h=Rv(g),R=typeof d=="function"?d(h):h(),x=p(...R);return _u(m,a,x)}function Ep(e){let t={},r=[],o,n={addCase(a,d){let m=typeof a=="string"?a:a.type;if(!m)throw new Error(Vt(28));if(m in t)throw new Error(Vt(29));return t[m]=d,n},addMatcher(a,d){return r.push({matcher:a,reducer:d}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function vv(e){return typeof e=="function"}function ee(e,t){let[r,o,n]=Ep(t),a;if(vv(e))a=()=>Fp(e());else{let m=Fp(e);a=()=>m}function d(m=a(),f){let p=[r[f.type],...o.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return p.filter(g=>!!g).length===0&&(p=[n]),p.reduce((g,h)=>{if(h)if(lt(g)){let x=h(g,f);return x===void 0?g:x}else{if(nt(g))return ur(g,R=>h(R,f));{let R=h(g,f);if(R===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}}return g},m)}return d.getInitialState=a,d}var Tp=(e,t)=>hv(e)?e.match(t):e(t);function Bt(...e){return t=>e.some(r=>Tp(r,t))}function Ko(...e){return t=>e.every(r=>Tp(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 qa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Hi(...e){return e.length===0?t=>Wi(t,["pending"]):qa(e)?Bt(...e.map(t=>t.pending)):Hi()(e[0])}function fo(...e){return e.length===0?t=>Wi(t,["rejected"]):qa(e)?Bt(...e.map(t=>t.rejected)):fo()(e[0])}function ka(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ko(fo(...e),t):qa(e)?Ko(fo(...e),t):ka()(e[0])}function lr(...e){return e.length===0?t=>Wi(t,["fulfilled"]):qa(e)?Bt(...e.map(t=>t.fulfilled)):lr()(e[0])}function Ki(...e){return e.length===0?t=>Wi(t,["pending","fulfilled","rejected"]):qa(e)?Bt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ki()(e[0])}var Fv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gi=(e=21)=>{let t="",r=e;for(;r--;)t+=Fv[Math.random()*64|0];return t},Pv=["name","message","stack","code"],rl=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},bp=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},Av=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Pv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},re=(()=>{function e(t,r,o){let n=F(t+"/fulfilled",(f,p,g,h)=>({payload:f,meta:{...h||{},arg:g,requestId:p,requestStatus:"fulfilled"}})),a=F(t+"/pending",(f,p,g)=>({payload:void 0,meta:{...g||{},arg:p,requestId:f,requestStatus:"pending"}})),d=F(t+"/rejected",(f,p,g,h,R)=>({payload:h,error:(o&&o.serializeError||Av)(f||"Rejected"),meta:{...R||{},arg:g,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,g,h)=>{let R=o?.idGenerator?o.idGenerator(f):Gi(),x=new i.AbortController,v,P;function w(O){P=O,x.abort()}let A=async function(){let O;try{let I=o?.condition?.(f,{getState:g,extra:h});if(wv(I)&&(I=await I),I===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let Q=new Promise((k,E)=>{v=()=>{E({name:"AbortError",message:P||"Aborted"})},x.signal.addEventListener("abort",v)});p(a(R,f,o?.getPendingMeta?.({requestId:R,arg:f},{getState:g,extra:h}))),O=await Promise.race([Q,Promise.resolve(r(f,{dispatch:p,getState:g,extra:h,requestId:R,signal:x.signal,abort:w,rejectWithValue:(k,E)=>new rl(k,E),fulfillWithValue:(k,E)=>new bp(k,E)})).then(k=>{if(k instanceof rl)throw k;return k instanceof bp?n(k.payload,R,f,k.meta):n(k,R,f)})])}catch(I){O=I instanceof rl?d(null,R,f,I.payload,I.meta):d(I,R,f)}finally{v&&x.signal.removeEventListener("abort",v)}return o&&!o.dispatchConditionRejection&&d.match(O)&&O.meta.condition||p(O),O}();return Object.assign(A,{abort:w,requestId:R,arg:f,unwrap(){return A.then(bv)}})}}return Object.assign(m,{pending:a,rejected:d,fulfilled:n,settled:Bt(d,n),typePrefix:t})}return e.withTypes=()=>e,e})();function bv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function wv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Op=Symbol.for("rtk-slice-createasyncthunk"),Vk={[Op]:re};function Iv(e,t){return`${e}/${t}`}function Ev({creators:e}={}){let t=e?.asyncThunk?.[Op];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Vt(11));typeof process<"u";let d=(typeof o.reducers=="function"?o.reducers(Ov()):o.reducers)||{},m=Object.keys(d),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(O,b){let I=typeof O=="string"?O:O.type;if(!I)throw new Error(Vt(12));if(I in f.sliceCaseReducersByType)throw new Error(Vt(13));return f.sliceCaseReducersByType[I]=b,p},addMatcher(O,b){return f.sliceMatchers.push({matcher:O,reducer:b}),p},exposeAction(O,b){return f.actionCreators[O]=b,p},exposeCaseReducer(O,b){return f.sliceCaseReducersByName[O]=b,p}};m.forEach(O=>{let b=d[O],I={reducerName:O,type:Iv(n,O),createNotation:typeof o.reducers=="function"};kv(b)?Dv(I,b,p,t):qv(I,b,p)});function g(){let[O={},b=[],I=void 0]=typeof o.extraReducers=="function"?Ep(o.extraReducers):[o.extraReducers],Q={...O,...f.sliceCaseReducersByType};return ee(o.initialState,k=>{for(let E in Q)k.addCase(E,Q[E]);for(let E of f.sliceMatchers)k.addMatcher(E.matcher,E.reducer);for(let E of b)k.addMatcher(E.matcher,E.reducer);I&&k.addDefaultCase(I)})}let h=O=>O,R=new Map,x;function v(O,b){return x||(x=g()),x(O,b)}function P(){return x||(x=g()),x.getInitialState()}function w(O,b=!1){function I(k){let E=k[O];return typeof E>"u"&&b&&(E=P()),E}function Q(k=h){let E=Pp(R,b,()=>new WeakMap);return Pp(E,k,()=>{let q={};for(let[V,U]of Object.entries(o.selectors??{}))q[V]=Tv(U,k,P,b);return q})}return{reducerPath:O,getSelectors:Q,get selectors(){return Q(I)},selectSlice:I}}let A={name:n,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:P,...w(a),injectInto(O,{reducerPath:b,...I}={}){let Q=b??a;return O.inject({reducerPath:Q,reducer:v},I),{...A,...w(Q,!0)}}};return A}}function Tv(e,t,r,o){function n(a,...d){let m=t(a);return typeof m>"u"&&o&&(m=r()),e(m,...d)}return n.unwrapped=e,n}var go=Ev();function Ov(){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 qv({type:e,reducerName:t,createNotation:r},o,n){let a,d;if("reducer"in o){if(r&&!Vv(o))throw new Error(Vt(17));a=o.reducer,d=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?F(e,d):F(e))}function kv(e){return e._reducerDefinitionType==="asyncThunk"}function Vv(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dv({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:d,pending:m,rejected:f,settled:p,options:g}=r,h=n(e,a,g);o.exposeAction(t,h),d&&o.addCase(h.fulfilled,d),m&&o.addCase(h.pending,m),f&&o.addCase(h.rejected,f),p&&o.addMatcher(h.settled,p),o.exposeCaseReducer(t,{fulfilled:d||zi,pending:m||zi,rejected:f||zi,settled:p||zi})}function zi(){}var qp="listener",kp="completed",Vp="cancelled",Dk=`task-${Vp}`,Nk=`task-${kp}`,Mk=`${qp}-${Vp}`,Lk=`${qp}-${kp}`;var{assign:Dp}=Object;var ol="listenerMiddleware";var Nv=Dp(F(`${ol}/add`),{withTypes:()=>Nv}),Qk=F(`${ol}/removeAll`),Mv=Dp(F(`${ol}/remove`),{withTypes:()=>Mv});var Uk=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();c();u();s();var Ar=K(e=>e.commercePagination?.principal.perPage||0,e=>e),Yi=K((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),br=K(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ji=K((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Xi=K(e=>e.commercePagination?.principal.page||0,e=>e),Np=K((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var iV=K(e=>e[X].productListing.responseId,e=>e),Va=K(e=>e.productListing.responseId,e=>e),Mp=K(e=>e.productListing.requestId,e=>e),Da=K(e=>e.productListing?.products.length||0,e=>e),Lp=K(e=>({total:br(e),current:Da(e)}),({current:e,total:t})=>e<t),Qp=K(e=>e.productListing?.isLoading,e=>te(e)?!1:e),Up=K(e=>e.productListing?.error,e=>e??null);l();c();u();s();l();c();u();s();function nl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function al(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function _t(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:d}])=>{let m=r(d);return m.length?{[a]:m}:{}}).reduce((a,d)=>({...a,...d}),{});return Object.keys(n).length?{[o]:n}:{}}l();c();u();s();l();c();u();s();function jt(e){let{activeValue:t,ancestryMap:r}=Qv(e);return t?Uv(t,r):[]}function Qv(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 Uv(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}l();c();u();s();function Bp(){return{principal:wr(),recommendations:{}}}function wr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}l();c();u();s();l();c();u();s();l();c();u();s();var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),Ir=(r=>(r.Ascending="asc",r.Descending="desc",r))(Ir||{}),Dt=()=>({by:"relevance"});var wV=new L({options:{required:!1},values:{by:new kt({enum:ht,required:!0}),fields:new ae({each:new L({values:{name:new D,direction:new kt({enum:Ir})}})})}});var Na=e=>({by:"fields",fields:e}),_p=new L({options:{required:!1},values:{by:new kt({enum:ht,required:!0}),fields:new ae({each:new L({values:{field:new D({required:!0}),direction:new kt({enum:Ir}),displayName:new D}})})}});function yo(){return{appliedSort:Dt(),availableSorts:[Dt()]}}function Zi(e){return{...Bv(e?.commercePagination,t=>t.principal.page,wr().page),..._v(e?.commercePagination,t=>t.principal.perPage,wr().perPage),...al(e?.commerceSort,t=>t.appliedSort,yo().appliedSort),..._t(e.commerceFacetSet,Er(e,"regular"),jv,"f"),..._t(e.commerceFacetSet,Er(e,"regular"),$v,"fExcluded"),..._t(e.commerceFacetSet,Er(e,"location"),zv,"lf"),..._t(e.commerceFacetSet,Er(e,"hierarchical"),Wv,"cf"),..._t(e.commerceFacetSet,Er(e,"dateRange"),jp,"df"),..._t(e.commerceFacetSet,Er(e,"dateRange"),$p,"dfExcluded"),..._t(e.commerceFacetSet,Er(e,"numericalRange"),jp,"nf"),..._t(e.commerceFacetSet,Er(e,"numericalRange"),$p,"nfExcluded"),...zp("selected",e.manualNumericFacetSet),...zp("excluded",e.manualNumericFacetSet)}}function Bv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function _v(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function jv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function $v(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function zv(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function jp(e){return e.values.filter(t=>t.state==="selected")}function $p(e){return e.values.filter(t=>t.state==="excluded")}function zp(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 Wv(e){return jt(e.values).map(r=>r.value)}function Er(e,t){return r=>e.commerceFacetSet[r].request.type===t}l();c();u();s();var ec=()=>({query:""});var SD=K(e=>e[X].commerceSearch.responseId,e=>e),Ma=K(e=>e.commerceSearch.responseId,e=>e),Wp=K(e=>e.commerceSearch.requestId,e=>e),La=K(e=>e.commerceSearch?.products.length||0,e=>e),Hp=K(e=>({total:br(e),current:La(e)}),({current:e,total:t})=>e<t),Kp=K(e=>e.commerceSearch?.isLoading,e=>te(e)?!1:e),Gp=K(e=>e.commerceSearch?.error,e=>e??null),tc=K(e=>e.commerceQuery?.query,e=>e??""),Hv=K(e=>e.commerceSearch?.queryExecuted,e=>e),Yp=(e,t)=>te(t.queryCorrection?.correctedQuery)?tc(e):t.queryCorrection.correctedQuery,Jp=e=>({...nl(e?.commerceQuery,t=>t.query,ec().query),...Zi(e)});function Xp(e){return{query:Hv(e)||""}}var il;(t=>t.responseIdSelector=Zp(Ma))(il||(il={}));var cl;(t=>t.responseIdSelector=Zp(Va))(cl||(cl={}));function Zp(e){return t=>e(t[X])}var dl={};qu(dl,{escape:()=>Jo,getHighlightedSuggestion:()=>ll,highlightString:()=>Gv});l();c();u();s();l();c();u();s();var ho=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ef(e){return Array.isArray(e)}function Yo(e){return e.trim()===""}function tf(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Qa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Gv(e){if(Yo(e.openingDelimiter)||Yo(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(te(e.content)||Yo(e.content))return e.content;if(e.highlights.length===0)return Jo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],d=a.offset,m=d+a.length;if(m>t)break;r+=Jo(e.content.slice(o,d)),r+=e.openingDelimiter,r+=Jo(e.content.slice(d,m)),r+=e.closingDelimiter,o=m}return o!==t&&(r+=Jo(e.content.slice(o))),r}function ll(e,t){return e=Jo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ul(o,t.notMatchDelimiters):n?ul(n,t.exactMatchDelimiters):a?ul(a,t.correctionDelimiters):r)}function ul(e,t){return t?t.open+e+t.close:e}function Jo(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}l();c();u();s();var ff=yt(lf(),1);l();c();u();s();l();c();u();s();var RF="recommendation-internal-options",TN=Symbol.for(RF);var oe=new Error("Failed to load reducers."),Xo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Co=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}};l();c();u();s();function df(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function mf(e){return typeof e!="object"||!e?!1:Object.values(e).every(vF)}function vF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function pf(e){return e===429}var Zo=class e{static async call(t){let r=FF(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...d}=n,m=async()=>{let f=await S(a,d);if(pf(f.status))throw f;return f};try{let f=await(0,ff.backOff)(m,{retry:p=>{let g=p&&pf(p.status);return g&&o.info("Platform retrying request"),g}});switch(f.status){case 419:case 401:throw o.info("Platform renewing token"),new Xo;case 404:throw new Co(a,f.status);default:return o.info({response:f,requestInfo:n},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Co(a):f}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:d}=r,{signal:m,...f}=t,p=Qa(f);try{let g=await n(t,o,d);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return p}};function Be(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function St(e,t="prod"){return`${Be(e,t)}/rest/search/v2`}function oc(e,t="prod"){return`${Be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function FF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:d}=e,m=e.method==="POST"||e.method==="PUT",f=PF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...m&&{body:f},signal:d}}function PF(e,t){return t==="application/x-www-form-urlencoded"?mf(e)?df(e):"":JSON.stringify(e)}l();c();u();s();l();c();u();s();function AF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function bF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xl(e,t){if(t&&e.name==="AbortError")return{error:bF(e)};if(e instanceof Co)return{error:AF(e)};throw e}l();c();u();s();var en=(e,t)=>({..._a(e,t),requestParams:wF(e)}),wF=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:d,page:m,perPage:f,facets:p,sort:g}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:d,page:m,perPage:f,facets:p,sort:g}},_a=(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}}};l();c();u();s();var gf=(e,t)=>({..._a(e,t),requestParams:IF(e)}),IF=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:d,currency:m,page:f,perPage:p}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:d,currency:m,page:f,perPage:p}};l();c();u();s();var yf=e=>({..._a(e,"search/querySuggest"),requestParams:EF(e)}),EF=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:d,currency:m}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:d,currency:m}};var We=e=>e.error!==void 0,nc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...en(t,"listing"),...this.options})}async search(t){let r=en(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...gf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=en(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=yf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=en(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=en(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Zo.call(t);if(r instanceof Error)return xl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function ac(e,t="prod"){return`${Be(e,t)}/rest/organizations/${e}/commerce/v2`}l();c();u();s();l();c();u();s();var ic=e=>e;l();c();u();s();l();c();u();s();var j=new D({required:!0,emptyAllowed:!1}),xe=new D({required:!1,emptyAllowed:!1}),Ee=new D({required:!0,emptyAllowed:!0}),hf=new D({required:!1,emptyAllowed:!0}),Sf=new ae({each:j,required:!0}),Cf=new D({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),et=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ke=(e,t)=>{if("required"in t)return{payload:new fe({value:t}).validate({value:e}).value};let n=new L({options:{required:!0},values:t}).validate(e);if(n)throw new va(n);return{payload:e}},T=(e,t)=>{try{return ke(e,t)}catch(r){return{payload:e,error:et(r)}}},at=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return xf(e,t,r,n,"Controller initialization error")},tt=(e,t,r,o)=>{let n=`Check the options of ${o}`;return xf(e,t,r,n,"Controller initialization error")},xf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};l();c();u();s();l();c();u();s();var tn="3.23.2-pre.e3734b4a39",Rf=["@coveo/atomic","@coveo/quantic"];var Rl=()=>xe,vf=()=>j,xo=F("configuration/updateBasicConfiguration",e=>T(e,{accessToken:xe,environment:new D({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:xe})),Ff=F("configuration/updateSearchConfiguration",e=>T(e,{proxyBaseUrl:new D({required:!1,url:!0}),pipeline:new D({required:!1,emptyAllowed:!0}),searchHub:xe,timezone:xe,locale:xe,authenticationProviders:new ae({required:!1,each:j})})),rn={enabled:new Z({default:!0}),originContext:Rl(),originLevel2:Rl(),originLevel3:Rl(),proxyBaseUrl:new D({required:!1,url:!0}),runtimeEnvironment:new Ce,anonymous:new Z({default:!1}),deviceId:xe,userDisplayName:xe,documentLocation:xe,trackingId:xe,analyticsMode:new D({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new L({options:{required:!1},values:Rf.reduce((e,t)=>(e[t]=Cf,e),{})})},vl=F("configuration/updateAnalyticsConfiguration",e=>T(e,rn)),cc=F("configuration/analytics/disable"),sc=F("configuration/analytics/enable"),Pf=F("configuration/analytics/originlevel2",e=>T(e,{originLevel2:vf()})),Af=F("configuration/analytics/originlevel3",e=>T(e,{originLevel3:vf()}));var on=F("commerce/configuration/updateBasicConfiguration",e=>T(e,{accessToken:xe,environment:new D({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:xe})),nn=F("commerce/configuration/updateProxyBaseUrl",e=>T(e,{proxyBaseUrl:new D({required:!1,url:!0})})),an=F("commerce/configuration/updateAnalyticsConfiguration",e=>T(e,{enabled:rn.enabled,proxyBaseUrl:rn.proxyBaseUrl,source:rn.source,trackingId:rn.trackingId})),uc=F("commerce/configuration/analytics/disable"),lc=F("commerce/configuration/analytics/enable");l();c();u();s();l();c();u();s();var bf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Fl=ee(bf(),e=>e.addCase(on,(t,r)=>{wf(t,r.payload)}).addCase(xo,(t,r)=>{wf(t,r.payload)}).addCase(nn,(t,r)=>{TF(t,r.payload)}).addCase(an,(t,r)=>{OF(t,r.payload)}).addCase(uc,t=>{t.analytics.enabled=!1}).addCase(lc,t=>{t.analytics.enabled=!0}));function wf(e,t){te(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",te(t.organizationId)||(e.organizationId=t.organizationId)}function TF(e,t){te(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function OF(e,t){te(t.enabled)||(e.analytics.enabled=t.enabled),te(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),te(t.source)||(e.analytics.source=t.source),te(t.trackingId)||(e.analytics.trackingId=t.trackingId)}l();c();u();s();l();c();u();s();l();c();u();s();function cn(e){return e.currency}var If=(e,t)=>({currency:cn(t.commerceContext),products:qF(t.cart),transaction:e}),Ef=(e,t)=>({currency:cn(t.commerceContext),...e}),Ro=K(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),qF=K(Ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));l();c();u();s();var Pl={productId:j,quantity:new G({required:!0,min:0}),name:new D({required:!1}),price:new G({required:!1,min:0})},Al=new ae({each:new L({values:{...Pl}})}),bl={items:Al},Tf=new fe(bl);var Tr=F("commerce/cart/setItems",e=>T(e,Al)),sn=F("commerce/cart/updateItemQuantity",e=>T(e,Pl)),un=F("commerce/cart/purchase"),dc=re("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=If(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),mc=re("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Ef(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});l();c();u();s();l();c();u();s();l();c();u();s();function ie(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let d=JSON.stringify(a),m=t!==d;return t=d,m}catch(d){return console.warn('Could not detect if state has changed, check the controller "get state method"',d),!0}};return{subscribe(a){a();let d=Symbol(),m;return o()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{n(this.state)&&r.forEach(f=>f())})),r.set(d,a),()=>{r.delete(d),o()&&m&&m()}},get state(){return{}}}}l();c();u();s();function Of(e,t){return e.cart[vo(t)]}var qf=K(Ro,e=>e.reduce((t,r)=>t+r.quantity,0)),kf=K(Ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Vf(e,t={}){if(!kF(e))throw oe;let{dispatch:r}=e,o=ie(e),n=()=>e[X].cart,a={...t.initialState};at(e,Tf,a,"buildCart"),a.items!==void 0&&r(Tr(a.items));function d(g,h){return h?h.quantity!==g.quantity:!0}function m(g,h){return!h||g.quantity>h.quantity?"add":"remove"}function f(g,h){return h?g.name===h.name&&g.price===h.price&&g.quantity===h.quantity:!1}function p(g,h){let{quantity:R,...x}=g,v=m(g,h),P=h?Math.abs(R-h.quantity):R;return{action:v,quantity:P,product:x}}return{...o,empty:function(){for(let g of Ro(n()))this.updateItemQuantity({...g,quantity:0})},purchase(g){r(dc(g)),r(un())},updateItemQuantity(g){let h=Of(n(),g);!h&&g.quantity<=0||f(g,h)||(d(g,h)&&r(mc(p(g,h))),r(sn(g)))},get state(){let g=n();return{items:Ro(g),totalQuantity:qf(g),totalPrice:kf(g)}}}}function vo(e){return`${e.productId},${e.name},${e.price}`}function kF(e){return e.addReducers({cart:ln}),!0}l();c();u();s();var pc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Df=e=>Mf(e.cartItems,e.cart),Nf=e=>Mf(e.purchasedItems,e.purchased);function Mf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:d}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=d,o},{});return[...Object.values(r)]}var ln=ee(pc(),e=>{e.addCase(Tr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,d)=>{let m=vo(d);return{cartItems:[...a.cartItems,m],cart:{...a.cart,[m]:d},purchasedItems:[],purchased:{}}},pc());Lf(t,n,o)}).addCase(sn,(t,{payload:r})=>{let o=vo(r);if(!(o in t.cart)){VF(r,t);return}if(r.quantity<=0){DF(r,t);return}t.cart[o]=r}).addCase(un,t=>{NF(t);let{cart:r,cartItems:o}=pc();Lf(t,o,r)})});function Lf(e,t,r){e.cartItems=t,e.cart=r}function VF(e,t){if(e.quantity<=0)return;let r=vo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function DF(e,t){let r=vo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function NF(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]}}l();c();u();s();l();c();u();s();var MF=Intl.supportedValuesOf("currency"),LF=new D({required:!0,emptyAllowed:!1,constrainTo:MF}),wl={url:j},Il={latitude:new G({min:-90,max:90,required:!0}),longitude:new G({min:-180,max:180,required:!0})},ja={language:j,country:j,currency:LF,view:new L({options:{required:!0},values:wl}),location:new L({options:{required:!1},values:Il})},Qf=new fe(ja);var Pe=F("commerce/context/set",e=>T(e,ja)),we=F("commerce/context/setView",e=>T(e,wl)),dn=F("commerce/context/setLocation",e=>T(e,Il));l();c();u();s();l();c();u();s();var Uf=()=>({language:"",country:"",currency:"",view:{url:""}});var $t=ee(Uf(),e=>{e.addCase(Pe,(t,{payload:r})=>r).addCase(we,(t,{payload:r})=>{t.view=r}).addCase(dn,(t,{payload:r})=>{t.location=r})});l();c();u();s();l();c();u();s();var fc=()=>({correctedQuery:"",corrections:[],originalQuery:""});l();c();u();s();l();c();u();s();var Ct=F("breadcrumb/deselectAll"),Or=F("breadcrumb/deselectAllNonBreadcrumbs");l();c();u();s();l();c();u();s();var qr=K(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${tn}`));var kr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??ac(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:Df(e.cart),source:qr(e.configuration.analytics)}}};l();c();u();s();l();c();u();s();var gc=(e,t,r)=>({...kr(e,t),...QF(e,r)}),QF=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var xt=(e,t)=>({...gc(e,t),facets:[...UF(e)],...e.commerceSort&&{sort:BF(e.commerceSort.appliedSort)}});function UF(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 BF(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}l();c();u();s();var Fo=F("commerce/facets/core/updateNumberOfValues",e=>T(e,{facetId:j,numberOfValues:new G({required:!0,min:1})})),Po=F("commerce/facets/core/updateIsFieldExpanded",e=>T(e,{facetId:j,isFieldExpanded:new Z({required:!0})})),Te=F("commerce/facets/core/clearAll"),He=F("commerce/facets/core/deselectAllValues",e=>T(e,{facetId:j})),Ao=F("commerce/facets/core/updateFreezeCurrentValues",e=>T(e,{facetId:j,freezeCurrentValues:new Z({required:!0})})),mn=F("commerce/facets/core/updateAutoSelectionForAll",e=>T(e,{allow:new Z({required:!0})}));l();c();u();s();var yc={slotId:hf},_F={...yc,pageSize:new G({required:!0,min:0})},mr=F("commerce/pagination/setPageSize",e=>T(e,_F)),jF={...yc,page:new G({required:!0,min:0})},zt=F("commerce/pagination/selectPage",e=>T(e,jF)),Vr=F("commerce/pagination/nextPage",e=>T(e,yc)),Dr=F("commerce/pagination/previousPage",e=>T(e,yc)),pn=F("commerce/pagination/registerRecommendationsSlot",e=>T(e,{slotId:j}));l();c();u();s();var Oe=F("commerce/query/update",e=>T(e,{query:new D}));l();c();u();s();l();c();u();s();var Nr=F("commerce/triggers/query/updateIgnore",e=>T(e,{q:new D({emptyAllowed:!0,required:!0})})),fn=F("commerce/triggers/query/applyModification",e=>T(e,new L({values:{originalQuery:xe,modification:xe}})));var $a=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 We(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(!(!te(n)&&!te(n.correctedQuery)))return null;let{correctedQuery:d,originalQuery:m}=o.queryCorrection;return this.onUpdateQueryForCorrection(d??""),{...t,response:{...o},queryExecuted:Yp(r,o),originalQuery:m??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(m=>m.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Nr({q:""})),null;let a=this.getCurrentQuery(),d=await this.automaticallyRetryQueryWithTriggerModification(o);return We(d.response)?this.rejectWithValue(d.response.error):{...d,response:{...d.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(fn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...xt(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 We(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Oe({query:t}))}};var ue=re("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=xt(o,n),d=tc(o),m=new $a(t),f=await m.fetchFromAPI({...a,query:d});return m.process(f)}),Mr=re("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Hp(o))return null;let d=Ar(o),f=La(o)/d,p=tc(o),g=xt(o,n),h=new $a(t),R=await h.fetchFromAPI({...g,query:p,page:f});return h.process(R)}),gn=re("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;T(e,{query:new D,clearFilters:new Z}),e.clearFilters&&(r(Te()),r(Or())),r(mn({allow:!0})),r(Oe({query:e.query})),r(zt({page:0}))}),yn=re("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:d}=o,{q:m}=e,f=await a.productSuggestions({...kr(n,d),query:m});return We(f)?r(f.error):{response:{...f.success,products:f.success.products}}}),$F={child:new L({options:{required:!0},values:{permanentid:new D({required:!0})}})},hn=F("commerce/search/promoteChildToParent",e=>T(e,$F));l();c();u();s();function Bf(){return{wasCorrectedTo:"",queryCorrection:fc(),originalQuery:""}}var hc=ee(Bf(),e=>{e.addCase(ue.pending,t=>{t.queryCorrection=fc(),t.wasCorrectedTo=""}).addCase(ue.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??[]}})});l();c();u();s();l();c();u();s();l();c();u();s();var le=j;l();c();u();s();var zF={state:new Ce({required:!0}),numberOfResults:new G({required:!0,min:0}),value:new D({required:!0,emptyAllowed:!0}),path:new ae({required:!0,each:j}),moreValuesAvailable:new Z({required:!1})};function za(e){e.children.forEach(t=>{za(t)}),ke({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},zF)}var Sn={facetId:le,field:j,tabs:new L({options:{required:!1},values:{included:new ae({each:new D}),excluded:new ae({each:new D})}}),activeTab:new D({required:!1}),delimitingCharacter:new D({required:!1,emptyAllowed:!0}),filterFacetCount:new Z({required:!1}),injectionDepth:new G({required:!1,min:0}),numberOfValues:new G({required:!1,min:1}),sortCriteria:new Ce({required:!1}),basePath:new ae({required:!1,each:j}),filterByBasePath:new Z({required:!1})},Cn=5,_f=F("categoryFacet/register",e=>T(e,Sn)),jf=F("categoryFacet/toggleSelectValue",e=>{try{return ke(e.facetId,j),za(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:et(t)}}}),$f=F("categoryFacet/deselectAll",e=>T(e,Sn.facetId)),F_=F("categoryFacet/updateNumberOfValues",e=>T(e,{facetId:Sn.facetId,numberOfValues:Sn.numberOfValues})),P_=F("categoryFacet/updateSortCriterion",e=>T(e,{facetId:Sn.facetId,criterion:new Ce})),A_=F("categoryFacet/updateBasePath",e=>T(e,{facetId:Sn.facetId,basePath:new ae({each:j})}));l();c();u();s();l();c();u();s();var Wa={facetId:le,captions:new L({options:{required:!1}}),numberOfValues:new G({required:!1,min:1}),query:new D({required:!1,emptyAllowed:!0})};var WF={path:new ae({required:!0,each:j}),displayValue:Ee,rawValue:Ee,count:new G({required:!0,min:0})},Rt=F("categoryFacet/selectSearchResult",e=>T(e,{facetId:le,value:new L({values:WF})})),Sc=F("categoryFacetSearch/register",e=>T(e,Wa));l();c();u();s();var zf={facetId:le,value:new L({values:{displayValue:Ee,rawValue:Ee,count:new G({required:!0,min:0})}})},Cc=F("facetSearch/register",e=>T(e,Wa)),Lr=F("facetSearch/update",e=>T(e,Wa)),mt=F("facetSearch/toggleSelectValue",e=>T(e,zf)),Nt=F("facetSearch/toggleExcludeValue",e=>T(e,zf));l();c();u();s();l();c();u();s();var pr=F("facetOptions/update",(e={freezeFacetOrder:!0})=>T(e,{freezeFacetOrder:new Z({required:!1})})),El=F("facetOptions/facet/enable",e=>T(e,le)),fr=F("facetOptions/facet/disable",e=>T(e,le));l();c();u();s();var HF=F("history/undo"),KF=F("history/redo"),Wt=F("history/snapshot"),fj=re("history/back",async(e,{dispatch:t})=>{t(HF()),await t(Ne())}),gj=re("history/forward",async(e,{dispatch:t})=>{t(KF()),await t(Ne())}),Ne=re("history/change",async(e,{getState:t})=>t().history.present);l();c();u();s();l();c();u();s();var xc={q:new D,enableQuerySyntax:new Z,aq:new D,cq:new D,firstResult:new G({min:0}),numberOfResults:new G({min:0}),sortCriteria:new D,f:new L,fExcluded:new L,cf:new L,nf:new L,mnf:new L,df:new L,debug:new Z,sf:new L,tab:new D,af:new L};var _e=F("searchParameters/restore",e=>T(e,xc)),GF=F("searchParameters/restoreTab",e=>T(e,j));l();c();u();s();l();c();u();s();l();c();u();s();function gr(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 N(e,t,r,o){function n(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function m(g){try{p(o.next(g))}catch(h){d(h)}}function f(g){try{p(o.throw(g))}catch(h){d(h)}}function p(g){g.done?a(g.value):n(g.value).then(m,f)}p((o=o.apply(e,t||[])).next())})}var ge;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ge||(ge={}));function ql(){return typeof window<"u"}function zl(){return typeof navigator<"u"}function xn(){return typeof document<"u"}function kl(){try{return typeof localStorage<"u"}catch{return!1}}function YF(){try{return typeof sessionStorage<"u"}catch{return!1}}function ag(){return zl()&&navigator.cookieEnabled}var JF=[ge.click,ge.custom,ge.search,ge.view],XF=(e,t)=>JF.indexOf(e)!==-1?Object.assign({language:xn()?document.documentElement.lang:"unknown",userAgent:zl()?navigator.userAgent:"unknown"},t):t,Ga=class e{static set(t,r,o){var n,a,d,m;o&&(a=new Date,a.setTime(a.getTime()+o)),m=window.location.hostname,m.indexOf(".")===-1?Wf(t,r,a):(d=m.split("."),n=d[d.length-2]+"."+d[d.length-1],Wf(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 Wf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function ZF(){return kl()?localStorage:ag()?new Ya:YF()?sessionStorage:new vn}var Ya=class e{getItem(t){return Ga.get(`${e.prefix}${t}`)}removeItem(t){Ga.erase(`${e.prefix}${t}`)}setItem(t,r,o){Ga.set(`${e.prefix}${t}`,r,o)}};Ya.prefix="coveo_";var Vl=class{constructor(){this.cookieStorage=new Ya}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)}},vn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ha="__coveo.analytics.history",ig=20,cg=1e3*60,sg=75,Fn=class{constructor(t){this.store=t||ZF()}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 N(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 N(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ha);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return N(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ha);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ha,JSON.stringify(t.slice(0,ig)))}catch{}}clear(){try{this.store.removeItem(Ha)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,sg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>cg:!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))}},ug=Object.freeze({__proto__:null,HistoryStore:Fn,MAX_NUMBER_OF_HISTORY_ELEMENTS:ig,MAX_VALUE_SIZE:sg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:cg,STORE_KEY:Ha,default:Fn}),eP=(e,t)=>N(void 0,void 0,void 0,function*(){return e===ge.view?(yield tP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),tP=e=>N(void 0,void 0,void 0,function*(){let t=new Fn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Rc,rP=new Uint8Array(16);function oP(){if(!Rc&&(Rc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rc(rP)}var nP=/^(?:[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 Fc(e){return typeof e=="string"&&nP.test(e)}var je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function lg(e,t=0){return(je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]).toLowerCase()}function aP(e){if(!Fc(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 iP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var cP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",sP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function uP(e,t,r){function o(n,a,d,m){var f;if(typeof n=="string"&&(n=iP(n)),typeof a=="string"&&(a=aP(a)),((f=a)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+n.length);if(p.set(a),p.set(n,a.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,d){m=m||0;for(let g=0;g<16;++g)d[m+g]=p[g];return d}return lg(p)}try{o.name=e}catch{}return o.DNS=cP,o.URL=sP,o}var lP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hf={randomUUID:lP};function bo(e,t,r){if(Hf.randomUUID&&!t&&!e)return Hf.randomUUID();e=e||{};let o=e.random||(e.rng||oP)();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 lg(o)}function dP(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 Tl(e,t){return e<<t|e>>>32-t}function mP(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let m=0;m<d.length;++m)e.push(d.charCodeAt(m))}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 d=0;d<n;++d){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[d*64+f*4]<<24|e[d*64+f*4+1]<<16|e[d*64+f*4+2]<<8|e[d*64+f*4+3];a[d]=m}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 d=0;d<n;++d){let m=new Uint32Array(80);for(let x=0;x<16;++x)m[x]=a[d][x];for(let x=16;x<80;++x)m[x]=Tl(m[x-3]^m[x-8]^m[x-14]^m[x-16],1);let f=r[0],p=r[1],g=r[2],h=r[3],R=r[4];for(let x=0;x<80;++x){let v=Math.floor(x/20),P=Tl(f,5)+dP(v,p,g,h)+R+t[v]+m[x]>>>0;R=h,h=g,g=Tl(p,30)>>>0,p=f,f=P}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+R>>>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 pP=uP("v5",80,mP),Kf=pP,dg="2.30.45",Gf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ka={pageview:"pageview",event:"event"},Pc=class{constructor({client:t,uuidGenerator:r=bo}){this.client=t,this.uuidGenerator=r}},Dl=class extends Pc{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Gf(window.location),this.lastReferrer=xn()?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:xn()?document.title:"",encoding:xn()?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===Ka.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ka.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ka.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ka.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 Gf(window.location)}},Qr=class e{constructor(t,r){if(!Fc(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 Fc(a)?new e(a,Number.parseInt(n)*1e3):null}};Qr.cvo_cid="cvo_cid";Qr.expirationTime=120;var Nl=class extends Pc{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return N(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(Qr.cvo_cid,new Qr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Nl.Id="link";var Ft=Object.keys;function vc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Ol=128,mg=192,Yf=224,Jf=240;function fP(e){return(e&248)===Jf?4:(e&Jf)===Yf?3:(e&Yf)===mg?2:1}function gP(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&Ol)!=Ol)break;if(r-=3,(o&mg)!=Ol){t-r>=fP(o)*3&&(r=t);break}}return e.substring(0,r)}var Ml={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"},yP=Ft(Ml).map(e=>Ml[e]),hP=[...yP].join("|"),SP=new RegExp(`^(${hP}$)`),CP={svcAction:"svc_action",svcActionData:"svc_action_data"},xP=e=>Ft(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Ml[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),RP=e=>SP.test(e),vP=[RP],Xf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Zf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ke={action:"pa",list:"pal",listSource:"pls"},Ac={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},FP=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ll={id:"quoteId",affiliation:"quoteAffiliation"},Ql={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},PP={add:Ke,bookmark_add:Ke,bookmark_remove:Ke,click:Ke,checkout:Ke,checkout_option:Ke,detail:Ke,impression:Ke,remove:Ke,refund:Object.assign(Object.assign({},Ke),Ac),purchase:Object.assign(Object.assign({},Ke),Ac),quickview:Ke,quote:Object.assign(Object.assign({},Ke),Ll),review:Object.assign(Object.assign({},Ke),Ql)},AP=Ft(Xf).map(e=>Xf[e]),bP=Ft(Zf).map(e=>Zf[e]),wP=Ft(Ke).map(e=>Ke[e]),IP=Ft(Ac).map(e=>Ac[e]),EP=Ft(Ql).map(e=>Ql[e]),TP=Ft(Ll).map(e=>Ll[e]),OP=[...AP,"custom"].join("|"),qP=[...bP,"custom"].join("|"),pg="(pr[0-9]+)",fg="(il[0-9]+pi[0-9]+)",kP=new RegExp(`^${pg}(${OP})$`),VP=new RegExp(`^(${fg}(${qP}))|(il[0-9]+nm)$`),DP=new RegExp(`^(${wP.join("|")})$`),NP=new RegExp(`^(${IP.join("|")})$`),MP=new RegExp(`^${pg}custom$`),LP=new RegExp(`^${fg}custom$`),QP=new RegExp(`^(${[...FP,...EP,...TP].join("|")})$`),UP=e=>kP.test(e),BP=e=>VP.test(e),_P=e=>DP.test(e),jP=e=>NP.test(e),$P=e=>QP.test(e),zP=[BP,UP,_P,jP,$P],WP=[MP,LP],HP={anonymizeIp:"aip"},KP={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},GP={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},YP=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],JP=Object.assign(Object.assign(Object.assign(Object.assign({},HP),KP),GP),YP.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ul=Object.assign(Object.assign({},JP),CP),XP=e=>{let t=!!e.action&&PP[e.action]||{};return Ft(e).reduce((r,o)=>{let n=t[o]||Ul[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},ZP=Ft(Ul).map(e=>Ul[e]),eA=e=>ZP.indexOf(e)!==-1,tA=e=>e==="custom",rA=e=>[...zP,...vP,eA,tA].some(t=>t(e)),oA=e=>Ft(e).reduce((t,r)=>{let o=nA(r);return o?Object.assign(Object.assign({},t),aA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),nA=e=>{let t;return[...WP].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},aA=(e,t)=>Ft(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bl=class{constructor(t){this.opts=t}sendEvent(t,r){return N(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:d,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return N(this,void 0,void 0,function*(){let n=t,a=r;if(o){let d=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=d;n=m||t;try{a=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}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 N(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[ge.click,ge.custom,ge.search,ge.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}},_l=class{sendEvent(t,r){return N(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return N(this,void 0,void 0,function*(){return Promise.resolve()})}},eg=y.fetch,bc=class{constructor(t){this.opts=t}sendEvent(t,r){return N(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${o}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),a?yield a(m,"analyticsFetch"):{}),{url:p}=f,g=gr(f,["url"]),h;try{h=yield eg(p,g)}catch(R){console.error("An error has occured when sending the event.",R);return}if(h.ok){let R=yield h.json();return R.visitorId&&n.setCurrentVisitorId(R.visitorId),R}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return N(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield eg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ge.click,ge.custom,ge.search,ge.view].indexOf(t)!==-1}getVisitorIdParam(){return N(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"})}},jl=class{constructor(t,r){kl()&&ag()?this.storage=new Vl:kl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vn),this.client=new bc(t),this.beaconClient=new Bl(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}},$l=class{constructor(t,r){this.storage=r||new vn,this.client=new bc(t)}getClientDependingOnEventType(t){return this.client}},wc=class{constructor(){this.storage=new vn,this.client=new _l}getClientDependingOnEventType(t){return this.client}},iA="xx",cA=e=>e?.startsWith(iA)||!1,sA=`
|
|
29
29
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
30
30
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
31
31
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|