@coveo/quantic 3.28.2-pre.5f8a67af1e → 3.28.2-pre.63fc406dfa
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/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23
23
|
`)}
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
|
-
`;return new Gr(r)}var Gr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},ke=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw Wf(n,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}},fe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(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 ve(e){return e===void 0}function Kf(e){return e===null}function X(e){return ve(e)||Kf(e)}var ne=class{constructor(e={}){le(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Yf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Yf(e){return ve(e)||dc(e)}function dc(e){return typeof e=="boolean"}var J=class{constructor(e={}){le(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Jf(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 Jf(e){return ve(e)||pc(e)}function pc(e){return typeof e=="number"&&!Number.isNaN(e)}var Xf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){le(this,"value");le(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new fe(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ve(e))return null;if(!Dn(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 n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(Xf.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 Dn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){le(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ve(e))return this.config.options.required?"value is required and is currently undefined":null;if(!fc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function fc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){le(this,"value");this.config=e,this.value=new fe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(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(n=>{this.config.each.required&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return dc(e)||Dn(e)||pc(e)||fc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function mc(e){return Array.isArray(e)}var Mi=class{constructor(e){le(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ve(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();function gc(e){return Array.isArray(e)}function qn(e){return e.trim()===""}var Zf=new Set(["1",1,"yes",!0]);function yc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Zf.has(r))}function hc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Wr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function em(e){if(qn(e.openingDelimiter)||qn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||qn(e.content))return e.content;if(e.highlights.length===0)return er(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,f=a+i.length;if(f>t)break;r+=er(e.content.slice(n,a)),r+=e.openingDelimiter,r+=er(e.content.slice(a,f)),r+=e.closingDelimiter,n=f}return n!==t&&(r+=er(e.content.slice(n))),r}function tm(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?ji(n,t.notMatchDelimiters):o?ji(o,t.exactMatchDelimiters):i?ji(i,t.correctionDelimiters):r)}function ji(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}d();c();l();u();var Fc=Qe(Rc(),1);d();c();l();u();var Ge=new Error("Failed to load reducers."),tr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Nt=class extends Error{constructor(r,n){super();le(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Ec(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ic(e){return typeof e!="object"||!e?!1:Object.values(e).every(Im)}function Im(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Pc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Pm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,f=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield A(i,a);if(Pc(m.status))throw m;return m});return function f(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Fc.backOff)(f,{retry:p=>{let y=p&&Pc(p.status);return y&&n.info("Platform retrying request"),y}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new Nt(i,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new Nt(i):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:f,...m}=t,p=Wr(m);try{let y=yield o(t,n,a);return{...t,...y}}catch(y){i.error(y,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Pe(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function mt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function jn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Pm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,f=e.method==="POST"||e.method==="PUT",m=Fm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(f&&{body:m}),signal:a}}function Fm(e,t){return t==="application/x-www-form-urlencoded"?Ic(e)?Ec(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var Nn=e=>e;d();c();l();u();d();c();l();u();function _n(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:_n(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:_n(),extendedResults:{},searchAction:void 0}}d();c();l();u();function gt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var yt=e=>{let{response:t}=e;return t.body?km(e):Om(t)},km=e=>Dm(e)?qm(e):Tm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Om=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Tm(e){return e.body.statusCode!==void 0}function Dm(e){return e.body.exception!==void 0}var qm=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var ht=class{constructor(){le(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Jr=class{constructor(t){le(this,"_basePath");le(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};d();c();l();u();function kc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var ot=(e,t,r,n)=>{let o=new Jr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Oc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:gt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=kc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Mm(a)?{success:a}:{error:yt({response:r,body:a})}});return function Oc(_x2,_x3){return _ref2.apply(this,arguments)}}();function Mm(e){return typeof e=="string"}d();c();l();u();function jm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Nm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vn(e,t){if(t&&e.name==="AbortError")return{error:Nm(e)};if(e instanceof Nt)return{error:jm(e)};throw e}var Ln=class{constructor(t){this.options=t;le(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:gt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Vn(r);let n=yield r.json();return Vm(n)?{success:n}:{error:yt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:gt(t),..._this3.options});if(r instanceof Error)return Vn(r);let n=yield r.json(),o={response:r,body:n};return _m(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:yt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(f=>$e.call({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:f??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Vn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Tc(i)?(a.body=Dc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:yt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:gt(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Tc(n)){let o={response:r,body:n};return o.body=Dc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:yt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Oc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return Lm(n)?{success:n}:{error:yt({response:r,body:n})}})()}},Un=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function Tc(e){return e.results!==void 0}function Dc(e){let t=_n();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function _m(e){return e.completions!==void 0}function Vm(e){return e.preprocessingOutput!==void 0}function Lm(e){return e.fields!==void 0}d();c();l();u();var qc=e=>e,Mc=e=>e,jc=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function be(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 Um=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nc=Um,zi=()=>Math.random().toString(36).substring(7).split("").join("."),Bm={INIT:`@@redux/INIT${zi()}`,REPLACE:`@@redux/REPLACE${zi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zi()}`},Bn=Bm;function Ke(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 Gi(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(Gi)(e,t)}let n=e,o=t,i=new Map,a=i,f=0,m=!1;function p(){a===i&&(a=new Map,i.forEach((P,x)=>{a.set(x,P)}))}function y(){if(m)throw new Error(be(3));return o}function h(P){if(typeof P!="function")throw new Error(be(4));if(m)throw new Error(be(5));let x=!0;p();let F=f++;return a.set(F,P),function(){if(x){if(m)throw new Error(be(6));x=!1,p(),a.delete(F),i=null}}}function S(P){if(!Ke(P))throw new Error(be(7));if(typeof P.type>"u")throw new Error(be(8));if(typeof P.type!="string")throw new Error(be(17));if(m)throw new Error(be(9));try{m=!0,o=n(o,P)}finally{m=!1}return(i=a).forEach(F=>{F()}),P}function g(P){if(typeof P!="function")throw new Error(be(10));n=P,S({type:Bn.REPLACE})}function v(){let P=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(be(11));function F(){let E=x;E.next&&E.next(y())}return F(),{unsubscribe:P(F)}},[Nc](){return this}}}return S({type:Bn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Nc]:v}}function Qm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function rr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let f=t[a];typeof e[f]=="function"&&(r[f]=e[f])}let n=Object.keys(r),o,i;try{Qm(r)}catch(a){i=a}return function(f={},m){if(i)throw i;let p=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],g=r[S],v=f[S],R=g(v,m);if(typeof R>"u"){let P=m&&m.type;throw new Error(be(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(f).length,p?y:f}}function nr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function _c(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(m,...p)=>i(m,...p)},f=e.map(m=>m(a));return i=nr(...f)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var na=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vt=Object.getPrototypeOf;function je(e){return!!e&&!!e[Te]}function De(e){return e?Qc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var $m=Object.prototype.constructor.toString();function Qc(e){if(!e||typeof e!="object")return!1;let t=Vt(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)===$m}function oa(e){return je(e)||Ae(15,e),e[Te].base_}function Zr(e,t){Lt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Lt(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(e,t){return Lt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wi(e,t){return Lt(e)===2?e.get(t):e[t]}function $c(e,t,r){let n=Lt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Hm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function _t(e){return e.copy_||e.base_}function Ji(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Qc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],f=n[a];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(n[a]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[a]})}return Object.create(Vt(e),n)}else{let n=Vt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function zn(e,t=!1){return Gn(e)||je(e)||!De(e)||(Lt(e)>1&&(e.set=e.add=e.clear=e.delete=zm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function zm(){Ae(2)}function Gn(e){return Object.isFrozen(e)}var Xi={};function Ut(e){let t=Xi[e];return t||Ae(0,e),t}function Gm(e,t){Xi[e]||(Xi[e]=t)}var tn;function Hc(){return tn}function Wm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Vc(e,t){t&&(Ut("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zi(e){ea(e),e.drafts_.forEach(Km),e.drafts_=null}function ea(e){e===tn&&(tn=e.parent_)}function Lc(e){return tn=Wm(tn,e)}function Km(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Uc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(Zi(t),Ae(4)),De(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Ut("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Zi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==na?e:void 0}function $n(e,t,r){if(Gn(t))return t;let n=t[Te];if(!n)return Zr(t,(o,i)=>Bc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Zr(i,(f,m)=>Bc(e,n,o,f,m,r,a)),Hn(e,o,!1),r&&e.patches_&&Ut("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Bc(e,t,r,n,o,i,a){if(je(o)){let f=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,m=$n(e,o,f);if($c(r,n,m),je(m))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Gn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function Ym(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Hc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ia;r&&(o=[n],i=rn);let{revoke:a,proxy:f}=Proxy.revocable(o,i);return n.draft_=f,n.revoke_=a,f}var ia={get(e,t){if(t===Te)return e;let r=_t(e);if(!en(r,t))return Jm(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Ki(e.base_,t)?(Yi(e),e.copy_[t]=ra(n,e)):n},has(e,t){return t in _t(e)},ownKeys(e){return Reflect.ownKeys(_t(e))},set(e,t,r){let n=zc(_t(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Ki(_t(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Hm(r,o)&&(r!==void 0||en(e.base_,t)))return!0;Yi(e),ta(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 Ki(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),ta(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=_t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Vt(e.base_)},setPrototypeOf(){Ae(12)}},rn={};Zr(ia,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return ia.set.call(this,e[0],t,r,e[0])};function Ki(e,t){let r=e[Te];return(r?_t(r):e)[t]}function Jm(e,t,r){let n=zc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function zc(e,t){if(!(t in e))return;let r=Vt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Vt(r)}}function ta(e){e.modified_||(e.modified_=!0,e.parent_&&ta(e.parent_))}function Yi(e){e.copy_||(e.copy_=Ji(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xm=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(m=i,...p){return a.produce(m,y=>r.call(this,y,...p))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Lc(this),a=ra(t,void 0),f=!0;try{o=r(a),f=!1}finally{f?Zi(i):ea(i)}return Vc(i,n),Uc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===na&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Ut("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...f)=>this.produceWithPatches(a,m=>t(m,...f));let n,o;return[this.produce(t,r,(a,f)=>{n=a,o=f}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),je(e)&&(e=Gc(e));let t=Lc(this),r=ra(e,void 0);return r[Te].isManual_=!0,ea(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Vc(n,t),Uc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ut("Patches").applyPatches_;return je(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ra(e,t){let r=nn(e)?Ut("MapSet").proxyMap_(e,t):on(e)?Ut("MapSet").proxySet_(e,t):Ym(e,t);return(t?t.scope_:Hc()).drafts_.push(r),r}function Gc(e){return je(e)||Ae(10,e),Wc(e)}function Wc(e){if(!De(e)||Gn(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ji(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ji(e,!0);return Zr(r,(n,o)=>{$c(r,n,Wc(o))}),t&&(t.finalized_=!1),r}function Kc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return f(S,g,v,R)}}function i(S,g,v,R){let{base_:P,assigned_:x}=S,F=S.copy_;F.length<P.length&&([P,F]=[F,P],[v,R]=[R,v]);for(let w=0;w<P.length;w++)if(x[w]&&F[w]!==P[w]){let E=g.concat([w]);v.push({op:t,path:E,value:h(F[w])}),R.push({op:t,path:E,value:h(P[w])})}for(let w=P.length;w<F.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:h(F[w])})}for(let w=F.length-1;P.length<=w;--w){let E=g.concat([w]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:P,copy_:x}=S;Zr(S.assigned_,(F,w)=>{let E=Wi(P,F),j=Wi(x,F),O=w?en(P,F)?t:r:n;if(E===j&&O===t)return;let I=g.concat(F);v.push(O===n?{op:O,path:I}:{op:O,path:I,value:j}),R.push(O===r?{op:n,path:I}:O===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function f(S,g,v,R){let{base_:P,copy_:x}=S,F=0;P.forEach(w=>{if(!x.has(w)){let E=g.concat([F]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}F++}),F=0,x.forEach(w=>{if(!P.has(w)){let E=g.concat([F]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}F++})}function m(S,g,v,R){v.push({op:t,path:[],value:g===na?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:P}=v,x=S;for(let j=0;j<R.length-1;j++){let O=Lt(x),I=R[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(O===0||O===1)&&(I==="__proto__"||I==="constructor")&&Ae(19),typeof x=="function"&&I==="prototype"&&Ae(19),x=Wi(x,I),typeof x!="object"&&Ae(18,R.join("/"))}let F=Lt(x),w=y(v.value),E=R[R.length-1];switch(P){case t:switch(F){case 2:return x.set(E,w);case 3:Ae(16);default:return x[E]=w}case r:switch(F){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(F){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:Ae(17,P)}}),S}function y(S){if(!De(S))return S;if(Array.isArray(S))return S.map(y);if(nn(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(on(S))return new Set(Array.from(S).map(y));let g=Object.create(Vt(S));for(let v in S)g[v]=y(S[v]);return en(S,Xr)&&(g[Xr]=S[Xr]),g}function h(S){return je(S)?y(S):S}Gm("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:m})}var Ne=new Xm,it=Ne.produce,Wn=Ne.produceWithPatches.bind(Ne),_x=Ne.setAutoFreeze.bind(Ne),Vx=Ne.setUseStrictShallowCopy.bind(Ne),aa=Ne.applyPatches.bind(Ne),Lx=Ne.createDraft.bind(Ne),Ux=Ne.finishDraft.bind(Ne);d();c();l();u();function Zm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function eg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function tg(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Yc=e=>Array.isArray(e)?e:[e];function rg(e){let t=Array.isArray(e[0])?e[0]:e;return tg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ng(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Wx=Symbol();var Kx=Object.getPrototypeOf({});var og=class{constructor(e){this.value=e}deref(){return this.value}},ig=typeof WeakRef<"u"?WeakRef:og,ag=0,Jc=1;function Kn(){return{s:ag,v:void 0,o:null,p:null}}function or(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let f=r,{length:m}=arguments;for(let h=0,S=m;h<S;h++){let g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=f.o;v===null&&(f.o=v=new WeakMap);let R=v.get(g);R===void 0?(f=Kn(),v.set(g,f)):f=R}else{let v=f.p;v===null&&(f.p=v=new Map);let R=v.get(g);R===void 0?(f=Kn(),v.set(g,f)):f=R}}let p=f,y;if(f.s===Jc)y=f.v;else if(y=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,y)&&(y=h,i!==0&&i--),o=typeof y=="object"&&y!==null||typeof y=="function"?new ig(y):y}return p.s=Jc,p.v=y,y}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Xc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,f,m={},p=o.pop();typeof p=="object"&&(m=p,p=o.pop()),Zm(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...m},{memoize:h,memoizeOptions:S=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Yc(S),x=Yc(v),F=rg(o),w=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,j=g(function(){a++;let I=ng(F,arguments);return f=w.apply(null,I),f},...x);return Object.assign(j,{resultFunc:p,memoizedResultFunc:w,dependencies:F,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>f,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var pe=Xc(or),sg=Object.assign((e,t=pe)=>{eg(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),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,f,m)=>(a[r[m]]=f,a),{}))},{withTypes:()=>sg});d();c();l();u();function Zc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var eu=Zc(),tu=Zc;var cg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nr:nr.apply(null,arguments)},fR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},ug=e=>e&&typeof e.match=="function";function D(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Qn(n)&&n.type===e,r}var au=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function ru(e){return De(e)?it(e,()=>{}):e}function nu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function lg(e){return typeof e=="boolean"}var dg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new au;return r&&(lg(r)?a.push(eu):a.push(tu(r.extraArgument))),a},sn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[sn]:!0}}),ou=e=>t=>{setTimeout(t,e)},pg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,f=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ou(10):e.type==="callback"?e.queueNotification:ou(e.timeout),p=()=>{a=!1,i&&(i=!1,f.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>o&&y(),S=n.subscribe(h);return f.add(y),()=>{S(),f.delete(y)}},dispatch(y){try{return o=!y?.meta?.[sn],i=!o,i&&(a||(a=!0,m(p))),n.dispatch(y)}finally{o=!0}}})},fg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new au(e);return n&&o.push(pg(typeof n=="object"?n:void 0)),o};function su(e){let t=dg(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},f;if(typeof r=="function")f=r;else if(Ke(r))f=rr(r);else throw new Error(He(1));let m;typeof n=="function"?m=n(t):m=t();let p=nr;o&&(p=cg({trace:!1,...(typeof o=="object"&&o)}));let y=_c(...m),h=fg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Gi(f,i,g)}function cu(e){let t={},r=[],n,o={addCase(i,a){let f=typeof i=="string"?i:i.type;if(!f)throw new Error(He(28));if(f in t)throw new Error(He(29));return t[f]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function mg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=cu(t),i;if(mg(e))i=()=>ru(e());else{let f=ru(e);i=()=>f}function a(f=i(),m){let p=[r[m.type],...n.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return p.filter(y=>!!y).length===0&&(p=[o]),p.reduce((y,h)=>{if(h)if(je(y)){let g=h(y,m);return g===void 0?y:g}else{if(De(y))return it(y,S=>h(S,m));{let S=h(y,m);if(S===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return y},f)}return a.getInitialState=i,a}var uu=(e,t)=>ug(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>uu(r,t))}function ir(...e){return t=>e.every(r=>uu(r,t))}function Jn(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):cn(e)?Ye(...e.map(t=>t.pending)):Xn()(e[0])}function Bt(...e){return e.length===0?t=>Jn(t,["rejected"]):cn(e)?Ye(...e.map(t=>t.rejected)):Bt()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Bt(...e),t):cn(e)?ir(Bt(...e),t):un()(e[0])}function at(...e){return e.length===0?t=>Jn(t,["fulfilled"]):cn(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):cn(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var gg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=gg[Math.random()*64|0];return t},yg=["name","message","stack","code"],sa=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},iu=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},hg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of yg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},de=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(m,p,y,h)=>({payload:m,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=D(t+"/pending",(m,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:m,requestStatus:"pending"}})),a=D(t+"/rejected",(m,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||hg)(m||"Rejected"),meta:{...(S||{}),arg:y,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function f(m){return(p,y,h)=>{let S=n?.idGenerator?n.idGenerator(m):eo(),g=new s.AbortController,v,R;function P(F){R=F,g.abort()}let x=_asyncToGenerator(function*(){let F;try{let E=n?.condition?.(m,{getState:y,extra:h});if(vg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((O,I)=>{v=()=>{I({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,m,n?.getPendingMeta?.({requestId:S,arg:m},{getState:y,extra:h}))),F=yield Promise.race([j,Promise.resolve(r(m,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(O,I)=>new sa(O,I),fulfillWithValue:(O,I)=>new iu(O,I)})).then(O=>{if(O instanceof sa)throw O;return O instanceof iu?o(O.payload,S,m,O.meta):o(O,S,m)})])}catch(E){F=E instanceof sa?a(null,S,m,E.payload,E.meta):a(E,S,m)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(F)&&F.meta.condition||p(F),F})();return Object.assign(x,{abort:P,requestId:S,arg:m,unwrap(){return x.then(Sg)}})}}return Object.assign(f,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Sg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function vg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var lu=Symbol.for("rtk-slice-createasyncthunk"),SR={[lu]:de};function bg(e,t){return`${e}/${t}`}function Ag({creators:e}={}){let t=e?.asyncThunk?.[lu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(wg()):n.reducers)||{},f=Object.keys(a),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(F,w){let E=typeof F=="string"?F:F.type;if(!E)throw new Error(He(12));if(E in m.sliceCaseReducersByType)throw new Error(He(13));return m.sliceCaseReducersByType[E]=w,p},addMatcher(F,w){return m.sliceMatchers.push({matcher:F,reducer:w}),p},exposeAction(F,w){return m.actionCreators[F]=w,p},exposeCaseReducer(F,w){return m.sliceCaseReducersByName[F]=w,p}};f.forEach(F=>{let w=a[F],E={reducerName:F,type:bg(o,F),createNotation:typeof n.reducers=="function"};Rg(w)?Ig(E,w,p,t):xg(E,w,p)});function y(){let[F={},w=[],E=void 0]=typeof n.extraReducers=="function"?cu(n.extraReducers):[n.extraReducers],j={...F,...m.sliceCaseReducersByType};return ge(n.initialState,O=>{for(let I in j)O.addCase(I,j[I]);for(let I of m.sliceMatchers)O.addMatcher(I.matcher,I.reducer);for(let I of w)O.addMatcher(I.matcher,I.reducer);E&&O.addDefaultCase(E)})}let h=F=>F,S=new Map,g;function v(F,w){return g||(g=y()),g(F,w)}function R(){return g||(g=y()),g.getInitialState()}function P(F,w=!1){function E(O){let I=O[F];return typeof I>"u"&&w&&(I=R()),I}function j(O=h){let I=nu(S,w,()=>new WeakMap);return nu(I,O,()=>{let k={};for(let[T,N]of Object.entries(n.selectors??{}))k[T]=Cg(N,O,R,w);return k})}return{reducerPath:F,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let x={name:o,reducer:v,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(F,{reducerPath:w,...E}={}){let j=w??i;return F.inject({reducerPath:j,reducer:v},E),{...x,...P(j,!0)}}};return x}}function Cg(e,t,r,n){function o(i,...a){let f=t(i);return typeof f>"u"&&n&&(f=r()),e(f,...a)}return o.unwrapped=e,o}var Qt=Ag();function wg(){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 xg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Eg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?D(e,a):D(e))}function Rg(e){return e._reducerDefinitionType==="asyncThunk"}function Eg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ig({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:f,rejected:m,settled:p,options:y}=r,h=o(e,i,y);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),f&&n.addCase(h.pending,f),m&&n.addCase(h.rejected,m),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:f||Yn,rejected:m||Yn,settled:p||Yn})}function Yn(){}var du="listener",pu="completed",fu="cancelled",vR=`task-${fu}`,bR=`task-${pu}`,AR=`${du}-${fu}`,CR=`${du}-${pu}`;var{assign:mu}=Object;var ca="listenerMiddleware";var Pg=mu(D(`${ca}/add`),{withTypes:()=>Pg}),wR=D(`${ca}/removeAll`),Fg=mu(D(`${ca}/remove`),{withTypes:()=>Fg});var xR=Symbol.for("rtk-state-proxy-original");function He(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. `}d();c();l();u();var W=new H({required:!0,emptyAllowed:!1}),Ce=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),MR=new H({required:!1,emptyAllowed:!0}),to=new ie({each:W,required:!0}),gu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),yu=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),jR=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Le=(e,t)=>{if("required"in t)return{payload:new ke({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Gr(o);return{payload:e}},B=(e,t)=>{try{return Le(e,t)}catch(r){return{payload:e,error:st(r)}}},hu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return vu(e,t,r,o,"Controller initialization error")},Su=(e,t,r,n)=>{let o=`Check the options of ${n}`;return vu(e,t,r,o,"Controller initialization error")},vu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var sr="3.27.8-pre.5f8a67af1e",bu=["@coveo/atomic","@coveo/quantic"];var ua=()=>Ce,Au=()=>W,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:Ce,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ce})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,timezone:Ce,locale:Ce,authenticationProviders:new ie({required:!1,each:W})})),kg={enabled:new ne({default:!0}),originContext:ua(),originLevel2:ua(),originLevel3:ua(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ce,userDisplayName:Ce,documentLocation:Ce,trackingId:yu,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:bu.reduce((e,t)=>(e[t]=gu,e),{})})},cr=D("configuration/updateAnalyticsConfiguration",e=>B(e,kg)),ur=D("configuration/analytics/disable"),lr=D("configuration/analytics/enable"),ro=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:Au()})),no=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:Au()}));d();c();l();u();d();c();l();u();d();c();l();u();var Cu={q:new H,enableQuerySyntax:new ne,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new ne,sf:new K,tab:new H,af:new K};var vt=D("searchParameters/restore",e=>B(e,Cu)),wu=D("searchParameters/restoreTab",e=>B(e,W));d();c();l();u();var oo=D("debug/enable"),io=D("debug/disable");d();c();l();u();var ao=()=>!1;var so=ge(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Og=D("history/undo"),Tg=D("history/redo"),Xe=D("history/snapshot"),HE=de("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Og()),yield t(qe())});return function(_x4,_x5){return _ref4.apply(this,arguments)}}()),zE=de("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Tg()),yield t(qe())});return function(_x6,_x7){return _ref5.apply(this,arguments)}}()),qe=de("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x8,_x9){return _ref6.apply(this,arguments)}}());d();c();l();u();var pr=()=>"";var fr=ge(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var mr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let f=window.location.hostname,m=/^(\d{1,3}\.){3}\d{1,3}$/,p=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;m.test(f)||p.test(f)||f.indexOf(".")===-1?la(t,r,i):(a=f.split("."),o=a[a.length-2]+"."+a[a.length-1],la(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function la(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function Dg(){return typeof navigator<"u"}function xu(){try{return typeof localStorage<"u"}catch{return!1}}function Ru(){try{return typeof sessionStorage<"u"}catch{return!1}}function Eu(){return!!(Dg()&&navigator.cookieEnabled)}var Iu=null;function Pu(){return Iu||(xu()?localStorage:Eu()?new da:Ru()?sessionStorage:new pa)}var gr=class gr{getItem(t){return mr.get(`${gr.prefix}${t}`)}removeItem(t){mr.erase(`${gr.prefix}${t}`)}setItem(t,r,n){mr.set(`${gr.prefix}${t}`,r,n)}};le(gr,"prefix","coveo_");var da=gr;var pa=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var co="__coveo.analytics.history",qg=20,Mg=1e3*60,jg=75,$t=class $t{constructor(t){le(this,"store");this.store=t||Pu()}static getInstance(t){return $t.instance||($t.instance=new $t(t)),$t.instance}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){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(co);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(co);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(co,JSON.stringify(t.slice(0,qg)))}catch{}}clear(){try{this.store.removeItem(co)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,jg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Mg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};le($t,"instance",null);var fa=$t,Ze=fa;d();c();l();u();d();c();l();u();var yr=pe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));d();c();l();u();d();c();l();u();function ct(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function q(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function f(y){try{p(n.next(y))}catch(h){a(h)}}function m(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(f,m)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function ya(){return typeof window<"u"}function Fa(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function ha(){try{return typeof localStorage<"u"}catch{return!1}}function Ng(){try{return typeof sessionStorage<"u"}catch{return!1}}function Bu(){return Fa()&&navigator.cookieEnabled}var _g=[ae.click,ae.custom,ae.search,ae.view],Vg=(e,t)=>_g.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Fa()?navigator.userAgent:"unknown"},t):t,dn=class e{static set(t,r,n){var o,i,a,f;n&&(i=new Date,i.setTime(i.getTime()+n)),f=window.location.hostname,f.indexOf(".")===-1?Fu(t,r,i):(a=f.split("."),o=a[a.length-2]+"."+a[a.length-1],Fu(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Fu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Lg(){return ha()?localStorage:Bu()?new pn:Ng()?sessionStorage:new vr}var pn=class e{getItem(t){return dn.get(`${e.prefix}${t}`)}removeItem(t){dn.erase(`${e.prefix}${t}`)}setItem(t,r,n){dn.set(`${e.prefix}${t}`,r,n)}};pn.prefix="coveo_";var Sa=class{constructor(){this.cookieStorage=new pn}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)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},uo="__coveo.analytics.history",Ug=20,Bg=1e3*60,Qg=75,fo=class{constructor(t){this.store=t||Lg()}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 q(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 q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(uo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(uo);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(uo,JSON.stringify(t.slice(0,Ug)))}catch{}}clear(){try{this.store.removeItem(uo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Qg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Bg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var $g=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield Hg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Hg=e=>q(void 0,void 0,void 0,function*(){let t=new fo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),lo,zg=new Uint8Array(16);function Gg(){if(!lo&&(lo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lo(zg)}var Wg=/^(?:[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 mo(e){return typeof e=="string"&&Wg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Qu(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function Kg(e){if(!mo(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 Yg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Jg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Xg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Zg(e,t,r){function n(o,i,a,f){var m;if(typeof o=="string"&&(o=Yg(o)),typeof i=="string"&&(i=Kg(i)),((m=i)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){f=f||0;for(let y=0;y<16;++y)a[f+y]=p[y];return a}return Qu(p)}try{n.name=e}catch{}return n.DNS=Jg,n.URL=Xg,n}var ey=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ku={randomUUID:ey};function Ht(e,t,r){if(ku.randomUUID&&!t&&!e)return ku.randomUUID();e=e||{};let n=e.random||(e.rng||Gg)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Qu(n)}function ty(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function ma(e,t){return e<<t|e>>>32-t}function ry(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let f=0;f<a.length;++f)e.push(a.charCodeAt(f))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let f=new Uint32Array(16);for(let m=0;m<16;++m)f[m]=e[a*64+m*4]<<24|e[a*64+m*4+1]<<16|e[a*64+m*4+2]<<8|e[a*64+m*4+3];i[a]=f}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let f=new Uint32Array(80);for(let g=0;g<16;++g)f[g]=i[a][g];for(let g=16;g<80;++g)f[g]=ma(f[g-3]^f[g-8]^f[g-14]^f[g-16],1);let m=r[0],p=r[1],y=r[2],h=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=ma(m,5)+ty(v,p,y,h)+S+t[v]+f[g]>>>0;S=h,h=y,y=ma(p,30)>>>0,p=m,m=R}r[0]=r[0]+m>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>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 ny=Zg("v5",80,ry),Ou=ny,$u="2.30.45",Tu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ln={pageview:"pageview",event:"event"},go=class{constructor({client:t,uuidGenerator:r=Ht}){this.client=t,this.uuidGenerator=r}},va=class extends go{constructor({client:t,uuidGenerator:r=Ht}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Tu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ln.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ln.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ln.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ln.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Tu(window.location)}},bt=class e{constructor(t,r){if(!mo(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return mo(i)?new e(i,Number.parseInt(o)*1e3):null}};bt.cvo_cid="cvo_cid";bt.expirationTime=120;var ba=class extends go{constructor({client:t,uuidGenerator:r=Ht}){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 q(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(bt.cvo_cid,new bt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ba.Id="link";var Be=Object.keys;function po(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ga=128,Hu=192,Du=224,qu=240;function oy(e){return(e&248)===qu?4:(e&qu)===Du?3:(e&Du)===Hu?2:1}function iy(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&ga)!=ga)break;if(r-=3,(n&Hu)!=ga){t-r>=oy(n)*3&&(r=t);break}}return e.substring(0,r)}var Aa={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"},ay=Be(Aa).map(e=>Aa[e]),sy=[...ay].join("|"),cy=new RegExp(`^(${sy}$)`),uy={svcAction:"svc_action",svcActionData:"svc_action_data"},ly=e=>Be(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Aa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),dy=e=>cy.test(e),py=[dy],Mu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ju={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},yo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},fy=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ca={id:"quoteId",affiliation:"quoteAffiliation"},wa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},my={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),yo),purchase:Object.assign(Object.assign({},Ee),yo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ca),review:Object.assign(Object.assign({},Ee),wa)},gy=Be(Mu).map(e=>Mu[e]),yy=Be(ju).map(e=>ju[e]),hy=Be(Ee).map(e=>Ee[e]),Sy=Be(yo).map(e=>yo[e]),vy=Be(wa).map(e=>wa[e]),by=Be(Ca).map(e=>Ca[e]),Ay=[...gy,"custom"].join("|"),Cy=[...yy,"custom"].join("|"),zu="(pr[0-9]+)",Gu="(il[0-9]+pi[0-9]+)",wy=new RegExp(`^${zu}(${Ay})$`),xy=new RegExp(`^(${Gu}(${Cy}))|(il[0-9]+nm)$`),Ry=new RegExp(`^(${hy.join("|")})$`),Ey=new RegExp(`^(${Sy.join("|")})$`),Iy=new RegExp(`^${zu}custom$`),Py=new RegExp(`^${Gu}custom$`),Fy=new RegExp(`^(${[...fy,...vy,...by].join("|")})$`),ky=e=>wy.test(e),Oy=e=>xy.test(e),Ty=e=>Ry.test(e),Dy=e=>Ey.test(e),qy=e=>Fy.test(e),My=[Oy,ky,Ty,Dy,qy],jy=[Iy,Py],Ny={anonymizeIp:"aip"},_y={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Vy={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Ly=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Uy=Object.assign(Object.assign(Object.assign(Object.assign({},Ny),_y),Vy),Ly.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xa=Object.assign(Object.assign({},Uy),uy),By=e=>{let t=!!e.action&&my[e.action]||{};return Be(e).reduce((r,n)=>{let o=t[n]||xa[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Qy=Be(xa).map(e=>xa[e]),$y=e=>Qy.indexOf(e)!==-1,Hy=e=>e==="custom",zy=e=>[...My,...py,$y,Hy].some(t=>t(e)),Gy=e=>Be(e).reduce((t,r)=>{let n=Wy(r);return n?Object.assign(Object.assign({},t),Ky(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Wy=e=>{let t;return[...jy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ky=(e,t)=>Be(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ra=class{constructor(t){this.opts=t}sendEvent(t,r){return q(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:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:f}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),m=this.encodeForEventType(t,f),p=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return q(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:f,body:m}=a;o=f||t;try{i=JSON.parse(m)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Ea=class{sendEvent(t,r){return q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){return Promise.resolve()})}},Nu=b.fetch,ho=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",f={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},f),i?yield i(f,"analyticsFetch"):{}),{url:p}=m,y=ct(m,["url"]),h;try{h=yield Nu(p,y)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}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 q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Nu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return q(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"})}},Ia=class{constructor(t,r){ha()&&Bu()?this.storage=new Sa:ha()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new ho(t),this.beaconClient=new Ra(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Pa=class{constructor(t,r){this.storage=r||new vr,this.client=new ho(t)}getClientDependingOnEventType(t){return this.client}},So=class{constructor(){this.storage=new vr,this.client=new Ea}getClientDependingOnEventType(t){return this.client}},Yy="xx",Jy=e=>e?.startsWith(Yy)||!1,Xy=`
|
|
26
|
+
`;return new Gr(r)}var Gr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},ke=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw Wf(n,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}},fe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(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 ve(e){return e===void 0}function Kf(e){return e===null}function X(e){return ve(e)||Kf(e)}var ne=class{constructor(e={}){le(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Yf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Yf(e){return ve(e)||dc(e)}function dc(e){return typeof e=="boolean"}var J=class{constructor(e={}){le(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Jf(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 Jf(e){return ve(e)||pc(e)}function pc(e){return typeof e=="number"&&!Number.isNaN(e)}var Xf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){le(this,"value");le(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new fe(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ve(e))return null;if(!Dn(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 n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(Xf.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 Dn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){le(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ve(e))return this.config.options.required?"value is required and is currently undefined":null;if(!fc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function fc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){le(this,"value");this.config=e,this.value=new fe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(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(n=>{this.config.each.required&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return dc(e)||Dn(e)||pc(e)||fc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function mc(e){return Array.isArray(e)}var Mi=class{constructor(e){le(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ve(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();function gc(e){return Array.isArray(e)}function qn(e){return e.trim()===""}var Zf=new Set(["1",1,"yes",!0]);function yc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Zf.has(r))}function hc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Wr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function em(e){if(qn(e.openingDelimiter)||qn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||qn(e.content))return e.content;if(e.highlights.length===0)return er(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,f=a+i.length;if(f>t)break;r+=er(e.content.slice(n,a)),r+=e.openingDelimiter,r+=er(e.content.slice(a,f)),r+=e.closingDelimiter,n=f}return n!==t&&(r+=er(e.content.slice(n))),r}function tm(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?ji(n,t.notMatchDelimiters):o?ji(o,t.exactMatchDelimiters):i?ji(i,t.correctionDelimiters):r)}function ji(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}d();c();l();u();var Fc=Qe(Rc(),1);d();c();l();u();var Ge=new Error("Failed to load reducers."),tr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Nt=class extends Error{constructor(r,n){super();le(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Ec(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ic(e){return typeof e!="object"||!e?!1:Object.values(e).every(Im)}function Im(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Pc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Pm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,f=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield A(i,a);if(Pc(m.status))throw m;return m});return function f(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Fc.backOff)(f,{retry:p=>{let y=p&&Pc(p.status);return y&&n.info("Platform retrying request"),y}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new Nt(i,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new Nt(i):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:f,...m}=t,p=Wr(m);try{let y=yield o(t,n,a);return{...t,...y}}catch(y){i.error(y,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Pe(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function mt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function jn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Pm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,f=e.method==="POST"||e.method==="PUT",m=Fm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(f&&{body:m}),signal:a}}function Fm(e,t){return t==="application/x-www-form-urlencoded"?Ic(e)?Ec(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var Nn=e=>e;d();c();l();u();d();c();l();u();function _n(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:_n(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:_n(),extendedResults:{},searchAction:void 0}}d();c();l();u();function gt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var yt=e=>{let{response:t}=e;return t.body?km(e):Om(t)},km=e=>Dm(e)?qm(e):Tm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Om=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Tm(e){return e.body.statusCode!==void 0}function Dm(e){return e.body.exception!==void 0}var qm=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var ht=class{constructor(){le(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Jr=class{constructor(t){le(this,"_basePath");le(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};d();c();l();u();function kc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var ot=(e,t,r,n)=>{let o=new Jr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Oc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:gt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=kc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Mm(a)?{success:a}:{error:yt({response:r,body:a})}});return function Oc(_x2,_x3){return _ref2.apply(this,arguments)}}();function Mm(e){return typeof e=="string"}d();c();l();u();function jm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Nm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vn(e,t){if(t&&e.name==="AbortError")return{error:Nm(e)};if(e instanceof Nt)return{error:jm(e)};throw e}var Ln=class{constructor(t){this.options=t;le(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:gt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Vn(r);let n=yield r.json();return Vm(n)?{success:n}:{error:yt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:gt(t),..._this3.options});if(r instanceof Error)return Vn(r);let n=yield r.json(),o={response:r,body:n};return _m(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:yt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(f=>$e.call({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:f??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Vn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Tc(i)?(a.body=Dc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:yt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:gt(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Tc(n)){let o={response:r,body:n};return o.body=Dc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:yt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Oc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return Lm(n)?{success:n}:{error:yt({response:r,body:n})}})()}},Un=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function Tc(e){return e.results!==void 0}function Dc(e){let t=_n();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function _m(e){return e.completions!==void 0}function Vm(e){return e.preprocessingOutput!==void 0}function Lm(e){return e.fields!==void 0}d();c();l();u();var qc=e=>e,Mc=e=>e,jc=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function be(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 Um=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nc=Um,zi=()=>Math.random().toString(36).substring(7).split("").join("."),Bm={INIT:`@@redux/INIT${zi()}`,REPLACE:`@@redux/REPLACE${zi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zi()}`},Bn=Bm;function Ke(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 Gi(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(Gi)(e,t)}let n=e,o=t,i=new Map,a=i,f=0,m=!1;function p(){a===i&&(a=new Map,i.forEach((P,x)=>{a.set(x,P)}))}function y(){if(m)throw new Error(be(3));return o}function h(P){if(typeof P!="function")throw new Error(be(4));if(m)throw new Error(be(5));let x=!0;p();let F=f++;return a.set(F,P),function(){if(x){if(m)throw new Error(be(6));x=!1,p(),a.delete(F),i=null}}}function S(P){if(!Ke(P))throw new Error(be(7));if(typeof P.type>"u")throw new Error(be(8));if(typeof P.type!="string")throw new Error(be(17));if(m)throw new Error(be(9));try{m=!0,o=n(o,P)}finally{m=!1}return(i=a).forEach(F=>{F()}),P}function g(P){if(typeof P!="function")throw new Error(be(10));n=P,S({type:Bn.REPLACE})}function v(){let P=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(be(11));function F(){let E=x;E.next&&E.next(y())}return F(),{unsubscribe:P(F)}},[Nc](){return this}}}return S({type:Bn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Nc]:v}}function Qm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function rr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let f=t[a];typeof e[f]=="function"&&(r[f]=e[f])}let n=Object.keys(r),o,i;try{Qm(r)}catch(a){i=a}return function(f={},m){if(i)throw i;let p=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],g=r[S],v=f[S],R=g(v,m);if(typeof R>"u"){let P=m&&m.type;throw new Error(be(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(f).length,p?y:f}}function nr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function _c(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(m,...p)=>i(m,...p)},f=e.map(m=>m(a));return i=nr(...f)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var na=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vt=Object.getPrototypeOf;function je(e){return!!e&&!!e[Te]}function De(e){return e?Qc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var $m=Object.prototype.constructor.toString();function Qc(e){if(!e||typeof e!="object")return!1;let t=Vt(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)===$m}function oa(e){return je(e)||Ae(15,e),e[Te].base_}function Zr(e,t){Lt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Lt(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(e,t){return Lt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wi(e,t){return Lt(e)===2?e.get(t):e[t]}function $c(e,t,r){let n=Lt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Hm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function _t(e){return e.copy_||e.base_}function Ji(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Qc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],f=n[a];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(n[a]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[a]})}return Object.create(Vt(e),n)}else{let n=Vt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function zn(e,t=!1){return Gn(e)||je(e)||!De(e)||(Lt(e)>1&&(e.set=e.add=e.clear=e.delete=zm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function zm(){Ae(2)}function Gn(e){return Object.isFrozen(e)}var Xi={};function Ut(e){let t=Xi[e];return t||Ae(0,e),t}function Gm(e,t){Xi[e]||(Xi[e]=t)}var tn;function Hc(){return tn}function Wm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Vc(e,t){t&&(Ut("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zi(e){ea(e),e.drafts_.forEach(Km),e.drafts_=null}function ea(e){e===tn&&(tn=e.parent_)}function Lc(e){return tn=Wm(tn,e)}function Km(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Uc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(Zi(t),Ae(4)),De(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Ut("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Zi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==na?e:void 0}function $n(e,t,r){if(Gn(t))return t;let n=t[Te];if(!n)return Zr(t,(o,i)=>Bc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Zr(i,(f,m)=>Bc(e,n,o,f,m,r,a)),Hn(e,o,!1),r&&e.patches_&&Ut("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Bc(e,t,r,n,o,i,a){if(je(o)){let f=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,m=$n(e,o,f);if($c(r,n,m),je(m))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Gn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function Ym(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Hc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ia;r&&(o=[n],i=rn);let{revoke:a,proxy:f}=Proxy.revocable(o,i);return n.draft_=f,n.revoke_=a,f}var ia={get(e,t){if(t===Te)return e;let r=_t(e);if(!en(r,t))return Jm(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Ki(e.base_,t)?(Yi(e),e.copy_[t]=ra(n,e)):n},has(e,t){return t in _t(e)},ownKeys(e){return Reflect.ownKeys(_t(e))},set(e,t,r){let n=zc(_t(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Ki(_t(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Hm(r,o)&&(r!==void 0||en(e.base_,t)))return!0;Yi(e),ta(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 Ki(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),ta(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=_t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Vt(e.base_)},setPrototypeOf(){Ae(12)}},rn={};Zr(ia,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return ia.set.call(this,e[0],t,r,e[0])};function Ki(e,t){let r=e[Te];return(r?_t(r):e)[t]}function Jm(e,t,r){let n=zc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function zc(e,t){if(!(t in e))return;let r=Vt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Vt(r)}}function ta(e){e.modified_||(e.modified_=!0,e.parent_&&ta(e.parent_))}function Yi(e){e.copy_||(e.copy_=Ji(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xm=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(m=i,...p){return a.produce(m,y=>r.call(this,y,...p))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Lc(this),a=ra(t,void 0),f=!0;try{o=r(a),f=!1}finally{f?Zi(i):ea(i)}return Vc(i,n),Uc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===na&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Ut("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...f)=>this.produceWithPatches(a,m=>t(m,...f));let n,o;return[this.produce(t,r,(a,f)=>{n=a,o=f}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),je(e)&&(e=Gc(e));let t=Lc(this),r=ra(e,void 0);return r[Te].isManual_=!0,ea(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Vc(n,t),Uc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ut("Patches").applyPatches_;return je(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ra(e,t){let r=nn(e)?Ut("MapSet").proxyMap_(e,t):on(e)?Ut("MapSet").proxySet_(e,t):Ym(e,t);return(t?t.scope_:Hc()).drafts_.push(r),r}function Gc(e){return je(e)||Ae(10,e),Wc(e)}function Wc(e){if(!De(e)||Gn(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ji(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ji(e,!0);return Zr(r,(n,o)=>{$c(r,n,Wc(o))}),t&&(t.finalized_=!1),r}function Kc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return f(S,g,v,R)}}function i(S,g,v,R){let{base_:P,assigned_:x}=S,F=S.copy_;F.length<P.length&&([P,F]=[F,P],[v,R]=[R,v]);for(let w=0;w<P.length;w++)if(x[w]&&F[w]!==P[w]){let E=g.concat([w]);v.push({op:t,path:E,value:h(F[w])}),R.push({op:t,path:E,value:h(P[w])})}for(let w=P.length;w<F.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:h(F[w])})}for(let w=F.length-1;P.length<=w;--w){let E=g.concat([w]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:P,copy_:x}=S;Zr(S.assigned_,(F,w)=>{let E=Wi(P,F),j=Wi(x,F),O=w?en(P,F)?t:r:n;if(E===j&&O===t)return;let I=g.concat(F);v.push(O===n?{op:O,path:I}:{op:O,path:I,value:j}),R.push(O===r?{op:n,path:I}:O===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function f(S,g,v,R){let{base_:P,copy_:x}=S,F=0;P.forEach(w=>{if(!x.has(w)){let E=g.concat([F]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}F++}),F=0,x.forEach(w=>{if(!P.has(w)){let E=g.concat([F]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}F++})}function m(S,g,v,R){v.push({op:t,path:[],value:g===na?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:P}=v,x=S;for(let j=0;j<R.length-1;j++){let O=Lt(x),I=R[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(O===0||O===1)&&(I==="__proto__"||I==="constructor")&&Ae(19),typeof x=="function"&&I==="prototype"&&Ae(19),x=Wi(x,I),typeof x!="object"&&Ae(18,R.join("/"))}let F=Lt(x),w=y(v.value),E=R[R.length-1];switch(P){case t:switch(F){case 2:return x.set(E,w);case 3:Ae(16);default:return x[E]=w}case r:switch(F){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(F){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:Ae(17,P)}}),S}function y(S){if(!De(S))return S;if(Array.isArray(S))return S.map(y);if(nn(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(on(S))return new Set(Array.from(S).map(y));let g=Object.create(Vt(S));for(let v in S)g[v]=y(S[v]);return en(S,Xr)&&(g[Xr]=S[Xr]),g}function h(S){return je(S)?y(S):S}Gm("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:m})}var Ne=new Xm,it=Ne.produce,Wn=Ne.produceWithPatches.bind(Ne),_x=Ne.setAutoFreeze.bind(Ne),Vx=Ne.setUseStrictShallowCopy.bind(Ne),aa=Ne.applyPatches.bind(Ne),Lx=Ne.createDraft.bind(Ne),Ux=Ne.finishDraft.bind(Ne);d();c();l();u();function Zm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function eg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function tg(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Yc=e=>Array.isArray(e)?e:[e];function rg(e){let t=Array.isArray(e[0])?e[0]:e;return tg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ng(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Wx=Symbol();var Kx=Object.getPrototypeOf({});var og=class{constructor(e){this.value=e}deref(){return this.value}},ig=typeof WeakRef<"u"?WeakRef:og,ag=0,Jc=1;function Kn(){return{s:ag,v:void 0,o:null,p:null}}function or(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let f=r,{length:m}=arguments;for(let h=0,S=m;h<S;h++){let g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=f.o;v===null&&(f.o=v=new WeakMap);let R=v.get(g);R===void 0?(f=Kn(),v.set(g,f)):f=R}else{let v=f.p;v===null&&(f.p=v=new Map);let R=v.get(g);R===void 0?(f=Kn(),v.set(g,f)):f=R}}let p=f,y;if(f.s===Jc)y=f.v;else if(y=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,y)&&(y=h,i!==0&&i--),o=typeof y=="object"&&y!==null||typeof y=="function"?new ig(y):y}return p.s=Jc,p.v=y,y}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Xc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,f,m={},p=o.pop();typeof p=="object"&&(m=p,p=o.pop()),Zm(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...m},{memoize:h,memoizeOptions:S=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Yc(S),x=Yc(v),F=rg(o),w=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,j=g(function(){a++;let I=ng(F,arguments);return f=w.apply(null,I),f},...x);return Object.assign(j,{resultFunc:p,memoizedResultFunc:w,dependencies:F,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>f,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var pe=Xc(or),sg=Object.assign((e,t=pe)=>{eg(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),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,f,m)=>(a[r[m]]=f,a),{}))},{withTypes:()=>sg});d();c();l();u();function Zc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var eu=Zc(),tu=Zc;var cg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nr:nr.apply(null,arguments)},fR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},ug=e=>e&&typeof e.match=="function";function D(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Qn(n)&&n.type===e,r}var au=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function ru(e){return De(e)?it(e,()=>{}):e}function nu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function lg(e){return typeof e=="boolean"}var dg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new au;return r&&(lg(r)?a.push(eu):a.push(tu(r.extraArgument))),a},sn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[sn]:!0}}),ou=e=>t=>{setTimeout(t,e)},pg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,f=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ou(10):e.type==="callback"?e.queueNotification:ou(e.timeout),p=()=>{a=!1,i&&(i=!1,f.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>o&&y(),S=n.subscribe(h);return f.add(y),()=>{S(),f.delete(y)}},dispatch(y){try{return o=!y?.meta?.[sn],i=!o,i&&(a||(a=!0,m(p))),n.dispatch(y)}finally{o=!0}}})},fg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new au(e);return n&&o.push(pg(typeof n=="object"?n:void 0)),o};function su(e){let t=dg(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},f;if(typeof r=="function")f=r;else if(Ke(r))f=rr(r);else throw new Error(He(1));let m;typeof n=="function"?m=n(t):m=t();let p=nr;o&&(p=cg({trace:!1,...(typeof o=="object"&&o)}));let y=_c(...m),h=fg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Gi(f,i,g)}function cu(e){let t={},r=[],n,o={addCase(i,a){let f=typeof i=="string"?i:i.type;if(!f)throw new Error(He(28));if(f in t)throw new Error(He(29));return t[f]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function mg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=cu(t),i;if(mg(e))i=()=>ru(e());else{let f=ru(e);i=()=>f}function a(f=i(),m){let p=[r[m.type],...n.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return p.filter(y=>!!y).length===0&&(p=[o]),p.reduce((y,h)=>{if(h)if(je(y)){let g=h(y,m);return g===void 0?y:g}else{if(De(y))return it(y,S=>h(S,m));{let S=h(y,m);if(S===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return y},f)}return a.getInitialState=i,a}var uu=(e,t)=>ug(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>uu(r,t))}function ir(...e){return t=>e.every(r=>uu(r,t))}function Jn(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):cn(e)?Ye(...e.map(t=>t.pending)):Xn()(e[0])}function Bt(...e){return e.length===0?t=>Jn(t,["rejected"]):cn(e)?Ye(...e.map(t=>t.rejected)):Bt()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Bt(...e),t):cn(e)?ir(Bt(...e),t):un()(e[0])}function at(...e){return e.length===0?t=>Jn(t,["fulfilled"]):cn(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):cn(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var gg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=gg[Math.random()*64|0];return t},yg=["name","message","stack","code"],sa=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},iu=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},hg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of yg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},de=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(m,p,y,h)=>({payload:m,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=D(t+"/pending",(m,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:m,requestStatus:"pending"}})),a=D(t+"/rejected",(m,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||hg)(m||"Rejected"),meta:{...(S||{}),arg:y,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function f(m){return(p,y,h)=>{let S=n?.idGenerator?n.idGenerator(m):eo(),g=new s.AbortController,v,R;function P(F){R=F,g.abort()}let x=_asyncToGenerator(function*(){let F;try{let E=n?.condition?.(m,{getState:y,extra:h});if(vg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((O,I)=>{v=()=>{I({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,m,n?.getPendingMeta?.({requestId:S,arg:m},{getState:y,extra:h}))),F=yield Promise.race([j,Promise.resolve(r(m,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(O,I)=>new sa(O,I),fulfillWithValue:(O,I)=>new iu(O,I)})).then(O=>{if(O instanceof sa)throw O;return O instanceof iu?o(O.payload,S,m,O.meta):o(O,S,m)})])}catch(E){F=E instanceof sa?a(null,S,m,E.payload,E.meta):a(E,S,m)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(F)&&F.meta.condition||p(F),F})();return Object.assign(x,{abort:P,requestId:S,arg:m,unwrap(){return x.then(Sg)}})}}return Object.assign(f,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Sg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function vg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var lu=Symbol.for("rtk-slice-createasyncthunk"),SR={[lu]:de};function bg(e,t){return`${e}/${t}`}function Ag({creators:e}={}){let t=e?.asyncThunk?.[lu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(wg()):n.reducers)||{},f=Object.keys(a),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(F,w){let E=typeof F=="string"?F:F.type;if(!E)throw new Error(He(12));if(E in m.sliceCaseReducersByType)throw new Error(He(13));return m.sliceCaseReducersByType[E]=w,p},addMatcher(F,w){return m.sliceMatchers.push({matcher:F,reducer:w}),p},exposeAction(F,w){return m.actionCreators[F]=w,p},exposeCaseReducer(F,w){return m.sliceCaseReducersByName[F]=w,p}};f.forEach(F=>{let w=a[F],E={reducerName:F,type:bg(o,F),createNotation:typeof n.reducers=="function"};Rg(w)?Ig(E,w,p,t):xg(E,w,p)});function y(){let[F={},w=[],E=void 0]=typeof n.extraReducers=="function"?cu(n.extraReducers):[n.extraReducers],j={...F,...m.sliceCaseReducersByType};return ge(n.initialState,O=>{for(let I in j)O.addCase(I,j[I]);for(let I of m.sliceMatchers)O.addMatcher(I.matcher,I.reducer);for(let I of w)O.addMatcher(I.matcher,I.reducer);E&&O.addDefaultCase(E)})}let h=F=>F,S=new Map,g;function v(F,w){return g||(g=y()),g(F,w)}function R(){return g||(g=y()),g.getInitialState()}function P(F,w=!1){function E(O){let I=O[F];return typeof I>"u"&&w&&(I=R()),I}function j(O=h){let I=nu(S,w,()=>new WeakMap);return nu(I,O,()=>{let k={};for(let[T,N]of Object.entries(n.selectors??{}))k[T]=Cg(N,O,R,w);return k})}return{reducerPath:F,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let x={name:o,reducer:v,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(F,{reducerPath:w,...E}={}){let j=w??i;return F.inject({reducerPath:j,reducer:v},E),{...x,...P(j,!0)}}};return x}}function Cg(e,t,r,n){function o(i,...a){let f=t(i);return typeof f>"u"&&n&&(f=r()),e(f,...a)}return o.unwrapped=e,o}var Qt=Ag();function wg(){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 xg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Eg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?D(e,a):D(e))}function Rg(e){return e._reducerDefinitionType==="asyncThunk"}function Eg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ig({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:f,rejected:m,settled:p,options:y}=r,h=o(e,i,y);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),f&&n.addCase(h.pending,f),m&&n.addCase(h.rejected,m),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:f||Yn,rejected:m||Yn,settled:p||Yn})}function Yn(){}var du="listener",pu="completed",fu="cancelled",vR=`task-${fu}`,bR=`task-${pu}`,AR=`${du}-${fu}`,CR=`${du}-${pu}`;var{assign:mu}=Object;var ca="listenerMiddleware";var Pg=mu(D(`${ca}/add`),{withTypes:()=>Pg}),wR=D(`${ca}/removeAll`),Fg=mu(D(`${ca}/remove`),{withTypes:()=>Fg});var xR=Symbol.for("rtk-state-proxy-original");function He(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. `}d();c();l();u();var W=new H({required:!0,emptyAllowed:!1}),Ce=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),MR=new H({required:!1,emptyAllowed:!0}),to=new ie({each:W,required:!0}),gu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),yu=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),jR=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Le=(e,t)=>{if("required"in t)return{payload:new ke({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Gr(o);return{payload:e}},B=(e,t)=>{try{return Le(e,t)}catch(r){return{payload:e,error:st(r)}}},hu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return vu(e,t,r,o,"Controller initialization error")},Su=(e,t,r,n)=>{let o=`Check the options of ${n}`;return vu(e,t,r,o,"Controller initialization error")},vu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var sr="3.27.8-pre.63fc406dfa",bu=["@coveo/atomic","@coveo/quantic"];var ua=()=>Ce,Au=()=>W,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:Ce,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ce})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,timezone:Ce,locale:Ce,authenticationProviders:new ie({required:!1,each:W})})),kg={enabled:new ne({default:!0}),originContext:ua(),originLevel2:ua(),originLevel3:ua(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ce,userDisplayName:Ce,documentLocation:Ce,trackingId:yu,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:bu.reduce((e,t)=>(e[t]=gu,e),{})})},cr=D("configuration/updateAnalyticsConfiguration",e=>B(e,kg)),ur=D("configuration/analytics/disable"),lr=D("configuration/analytics/enable"),ro=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:Au()})),no=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:Au()}));d();c();l();u();d();c();l();u();d();c();l();u();var Cu={q:new H,enableQuerySyntax:new ne,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new ne,sf:new K,tab:new H,af:new K};var vt=D("searchParameters/restore",e=>B(e,Cu)),wu=D("searchParameters/restoreTab",e=>B(e,W));d();c();l();u();var oo=D("debug/enable"),io=D("debug/disable");d();c();l();u();var ao=()=>!1;var so=ge(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Og=D("history/undo"),Tg=D("history/redo"),Xe=D("history/snapshot"),HE=de("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Og()),yield t(qe())});return function(_x4,_x5){return _ref4.apply(this,arguments)}}()),zE=de("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Tg()),yield t(qe())});return function(_x6,_x7){return _ref5.apply(this,arguments)}}()),qe=de("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x8,_x9){return _ref6.apply(this,arguments)}}());d();c();l();u();var pr=()=>"";var fr=ge(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var mr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let f=window.location.hostname,m=/^(\d{1,3}\.){3}\d{1,3}$/,p=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;m.test(f)||p.test(f)||f.indexOf(".")===-1?la(t,r,i):(a=f.split("."),o=a[a.length-2]+"."+a[a.length-1],la(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function la(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function Dg(){return typeof navigator<"u"}function xu(){try{return typeof localStorage<"u"}catch{return!1}}function Ru(){try{return typeof sessionStorage<"u"}catch{return!1}}function Eu(){return!!(Dg()&&navigator.cookieEnabled)}var Iu=null;function Pu(){return Iu||(xu()?localStorage:Eu()?new da:Ru()?sessionStorage:new pa)}var gr=class gr{getItem(t){return mr.get(`${gr.prefix}${t}`)}removeItem(t){mr.erase(`${gr.prefix}${t}`)}setItem(t,r,n){mr.set(`${gr.prefix}${t}`,r,n)}};le(gr,"prefix","coveo_");var da=gr;var pa=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var co="__coveo.analytics.history",qg=20,Mg=1e3*60,jg=75,$t=class $t{constructor(t){le(this,"store");this.store=t||Pu()}static getInstance(t){return $t.instance||($t.instance=new $t(t)),$t.instance}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){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(co);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(co);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(co,JSON.stringify(t.slice(0,qg)))}catch{}}clear(){try{this.store.removeItem(co)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,jg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Mg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};le($t,"instance",null);var fa=$t,Ze=fa;d();c();l();u();d();c();l();u();var yr=pe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));d();c();l();u();d();c();l();u();function ct(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function q(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function f(y){try{p(n.next(y))}catch(h){a(h)}}function m(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(f,m)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function ya(){return typeof window<"u"}function Fa(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function ha(){try{return typeof localStorage<"u"}catch{return!1}}function Ng(){try{return typeof sessionStorage<"u"}catch{return!1}}function Bu(){return Fa()&&navigator.cookieEnabled}var _g=[ae.click,ae.custom,ae.search,ae.view],Vg=(e,t)=>_g.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Fa()?navigator.userAgent:"unknown"},t):t,dn=class e{static set(t,r,n){var o,i,a,f;n&&(i=new Date,i.setTime(i.getTime()+n)),f=window.location.hostname,f.indexOf(".")===-1?Fu(t,r,i):(a=f.split("."),o=a[a.length-2]+"."+a[a.length-1],Fu(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Fu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Lg(){return ha()?localStorage:Bu()?new pn:Ng()?sessionStorage:new vr}var pn=class e{getItem(t){return dn.get(`${e.prefix}${t}`)}removeItem(t){dn.erase(`${e.prefix}${t}`)}setItem(t,r,n){dn.set(`${e.prefix}${t}`,r,n)}};pn.prefix="coveo_";var Sa=class{constructor(){this.cookieStorage=new pn}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)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},uo="__coveo.analytics.history",Ug=20,Bg=1e3*60,Qg=75,fo=class{constructor(t){this.store=t||Lg()}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 q(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 q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(uo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(uo);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(uo,JSON.stringify(t.slice(0,Ug)))}catch{}}clear(){try{this.store.removeItem(uo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Qg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Bg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var $g=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield Hg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Hg=e=>q(void 0,void 0,void 0,function*(){let t=new fo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),lo,zg=new Uint8Array(16);function Gg(){if(!lo&&(lo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lo(zg)}var Wg=/^(?:[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 mo(e){return typeof e=="string"&&Wg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Qu(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function Kg(e){if(!mo(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 Yg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Jg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Xg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Zg(e,t,r){function n(o,i,a,f){var m;if(typeof o=="string"&&(o=Yg(o)),typeof i=="string"&&(i=Kg(i)),((m=i)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){f=f||0;for(let y=0;y<16;++y)a[f+y]=p[y];return a}return Qu(p)}try{n.name=e}catch{}return n.DNS=Jg,n.URL=Xg,n}var ey=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ku={randomUUID:ey};function Ht(e,t,r){if(ku.randomUUID&&!t&&!e)return ku.randomUUID();e=e||{};let n=e.random||(e.rng||Gg)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Qu(n)}function ty(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function ma(e,t){return e<<t|e>>>32-t}function ry(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let f=0;f<a.length;++f)e.push(a.charCodeAt(f))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let f=new Uint32Array(16);for(let m=0;m<16;++m)f[m]=e[a*64+m*4]<<24|e[a*64+m*4+1]<<16|e[a*64+m*4+2]<<8|e[a*64+m*4+3];i[a]=f}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let f=new Uint32Array(80);for(let g=0;g<16;++g)f[g]=i[a][g];for(let g=16;g<80;++g)f[g]=ma(f[g-3]^f[g-8]^f[g-14]^f[g-16],1);let m=r[0],p=r[1],y=r[2],h=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=ma(m,5)+ty(v,p,y,h)+S+t[v]+f[g]>>>0;S=h,h=y,y=ma(p,30)>>>0,p=m,m=R}r[0]=r[0]+m>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>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 ny=Zg("v5",80,ry),Ou=ny,$u="2.30.45",Tu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ln={pageview:"pageview",event:"event"},go=class{constructor({client:t,uuidGenerator:r=Ht}){this.client=t,this.uuidGenerator=r}},va=class extends go{constructor({client:t,uuidGenerator:r=Ht}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Tu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ln.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ln.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ln.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ln.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Tu(window.location)}},bt=class e{constructor(t,r){if(!mo(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return mo(i)?new e(i,Number.parseInt(o)*1e3):null}};bt.cvo_cid="cvo_cid";bt.expirationTime=120;var ba=class extends go{constructor({client:t,uuidGenerator:r=Ht}){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 q(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(bt.cvo_cid,new bt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ba.Id="link";var Be=Object.keys;function po(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ga=128,Hu=192,Du=224,qu=240;function oy(e){return(e&248)===qu?4:(e&qu)===Du?3:(e&Du)===Hu?2:1}function iy(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&ga)!=ga)break;if(r-=3,(n&Hu)!=ga){t-r>=oy(n)*3&&(r=t);break}}return e.substring(0,r)}var Aa={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"},ay=Be(Aa).map(e=>Aa[e]),sy=[...ay].join("|"),cy=new RegExp(`^(${sy}$)`),uy={svcAction:"svc_action",svcActionData:"svc_action_data"},ly=e=>Be(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Aa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),dy=e=>cy.test(e),py=[dy],Mu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ju={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},yo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},fy=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ca={id:"quoteId",affiliation:"quoteAffiliation"},wa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},my={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),yo),purchase:Object.assign(Object.assign({},Ee),yo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ca),review:Object.assign(Object.assign({},Ee),wa)},gy=Be(Mu).map(e=>Mu[e]),yy=Be(ju).map(e=>ju[e]),hy=Be(Ee).map(e=>Ee[e]),Sy=Be(yo).map(e=>yo[e]),vy=Be(wa).map(e=>wa[e]),by=Be(Ca).map(e=>Ca[e]),Ay=[...gy,"custom"].join("|"),Cy=[...yy,"custom"].join("|"),zu="(pr[0-9]+)",Gu="(il[0-9]+pi[0-9]+)",wy=new RegExp(`^${zu}(${Ay})$`),xy=new RegExp(`^(${Gu}(${Cy}))|(il[0-9]+nm)$`),Ry=new RegExp(`^(${hy.join("|")})$`),Ey=new RegExp(`^(${Sy.join("|")})$`),Iy=new RegExp(`^${zu}custom$`),Py=new RegExp(`^${Gu}custom$`),Fy=new RegExp(`^(${[...fy,...vy,...by].join("|")})$`),ky=e=>wy.test(e),Oy=e=>xy.test(e),Ty=e=>Ry.test(e),Dy=e=>Ey.test(e),qy=e=>Fy.test(e),My=[Oy,ky,Ty,Dy,qy],jy=[Iy,Py],Ny={anonymizeIp:"aip"},_y={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Vy={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Ly=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Uy=Object.assign(Object.assign(Object.assign(Object.assign({},Ny),_y),Vy),Ly.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xa=Object.assign(Object.assign({},Uy),uy),By=e=>{let t=!!e.action&&my[e.action]||{};return Be(e).reduce((r,n)=>{let o=t[n]||xa[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Qy=Be(xa).map(e=>xa[e]),$y=e=>Qy.indexOf(e)!==-1,Hy=e=>e==="custom",zy=e=>[...My,...py,$y,Hy].some(t=>t(e)),Gy=e=>Be(e).reduce((t,r)=>{let n=Wy(r);return n?Object.assign(Object.assign({},t),Ky(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Wy=e=>{let t;return[...jy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ky=(e,t)=>Be(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ra=class{constructor(t){this.opts=t}sendEvent(t,r){return q(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:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:f}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),m=this.encodeForEventType(t,f),p=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return q(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:f,body:m}=a;o=f||t;try{i=JSON.parse(m)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Ea=class{sendEvent(t,r){return q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){return Promise.resolve()})}},Nu=b.fetch,ho=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",f={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},f),i?yield i(f,"analyticsFetch"):{}),{url:p}=m,y=ct(m,["url"]),h;try{h=yield Nu(p,y)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}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 q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Nu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return q(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"})}},Ia=class{constructor(t,r){ha()&&Bu()?this.storage=new Sa:ha()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new ho(t),this.beaconClient=new Ra(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Pa=class{constructor(t,r){this.storage=r||new vr,this.client=new ho(t)}getClientDependingOnEventType(t){return this.client}},So=class{constructor(){this.storage=new vr,this.client=new Ea}getClientDependingOnEventType(t){return this.client}},Yy="xx",Jy=e=>e?.startsWith(Yy)||!1,Xy=`
|
|
27
27
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
28
28
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
29
29
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
@@ -46,4 +46,4 @@ ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":I
|
|
|
46
46
|
* limitations under the License.
|
|
47
47
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
48
48
|
|
|
49
|
-
window.coveoQuanticVersion = '3.28.2-pre.
|
|
49
|
+
window.coveoQuanticVersion = '3.28.2-pre.63fc406dfa';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/quantic",
|
|
3
|
-
"version": "3.28.2-pre.
|
|
3
|
+
"version": "3.28.2-pre.63fc406dfa",
|
|
4
4
|
"description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform",
|
|
5
5
|
"author": "coveo.com",
|
|
6
6
|
"homepage": "https://coveo.com",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@coveo/bueno": "1.0.24",
|
|
52
|
-
"@coveo/headless": "3.27.8-pre.
|
|
52
|
+
"@coveo/headless": "3.27.8-pre.63fc406dfa",
|
|
53
53
|
"dompurify": "3.2.6",
|
|
54
54
|
"fs-extra": "11.3.0",
|
|
55
55
|
"marked": "12.0.2"
|