@coveo/quantic 3.30.0-pre.8a67bd16aa → 3.30.0-pre.8b47cb07e6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +2 -2
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-definitions.d.ts +0 -3
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +8 -8
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controller-utils.d.ts +2 -1
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +2 -3
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/cart/headless-cart.ssr.d.ts +2 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/context/headless-context.ssr.d.ts +3 -2
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +1 -2
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +2 -1
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/generator/headless-commerce-facet-generator.ssr.d.ts +2 -3
  11. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/instant-products/headless-instant-products.ssr.d.ts +2 -1
  12. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/pagination/headless-core-commerce-pagination.ssr.d.ts +2 -3
  13. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/parameter-manager/headless-core-parameter-manager.ssr.d.ts +13 -3
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/product-list/headless-product-list.ssr.d.ts +2 -3
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/product-view/headless-product-view.ssr.d.ts +3 -1
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/recent-queries-list/headless-recent-queries-list.ssr.d.ts +2 -1
  17. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/search-box/headless-search-box.ssr.d.ts +2 -1
  18. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/sort/headless-core-commerce-sort.ssr.d.ts +2 -3
  19. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +2 -1
  20. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/summary/headless-core-summary.ssr.d.ts +2 -3
  21. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/triggers/headless-notify-trigger.ssr.d.ts +2 -1
  22. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/triggers/headless-query-trigger.ssr.d.ts +2 -1
  23. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/triggers/headless-redirection-trigger.ssr.d.ts +2 -1
  24. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-definitions.d.ts +48 -3
  25. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-scopes.d.ts +6 -0
  26. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/errors.d.ts +3 -0
  27. package/force-app/main/default/staticresources/coveoheadless/headless.js +3 -3
  28. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +2 -2
  29. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
  30. package/package.json +2 -2
@@ -24,7 +24,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
24
24
 
25
25
  ${t}
26
26
  `;return new vn(r)}var vn=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Se=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let a=this.definition[o].validate(r[o]);a&&n.push(`${o}: ${a}`)}if(n.length)throw Db(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}},Ie=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&K(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 Zn(e){return e===void 0}function jb(e){return e===null}function K(e){return Zn(e)||jb(e)}var ae=class{constructor(e={}){xe(this,"value");this.value=new Ie(e)}validate(e){let t=this.value.validate(e);return t||(Vb(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Vb(e){return Zn(e)||Jf(e)}function Jf(e){return typeof e=="boolean"}var Z=class{constructor(e={}){xe(this,"value");this.config=e,this.value=new Ie(e)}validate(e){let t=this.value.validate(e);return t||(Nb(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 Nb(e){return Zn(e)||Xf(e)}function Xf(e){return typeof e=="number"&&!Number.isNaN(e)}var Mb=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,N=class{constructor(e={}){xe(this,"value");xe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Ie(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:a}=this.config,d=this.value.validate(e);if(d)return d;if(Zn(e))return null;if(!eo(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(", ")}.`:a&&!(Mb.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 eo(e){return Object.prototype.toString.call(e)==="[object String]"}var U=class{constructor(e={}){xe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Zn(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Zf(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&K(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],a=n.validate(o);a!==null&&(t+=` ${a}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Zf(e){return e!==void 0&&typeof e=="object"}var te=class{constructor(e={}){xe(this,"value");this.config=e,this.value=new Ie(this.config)}validate(e){if(!K(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(K(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&&K(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 Jf(e)||eo(e)||Xf(e)||Zf(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function to(e){return Array.isArray(e)}var Dr=class{constructor(e){xe(this,"value");this.config=e,this.value=new Ie(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Zn(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}};l();s();u();c();var Ki=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Ji(e){return Array.isArray(e)}function Xi(e){return e.trim()===""}function eg(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function Qb(e){return btoa(encodeURI(e))}function Zi(e,t){let{[e]:r,...n}=t;return n}function ro(e){return Qb(JSON.stringify(e))}var Lb=new Set(["1",1,"yes",!0]);function tg(){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=>Lb.has(r))}function rg(e){let t={};for(let[r,n]of e)t[r]=n;return t}function ng(e,t,r){return clearTimeout(t),setTimeout(e,r)}function ja(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function _b(e){if(Xi(e.openingDelimiter)||Xi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(K(e.content)||Xi(e.content))return e.content;if(e.highlights.length===0)return no(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],d=a.offset,p=d+a.length;if(p>t)break;r+=no(e.content.slice(n,d)),r+=e.openingDelimiter,r+=no(e.content.slice(d,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=no(e.content.slice(n))),r}function bd(e,t){return e=no(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?xd(n,t.notMatchDelimiters):o?xd(o,t.exactMatchDelimiters):a?xd(a,t.correctionDelimiters):r)}function xd(e,t){return t?t.open+e+t.close:e}function no(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,a=>t[a]):e}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();function ag(_x2,_x3){return _ag.apply(this,arguments)}function _ag(){_ag=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _ag.apply(this,arguments)}function ig(e){let t,r,n,o=!1;return function(d){t===void 0?(t=d,r=0,n=-1):t=Bb(t,d);let p=t.length,m=0;for(;r<p;){o&&(t[r]===10&&(m=++r),o=!1);let f=-1;for(;r<p&&f===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-m);break;case 13:o=!0,f=r;break;case 10:f=r;break}if(f===-1)break;e(t.subarray(m,f),n),m=r,n=-1}m===p?t=void 0:m!==0&&(t=t.subarray(m),r-=m)}}function sg(e,t,r){let n=og(),o=new TextDecoder;return function(d,p){if(d.length===0)r?.(n),n=og();else if(p>0){let m=o.decode(d.subarray(0,p)),f=p+(d[p+1]===32?2:1),y=o.decode(d.subarray(f));switch(m){case"data":n.data=n.data?`${n.data}
27
- ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":Ub(y,n,t);break}}}}function Ub(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Bb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function og(){return{data:"",event:"",id:"",retry:void 0}}var Id="text/event-stream",$b=1e3,cg="last-event-id";function ug(){return typeof window<"u"}function es(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:d,openWhenHidden:p,fetch:m,...f}){return new Promise((y,A)=>{let v={...r};v.accept||(v.accept=Id);let C;function R(){C?.abort(),document.hidden||q()}!p&&ug()&&document.addEventListener("visibilitychange",R);let b=$b,x;function F(){ug()&&document.removeEventListener("visibilitychange",R),clearTimeout(x),C?.abort()}t?.addEventListener("abort",()=>{F(),y()});let P=m??h,I=n??Hb;function q(){return _q2.apply(this,arguments)}function _q2(){_q2=_asyncToGenerator(function*(){C=i.AbortController?new i.AbortController:null;try{let M=yield P(e,{...f,headers:v,signal:C?.signal});yield I(M),yield ag(M.body,ig(sg(D=>{D?v[cg]=D:delete v[cg]},D=>{b=D},o))),a?.(),F(),y()}catch(M){if(!C?.signal?.aborted)try{let D=d?.(M)??b;clearTimeout(x),x=setTimeout(q,D)}catch(D){F(),A(D)}}});return _q2.apply(this,arguments)}q()})}function Hb(e){let t=e.headers.get("content-type");if(!t?.startsWith(Id))throw new Error(`Expected content-type to be ${Id}, Actual: ${t}`)}l();s();u();c();var jr=class{constructor(t){xe(this,"_basePath");xe(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}};var Gb=(e,t,r)=>new jr(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,lg=3,zb=5e3,Wb="text/event-stream",Ed=1,wd=class extends Error{},Va=class extends Error{constructor(r){super(r.message);this.payload=r}},Pd=class{constructor(){xe(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},ts=class{constructor(t){xe(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:d}=t,{write:p,abort:m,close:f,resetAnswer:y}=r,A=new Pd;if(!a){this.logger.error("No stream ID found");return}let v=0,C,R=()=>{C&&!A.isActive(C)&&(x?.abort(),y(),F())},b=()=>{A.remove(C),C=ng(R,C,zb),A.add(C)},x=new i.AbortController,F=()=>es(Gb(n,o,a),{method:"GET",fetch:h,headers:{Authorization:`Bearer ${d}`,accept:"*/*"},openWhenHidden:!0,signal:x?.signal,onopen(P){return _asyncToGenerator(function*(){if(P.ok&&P.headers.get("content-type")===Wb)return;throw P.status>=400&&P.status<500&&P.status!==429?new Va({message:"Error opening stream",code:P.status}):new wd})()},onmessage:P=>{if(x?.signal.aborted)return;let I=JSON.parse(P.data);if(I.finishReason==="ERROR"){A.remove(C),x?.abort(),m({message:I.errorMessage,code:I.statusCode});return}p(I),v=0,I.finishReason==="COMPLETED"?(A.remove(C),f()):b()},onerror:P=>{if(!x?.signal.aborted){if(A.remove(C),P instanceof Va)throw x?.abort(),m(P),P;if(++v>lg){this.logger.info("Maximum retry exceeded.");let I={message:"Failed to complete stream.",code:Ed};throw x?.abort(),m(I),new Va(I)}this.logger.info(`Retrying...(${v}/${lg})`),y()}}});return F(),x}};l();s();u();c();var rs=e=>e;l();s();u();c();l();s();u();c();var Rg=Ot(Sg(),1);l();s();u();c();var re=new Error("Failed to load reducers."),oo=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},xn=class extends Error{constructor(r,n){super();xe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();s();u();c();function Cg(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ag(e){return typeof e!="object"||!e?!1:Object.values(e).every(AF)}function AF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function vg(e){return e===429}var Dt=class e{static call(t){return _asyncToGenerator(function*(){let r=vF(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...d}=o,p=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield h(a,d);if(vg(m.status))throw m;return m});return function p(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Rg.backOff)(p,{retry:f=>{let y=f&&vg(f.status);return y&&n.info("Platform retrying request"),y}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new oo;case 404:throw new xn(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new xn(a):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:d}=r,{signal:p,...m}=t,f=ja(m);try{let y=yield o(t,n,d);return{...t,...y}}catch(y){a.error(y,"Platform request preprocessing failed. Returning default request options.")}return f})()}};function ke(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ut(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function os(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function vF(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:d}=e,p=e.method==="POST"||e.method==="PUT",m=RF(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:m}),signal:d}}function RF(e,t){return t==="application/x-www-form-urlencoded"?Ag(e)?Cg(e):"":JSON.stringify(e)}l();s();u();c();l();s();u();c();function Qa(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var Md=e=>{let{response:t}=e;return t.body?xF(e):bF(t)},xF=e=>IF(e)?wF(e):FF(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},bF=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function FF(e){return e.body.statusCode!==void 0}function IF(e){return e.body.exception!==void 0}var wF=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();s();u();c();function xg(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();s();u();c();var Qd=(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 bg=(e,t)=>{let r=new jr(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Ld=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield Dt.call({...Qd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Qa(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=xg(r),o=yield r.arrayBuffer(),d=new TextDecoder(n).decode(o);return PF(d)?{success:d}:{error:Md({response:r,body:d})}});return function Ld(_x4,_x5){return _ref2.apply(this,arguments)}}();function PF(e){return typeof e=="string"}l();s();u();c();l();s();u();c();function ao(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ao(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ao(),extendedResults:{},searchAction:void 0}}l();s();u();c();l();s();u();c();function EF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function qF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function bn(e,t){if(t&&e.name==="AbortError")return{error:qF(e)};if(e instanceof xn)return{error:EF(e)};throw e}var Vr=e=>e.success!==void 0,we=e=>e.error!==void 0;function Fg(e){return e.results!==void 0}function Ig(e){let t=ao();return K(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}l();s();u();c();l();s();u();c();var _d=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,TF=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,La=(e,t,r,n)=>{kF(e);let o=_d(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},wg=(e,t,r)=>{OF(e);let n=TF(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Ud=e=>{let{insightId:t,...r}=Qa(e);return r},Pg=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},kF=e=>{if(Pg(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},OF=e=>{if(Pg(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var Eg=e=>({...La(e,"GET","application/json","/interface"),requestParams:{}});l();s();u();c();var qg=e=>({...La(e,"POST","application/json","/search"),requestParams:Ud(e)}),Tg=e=>({...La(e,"POST","application/json","/querysuggest"),requestParams:Ud(e)});l();s();u();c();var kg=e=>({...wg(e,"POST","application/json"),requestParams:{objectId:e.userId}});var as=class{constructor(t){this.options=t}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...Eg(t),..._this.options});if(r instanceof Error)return bn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}query(t,r){var _this2=this;return _asyncToGenerator(function*(){let n=yield Dt.call({...qg(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return bn(n);let o=yield n.json();return Fg(o)&&(o=Ig(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...Tg(t),..._this3.options});if(r instanceof Error)return bn(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...kg(t),..._this4.options});if(r instanceof Error)return bn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return Ld(t,{..._this5.options})})()}};l();s();u();c();l();s();u();c();var B=new N({required:!0,emptyAllowed:!1}),be=new N({required:!1,emptyAllowed:!1}),Pe=new N({required:!0,emptyAllowed:!0}),Og=new N({required:!1,emptyAllowed:!0}),is=new te({each:B,required:!0}),Dg=new N({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),jg=new N({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),$0=new N({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),jt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ft=(e,t)=>{if("required"in t)return{payload:new Se({value:t}).validate({value:e}).value};let o=new U({options:{required:!0},values:t}).validate(e);if(o)throw new vn(o);return{payload:e}},E=(e,t)=>{try{return Ft(e,t)}catch(r){return{payload:e,error:jt(r)}}},$t=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Vg(e,t,r,o,"Controller initialization error")},He=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Vg(e,t,r,o,"Controller initialization error")},Vg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};l();s();u();c();l();s();u();c();l();s();u();c();function Ye(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 DF=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ng=DF,Bd=()=>Math.random().toString(36).substring(7).split("").join("."),jF={INIT:`@@redux/INIT${Bd()}`,REPLACE:`@@redux/REPLACE${Bd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bd()}`},ss=jF;function Ht(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 $d(e,t,r){if(typeof e!="function")throw new Error(Ye(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ye(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ye(1));return r($d)(e,t)}let n=e,o=t,a=new Map,d=a,p=0,m=!1;function f(){d===a&&(d=new Map,a.forEach((x,F)=>{d.set(F,x)}))}function y(){if(m)throw new Error(Ye(3));return o}function A(x){if(typeof x!="function")throw new Error(Ye(4));if(m)throw new Error(Ye(5));let F=!0;f();let P=p++;return d.set(P,x),function(){if(F){if(m)throw new Error(Ye(6));F=!1,f(),d.delete(P),a=null}}}function v(x){if(!Ht(x))throw new Error(Ye(7));if(typeof x.type>"u")throw new Error(Ye(8));if(typeof x.type!="string")throw new Error(Ye(17));if(m)throw new Error(Ye(9));try{m=!0,o=n(o,x)}finally{m=!1}return(a=d).forEach(P=>{P()}),x}function C(x){if(typeof x!="function")throw new Error(Ye(10));n=x,v({type:ss.REPLACE})}function R(){let x=A;return{subscribe(F){if(typeof F!="object"||F===null)throw new Error(Ye(11));function P(){let q=F;q.next&&q.next(y())}return P(),{unsubscribe:x(P)}},[Ng](){return this}}}return v({type:ss.INIT}),{dispatch:v,subscribe:A,getState:y,replaceReducer:C,[Ng]:R}}function VF(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:ss.INIT})>"u")throw new Error(Ye(12));if(typeof r(void 0,{type:ss.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ye(13))})}function io(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let p=t[d];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{VF(r)}catch(d){a=d}return function(p={},m){if(a)throw a;let f=!1,y={};for(let A=0;A<n.length;A++){let v=n[A],C=r[v],R=p[v],b=C(R,m);if(typeof b>"u"){let x=m&&m.type;throw new Error(Ye(14))}y[v]=b,f=f||b!==R}return f=f||n.length!==Object.keys(p).length,f?y:p}}function so(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Mg(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Ye(15))},d={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(d));return a=so(...p)(o.dispatch),{...o,dispatch:a}}}function cs(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}l();s();u();c();var ep=Symbol.for("immer-nothing"),_a=Symbol.for("immer-draftable"),lt=Symbol.for("immer-state");function Ke(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var In=Object.getPrototypeOf;function St(e){return!!e&&!!e[lt]}function dt(e){return e?Bg(e)||Array.isArray(e)||!!e[_a]||!!e.constructor?.[_a]||co(e)||za(e):!1}var NF=Object.prototype.constructor.toString();function Bg(e){if(!e||typeof e!="object")return!1;let t=In(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)===NF}function tp(e){return St(e)||Ke(15,e),e[lt].base_}function Ua(e,t){wn(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function wn(e){let t=e[lt];return t?t.type_:Array.isArray(e)?1:co(e)?2:za(e)?3:0}function Ba(e,t){return wn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hd(e,t){return wn(e)===2?e.get(t):e[t]}function $g(e,t,r){let n=wn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function MF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function co(e){return e instanceof Map}function za(e){return e instanceof Set}function Fn(e){return e.copy_||e.base_}function Wd(e,t){if(co(e))return new Map(e);if(za(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Bg(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[lt];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let d=o[a],p=n[d];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(n[d]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[d]})}return Object.create(In(e),n)}else{let n=In(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function ps(e,t=!1){return ms(e)||St(e)||!dt(e)||(wn(e)>1&&Object.defineProperties(e,{set:{value:us},add:{value:us},clear:{value:us},delete:{value:us}}),Object.freeze(e),t&&Object.values(e).forEach(r=>ps(r,!0))),e}function us(){Ke(2)}function ms(e){return Object.isFrozen(e)}var Yd={};function Pn(e){let t=Yd[e];return t||Ke(0,e),t}function QF(e,t){Yd[e]||(Yd[e]=t)}var $a;function Hg(){return $a}function LF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qg(e,t){t&&(Pn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kd(e){Jd(e),e.drafts_.forEach(_F),e.drafts_=null}function Jd(e){e===$a&&($a=e.parent_)}function Lg(e){return $a=LF($a,e)}function _F(e){let t=e[lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _g(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[lt].modified_&&(Kd(t),Ke(4)),dt(e)&&(e=ls(t,e),t.parent_||ds(t,e)),t.patches_&&Pn("Patches").generateReplacementPatches_(r[lt].base_,e,t.patches_,t.inversePatches_)):e=ls(t,r,[]),Kd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ep?e:void 0}function ls(e,t,r){if(ms(t))return t;let n=t[lt];if(!n)return Ua(t,(o,a)=>Ug(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ds(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,d=!1;n.type_===3&&(a=new Set(o),o.clear(),d=!0),Ua(a,(p,m)=>Ug(e,n,o,p,m,r,d)),ds(e,o,!1),r&&e.patches_&&Pn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Ug(e,t,r,n,o,a,d){if(St(o)){let p=a&&t&&t.type_!==3&&!Ba(t.assigned_,n)?a.concat(n):void 0,m=ls(e,o,p);if($g(r,n,m),St(m))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(dt(o)&&!ms(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ls(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(co(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ds(e,o)}}function ds(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ps(t,r)}function UF(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Hg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=rp;r&&(o=[n],a=Ha);let{revoke:d,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=d,p}var rp={get(e,t){if(t===lt)return e;let r=Fn(e);if(!Ba(r,t))return BF(e,r,t);let n=r[t];return e.finalized_||!dt(n)?n:n===Gd(e.base_,t)?(zd(e),e.copy_[t]=Zd(n,e)):n},has(e,t){return t in Fn(e)},ownKeys(e){return Reflect.ownKeys(Fn(e))},set(e,t,r){let n=Gg(Fn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Gd(Fn(e),t),a=o?.[lt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(MF(r,o)&&(r!==void 0||Ba(e.base_,t)))return!0;zd(e),Xd(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zd(e),Xd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Fn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ke(11)},getPrototypeOf(e){return In(e.base_)},setPrototypeOf(){Ke(12)}},Ha={};Ua(rp,(e,t)=>{Ha[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ha.deleteProperty=function(e,t){return Ha.set.call(this,e,t,void 0)};Ha.set=function(e,t,r){return rp.set.call(this,e[0],t,r,e[0])};function Gd(e,t){let r=e[lt];return(r?Fn(r):e)[t]}function BF(e,t,r){let n=Gg(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Gg(e,t){if(!(t in e))return;let r=In(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=In(r)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function zd(e){e.copy_||(e.copy_=Wd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $F=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let d=this;return function(m=a,...f){return d.produce(m,y=>r.call(this,y,...f))}}typeof r!="function"&&Ke(6),n!==void 0&&typeof n!="function"&&Ke(7);let o;if(dt(t)){let a=Lg(this),d=Zd(t,void 0),p=!0;try{o=r(d),p=!1}finally{p?Kd(a):Jd(a)}return Qg(a,n),_g(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ep&&(o=void 0),this.autoFreeze_&&ps(o,!0),n){let a=[],d=[];Pn("Patches").generateReplacementPatches_(t,o,a,d),n(a,d)}return o}else Ke(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...p)=>this.produceWithPatches(d,m=>t(m,...p));let n,o;return[this.produce(t,r,(d,p)=>{n=d,o=p}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){dt(e)||Ke(8),St(e)&&(e=zg(e));let t=Lg(this),r=Zd(e,void 0);return r[lt].isManual_=!0,Jd(t),r}finishDraft(e,t){let r=e&&e[lt];(!r||!r.isManual_)&&Ke(9);let{scope_:n}=r;return Qg(n,t),_g(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=Pn("Patches").applyPatches_;return St(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zd(e,t){let r=co(e)?Pn("MapSet").proxyMap_(e,t):za(e)?Pn("MapSet").proxySet_(e,t):UF(e,t);return(t?t.scope_:Hg()).drafts_.push(r),r}function zg(e){return St(e)||Ke(10,e),Wg(e)}function Wg(e){if(!dt(e)||ms(e))return e;let t=e[lt],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Wd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Wd(e,!0);return Ua(r,(n,o)=>{$g(r,n,Wg(o))}),t&&(t.finalized_=!1),r}function Yg(){let t="replace",r="add",n="remove";function o(v,C,R,b){switch(v.type_){case 0:case 2:return d(v,C,R,b);case 1:return a(v,C,R,b);case 3:return p(v,C,R,b)}}function a(v,C,R,b){let{base_:x,assigned_:F}=v,P=v.copy_;P.length<x.length&&([x,P]=[P,x],[R,b]=[b,R]);for(let I=0;I<x.length;I++)if(F[I]&&P[I]!==x[I]){let q=C.concat([I]);R.push({op:t,path:q,value:A(P[I])}),b.push({op:t,path:q,value:A(x[I])})}for(let I=x.length;I<P.length;I++){let q=C.concat([I]);R.push({op:r,path:q,value:A(P[I])})}for(let I=P.length-1;x.length<=I;--I){let q=C.concat([I]);b.push({op:n,path:q})}}function d(v,C,R,b){let{base_:x,copy_:F}=v;Ua(v.assigned_,(P,I)=>{let q=Hd(x,P),M=Hd(F,P),D=I?Ba(x,P)?t:r:n;if(q===M&&D===t)return;let T=C.concat(P);R.push(D===n?{op:D,path:T}:{op:D,path:T,value:M}),b.push(D===r?{op:n,path:T}:D===n?{op:r,path:T,value:A(q)}:{op:t,path:T,value:A(q)})})}function p(v,C,R,b){let{base_:x,copy_:F}=v,P=0;x.forEach(I=>{if(!F.has(I)){let q=C.concat([P]);R.push({op:n,path:q,value:I}),b.unshift({op:r,path:q,value:I})}P++}),P=0,F.forEach(I=>{if(!x.has(I)){let q=C.concat([P]);R.push({op:r,path:q,value:I}),b.unshift({op:n,path:q,value:I})}P++})}function m(v,C,R,b){R.push({op:t,path:[],value:C===ep?void 0:C}),b.push({op:t,path:[],value:v})}function f(v,C){return C.forEach(R=>{let{path:b,op:x}=R,F=v;for(let M=0;M<b.length-1;M++){let D=wn(F),T=b[M];typeof T!="string"&&typeof T!="number"&&(T=""+T),(D===0||D===1)&&(T==="__proto__"||T==="constructor")&&Ke(19),typeof F=="function"&&T==="prototype"&&Ke(19),F=Hd(F,T),typeof F!="object"&&Ke(18,b.join("/"))}let P=wn(F),I=y(R.value),q=b[b.length-1];switch(x){case t:switch(P){case 2:return F.set(q,I);case 3:Ke(16);default:return F[q]=I}case r:switch(P){case 1:return q==="-"?F.push(I):F.splice(q,0,I);case 2:return F.set(q,I);case 3:return F.add(I);default:return F[q]=I}case n:switch(P){case 1:return F.splice(q,1);case 2:return F.delete(q);case 3:return F.delete(R.value);default:return delete F[q]}default:Ke(17,x)}}),v}function y(v){if(!dt(v))return v;if(Array.isArray(v))return v.map(y);if(co(v))return new Map(Array.from(v.entries()).map(([R,b])=>[R,y(b)]));if(za(v))return new Set(Array.from(v).map(y));let C=Object.create(In(v));for(let R in v)C[R]=y(v[R]);return Ba(v,_a)&&(C[_a]=v[_a]),C}function A(v){return St(v)?y(v):v}QF("Patches",{applyPatches_:f,generatePatches_:o,generateReplacementPatches_:m})}var Ga=new $F,Cr=Ga.produce,fs=Ga.produceWithPatches.bind(Ga);var np=Ga.applyPatches.bind(Ga);l();s();u();c();function HF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function GF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function zF(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 Kg=e=>Array.isArray(e)?e:[e];function WF(e){let t=Array.isArray(e[0])?e[0]:e;return zF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YF(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var sQ=Symbol();var cQ=Object.getPrototypeOf({});var KF=class{constructor(e){this.value=e}deref(){return this.value}},JF=typeof WeakRef<"u"?WeakRef:KF,XF=0,Jg=1;function gs(){return{s:XF,v:void 0,o:null,p:null}}function uo(e,t={}){let r=gs(),{resultEqualityCheck:n}=t,o,a=0;function d(){let p=r,{length:m}=arguments;for(let A=0,v=m;A<v;A++){let C=arguments[A];if(typeof C=="function"||typeof C=="object"&&C!==null){let R=p.o;R===null&&(p.o=R=new WeakMap);let b=R.get(C);b===void 0?(p=gs(),R.set(C,p)):p=b}else{let R=p.p;R===null&&(p.p=R=new Map);let b=R.get(C);b===void 0?(p=gs(),R.set(C,p)):p=b}}let f=p,y;if(p.s===Jg)y=p.v;else if(y=e.apply(null,arguments),a++,n){let A=o?.deref?.()??o;A!=null&&n(A,y)&&(y=A,a!==0&&a--),o=typeof y=="object"&&y!==null||typeof y=="function"?new JF(y):y}return f.s=Jg,f.v=y,y}return d.clearCache=()=>{r=gs(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function Xg(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,d=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),HF(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let y={...r,...m},{memoize:A,memoizeOptions:v=[],argsMemoize:C=uo,argsMemoizeOptions:R=[],devModeChecks:b={}}=y,x=Kg(v),F=Kg(R),P=WF(o),I=A(function(){return a++,f.apply(null,arguments)},...x),q=!0,M=C(function(){d++;let T=YF(P,arguments);return p=I.apply(null,T),p},...F);return Object.assign(M,{resultFunc:f,memoizedResultFunc:I,dependencies:P,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:A,argsMemoize:C})};return Object.assign(n,{withTypes:()=>n}),n}var se=Xg(uo),ZF=Object.assign((e,t=se)=>{GF(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(a=>e[a]);return t(n,(...a)=>a.reduce((d,p,m)=>(d[r[m]]=p,d),{}))},{withTypes:()=>ZF});l();s();u();c();function Zg(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ey=Zg(),ty=Zg;var eI=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?so:so.apply(null,arguments)},IQ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},tI=e=>e&&typeof e.match=="function";function w(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Vt(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=>cs(n)&&n.type===e,r}var iy=class Wa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Wa.prototype)}static get[Symbol.species](){return Wa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Wa(...t[0].concat(this)):new Wa(...t.concat(this))}};function ry(e){return dt(e)?Cr(e,()=>{}):e}function ny(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function rI(e){return typeof e=="boolean"}var nI=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},d=new iy;return r&&(rI(r)?d.push(ey):d.push(ty(r.extraArgument))),d},Ya="RTK_autoBatch",po=()=>e=>({payload:e,meta:{[Ya]:!0}}),oy=e=>t=>{setTimeout(t,e)},oI=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,d=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:oy(10):e.type==="callback"?e.queueNotification:oy(e.timeout),f=()=>{d=!1,a&&(a=!1,p.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let A=()=>o&&y(),v=n.subscribe(A);return p.add(y),()=>{v(),p.delete(y)}},dispatch(y){try{return o=!y?.meta?.[Ya],a=!o,a&&(d||(d=!0,m(f))),n.dispatch(y)}finally{o=!0}}})},aI=e=>function(r){let{autoBatch:n=!0}=r??{},o=new iy(e);return n&&o.push(oI(typeof n=="object"?n:void 0)),o};function sy(e){let t=nI(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},p;if(typeof r=="function")p=r;else if(Ht(r))p=io(r);else throw new Error(Vt(1));let m;typeof n=="function"?m=n(t):m=t();let f=so;o&&(f=eI({trace:!1,...(typeof o=="object"&&o)}));let y=Mg(...m),A=aI(y),v=typeof d=="function"?d(A):A(),C=f(...v);return $d(p,a,C)}function cy(e){let t={},r=[],n,o={addCase(a,d){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Vt(28));if(p in t)throw new Error(Vt(29));return t[p]=d,o},addMatcher(a,d){return r.push({matcher:a,reducer:d}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function iI(e){return typeof e=="function"}function oe(e,t){let[r,n,o]=cy(t),a;if(iI(e))a=()=>ry(e());else{let p=ry(e);a=()=>p}function d(p=a(),m){let f=[r[m.type],...n.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return f.filter(y=>!!y).length===0&&(f=[o]),f.reduce((y,A)=>{if(A)if(St(y)){let C=A(y,m);return C===void 0?y:C}else{if(dt(y))return Cr(y,v=>A(v,m));{let v=A(y,m);if(v===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return y},p)}return d.getInitialState=a,d}var uy=(e,t)=>tI(e)?e.match(t):e(t);function Gt(...e){return t=>e.some(r=>uy(r,t))}function lo(...e){return t=>e.every(r=>uy(r,t))}function hs(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 Ka(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ss(...e){return e.length===0?t=>hs(t,["pending"]):Ka(e)?Gt(...e.map(t=>t.pending)):Ss()(e[0])}function En(...e){return e.length===0?t=>hs(t,["rejected"]):Ka(e)?Gt(...e.map(t=>t.rejected)):En()(e[0])}function Ja(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?lo(En(...e),t):Ka(e)?lo(En(...e),t):Ja()(e[0])}function Ar(...e){return e.length===0?t=>hs(t,["fulfilled"]):Ka(e)?Gt(...e.map(t=>t.fulfilled)):Ar()(e[0])}function Cs(...e){return e.length===0?t=>hs(t,["pending","fulfilled","rejected"]):Ka(e)?Gt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Cs()(e[0])}var sI="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",As=(e=21)=>{let t="",r=e;for(;r--;)t+=sI[Math.random()*64|0];return t},cI=["name","message","stack","code"],op=class{constructor(e,t){xe(this,"_type");this.payload=e,this.meta=t}},ay=class{constructor(e,t){xe(this,"_type");this.payload=e,this.meta=t}},uI=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of cI)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ee=(()=>{function e(t,r,n){let o=w(t+"/fulfilled",(m,f,y,A)=>({payload:m,meta:{...(A||{}),arg:y,requestId:f,requestStatus:"fulfilled"}})),a=w(t+"/pending",(m,f,y)=>({payload:void 0,meta:{...(y||{}),arg:f,requestId:m,requestStatus:"pending"}})),d=w(t+"/rejected",(m,f,y,A,v)=>({payload:A,error:(n&&n.serializeError||uI)(m||"Rejected"),meta:{...(v||{}),arg:y,requestId:f,rejectedWithValue:!!A,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m){return(f,y,A)=>{let v=n?.idGenerator?n.idGenerator(m):As(),C=new i.AbortController,R,b;function x(P){b=P,C.abort()}let F=_asyncToGenerator(function*(){let P;try{let q=n?.condition?.(m,{getState:y,extra:A});if(dI(q)&&(q=yield q),q===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((D,T)=>{R=()=>{T({name:"AbortError",message:b||"Aborted"})},C.signal.addEventListener("abort",R)});f(a(v,m,n?.getPendingMeta?.({requestId:v,arg:m},{getState:y,extra:A}))),P=yield Promise.race([M,Promise.resolve(r(m,{dispatch:f,getState:y,extra:A,requestId:v,signal:C.signal,abort:x,rejectWithValue:(D,T)=>new op(D,T),fulfillWithValue:(D,T)=>new ay(D,T)})).then(D=>{if(D instanceof op)throw D;return D instanceof ay?o(D.payload,v,m,D.meta):o(D,v,m)})])}catch(q){P=q instanceof op?d(null,v,m,q.payload,q.meta):d(q,v,m)}finally{R&&C.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&d.match(P)&&P.meta.condition||f(P),P})();return Object.assign(F,{abort:x,requestId:v,arg:m,unwrap(){return F.then(lI)}})}}return Object.assign(p,{pending:a,rejected:d,fulfilled:o,settled:Gt(d,o),typePrefix:t})}return e.withTypes=()=>e,e})();function lI(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function dI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ly=Symbol.for("rtk-slice-createasyncthunk"),TQ={[ly]:ee};function pI(e,t){return`${e}/${t}`}function mI({creators:e}={}){let t=e?.asyncThunk?.[ly];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Vt(11));typeof process<"u";let d=(typeof n.reducers=="function"?n.reducers(gI()):n.reducers)||{},p=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(P,I){let q=typeof P=="string"?P:P.type;if(!q)throw new Error(Vt(12));if(q in m.sliceCaseReducersByType)throw new Error(Vt(13));return m.sliceCaseReducersByType[q]=I,f},addMatcher(P,I){return m.sliceMatchers.push({matcher:P,reducer:I}),f},exposeAction(P,I){return m.actionCreators[P]=I,f},exposeCaseReducer(P,I){return m.sliceCaseReducersByName[P]=I,f}};p.forEach(P=>{let I=d[P],q={reducerName:P,type:pI(o,P),createNotation:typeof n.reducers=="function"};hI(I)?CI(q,I,f,t):yI(q,I,f)});function y(){let[P={},I=[],q=void 0]=typeof n.extraReducers=="function"?cy(n.extraReducers):[n.extraReducers],M={...P,...m.sliceCaseReducersByType};return oe(n.initialState,D=>{for(let T in M)D.addCase(T,M[T]);for(let T of m.sliceMatchers)D.addMatcher(T.matcher,T.reducer);for(let T of I)D.addMatcher(T.matcher,T.reducer);q&&D.addDefaultCase(q)})}let A=P=>P,v=new Map,C;function R(P,I){return C||(C=y()),C(P,I)}function b(){return C||(C=y()),C.getInitialState()}function x(P,I=!1){function q(D){let T=D[P];return typeof T>"u"&&I&&(T=b()),T}function M(D=A){let T=ny(v,I,()=>new WeakMap);return ny(T,D,()=>{let O={};for(let[j,Q]of Object.entries(n.selectors??{}))O[j]=fI(Q,D,b,I);return O})}return{reducerPath:P,getSelectors:M,get selectors(){return M(q)},selectSlice:q}}let F={name:o,reducer:R,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:b,...x(a),injectInto(P,{reducerPath:I,...q}={}){let M=I??a;return P.inject({reducerPath:M,reducer:R},q),{...F,...x(M,!0)}}};return F}}function fI(e,t,r,n){function o(a,...d){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...d)}return o.unwrapped=e,o}var qn=mI();function gI(){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 yI({type:e,reducerName:t,createNotation:r},n,o){let a,d;if("reducer"in n){if(r&&!SI(n))throw new Error(Vt(17));a=n.reducer,d=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?w(e,d):w(e))}function hI(e){return e._reducerDefinitionType==="asyncThunk"}function SI(e){return e._reducerDefinitionType==="reducerWithPrepare"}function CI({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:d,pending:p,rejected:m,settled:f,options:y}=r,A=o(e,a,y);n.exposeAction(t,A),d&&n.addCase(A.fulfilled,d),p&&n.addCase(A.pending,p),m&&n.addCase(A.rejected,m),f&&n.addMatcher(A.settled,f),n.exposeCaseReducer(t,{fulfilled:d||ys,pending:p||ys,rejected:m||ys,settled:f||ys})}function ys(){}var dy="listener",py="completed",my="cancelled",kQ=`task-${my}`,OQ=`task-${py}`,DQ=`${dy}-${my}`,jQ=`${dy}-${py}`;var{assign:fy}=Object;var ap="listenerMiddleware";var AI=fy(w(`${ap}/add`),{withTypes:()=>AI}),VQ=w(`${ap}/removeAll`),vI=fy(w(`${ap}/remove`),{withTypes:()=>vI});var NQ=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();var gy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function RI(e){return typeof e=="string"&&gy.test(e)}var ip=RI;l();s();u();c();var Je=[];for(let e=0;e<256;++e)Je.push((e+256).toString(16).slice(1));function yy(e,t=0){return(Je[e[t+0]]+Je[e[t+1]]+Je[e[t+2]]+Je[e[t+3]]+"-"+Je[e[t+4]]+Je[e[t+5]]+"-"+Je[e[t+6]]+Je[e[t+7]]+"-"+Je[e[t+8]]+Je[e[t+9]]+"-"+Je[e[t+10]]+Je[e[t+11]]+Je[e[t+12]]+Je[e[t+13]]+Je[e[t+14]]+Je[e[t+15]]).toLowerCase()}l();s();u();c();var sp,xI=new Uint8Array(16);function cp(){if(!sp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sp=crypto.getRandomValues.bind(crypto)}return sp(xI)}l();s();u();c();l();s();u();c();var bI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),up={randomUUID:bI};function FI(e,t,r){if(up.randomUUID&&!t&&!e)return up.randomUUID();e=e||{};let n=e.random??e.rng?.()??cp();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return yy(n)}var lp=FI;l();s();u();c();function hy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function II({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:d}=e;d!=="disabled"&&(n.call(r),t.send(o,a,r))}var Sy="visitorId";function wI(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Sy),o=n&&ip(n)?n:t.generateUUID();return r.setItem(Sy,o),o}}}var xy="1.2.6",dp=128,by=192,Cy=224,Ay=240,PI=248;function EI(e){return(e&PI)===Ay?4:(e&Ay)===Cy?3:(e&Cy)===by?2:1}function qI(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&dp)!=dp)break;if(r-=3,(n&by)!=dp){t-r>=EI(n)*3&&(r=t);break}}return e.substring(0,r)}function TI(e){let{trackingId:t}=e;return{trackingId:t}}function kI(e){return(e.source||[]).concat([`relay@${xy}`])}function Fy(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:d}=r,p=TI(t),m=n.getClientId();return Object.freeze({type:e,config:p,ts:Date.now(),source:kI(t),clientId:m,userAgent:d(),referrer:vy(o()),location:vy(a())})}function vy(e){return e!==null?qI(e,1024):null}function OI(e,t,r,n,o){return{...t,meta:Fy(e,r,n,o)}}var DI="*";function jI(){let e=[];function t({type:m,callback:f}){return e.findIndex(y=>y.type===m&&y.callback===f)}function r(m,f){return m.type==="*"||f===m.type}function n(m){return t(m)<0&&e.push(m),()=>p(m.type,m.callback)}function o(m){e.forEach(f=>{if(r(f,m.meta.type))try{f.callback(m)}catch(y){console.error(y)}})}function a(m){if(m===DI)e.length=0;else for(let f=e.length-1;f>=0;f--)e[f].type===m&&e.splice(f,1)}function d(m){let f=t(m);f>=0&&e.splice(f,1)}function p(m,f){f?d({type:m,callback:f}):a(m)}return{add:n,call:o,remove:p}}function Ry({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function VI(e){let t=Ry(e);return{get:()=>t,update:r=>{t=Ry({...t,...r})}}}var pp=NI();function NI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let d=a.replace(/^\s+/,"");if(d.lastIndexOf(n,0)===0)return d.substring(n.length,d.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),d=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${d}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function MI(){return{getItem(e){return pp.getItem(e)||localStorage.getItem(e)},removeItem(e){pp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),pp.setItem(e,t,31556952e3)}}}function QI(){let e=document.referrer;return e===""?null:e}function LI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(hy().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>QI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>lp(),storage:MI()}}function _I(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function UI(){return{getItem(){return null},removeItem(){},setItem(){}}}function BI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:UI()}}function $I(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=BI();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&HI()&&_I()?LI():n}function HI(){try{return typeof window=="object"}catch{return!1}}function GI(e){return{get:()=>Object.freeze($I(e))}}function Iy(e){let t=VI(e),r=jI(),n=GI(t),o=wI(n);return{emit:(a,d)=>{let p=t.get(),m=n.get(),f=OI(a,d,p,m,o);return II({config:p,environment:m,event:f,listenerManager:r})},getMeta:a=>Fy(a,t.get(),n.get(),o),on:(a,d)=>r.add({type:a,callback:d}),off:(a,d)=>r.remove(a,d),updateConfig:a=>t.update(a),version:xy}}l();s();u();c();l();s();u();c();var mo="3.29.3-pre.8a67bd16aa",wy=["@coveo/atomic","@coveo/quantic"];var Nr=se(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${mo}`));var Xa=se(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Nr(e.configuration.analytics),(e,t)=>zI(t),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},d,p)=>Iy({mode:a?"emit":"disabled",url:o??os(e,t),token:r,trackingId:n??null,source:d,environment:p})),zI=e=>{if(!e)return;let t=e();return{getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent,generateUUID:()=>t.clientId}};l();s();u();c();l();s();u();c();function zt(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 V(e,t,r,n){function o(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function p(y){try{f(n.next(y))}catch(A){d(A)}}function m(y){try{f(n.throw(y))}catch(A){d(A)}}function f(y){y.done?a(y.value):o(y.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var Ce;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Ce||(Ce={}));function gp(){return typeof window<"u"}function Ep(){return typeof navigator<"u"}function fo(){return typeof document<"u"}function yp(){try{return typeof localStorage<"u"}catch{return!1}}function WI(){try{return typeof sessionStorage<"u"}catch{return!1}}function Ly(){return Ep()&&navigator.cookieEnabled}var YI=[Ce.click,Ce.custom,Ce.search,Ce.view],KI=(e,t)=>YI.indexOf(e)!==-1?Object.assign({language:fo()?document.documentElement.lang:"unknown",userAgent:Ep()?navigator.userAgent:"unknown"},t):t,ei=class e{static set(t,r,n){var o,a,d,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?Py(t,r,a):(d=p.split("."),o=d[d.length-2]+"."+d[d.length-1],Py(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Py(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function JI(){return yp()?localStorage:Ly()?new ti:WI()?sessionStorage:new yo}var ti=class e{getItem(t){return ei.get(`${e.prefix}${t}`)}removeItem(t){ei.erase(`${e.prefix}${t}`)}setItem(t,r,n){ei.set(`${e.prefix}${t}`,r,n)}};ti.prefix="coveo_";var hp=class{constructor(){this.cookieStorage=new ti}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)}},yo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},vs="__coveo.analytics.history",XI=20,ZI=1e3*60,ew=75,bs=class{constructor(t){this.store=t||JI()}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 V(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 V(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(vs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return V(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(vs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(vs,JSON.stringify(t.slice(0,XI)))}catch{}}clear(){try{this.store.removeItem(vs)}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,ew)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ZI:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}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 tw=(e,t)=>V(void 0,void 0,void 0,function*(){return e===Ce.view?(yield rw(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),rw=e=>V(void 0,void 0,void 0,function*(){let t=new bs,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Rs,nw=new Uint8Array(16);function ow(){if(!Rs&&(Rs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rs(nw)}var aw=/^(?:[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 Fs(e){return typeof e=="string"&&aw.test(e)}var Xe=[];for(let e=0;e<256;++e)Xe.push((e+256).toString(16).slice(1));function _y(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 iw(e){if(!Fs(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 sw(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var cw="6ba7b810-9dad-11d1-80b4-00c04fd430c8",uw="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function lw(e,t,r){function n(o,a,d,p){var m;if(typeof o=="string"&&(o=sw(o)),typeof a=="string"&&(a=iw(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,d){p=p||0;for(let y=0;y<16;++y)d[p+y]=f[y];return d}return _y(f)}try{n.name=e}catch{}return n.DNS=cw,n.URL=uw,n}var dw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ey={randomUUID:dw};function Tn(e,t,r){if(Ey.randomUUID&&!t&&!e)return Ey.randomUUID();e=e||{};let n=e.random||(e.rng||ow)();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 _y(n)}function pw(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 mp(e,t){return e<<t|e>>>32-t}function mw(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let p=0;p<d.length;++p)e.push(d.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let d=0;d<o;++d){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[d*64+m*4]<<24|e[d*64+m*4+1]<<16|e[d*64+m*4+2]<<8|e[d*64+m*4+3];a[d]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let d=0;d<o;++d){let p=new Uint32Array(80);for(let C=0;C<16;++C)p[C]=a[d][C];for(let C=16;C<80;++C)p[C]=mp(p[C-3]^p[C-8]^p[C-14]^p[C-16],1);let m=r[0],f=r[1],y=r[2],A=r[3],v=r[4];for(let C=0;C<80;++C){let R=Math.floor(C/20),b=mp(m,5)+pw(R,f,y,A)+v+t[R]+p[C]>>>0;v=A,A=y,y=mp(f,30)>>>0,f=m,m=b}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+A>>>0,r[4]=r[4]+v>>>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 fw=lw("v5",80,mw),qy=fw,Uy="2.30.45",Ty=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Za={pageview:"pageview",event:"event"},Is=class{constructor({client:t,uuidGenerator:r=Tn}){this.client=t,this.uuidGenerator=r}},Sp=class extends Is{constructor({client:t,uuidGenerator:r=Tn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ty(window.location),this.lastReferrer=fo()?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:fo()?document.title:"",encoding:fo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Za.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Za.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Za.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Za.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 Ty(window.location)}},Mr=class e{constructor(t,r){if(!Fs(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 a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Fs(a)?new e(a,Number.parseInt(o)*1e3):null}};Mr.cvo_cid="cvo_cid";Mr.expirationTime=120;var Cp=class extends Is{constructor({client:t,uuidGenerator:r=Tn}){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 V(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(Mr.cvo_cid,new Mr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Cp.Id="link";var wt=Object.keys;function xs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var fp=128,By=192,ky=224,Oy=240;function gw(e){return(e&248)===Oy?4:(e&Oy)===ky?3:(e&ky)===By?2:1}function yw(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&fp)!=fp)break;if(r-=3,(n&By)!=fp){t-r>=gw(n)*3&&(r=t);break}}return e.substring(0,r)}var Ap={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"},hw=wt(Ap).map(e=>Ap[e]),Sw=[...hw].join("|"),Cw=new RegExp(`^(${Sw}$)`),Aw={svcAction:"svc_action",svcActionData:"svc_action_data"},vw=e=>wt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Ap[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Rw=e=>Cw.test(e),xw=[Rw],Dy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},jy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},tt={action:"pa",list:"pal",listSource:"pls"},ws={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},bw=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],vp={id:"quoteId",affiliation:"quoteAffiliation"},Rp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Fw={add:tt,bookmark_add:tt,bookmark_remove:tt,click:tt,checkout:tt,checkout_option:tt,detail:tt,impression:tt,remove:tt,refund:Object.assign(Object.assign({},tt),ws),purchase:Object.assign(Object.assign({},tt),ws),quickview:tt,quote:Object.assign(Object.assign({},tt),vp),review:Object.assign(Object.assign({},tt),Rp)},Iw=wt(Dy).map(e=>Dy[e]),ww=wt(jy).map(e=>jy[e]),Pw=wt(tt).map(e=>tt[e]),Ew=wt(ws).map(e=>ws[e]),qw=wt(Rp).map(e=>Rp[e]),Tw=wt(vp).map(e=>vp[e]),kw=[...Iw,"custom"].join("|"),Ow=[...ww,"custom"].join("|"),$y="(pr[0-9]+)",Hy="(il[0-9]+pi[0-9]+)",Dw=new RegExp(`^${$y}(${kw})$`),jw=new RegExp(`^(${Hy}(${Ow}))|(il[0-9]+nm)$`),Vw=new RegExp(`^(${Pw.join("|")})$`),Nw=new RegExp(`^(${Ew.join("|")})$`),Mw=new RegExp(`^${$y}custom$`),Qw=new RegExp(`^${Hy}custom$`),Lw=new RegExp(`^(${[...bw,...qw,...Tw].join("|")})$`),_w=e=>Dw.test(e),Uw=e=>jw.test(e),Bw=e=>Vw.test(e),$w=e=>Nw.test(e),Hw=e=>Lw.test(e),Gw=[Uw,_w,Bw,$w,Hw],zw=[Mw,Qw],Ww={anonymizeIp:"aip"},Yw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Kw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Jw=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Xw=Object.assign(Object.assign(Object.assign(Object.assign({},Ww),Yw),Kw),Jw.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xp=Object.assign(Object.assign({},Xw),Aw),Zw=e=>{let t=!!e.action&&Fw[e.action]||{};return wt(e).reduce((r,n)=>{let o=t[n]||xp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},eP=wt(xp).map(e=>xp[e]),tP=e=>eP.indexOf(e)!==-1,rP=e=>e==="custom",nP=e=>[...Gw,...xw,tP,rP].some(t=>t(e)),oP=e=>wt(e).reduce((t,r)=>{let n=aP(r);return n?Object.assign(Object.assign({},t),iP(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),aP=e=>{let t;return[...zw].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},iP=(e,t)=>wt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),bp=class{constructor(t){this.opts=t}sendEvent(t,r){return V(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,a=yield this.getQueryParamsForEventType(t),{url:d,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return V(this,void 0,void 0,function*(){let o=t,a=r;if(n){let d=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=d;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return V(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(a=>!!a).join("&")})}isEventTypeLegacy(t){return[Ce.click,Ce.custom,Ce.search,Ce.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}},Fp=class{sendEvent(t,r){return V(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return V(this,void 0,void 0,function*(){return Promise.resolve()})}},Vy=g.fetch,Ps=class{constructor(t){this.opts=t}sendEvent(t,r){return V(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,y=zt(m,["url"]),A;try{A=yield Vy(f,y)}catch(v){console.error("An error has occured when sending the event.",v);return}if(A.ok){let v=yield A.json();return v.visitorId&&o.setCurrentVisitorId(v.visitorId),v}else{try{A.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,A,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return V(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Vy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Ce.click,Ce.custom,Ce.search,Ce.view].indexOf(t)!==-1}getVisitorIdParam(){return V(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"})}},Ip=class{constructor(t,r){yp()&&Ly()?this.storage=new hp:yp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new yo),this.client=new Ps(t),this.beaconClient=new bp(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},wp=class{constructor(t,r){this.storage=r||new yo,this.client=new Ps(t)}getClientDependingOnEventType(t){return this.client}},Es=class{constructor(){this.storage=new yo,this.client=new Fp}getClientDependingOnEventType(t){return this.client}},sP="xx",cP=e=>e?.startsWith(sP)||!1,uP=`
27
+ ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":Ub(y,n,t);break}}}}function Ub(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Bb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function og(){return{data:"",event:"",id:"",retry:void 0}}var Id="text/event-stream",$b=1e3,cg="last-event-id";function ug(){return typeof window<"u"}function es(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:d,openWhenHidden:p,fetch:m,...f}){return new Promise((y,A)=>{let v={...r};v.accept||(v.accept=Id);let C;function R(){C?.abort(),document.hidden||q()}!p&&ug()&&document.addEventListener("visibilitychange",R);let b=$b,x;function F(){ug()&&document.removeEventListener("visibilitychange",R),clearTimeout(x),C?.abort()}t?.addEventListener("abort",()=>{F(),y()});let P=m??h,I=n??Hb;function q(){return _q2.apply(this,arguments)}function _q2(){_q2=_asyncToGenerator(function*(){C=i.AbortController?new i.AbortController:null;try{let M=yield P(e,{...f,headers:v,signal:C?.signal});yield I(M),yield ag(M.body,ig(sg(D=>{D?v[cg]=D:delete v[cg]},D=>{b=D},o))),a?.(),F(),y()}catch(M){if(!C?.signal?.aborted)try{let D=d?.(M)??b;clearTimeout(x),x=setTimeout(q,D)}catch(D){F(),A(D)}}});return _q2.apply(this,arguments)}q()})}function Hb(e){let t=e.headers.get("content-type");if(!t?.startsWith(Id))throw new Error(`Expected content-type to be ${Id}, Actual: ${t}`)}l();s();u();c();var jr=class{constructor(t){xe(this,"_basePath");xe(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}};var Gb=(e,t,r)=>new jr(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,lg=3,zb=5e3,Wb="text/event-stream",Ed=1,wd=class extends Error{},Va=class extends Error{constructor(r){super(r.message);this.payload=r}},Pd=class{constructor(){xe(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},ts=class{constructor(t){xe(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:d}=t,{write:p,abort:m,close:f,resetAnswer:y}=r,A=new Pd;if(!a){this.logger.error("No stream ID found");return}let v=0,C,R=()=>{C&&!A.isActive(C)&&(x?.abort(),y(),F())},b=()=>{A.remove(C),C=ng(R,C,zb),A.add(C)},x=new i.AbortController,F=()=>es(Gb(n,o,a),{method:"GET",fetch:h,headers:{Authorization:`Bearer ${d}`,accept:"*/*"},openWhenHidden:!0,signal:x?.signal,onopen(P){return _asyncToGenerator(function*(){if(P.ok&&P.headers.get("content-type")===Wb)return;throw P.status>=400&&P.status<500&&P.status!==429?new Va({message:"Error opening stream",code:P.status}):new wd})()},onmessage:P=>{if(x?.signal.aborted)return;let I=JSON.parse(P.data);if(I.finishReason==="ERROR"){A.remove(C),x?.abort(),m({message:I.errorMessage,code:I.statusCode});return}p(I),v=0,I.finishReason==="COMPLETED"?(A.remove(C),f()):b()},onerror:P=>{if(!x?.signal.aborted){if(A.remove(C),P instanceof Va)throw x?.abort(),m(P),P;if(++v>lg){this.logger.info("Maximum retry exceeded.");let I={message:"Failed to complete stream.",code:Ed};throw x?.abort(),m(I),new Va(I)}this.logger.info(`Retrying...(${v}/${lg})`),y()}}});return F(),x}};l();s();u();c();var rs=e=>e;l();s();u();c();l();s();u();c();var Rg=Ot(Sg(),1);l();s();u();c();var re=new Error("Failed to load reducers."),oo=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},xn=class extends Error{constructor(r,n){super();xe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();s();u();c();function Cg(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ag(e){return typeof e!="object"||!e?!1:Object.values(e).every(AF)}function AF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function vg(e){return e===429}var Dt=class e{static call(t){return _asyncToGenerator(function*(){let r=vF(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...d}=o,p=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield h(a,d);if(vg(m.status))throw m;return m});return function p(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Rg.backOff)(p,{retry:f=>{let y=f&&vg(f.status);return y&&n.info("Platform retrying request"),y}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new oo;case 404:throw new xn(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new xn(a):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:d}=r,{signal:p,...m}=t,f=ja(m);try{let y=yield o(t,n,d);return{...t,...y}}catch(y){a.error(y,"Platform request preprocessing failed. Returning default request options.")}return f})()}};function ke(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ut(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function os(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function vF(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:d}=e,p=e.method==="POST"||e.method==="PUT",m=RF(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:m}),signal:d}}function RF(e,t){return t==="application/x-www-form-urlencoded"?Ag(e)?Cg(e):"":JSON.stringify(e)}l();s();u();c();l();s();u();c();function Qa(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var Md=e=>{let{response:t}=e;return t.body?xF(e):bF(t)},xF=e=>IF(e)?wF(e):FF(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},bF=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function FF(e){return e.body.statusCode!==void 0}function IF(e){return e.body.exception!==void 0}var wF=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();s();u();c();function xg(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();s();u();c();var Qd=(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 bg=(e,t)=>{let r=new jr(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Ld=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield Dt.call({...Qd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Qa(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=xg(r),o=yield r.arrayBuffer(),d=new TextDecoder(n).decode(o);return PF(d)?{success:d}:{error:Md({response:r,body:d})}});return function Ld(_x4,_x5){return _ref2.apply(this,arguments)}}();function PF(e){return typeof e=="string"}l();s();u();c();l();s();u();c();function ao(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ao(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ao(),extendedResults:{},searchAction:void 0}}l();s();u();c();l();s();u();c();function EF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function qF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function bn(e,t){if(t&&e.name==="AbortError")return{error:qF(e)};if(e instanceof xn)return{error:EF(e)};throw e}var Vr=e=>e.success!==void 0,we=e=>e.error!==void 0;function Fg(e){return e.results!==void 0}function Ig(e){let t=ao();return K(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}l();s();u();c();l();s();u();c();var _d=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,TF=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,La=(e,t,r,n)=>{kF(e);let o=_d(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},wg=(e,t,r)=>{OF(e);let n=TF(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Ud=e=>{let{insightId:t,...r}=Qa(e);return r},Pg=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},kF=e=>{if(Pg(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},OF=e=>{if(Pg(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var Eg=e=>({...La(e,"GET","application/json","/interface"),requestParams:{}});l();s();u();c();var qg=e=>({...La(e,"POST","application/json","/search"),requestParams:Ud(e)}),Tg=e=>({...La(e,"POST","application/json","/querysuggest"),requestParams:Ud(e)});l();s();u();c();var kg=e=>({...wg(e,"POST","application/json"),requestParams:{objectId:e.userId}});var as=class{constructor(t){this.options=t}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...Eg(t),..._this.options});if(r instanceof Error)return bn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}query(t,r){var _this2=this;return _asyncToGenerator(function*(){let n=yield Dt.call({...qg(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return bn(n);let o=yield n.json();return Fg(o)&&(o=Ig(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...Tg(t),..._this3.options});if(r instanceof Error)return bn(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Dt.call({...kg(t),..._this4.options});if(r instanceof Error)return bn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return Ld(t,{..._this5.options})})()}};l();s();u();c();l();s();u();c();var B=new N({required:!0,emptyAllowed:!1}),be=new N({required:!1,emptyAllowed:!1}),Pe=new N({required:!0,emptyAllowed:!0}),Og=new N({required:!1,emptyAllowed:!0}),is=new te({each:B,required:!0}),Dg=new N({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),jg=new N({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),$0=new N({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),jt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ft=(e,t)=>{if("required"in t)return{payload:new Se({value:t}).validate({value:e}).value};let o=new U({options:{required:!0},values:t}).validate(e);if(o)throw new vn(o);return{payload:e}},E=(e,t)=>{try{return Ft(e,t)}catch(r){return{payload:e,error:jt(r)}}},$t=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Vg(e,t,r,o,"Controller initialization error")},He=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Vg(e,t,r,o,"Controller initialization error")},Vg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};l();s();u();c();l();s();u();c();l();s();u();c();function Ye(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 DF=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ng=DF,Bd=()=>Math.random().toString(36).substring(7).split("").join("."),jF={INIT:`@@redux/INIT${Bd()}`,REPLACE:`@@redux/REPLACE${Bd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bd()}`},ss=jF;function Ht(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 $d(e,t,r){if(typeof e!="function")throw new Error(Ye(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ye(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ye(1));return r($d)(e,t)}let n=e,o=t,a=new Map,d=a,p=0,m=!1;function f(){d===a&&(d=new Map,a.forEach((x,F)=>{d.set(F,x)}))}function y(){if(m)throw new Error(Ye(3));return o}function A(x){if(typeof x!="function")throw new Error(Ye(4));if(m)throw new Error(Ye(5));let F=!0;f();let P=p++;return d.set(P,x),function(){if(F){if(m)throw new Error(Ye(6));F=!1,f(),d.delete(P),a=null}}}function v(x){if(!Ht(x))throw new Error(Ye(7));if(typeof x.type>"u")throw new Error(Ye(8));if(typeof x.type!="string")throw new Error(Ye(17));if(m)throw new Error(Ye(9));try{m=!0,o=n(o,x)}finally{m=!1}return(a=d).forEach(P=>{P()}),x}function C(x){if(typeof x!="function")throw new Error(Ye(10));n=x,v({type:ss.REPLACE})}function R(){let x=A;return{subscribe(F){if(typeof F!="object"||F===null)throw new Error(Ye(11));function P(){let q=F;q.next&&q.next(y())}return P(),{unsubscribe:x(P)}},[Ng](){return this}}}return v({type:ss.INIT}),{dispatch:v,subscribe:A,getState:y,replaceReducer:C,[Ng]:R}}function VF(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:ss.INIT})>"u")throw new Error(Ye(12));if(typeof r(void 0,{type:ss.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ye(13))})}function io(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let p=t[d];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{VF(r)}catch(d){a=d}return function(p={},m){if(a)throw a;let f=!1,y={};for(let A=0;A<n.length;A++){let v=n[A],C=r[v],R=p[v],b=C(R,m);if(typeof b>"u"){let x=m&&m.type;throw new Error(Ye(14))}y[v]=b,f=f||b!==R}return f=f||n.length!==Object.keys(p).length,f?y:p}}function so(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Mg(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Ye(15))},d={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(d));return a=so(...p)(o.dispatch),{...o,dispatch:a}}}function cs(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}l();s();u();c();var ep=Symbol.for("immer-nothing"),_a=Symbol.for("immer-draftable"),lt=Symbol.for("immer-state");function Ke(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var In=Object.getPrototypeOf;function St(e){return!!e&&!!e[lt]}function dt(e){return e?Bg(e)||Array.isArray(e)||!!e[_a]||!!e.constructor?.[_a]||co(e)||za(e):!1}var NF=Object.prototype.constructor.toString();function Bg(e){if(!e||typeof e!="object")return!1;let t=In(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)===NF}function tp(e){return St(e)||Ke(15,e),e[lt].base_}function Ua(e,t){wn(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function wn(e){let t=e[lt];return t?t.type_:Array.isArray(e)?1:co(e)?2:za(e)?3:0}function Ba(e,t){return wn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hd(e,t){return wn(e)===2?e.get(t):e[t]}function $g(e,t,r){let n=wn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function MF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function co(e){return e instanceof Map}function za(e){return e instanceof Set}function Fn(e){return e.copy_||e.base_}function Wd(e,t){if(co(e))return new Map(e);if(za(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Bg(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[lt];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let d=o[a],p=n[d];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(n[d]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[d]})}return Object.create(In(e),n)}else{let n=In(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function ps(e,t=!1){return ms(e)||St(e)||!dt(e)||(wn(e)>1&&Object.defineProperties(e,{set:{value:us},add:{value:us},clear:{value:us},delete:{value:us}}),Object.freeze(e),t&&Object.values(e).forEach(r=>ps(r,!0))),e}function us(){Ke(2)}function ms(e){return Object.isFrozen(e)}var Yd={};function Pn(e){let t=Yd[e];return t||Ke(0,e),t}function QF(e,t){Yd[e]||(Yd[e]=t)}var $a;function Hg(){return $a}function LF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qg(e,t){t&&(Pn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kd(e){Jd(e),e.drafts_.forEach(_F),e.drafts_=null}function Jd(e){e===$a&&($a=e.parent_)}function Lg(e){return $a=LF($a,e)}function _F(e){let t=e[lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _g(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[lt].modified_&&(Kd(t),Ke(4)),dt(e)&&(e=ls(t,e),t.parent_||ds(t,e)),t.patches_&&Pn("Patches").generateReplacementPatches_(r[lt].base_,e,t.patches_,t.inversePatches_)):e=ls(t,r,[]),Kd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ep?e:void 0}function ls(e,t,r){if(ms(t))return t;let n=t[lt];if(!n)return Ua(t,(o,a)=>Ug(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ds(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,d=!1;n.type_===3&&(a=new Set(o),o.clear(),d=!0),Ua(a,(p,m)=>Ug(e,n,o,p,m,r,d)),ds(e,o,!1),r&&e.patches_&&Pn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Ug(e,t,r,n,o,a,d){if(St(o)){let p=a&&t&&t.type_!==3&&!Ba(t.assigned_,n)?a.concat(n):void 0,m=ls(e,o,p);if($g(r,n,m),St(m))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(dt(o)&&!ms(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ls(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(co(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ds(e,o)}}function ds(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ps(t,r)}function UF(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Hg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=rp;r&&(o=[n],a=Ha);let{revoke:d,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=d,p}var rp={get(e,t){if(t===lt)return e;let r=Fn(e);if(!Ba(r,t))return BF(e,r,t);let n=r[t];return e.finalized_||!dt(n)?n:n===Gd(e.base_,t)?(zd(e),e.copy_[t]=Zd(n,e)):n},has(e,t){return t in Fn(e)},ownKeys(e){return Reflect.ownKeys(Fn(e))},set(e,t,r){let n=Gg(Fn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Gd(Fn(e),t),a=o?.[lt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(MF(r,o)&&(r!==void 0||Ba(e.base_,t)))return!0;zd(e),Xd(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zd(e),Xd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Fn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ke(11)},getPrototypeOf(e){return In(e.base_)},setPrototypeOf(){Ke(12)}},Ha={};Ua(rp,(e,t)=>{Ha[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ha.deleteProperty=function(e,t){return Ha.set.call(this,e,t,void 0)};Ha.set=function(e,t,r){return rp.set.call(this,e[0],t,r,e[0])};function Gd(e,t){let r=e[lt];return(r?Fn(r):e)[t]}function BF(e,t,r){let n=Gg(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Gg(e,t){if(!(t in e))return;let r=In(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=In(r)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function zd(e){e.copy_||(e.copy_=Wd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $F=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let d=this;return function(m=a,...f){return d.produce(m,y=>r.call(this,y,...f))}}typeof r!="function"&&Ke(6),n!==void 0&&typeof n!="function"&&Ke(7);let o;if(dt(t)){let a=Lg(this),d=Zd(t,void 0),p=!0;try{o=r(d),p=!1}finally{p?Kd(a):Jd(a)}return Qg(a,n),_g(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ep&&(o=void 0),this.autoFreeze_&&ps(o,!0),n){let a=[],d=[];Pn("Patches").generateReplacementPatches_(t,o,a,d),n(a,d)}return o}else Ke(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...p)=>this.produceWithPatches(d,m=>t(m,...p));let n,o;return[this.produce(t,r,(d,p)=>{n=d,o=p}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){dt(e)||Ke(8),St(e)&&(e=zg(e));let t=Lg(this),r=Zd(e,void 0);return r[lt].isManual_=!0,Jd(t),r}finishDraft(e,t){let r=e&&e[lt];(!r||!r.isManual_)&&Ke(9);let{scope_:n}=r;return Qg(n,t),_g(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=Pn("Patches").applyPatches_;return St(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zd(e,t){let r=co(e)?Pn("MapSet").proxyMap_(e,t):za(e)?Pn("MapSet").proxySet_(e,t):UF(e,t);return(t?t.scope_:Hg()).drafts_.push(r),r}function zg(e){return St(e)||Ke(10,e),Wg(e)}function Wg(e){if(!dt(e)||ms(e))return e;let t=e[lt],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Wd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Wd(e,!0);return Ua(r,(n,o)=>{$g(r,n,Wg(o))}),t&&(t.finalized_=!1),r}function Yg(){let t="replace",r="add",n="remove";function o(v,C,R,b){switch(v.type_){case 0:case 2:return d(v,C,R,b);case 1:return a(v,C,R,b);case 3:return p(v,C,R,b)}}function a(v,C,R,b){let{base_:x,assigned_:F}=v,P=v.copy_;P.length<x.length&&([x,P]=[P,x],[R,b]=[b,R]);for(let I=0;I<x.length;I++)if(F[I]&&P[I]!==x[I]){let q=C.concat([I]);R.push({op:t,path:q,value:A(P[I])}),b.push({op:t,path:q,value:A(x[I])})}for(let I=x.length;I<P.length;I++){let q=C.concat([I]);R.push({op:r,path:q,value:A(P[I])})}for(let I=P.length-1;x.length<=I;--I){let q=C.concat([I]);b.push({op:n,path:q})}}function d(v,C,R,b){let{base_:x,copy_:F}=v;Ua(v.assigned_,(P,I)=>{let q=Hd(x,P),M=Hd(F,P),D=I?Ba(x,P)?t:r:n;if(q===M&&D===t)return;let T=C.concat(P);R.push(D===n?{op:D,path:T}:{op:D,path:T,value:M}),b.push(D===r?{op:n,path:T}:D===n?{op:r,path:T,value:A(q)}:{op:t,path:T,value:A(q)})})}function p(v,C,R,b){let{base_:x,copy_:F}=v,P=0;x.forEach(I=>{if(!F.has(I)){let q=C.concat([P]);R.push({op:n,path:q,value:I}),b.unshift({op:r,path:q,value:I})}P++}),P=0,F.forEach(I=>{if(!x.has(I)){let q=C.concat([P]);R.push({op:r,path:q,value:I}),b.unshift({op:n,path:q,value:I})}P++})}function m(v,C,R,b){R.push({op:t,path:[],value:C===ep?void 0:C}),b.push({op:t,path:[],value:v})}function f(v,C){return C.forEach(R=>{let{path:b,op:x}=R,F=v;for(let M=0;M<b.length-1;M++){let D=wn(F),T=b[M];typeof T!="string"&&typeof T!="number"&&(T=""+T),(D===0||D===1)&&(T==="__proto__"||T==="constructor")&&Ke(19),typeof F=="function"&&T==="prototype"&&Ke(19),F=Hd(F,T),typeof F!="object"&&Ke(18,b.join("/"))}let P=wn(F),I=y(R.value),q=b[b.length-1];switch(x){case t:switch(P){case 2:return F.set(q,I);case 3:Ke(16);default:return F[q]=I}case r:switch(P){case 1:return q==="-"?F.push(I):F.splice(q,0,I);case 2:return F.set(q,I);case 3:return F.add(I);default:return F[q]=I}case n:switch(P){case 1:return F.splice(q,1);case 2:return F.delete(q);case 3:return F.delete(R.value);default:return delete F[q]}default:Ke(17,x)}}),v}function y(v){if(!dt(v))return v;if(Array.isArray(v))return v.map(y);if(co(v))return new Map(Array.from(v.entries()).map(([R,b])=>[R,y(b)]));if(za(v))return new Set(Array.from(v).map(y));let C=Object.create(In(v));for(let R in v)C[R]=y(v[R]);return Ba(v,_a)&&(C[_a]=v[_a]),C}function A(v){return St(v)?y(v):v}QF("Patches",{applyPatches_:f,generatePatches_:o,generateReplacementPatches_:m})}var Ga=new $F,Cr=Ga.produce,fs=Ga.produceWithPatches.bind(Ga);var np=Ga.applyPatches.bind(Ga);l();s();u();c();function HF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function GF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function zF(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 Kg=e=>Array.isArray(e)?e:[e];function WF(e){let t=Array.isArray(e[0])?e[0]:e;return zF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YF(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var sQ=Symbol();var cQ=Object.getPrototypeOf({});var KF=class{constructor(e){this.value=e}deref(){return this.value}},JF=typeof WeakRef<"u"?WeakRef:KF,XF=0,Jg=1;function gs(){return{s:XF,v:void 0,o:null,p:null}}function uo(e,t={}){let r=gs(),{resultEqualityCheck:n}=t,o,a=0;function d(){let p=r,{length:m}=arguments;for(let A=0,v=m;A<v;A++){let C=arguments[A];if(typeof C=="function"||typeof C=="object"&&C!==null){let R=p.o;R===null&&(p.o=R=new WeakMap);let b=R.get(C);b===void 0?(p=gs(),R.set(C,p)):p=b}else{let R=p.p;R===null&&(p.p=R=new Map);let b=R.get(C);b===void 0?(p=gs(),R.set(C,p)):p=b}}let f=p,y;if(p.s===Jg)y=p.v;else if(y=e.apply(null,arguments),a++,n){let A=o?.deref?.()??o;A!=null&&n(A,y)&&(y=A,a!==0&&a--),o=typeof y=="object"&&y!==null||typeof y=="function"?new JF(y):y}return f.s=Jg,f.v=y,y}return d.clearCache=()=>{r=gs(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function Xg(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,d=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),HF(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let y={...r,...m},{memoize:A,memoizeOptions:v=[],argsMemoize:C=uo,argsMemoizeOptions:R=[],devModeChecks:b={}}=y,x=Kg(v),F=Kg(R),P=WF(o),I=A(function(){return a++,f.apply(null,arguments)},...x),q=!0,M=C(function(){d++;let T=YF(P,arguments);return p=I.apply(null,T),p},...F);return Object.assign(M,{resultFunc:f,memoizedResultFunc:I,dependencies:P,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:A,argsMemoize:C})};return Object.assign(n,{withTypes:()=>n}),n}var se=Xg(uo),ZF=Object.assign((e,t=se)=>{GF(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(a=>e[a]);return t(n,(...a)=>a.reduce((d,p,m)=>(d[r[m]]=p,d),{}))},{withTypes:()=>ZF});l();s();u();c();function Zg(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ey=Zg(),ty=Zg;var eI=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?so:so.apply(null,arguments)},IQ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},tI=e=>e&&typeof e.match=="function";function w(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Vt(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=>cs(n)&&n.type===e,r}var iy=class Wa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Wa.prototype)}static get[Symbol.species](){return Wa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Wa(...t[0].concat(this)):new Wa(...t.concat(this))}};function ry(e){return dt(e)?Cr(e,()=>{}):e}function ny(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function rI(e){return typeof e=="boolean"}var nI=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},d=new iy;return r&&(rI(r)?d.push(ey):d.push(ty(r.extraArgument))),d},Ya="RTK_autoBatch",po=()=>e=>({payload:e,meta:{[Ya]:!0}}),oy=e=>t=>{setTimeout(t,e)},oI=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,d=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:oy(10):e.type==="callback"?e.queueNotification:oy(e.timeout),f=()=>{d=!1,a&&(a=!1,p.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let A=()=>o&&y(),v=n.subscribe(A);return p.add(y),()=>{v(),p.delete(y)}},dispatch(y){try{return o=!y?.meta?.[Ya],a=!o,a&&(d||(d=!0,m(f))),n.dispatch(y)}finally{o=!0}}})},aI=e=>function(r){let{autoBatch:n=!0}=r??{},o=new iy(e);return n&&o.push(oI(typeof n=="object"?n:void 0)),o};function sy(e){let t=nI(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},p;if(typeof r=="function")p=r;else if(Ht(r))p=io(r);else throw new Error(Vt(1));let m;typeof n=="function"?m=n(t):m=t();let f=so;o&&(f=eI({trace:!1,...(typeof o=="object"&&o)}));let y=Mg(...m),A=aI(y),v=typeof d=="function"?d(A):A(),C=f(...v);return $d(p,a,C)}function cy(e){let t={},r=[],n,o={addCase(a,d){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Vt(28));if(p in t)throw new Error(Vt(29));return t[p]=d,o},addMatcher(a,d){return r.push({matcher:a,reducer:d}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function iI(e){return typeof e=="function"}function oe(e,t){let[r,n,o]=cy(t),a;if(iI(e))a=()=>ry(e());else{let p=ry(e);a=()=>p}function d(p=a(),m){let f=[r[m.type],...n.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return f.filter(y=>!!y).length===0&&(f=[o]),f.reduce((y,A)=>{if(A)if(St(y)){let C=A(y,m);return C===void 0?y:C}else{if(dt(y))return Cr(y,v=>A(v,m));{let v=A(y,m);if(v===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return y},p)}return d.getInitialState=a,d}var uy=(e,t)=>tI(e)?e.match(t):e(t);function Gt(...e){return t=>e.some(r=>uy(r,t))}function lo(...e){return t=>e.every(r=>uy(r,t))}function hs(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 Ka(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ss(...e){return e.length===0?t=>hs(t,["pending"]):Ka(e)?Gt(...e.map(t=>t.pending)):Ss()(e[0])}function En(...e){return e.length===0?t=>hs(t,["rejected"]):Ka(e)?Gt(...e.map(t=>t.rejected)):En()(e[0])}function Ja(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?lo(En(...e),t):Ka(e)?lo(En(...e),t):Ja()(e[0])}function Ar(...e){return e.length===0?t=>hs(t,["fulfilled"]):Ka(e)?Gt(...e.map(t=>t.fulfilled)):Ar()(e[0])}function Cs(...e){return e.length===0?t=>hs(t,["pending","fulfilled","rejected"]):Ka(e)?Gt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Cs()(e[0])}var sI="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",As=(e=21)=>{let t="",r=e;for(;r--;)t+=sI[Math.random()*64|0];return t},cI=["name","message","stack","code"],op=class{constructor(e,t){xe(this,"_type");this.payload=e,this.meta=t}},ay=class{constructor(e,t){xe(this,"_type");this.payload=e,this.meta=t}},uI=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of cI)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ee=(()=>{function e(t,r,n){let o=w(t+"/fulfilled",(m,f,y,A)=>({payload:m,meta:{...(A||{}),arg:y,requestId:f,requestStatus:"fulfilled"}})),a=w(t+"/pending",(m,f,y)=>({payload:void 0,meta:{...(y||{}),arg:f,requestId:m,requestStatus:"pending"}})),d=w(t+"/rejected",(m,f,y,A,v)=>({payload:A,error:(n&&n.serializeError||uI)(m||"Rejected"),meta:{...(v||{}),arg:y,requestId:f,rejectedWithValue:!!A,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m){return(f,y,A)=>{let v=n?.idGenerator?n.idGenerator(m):As(),C=new i.AbortController,R,b;function x(P){b=P,C.abort()}let F=_asyncToGenerator(function*(){let P;try{let q=n?.condition?.(m,{getState:y,extra:A});if(dI(q)&&(q=yield q),q===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((D,T)=>{R=()=>{T({name:"AbortError",message:b||"Aborted"})},C.signal.addEventListener("abort",R)});f(a(v,m,n?.getPendingMeta?.({requestId:v,arg:m},{getState:y,extra:A}))),P=yield Promise.race([M,Promise.resolve(r(m,{dispatch:f,getState:y,extra:A,requestId:v,signal:C.signal,abort:x,rejectWithValue:(D,T)=>new op(D,T),fulfillWithValue:(D,T)=>new ay(D,T)})).then(D=>{if(D instanceof op)throw D;return D instanceof ay?o(D.payload,v,m,D.meta):o(D,v,m)})])}catch(q){P=q instanceof op?d(null,v,m,q.payload,q.meta):d(q,v,m)}finally{R&&C.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&d.match(P)&&P.meta.condition||f(P),P})();return Object.assign(F,{abort:x,requestId:v,arg:m,unwrap(){return F.then(lI)}})}}return Object.assign(p,{pending:a,rejected:d,fulfilled:o,settled:Gt(d,o),typePrefix:t})}return e.withTypes=()=>e,e})();function lI(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function dI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ly=Symbol.for("rtk-slice-createasyncthunk"),TQ={[ly]:ee};function pI(e,t){return`${e}/${t}`}function mI({creators:e}={}){let t=e?.asyncThunk?.[ly];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Vt(11));typeof process<"u";let d=(typeof n.reducers=="function"?n.reducers(gI()):n.reducers)||{},p=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(P,I){let q=typeof P=="string"?P:P.type;if(!q)throw new Error(Vt(12));if(q in m.sliceCaseReducersByType)throw new Error(Vt(13));return m.sliceCaseReducersByType[q]=I,f},addMatcher(P,I){return m.sliceMatchers.push({matcher:P,reducer:I}),f},exposeAction(P,I){return m.actionCreators[P]=I,f},exposeCaseReducer(P,I){return m.sliceCaseReducersByName[P]=I,f}};p.forEach(P=>{let I=d[P],q={reducerName:P,type:pI(o,P),createNotation:typeof n.reducers=="function"};hI(I)?CI(q,I,f,t):yI(q,I,f)});function y(){let[P={},I=[],q=void 0]=typeof n.extraReducers=="function"?cy(n.extraReducers):[n.extraReducers],M={...P,...m.sliceCaseReducersByType};return oe(n.initialState,D=>{for(let T in M)D.addCase(T,M[T]);for(let T of m.sliceMatchers)D.addMatcher(T.matcher,T.reducer);for(let T of I)D.addMatcher(T.matcher,T.reducer);q&&D.addDefaultCase(q)})}let A=P=>P,v=new Map,C;function R(P,I){return C||(C=y()),C(P,I)}function b(){return C||(C=y()),C.getInitialState()}function x(P,I=!1){function q(D){let T=D[P];return typeof T>"u"&&I&&(T=b()),T}function M(D=A){let T=ny(v,I,()=>new WeakMap);return ny(T,D,()=>{let O={};for(let[j,Q]of Object.entries(n.selectors??{}))O[j]=fI(Q,D,b,I);return O})}return{reducerPath:P,getSelectors:M,get selectors(){return M(q)},selectSlice:q}}let F={name:o,reducer:R,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:b,...x(a),injectInto(P,{reducerPath:I,...q}={}){let M=I??a;return P.inject({reducerPath:M,reducer:R},q),{...F,...x(M,!0)}}};return F}}function fI(e,t,r,n){function o(a,...d){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...d)}return o.unwrapped=e,o}var qn=mI();function gI(){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 yI({type:e,reducerName:t,createNotation:r},n,o){let a,d;if("reducer"in n){if(r&&!SI(n))throw new Error(Vt(17));a=n.reducer,d=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?w(e,d):w(e))}function hI(e){return e._reducerDefinitionType==="asyncThunk"}function SI(e){return e._reducerDefinitionType==="reducerWithPrepare"}function CI({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Vt(18));let{payloadCreator:a,fulfilled:d,pending:p,rejected:m,settled:f,options:y}=r,A=o(e,a,y);n.exposeAction(t,A),d&&n.addCase(A.fulfilled,d),p&&n.addCase(A.pending,p),m&&n.addCase(A.rejected,m),f&&n.addMatcher(A.settled,f),n.exposeCaseReducer(t,{fulfilled:d||ys,pending:p||ys,rejected:m||ys,settled:f||ys})}function ys(){}var dy="listener",py="completed",my="cancelled",kQ=`task-${my}`,OQ=`task-${py}`,DQ=`${dy}-${my}`,jQ=`${dy}-${py}`;var{assign:fy}=Object;var ap="listenerMiddleware";var AI=fy(w(`${ap}/add`),{withTypes:()=>AI}),VQ=w(`${ap}/removeAll`),vI=fy(w(`${ap}/remove`),{withTypes:()=>vI});var NQ=Symbol.for("rtk-state-proxy-original");function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();var gy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function RI(e){return typeof e=="string"&&gy.test(e)}var ip=RI;l();s();u();c();var Je=[];for(let e=0;e<256;++e)Je.push((e+256).toString(16).slice(1));function yy(e,t=0){return(Je[e[t+0]]+Je[e[t+1]]+Je[e[t+2]]+Je[e[t+3]]+"-"+Je[e[t+4]]+Je[e[t+5]]+"-"+Je[e[t+6]]+Je[e[t+7]]+"-"+Je[e[t+8]]+Je[e[t+9]]+"-"+Je[e[t+10]]+Je[e[t+11]]+Je[e[t+12]]+Je[e[t+13]]+Je[e[t+14]]+Je[e[t+15]]).toLowerCase()}l();s();u();c();var sp,xI=new Uint8Array(16);function cp(){if(!sp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sp=crypto.getRandomValues.bind(crypto)}return sp(xI)}l();s();u();c();l();s();u();c();var bI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),up={randomUUID:bI};function FI(e,t,r){if(up.randomUUID&&!t&&!e)return up.randomUUID();e=e||{};let n=e.random??e.rng?.()??cp();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return yy(n)}var lp=FI;l();s();u();c();function hy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function II({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:d}=e;d!=="disabled"&&(n.call(r),t.send(o,a,r))}var Sy="visitorId";function wI(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Sy),o=n&&ip(n)?n:t.generateUUID();return r.setItem(Sy,o),o}}}var xy="1.2.6",dp=128,by=192,Cy=224,Ay=240,PI=248;function EI(e){return(e&PI)===Ay?4:(e&Ay)===Cy?3:(e&Cy)===by?2:1}function qI(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&dp)!=dp)break;if(r-=3,(n&by)!=dp){t-r>=EI(n)*3&&(r=t);break}}return e.substring(0,r)}function TI(e){let{trackingId:t}=e;return{trackingId:t}}function kI(e){return(e.source||[]).concat([`relay@${xy}`])}function Fy(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:d}=r,p=TI(t),m=n.getClientId();return Object.freeze({type:e,config:p,ts:Date.now(),source:kI(t),clientId:m,userAgent:d(),referrer:vy(o()),location:vy(a())})}function vy(e){return e!==null?qI(e,1024):null}function OI(e,t,r,n,o){return{...t,meta:Fy(e,r,n,o)}}var DI="*";function jI(){let e=[];function t({type:m,callback:f}){return e.findIndex(y=>y.type===m&&y.callback===f)}function r(m,f){return m.type==="*"||f===m.type}function n(m){return t(m)<0&&e.push(m),()=>p(m.type,m.callback)}function o(m){e.forEach(f=>{if(r(f,m.meta.type))try{f.callback(m)}catch(y){console.error(y)}})}function a(m){if(m===DI)e.length=0;else for(let f=e.length-1;f>=0;f--)e[f].type===m&&e.splice(f,1)}function d(m){let f=t(m);f>=0&&e.splice(f,1)}function p(m,f){f?d({type:m,callback:f}):a(m)}return{add:n,call:o,remove:p}}function Ry({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function VI(e){let t=Ry(e);return{get:()=>t,update:r=>{t=Ry({...t,...r})}}}var pp=NI();function NI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let d=a.replace(/^\s+/,"");if(d.lastIndexOf(n,0)===0)return d.substring(n.length,d.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),d=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${d}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function MI(){return{getItem(e){return pp.getItem(e)||localStorage.getItem(e)},removeItem(e){pp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),pp.setItem(e,t,31556952e3)}}}function QI(){let e=document.referrer;return e===""?null:e}function LI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(hy().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>QI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>lp(),storage:MI()}}function _I(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function UI(){return{getItem(){return null},removeItem(){},setItem(){}}}function BI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:UI()}}function $I(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=BI();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&HI()&&_I()?LI():n}function HI(){try{return typeof window=="object"}catch{return!1}}function GI(e){return{get:()=>Object.freeze($I(e))}}function Iy(e){let t=VI(e),r=jI(),n=GI(t),o=wI(n);return{emit:(a,d)=>{let p=t.get(),m=n.get(),f=OI(a,d,p,m,o);return II({config:p,environment:m,event:f,listenerManager:r})},getMeta:a=>Fy(a,t.get(),n.get(),o),on:(a,d)=>r.add({type:a,callback:d}),off:(a,d)=>r.remove(a,d),updateConfig:a=>t.update(a),version:xy}}l();s();u();c();l();s();u();c();var mo="3.29.3-pre.8b47cb07e6",wy=["@coveo/atomic","@coveo/quantic"];var Nr=se(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${mo}`));var Xa=se(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Nr(e.configuration.analytics),(e,t)=>zI(t),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},d,p)=>Iy({mode:a?"emit":"disabled",url:o??os(e,t),token:r,trackingId:n??null,source:d,environment:p})),zI=e=>{if(!e)return;let t=e();return{getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent,generateUUID:()=>t.clientId}};l();s();u();c();l();s();u();c();function zt(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 V(e,t,r,n){function o(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function p(y){try{f(n.next(y))}catch(A){d(A)}}function m(y){try{f(n.throw(y))}catch(A){d(A)}}function f(y){y.done?a(y.value):o(y.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var Ce;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Ce||(Ce={}));function gp(){return typeof window<"u"}function Ep(){return typeof navigator<"u"}function fo(){return typeof document<"u"}function yp(){try{return typeof localStorage<"u"}catch{return!1}}function WI(){try{return typeof sessionStorage<"u"}catch{return!1}}function Ly(){return Ep()&&navigator.cookieEnabled}var YI=[Ce.click,Ce.custom,Ce.search,Ce.view],KI=(e,t)=>YI.indexOf(e)!==-1?Object.assign({language:fo()?document.documentElement.lang:"unknown",userAgent:Ep()?navigator.userAgent:"unknown"},t):t,ei=class e{static set(t,r,n){var o,a,d,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?Py(t,r,a):(d=p.split("."),o=d[d.length-2]+"."+d[d.length-1],Py(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Py(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function JI(){return yp()?localStorage:Ly()?new ti:WI()?sessionStorage:new yo}var ti=class e{getItem(t){return ei.get(`${e.prefix}${t}`)}removeItem(t){ei.erase(`${e.prefix}${t}`)}setItem(t,r,n){ei.set(`${e.prefix}${t}`,r,n)}};ti.prefix="coveo_";var hp=class{constructor(){this.cookieStorage=new ti}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)}},yo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},vs="__coveo.analytics.history",XI=20,ZI=1e3*60,ew=75,bs=class{constructor(t){this.store=t||JI()}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 V(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 V(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(vs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return V(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(vs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(vs,JSON.stringify(t.slice(0,XI)))}catch{}}clear(){try{this.store.removeItem(vs)}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,ew)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ZI:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}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 tw=(e,t)=>V(void 0,void 0,void 0,function*(){return e===Ce.view?(yield rw(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),rw=e=>V(void 0,void 0,void 0,function*(){let t=new bs,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Rs,nw=new Uint8Array(16);function ow(){if(!Rs&&(Rs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rs(nw)}var aw=/^(?:[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 Fs(e){return typeof e=="string"&&aw.test(e)}var Xe=[];for(let e=0;e<256;++e)Xe.push((e+256).toString(16).slice(1));function _y(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 iw(e){if(!Fs(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 sw(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var cw="6ba7b810-9dad-11d1-80b4-00c04fd430c8",uw="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function lw(e,t,r){function n(o,a,d,p){var m;if(typeof o=="string"&&(o=sw(o)),typeof a=="string"&&(a=iw(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,d){p=p||0;for(let y=0;y<16;++y)d[p+y]=f[y];return d}return _y(f)}try{n.name=e}catch{}return n.DNS=cw,n.URL=uw,n}var dw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ey={randomUUID:dw};function Tn(e,t,r){if(Ey.randomUUID&&!t&&!e)return Ey.randomUUID();e=e||{};let n=e.random||(e.rng||ow)();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 _y(n)}function pw(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 mp(e,t){return e<<t|e>>>32-t}function mw(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let p=0;p<d.length;++p)e.push(d.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let d=0;d<o;++d){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[d*64+m*4]<<24|e[d*64+m*4+1]<<16|e[d*64+m*4+2]<<8|e[d*64+m*4+3];a[d]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let d=0;d<o;++d){let p=new Uint32Array(80);for(let C=0;C<16;++C)p[C]=a[d][C];for(let C=16;C<80;++C)p[C]=mp(p[C-3]^p[C-8]^p[C-14]^p[C-16],1);let m=r[0],f=r[1],y=r[2],A=r[3],v=r[4];for(let C=0;C<80;++C){let R=Math.floor(C/20),b=mp(m,5)+pw(R,f,y,A)+v+t[R]+p[C]>>>0;v=A,A=y,y=mp(f,30)>>>0,f=m,m=b}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+A>>>0,r[4]=r[4]+v>>>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 fw=lw("v5",80,mw),qy=fw,Uy="2.30.45",Ty=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Za={pageview:"pageview",event:"event"},Is=class{constructor({client:t,uuidGenerator:r=Tn}){this.client=t,this.uuidGenerator=r}},Sp=class extends Is{constructor({client:t,uuidGenerator:r=Tn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ty(window.location),this.lastReferrer=fo()?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:fo()?document.title:"",encoding:fo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Za.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Za.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Za.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Za.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 Ty(window.location)}},Mr=class e{constructor(t,r){if(!Fs(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 a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Fs(a)?new e(a,Number.parseInt(o)*1e3):null}};Mr.cvo_cid="cvo_cid";Mr.expirationTime=120;var Cp=class extends Is{constructor({client:t,uuidGenerator:r=Tn}){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 V(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(Mr.cvo_cid,new Mr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Cp.Id="link";var wt=Object.keys;function xs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var fp=128,By=192,ky=224,Oy=240;function gw(e){return(e&248)===Oy?4:(e&Oy)===ky?3:(e&ky)===By?2:1}function yw(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&fp)!=fp)break;if(r-=3,(n&By)!=fp){t-r>=gw(n)*3&&(r=t);break}}return e.substring(0,r)}var Ap={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"},hw=wt(Ap).map(e=>Ap[e]),Sw=[...hw].join("|"),Cw=new RegExp(`^(${Sw}$)`),Aw={svcAction:"svc_action",svcActionData:"svc_action_data"},vw=e=>wt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Ap[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Rw=e=>Cw.test(e),xw=[Rw],Dy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},jy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},tt={action:"pa",list:"pal",listSource:"pls"},ws={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},bw=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],vp={id:"quoteId",affiliation:"quoteAffiliation"},Rp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Fw={add:tt,bookmark_add:tt,bookmark_remove:tt,click:tt,checkout:tt,checkout_option:tt,detail:tt,impression:tt,remove:tt,refund:Object.assign(Object.assign({},tt),ws),purchase:Object.assign(Object.assign({},tt),ws),quickview:tt,quote:Object.assign(Object.assign({},tt),vp),review:Object.assign(Object.assign({},tt),Rp)},Iw=wt(Dy).map(e=>Dy[e]),ww=wt(jy).map(e=>jy[e]),Pw=wt(tt).map(e=>tt[e]),Ew=wt(ws).map(e=>ws[e]),qw=wt(Rp).map(e=>Rp[e]),Tw=wt(vp).map(e=>vp[e]),kw=[...Iw,"custom"].join("|"),Ow=[...ww,"custom"].join("|"),$y="(pr[0-9]+)",Hy="(il[0-9]+pi[0-9]+)",Dw=new RegExp(`^${$y}(${kw})$`),jw=new RegExp(`^(${Hy}(${Ow}))|(il[0-9]+nm)$`),Vw=new RegExp(`^(${Pw.join("|")})$`),Nw=new RegExp(`^(${Ew.join("|")})$`),Mw=new RegExp(`^${$y}custom$`),Qw=new RegExp(`^${Hy}custom$`),Lw=new RegExp(`^(${[...bw,...qw,...Tw].join("|")})$`),_w=e=>Dw.test(e),Uw=e=>jw.test(e),Bw=e=>Vw.test(e),$w=e=>Nw.test(e),Hw=e=>Lw.test(e),Gw=[Uw,_w,Bw,$w,Hw],zw=[Mw,Qw],Ww={anonymizeIp:"aip"},Yw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Kw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Jw=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Xw=Object.assign(Object.assign(Object.assign(Object.assign({},Ww),Yw),Kw),Jw.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xp=Object.assign(Object.assign({},Xw),Aw),Zw=e=>{let t=!!e.action&&Fw[e.action]||{};return wt(e).reduce((r,n)=>{let o=t[n]||xp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},eP=wt(xp).map(e=>xp[e]),tP=e=>eP.indexOf(e)!==-1,rP=e=>e==="custom",nP=e=>[...Gw,...xw,tP,rP].some(t=>t(e)),oP=e=>wt(e).reduce((t,r)=>{let n=aP(r);return n?Object.assign(Object.assign({},t),iP(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),aP=e=>{let t;return[...zw].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},iP=(e,t)=>wt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),bp=class{constructor(t){this.opts=t}sendEvent(t,r){return V(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,a=yield this.getQueryParamsForEventType(t),{url:d,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return V(this,void 0,void 0,function*(){let o=t,a=r;if(n){let d=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=d;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return V(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(a=>!!a).join("&")})}isEventTypeLegacy(t){return[Ce.click,Ce.custom,Ce.search,Ce.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}},Fp=class{sendEvent(t,r){return V(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return V(this,void 0,void 0,function*(){return Promise.resolve()})}},Vy=g.fetch,Ps=class{constructor(t){this.opts=t}sendEvent(t,r){return V(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,y=zt(m,["url"]),A;try{A=yield Vy(f,y)}catch(v){console.error("An error has occured when sending the event.",v);return}if(A.ok){let v=yield A.json();return v.visitorId&&o.setCurrentVisitorId(v.visitorId),v}else{try{A.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,A,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return V(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Vy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Ce.click,Ce.custom,Ce.search,Ce.view].indexOf(t)!==-1}getVisitorIdParam(){return V(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"})}},Ip=class{constructor(t,r){yp()&&Ly()?this.storage=new hp:yp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new yo),this.client=new Ps(t),this.beaconClient=new bp(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},wp=class{constructor(t,r){this.storage=r||new yo,this.client=new Ps(t)}getClientDependingOnEventType(t){return this.client}},Es=class{constructor(){this.storage=new yo,this.client=new Fp}getClientDependingOnEventType(t){return this.client}},sP="xx",cP=e=>e?.startsWith(sP)||!1,uP=`
28
28
  We've detected you're using React Native but have not provided the corresponding runtime,
29
29
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
30
30
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
@@ -50,4 +50,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
50
50
  * limitations under the License.
51
51
  */if(__exports!=exports)module.exports=exports;return module.exports});
52
52
 
53
- window.coveoQuanticVersion = '3.30.0-pre.8a67bd16aa';
53
+ window.coveoQuanticVersion = '3.30.0-pre.8b47cb07e6';