@coveo/quantic 3.29.0-pre.bc5fc96bfc → 3.29.0-pre.bf3a34cede
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.html +1 -0
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.js +33 -7
- package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js +21 -6
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +1 -0
- package/force-app/main/default/lwc/quanticSourceCitations/quanticSourceCitations.html +1 -0
- package/force-app/main/default/lwc/quanticSourceCitations/quanticSourceCitations.js +7 -0
- package/force-app/main/default/lwc/quanticUtils/citationAnchoringUtils.js +43 -0
- package/force-app/main/default/lwc/quanticUtils/quanticUtils.js +1 -0
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/build.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-inference.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/engine.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/engine.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/from-build-result.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +2 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/engine/commerce-engine.ssr.d.ts +2 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/hydrated-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/static-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/build.d.ts +5 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-inference.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/engine.d.ts +6 -17
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/fetch-static-state.d.ts +7 -11
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/hydrate-static-state.d.ts +6 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/controller-utils.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/build.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/engine.d.ts +3 -9
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/fetch-static-state.d.ts +7 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/hydrate-static-state.d.ts +6 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/engine/search-engine.ssr.d.ts +8 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
- package/package.json +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/from-build-result.d.ts +0 -19
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/from-build-result.d.ts +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {LinkUtils} from 'c/quanticUtils';
|
|
1
|
+
import {LinkUtils, generateTextFragmentUrl} from 'c/quanticUtils';
|
|
2
2
|
import {NavigationMixin} from 'lightning/navigation';
|
|
3
3
|
import {LightningElement, api} from 'lwc';
|
|
4
4
|
|
|
@@ -7,6 +7,8 @@ import {LightningElement, api} from 'lwc';
|
|
|
7
7
|
const minimumTooltipDisplayDurationMs = 1000;
|
|
8
8
|
const debounceDurationBeforeHoverMs = 200;
|
|
9
9
|
|
|
10
|
+
const supportedFileTypesForTextFragment = ['html', 'SalesforceItem'];
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* The `QuanticCitation` component renders an individual citation.
|
|
12
14
|
* @fires CustomEvent#quantic__citationhover
|
|
@@ -18,7 +20,7 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
18
20
|
/**
|
|
19
21
|
* The citation item information.
|
|
20
22
|
* @api
|
|
21
|
-
* @type {{title: string, index: number, text: string, clickUri: string, fields: object}}
|
|
23
|
+
* @type {{title: string, index: number, text: string, uri: string, clickUri: string, fields: object}}
|
|
22
24
|
*/
|
|
23
25
|
@api citation;
|
|
24
26
|
/**
|
|
@@ -27,6 +29,13 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
27
29
|
* @type {InteractiveCitation}
|
|
28
30
|
*/
|
|
29
31
|
@api interactiveCitation;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to disable citation anchoring.
|
|
34
|
+
* @api
|
|
35
|
+
* @type {boolean}
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
@api disableCitationAnchoring = false;
|
|
30
39
|
|
|
31
40
|
/** @type {Object} */
|
|
32
41
|
timeout;
|
|
@@ -42,6 +51,16 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
42
51
|
isInitialRender = true;
|
|
43
52
|
/** @type {string} */
|
|
44
53
|
salesforceRecordUrl;
|
|
54
|
+
/** @type {boolean} */
|
|
55
|
+
isHrefWithTextFragment = false;
|
|
56
|
+
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
const fileType = this.citation?.fields?.filetype;
|
|
59
|
+
this.isHrefWithTextFragment =
|
|
60
|
+
!this.disableCitationAnchoring &&
|
|
61
|
+
supportedFileTypesForTextFragment.includes(fileType) &&
|
|
62
|
+
!!this.text;
|
|
63
|
+
}
|
|
45
64
|
|
|
46
65
|
renderedCallback() {
|
|
47
66
|
if (this.isInitialRender) {
|
|
@@ -111,7 +130,9 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
111
130
|
}
|
|
112
131
|
|
|
113
132
|
handleClick(event) {
|
|
114
|
-
|
|
133
|
+
// Only apply the Salesforce navigation using the mixin for Salesforce documents and when citation anchoring is disabled.
|
|
134
|
+
// Otherwise we rely on the default behavior of the browser with a `hrefValue`.
|
|
135
|
+
if (this.isSalesforceLink && !this.isHrefWithTextFragment) {
|
|
115
136
|
event.preventDefault();
|
|
116
137
|
this.navigateToSalesforceRecord(event);
|
|
117
138
|
}
|
|
@@ -145,10 +166,9 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
145
166
|
}
|
|
146
167
|
|
|
147
168
|
get hrefValue() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return this.clickUri;
|
|
169
|
+
return this.isHrefWithTextFragment
|
|
170
|
+
? generateTextFragmentUrl(this.sourceUri, this.text)
|
|
171
|
+
: this.sourceUri;
|
|
152
172
|
}
|
|
153
173
|
|
|
154
174
|
/**
|
|
@@ -180,4 +200,10 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
180
200
|
get index() {
|
|
181
201
|
return this.citation?.index;
|
|
182
202
|
}
|
|
203
|
+
|
|
204
|
+
get sourceUri() {
|
|
205
|
+
return this.isSalesforceLink
|
|
206
|
+
? this.salesforceRecordUrl
|
|
207
|
+
: (this.clickUri ?? this.citation?.uri);
|
|
208
|
+
}
|
|
183
209
|
}
|
|
@@ -49,6 +49,7 @@ const MAX_VALID_COLLAPSED_HEIGHT = 500;
|
|
|
49
49
|
const MIN_VALID_COLLAPSED_HEIGHT = 150;
|
|
50
50
|
|
|
51
51
|
const GENERATED_ANSWER_DATA_KEY = 'coveo-generated-answer-data';
|
|
52
|
+
const DEFAULT_CITATION_FIELDS = ['sfid', 'sfkbid', 'sfkavid', 'filetype'];
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* The `QuanticGeneratedAnswer` component automatically generates an answer using Coveo machine learning models to answer the query executed by the user.
|
|
@@ -71,9 +72,9 @@ export default class QuanticGeneratedAnswer extends LightningElement {
|
|
|
71
72
|
* A list of fields to fetch with the citations used to generate the answer.
|
|
72
73
|
* @api
|
|
73
74
|
* @type {string}
|
|
74
|
-
* @defaultValue `'sfid,sfkbid,sfkavid'`
|
|
75
|
+
* @defaultValue `'sfid,sfkbid,sfkavid,filetype'`
|
|
75
76
|
*/
|
|
76
|
-
@api fieldsToIncludeInCitations = 'sfid,sfkbid,sfkavid';
|
|
77
|
+
@api fieldsToIncludeInCitations = 'sfid,sfkbid,sfkavid,filetype';
|
|
77
78
|
/**
|
|
78
79
|
* Whether the generated answer should be collapsible when it exceeds the maximum height of 250px.
|
|
79
80
|
* @api
|
|
@@ -118,6 +119,13 @@ export default class QuanticGeneratedAnswer extends LightningElement {
|
|
|
118
119
|
this._maxCollapsedHeight = DEFAULT_COLLAPSED_HEIGHT;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Whether to disable citation anchoring.
|
|
124
|
+
* @api
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
@api disableCitationAnchoring = false;
|
|
121
129
|
|
|
122
130
|
labels = {
|
|
123
131
|
generatedAnswerForYou,
|
|
@@ -530,10 +538,17 @@ export default class QuanticGeneratedAnswer extends LightningElement {
|
|
|
530
538
|
}
|
|
531
539
|
|
|
532
540
|
get citationFields() {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
541
|
+
const userCitationFields =
|
|
542
|
+
this.fieldsToIncludeInCitations
|
|
543
|
+
?.split(',')
|
|
544
|
+
.map((field) => field.trim())
|
|
545
|
+
.filter((field) => field.length > 0) || [];
|
|
546
|
+
|
|
547
|
+
const combinedCitationFields = [
|
|
548
|
+
...DEFAULT_CITATION_FIELDS,
|
|
549
|
+
...userCitationFields,
|
|
550
|
+
];
|
|
551
|
+
return [...new Set(combinedCitationFields)];
|
|
537
552
|
}
|
|
538
553
|
|
|
539
554
|
get shouldShowDisclaimer() {
|
|
@@ -37,6 +37,13 @@ export default class QuanticSourceCitations extends LightningElement {
|
|
|
37
37
|
* @type {function}
|
|
38
38
|
*/
|
|
39
39
|
@api citationHoverHandler;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to disable citation anchoring.
|
|
42
|
+
* @api
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
@api disableCitationAnchoring = false;
|
|
40
47
|
|
|
41
48
|
/** @type {AnyHeadless} */
|
|
42
49
|
headless;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts a text to highlight from a given text.
|
|
3
|
+
* It tries to extract the first sentence, and if it fails, it returns the first few words.
|
|
4
|
+
* @param {string} text The text from which to extract the text to highlight.
|
|
5
|
+
* @returns {string} The extracted text to highlight.
|
|
6
|
+
*/
|
|
7
|
+
export function extractTextToHighlight(text) {
|
|
8
|
+
const fallbackWordCount = 5;
|
|
9
|
+
|
|
10
|
+
const trimmedText = text.trim();
|
|
11
|
+
if (!trimmedText || typeof trimmedText !== 'string') {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const sentenceRegex =
|
|
16
|
+
/(?<=^|\p{P}\s)\p{P}?\p{Lu}.*?[.!?]+(?=\s+(?:\p{Lu}|\d)|$)/gu;
|
|
17
|
+
const sentences = trimmedText.match(sentenceRegex);
|
|
18
|
+
|
|
19
|
+
if (Array.isArray(sentences) && sentences?.length > 0) {
|
|
20
|
+
return sentences[0].trim();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return trimmedText.split(/\s+/).slice(0, fallbackWordCount).join(' ');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Generates an encoded text fragment URL for the citation.
|
|
28
|
+
* This URL will highlight the text in the citation if it is an HTML file.
|
|
29
|
+
* @param {string} uri
|
|
30
|
+
* @param {string} text
|
|
31
|
+
* @returns {string}
|
|
32
|
+
* @example
|
|
33
|
+
* generateTextFragmentUrl('https://example.com', 'This is a sample text.');
|
|
34
|
+
* // Returns: 'https://example.com#:~:text=This%20is%20a%20sample%20text.'
|
|
35
|
+
*/
|
|
36
|
+
export function generateTextFragmentUrl(uri, text) {
|
|
37
|
+
const highlight = extractTextToHighlight(text);
|
|
38
|
+
const encodedTextFragment = encodeURIComponent(highlight).replace(
|
|
39
|
+
/-/g,
|
|
40
|
+
'%2D'
|
|
41
|
+
);
|
|
42
|
+
return `${uri}#:~:text=${encodedTextFragment}`;
|
|
43
|
+
}
|
|
@@ -35,6 +35,7 @@ import pastYear_plural from '@salesforce/label/c.quantic_PastYear_plural';
|
|
|
35
35
|
export * from './recentQueriesUtils';
|
|
36
36
|
export * from './markdownUtils';
|
|
37
37
|
export * from './facetDependenciesUtils';
|
|
38
|
+
export * from './citationAnchoringUtils';
|
|
38
39
|
|
|
39
40
|
export class Debouncer {
|
|
40
41
|
_timeout;
|
|
@@ -23,7 +23,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23
23
|
`)}
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
|
-
`;return new Zi(r)}var Zi=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Le=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Df(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}},Et=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&Y(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 $t(e){return e===void 0}function qf(e){return e===null}function Y(e){return $t(e)||qf(e)}var he=class{constructor(e={}){se(this,"value");this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(jf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function jf(e){return $t(e)||Va(e)}function Va(e){return typeof e=="boolean"}var Re=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Mf(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 Mf(e){return $t(e)||Ba(e)}function Ba(e){return typeof e=="number"&&!Number.isNaN(e)}var Nf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,W=class{constructor(e={}){se(this,"value");se(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Et(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if($t(e))return null;if(!Qa(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!(Nf.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 Qa(e){return Object.prototype.toString.call(e)==="[object String]"}var ce=class{constructor(e={}){se(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if($t(e))return this.config.options.required?"value is required and is currently undefined":null;if(!$a(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&Y(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=` ${o}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function $a(e){return e!==void 0&&typeof e=="object"}var Ze=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Et(this.config)}validate(e){if(!Y(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(Y(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&&Y(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=` ${i}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Va(e)||Qa(e)||Ba(e)||$a(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ha(e){return Array.isArray(e)}var eo=class{constructor(e){se(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t!==null?t:$t(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}};g();d();f();p();var cn=e=>e;g();d();f();p();g();d();f();p();g();d();f();p();var Ht=class{constructor(t){se(this,"_basePath");se(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}};g();d();f();p();function to(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var ro=e=>{let{response:t}=e;return t.body?_f(e):Lf(t)},_f=e=>Vf(e)?Bf(e):Uf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Lf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Uf(e){return e.body.statusCode!==void 0}function Vf(e){return e.body.exception!==void 0}var Bf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});g();d();f();p();function za(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}g();d();f();p();var no=(e,t,r,n)=>{let i=new Ht(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var Ga=(e,t)=>{let r=new Ht(`${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},io=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield ct.call({...no(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:to(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=za(r),i=yield r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Qf(s)?{success:s}:{error:ro({response:r,body:s})}});return function io(_x,_x2){return _ref2.apply(this,arguments)}}();function Qf(e){return typeof e=="string"}g();d();f();p();function $f(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Hf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function un(e,t){if(t&&e.name==="AbortError")return{error:Hf(e)};if(e instanceof xt)return{error:$f(e)};throw e}g();d();f();p();g();d();f();p();var ln=(e,t,r,n,i={})=>{zf(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=Gf(i),u=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},dn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r],t),{}),pn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r].value,t),{}),zf=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.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},Gf=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Wa=e=>{let t=e.debug?{debug:"1"}:{};return{...ln(e,"POST","application/json","/classify",t),requestParams:Wf(e)}},Wf=e=>({clientId:e.clientId,locale:e.locale,fields:dn(e.fields)});g();d();f();p();var Ya=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...ln(e,"POST","application/json","/documents/suggest",t),requestParams:Yf(e)}},Yf=e=>({clientId:e.clientId,locale:e.locale,fields:dn(e.fields),context:e.context,analytics:e.analytics});var fn=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield ct.call({...Wa(t),..._this.options});if(r instanceof Error)return un(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield ct.call({...Ya(t),..._this2.options});if(r instanceof Error)return un(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return io(t,_this3.options)})()}};g();d();f();p();g();d();f();p();g();d();f();p();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 Kf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ka=Kf,oo=()=>Math.random().toString(36).substring(7).split("").join("."),Jf={INIT:`@@redux/INIT${oo()}`,REPLACE:`@@redux/REPLACE${oo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${oo()}`},gn=Jf;function Qe(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 so(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(so)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,c=!1;function a(){s===o&&(s=new Map,o.forEach((E,C)=>{s.set(C,E)}))}function h(){if(c)throw new Error(ye(3));return i}function y(E){if(typeof E!="function")throw new Error(ye(4));if(c)throw new Error(ye(5));let C=!0;a();let P=u++;return s.set(P,E),function(){if(C){if(c)throw new Error(ye(6));C=!1,a(),s.delete(P),o=null}}}function S(E){if(!Qe(E))throw new Error(ye(7));if(typeof E.type>"u")throw new Error(ye(8));if(typeof E.type!="string")throw new Error(ye(17));if(c)throw new Error(ye(9));try{c=!0,i=n(i,E)}finally{c=!1}return(o=s).forEach(P=>{P()}),E}function m(E){if(typeof E!="function")throw new Error(ye(10));n=E,S({type:gn.REPLACE})}function v(){let E=y;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(ye(11));function P(){let I=C;I.next&&I.next(h())}return P(),{unsubscribe:E(P)}},[Ka](){return this}}}return S({type:gn.INIT}),{dispatch:S,subscribe:y,getState:h,replaceReducer:m,[Ka]:v}}function Xf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:gn.INIT})>"u")throw new Error(ye(12));if(typeof r(void 0,{type:gn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function zt(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),i,o;try{Xf(r)}catch(s){o=s}return function(u={},c){if(o)throw o;let a=!1,h={};for(let y=0;y<n.length;y++){let S=n[y],m=r[S],v=u[S],R=m(v,c);if(typeof R>"u"){let E=c&&c.type;throw new Error(ye(14))}h[S]=R,a=a||R!==v}return a=a||n.length!==Object.keys(u).length,a?h:u}}function Gt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Ja(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(ye(15))},s={getState:i.getState,dispatch:(c,...a)=>o(c,...a)},u=e.map(c=>c(s));return o=Gt(...u)(i.dispatch),{...i,dispatch:o}}}function mn(e){return Qe(e)&&"type"in e&&typeof e.type=="string"}g();d();f();p();var yo=Symbol.for("immer-nothing"),Or=Symbol.for("immer-draftable"),xe=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var kt=Object.getPrototypeOf;function Pe(e){return!!e&&!!e[xe]}function Ee(e){return e?rc(e)||Array.isArray(e)||!!e[Or]||!!e.constructor?.[Or]||jr(e)||Mr(e):!1}var Zf=Object.prototype.constructor.toString();function rc(e){if(!e||typeof e!="object")return!1;let t=kt(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)===Zf}function So(e){return Pe(e)||Se(15,e),e[xe].base_}function Fr(e,t){Pt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Pt(e){let t=e[xe];return t?t.type_:Array.isArray(e)?1:jr(e)?2:Mr(e)?3:0}function Tr(e,t){return Pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ao(e,t){return Pt(e)===2?e.get(t):e[t]}function nc(e,t,r){let n=Pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eg(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function jr(e){return e instanceof Map}function Mr(e){return e instanceof Set}function It(e){return e.copy_||e.base_}function lo(e,t){if(jr(e))return new Map(e);if(Mr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[xe];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(kt(e),n)}else{let n=kt(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function Sn(e,t=!1){return vn(e)||Pe(e)||!Ee(e)||(Pt(e)>1&&(e.set=e.add=e.clear=e.delete=tg),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Sn(n,!0))),e}function tg(){Se(2)}function vn(e){return Object.isFrozen(e)}var po={};function Ot(e){let t=po[e];return t||Se(0,e),t}function rg(e,t){po[e]||(po[e]=t)}var Dr;function ic(){return Dr}function ng(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xa(e,t){t&&(Ot("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fo(e){go(e),e.drafts_.forEach(ig),e.drafts_=null}function go(e){e===Dr&&(Dr=e.parent_)}function Za(e){return Dr=ng(Dr,e)}function ig(e){let t=e[xe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ec(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[xe].modified_&&(fo(t),Se(4)),Ee(e)&&(e=hn(t,e),t.parent_||yn(t,e)),t.patches_&&Ot("Patches").generateReplacementPatches_(r[xe].base_,e,t.patches_,t.inversePatches_)):e=hn(t,r,[]),fo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yo?e:void 0}function hn(e,t,r){if(vn(t))return t;let n=t[xe];if(!n)return Fr(t,(i,o)=>tc(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return yn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Fr(o,(u,c)=>tc(e,n,i,u,c,r,s)),yn(e,i,!1),r&&e.patches_&&Ot("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function tc(e,t,r,n,i,o,s){if(Pe(i)){let u=o&&t&&t.type_!==3&&!Tr(t.assigned_,n)?o.concat(n):void 0,c=hn(e,i,u);if(nc(r,n,c),Pe(c))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Ee(i)&&!vn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;hn(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&yn(e,i)}}function yn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Sn(t,r)}function og(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ic(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=vo;r&&(i=[n],o=qr);let{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var vo={get(e,t){if(t===xe)return e;let r=It(e);if(!Tr(r,t))return sg(e,r,t);let n=r[t];return e.finalized_||!Ee(n)?n:n===co(e.base_,t)?(uo(e),e.copy_[t]=ho(n,e)):n},has(e,t){return t in It(e)},ownKeys(e){return Reflect.ownKeys(It(e))},set(e,t,r){let n=oc(It(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=co(It(e),t),o=i?.[xe];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eg(r,i)&&(r!==void 0||Tr(e.base_,t)))return!0;uo(e),mo(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 co(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uo(e),mo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=It(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return kt(e.base_)},setPrototypeOf(){Se(12)}},qr={};Fr(vo,(e,t)=>{qr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qr.deleteProperty=function(e,t){return qr.set.call(this,e,t,void 0)};qr.set=function(e,t,r){return vo.set.call(this,e[0],t,r,e[0])};function co(e,t){let r=e[xe];return(r?It(r):e)[t]}function sg(e,t,r){let n=oc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function oc(e,t){if(!(t in e))return;let r=kt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=kt(r)}}function mo(e){e.modified_||(e.modified_=!0,e.parent_&&mo(e.parent_))}function uo(e){e.copy_||(e.copy_=lo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ag=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(c=o,...a){return s.produce(c,h=>r.call(this,h,...a))}}typeof r!="function"&&Se(6),n!==void 0&&typeof n!="function"&&Se(7);let i;if(Ee(t)){let o=Za(this),s=ho(t,void 0),u=!0;try{i=r(s),u=!1}finally{u?fo(o):go(o)}return Xa(o,n),ec(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===yo&&(i=void 0),this.autoFreeze_&&Sn(i,!0),n){let o=[],s=[];Ot("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else Se(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ee(e)||Se(8),Pe(e)&&(e=sc(e));let t=Za(this),r=ho(e,void 0);return r[xe].isManual_=!0,go(t),r}finishDraft(e,t){let r=e&&e[xe];(!r||!r.isManual_)&&Se(9);let{scope_:n}=r;return Xa(n,t),ec(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Ot("Patches").applyPatches_;return Pe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function ho(e,t){let r=jr(e)?Ot("MapSet").proxyMap_(e,t):Mr(e)?Ot("MapSet").proxySet_(e,t):og(e,t);return(t?t.scope_:ic()).drafts_.push(r),r}function sc(e){return Pe(e)||Se(10,e),ac(e)}function ac(e){if(!Ee(e)||vn(e))return e;let t=e[xe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=lo(e,t.scope_.immer_.useStrictShallowCopy_)}else r=lo(e,!0);return Fr(r,(n,i)=>{nc(r,n,ac(i))}),t&&(t.finalized_=!1),r}function cc(){let t="replace",r="add",n="remove";function i(S,m,v,R){switch(S.type_){case 0:case 2:return s(S,m,v,R);case 1:return o(S,m,v,R);case 3:return u(S,m,v,R)}}function o(S,m,v,R){let{base_:E,assigned_:C}=S,P=S.copy_;P.length<E.length&&([E,P]=[P,E],[v,R]=[R,v]);for(let b=0;b<E.length;b++)if(C[b]&&P[b]!==E[b]){let I=m.concat([b]);v.push({op:t,path:I,value:y(P[b])}),R.push({op:t,path:I,value:y(E[b])})}for(let b=E.length;b<P.length;b++){let I=m.concat([b]);v.push({op:r,path:I,value:y(P[b])})}for(let b=P.length-1;E.length<=b;--b){let I=m.concat([b]);R.push({op:n,path:I})}}function s(S,m,v,R){let{base_:E,copy_:C}=S;Fr(S.assigned_,(P,b)=>{let I=ao(E,P),j=ao(C,P),F=b?Tr(E,P)?t:r:n;if(I===j&&F===t)return;let k=m.concat(P);v.push(F===n?{op:F,path:k}:{op:F,path:k,value:j}),R.push(F===r?{op:n,path:k}:F===n?{op:r,path:k,value:y(I)}:{op:t,path:k,value:y(I)})})}function u(S,m,v,R){let{base_:E,copy_:C}=S,P=0;E.forEach(b=>{if(!C.has(b)){let I=m.concat([P]);v.push({op:n,path:I,value:b}),R.unshift({op:r,path:I,value:b})}P++}),P=0,C.forEach(b=>{if(!E.has(b)){let I=m.concat([P]);v.push({op:r,path:I,value:b}),R.unshift({op:n,path:I,value:b})}P++})}function c(S,m,v,R){v.push({op:t,path:[],value:m===yo?void 0:m}),R.push({op:t,path:[],value:S})}function a(S,m){return m.forEach(v=>{let{path:R,op:E}=v,C=S;for(let j=0;j<R.length-1;j++){let F=Pt(C),k=R[j];typeof k!="string"&&typeof k!="number"&&(k=""+k),(F===0||F===1)&&(k==="__proto__"||k==="constructor")&&Se(19),typeof C=="function"&&k==="prototype"&&Se(19),C=ao(C,k),typeof C!="object"&&Se(18,R.join("/"))}let P=Pt(C),b=h(v.value),I=R[R.length-1];switch(E){case t:switch(P){case 2:return C.set(I,b);case 3:Se(16);default:return C[I]=b}case r:switch(P){case 1:return I==="-"?C.push(b):C.splice(I,0,b);case 2:return C.set(I,b);case 3:return C.add(b);default:return C[I]=b}case n:switch(P){case 1:return C.splice(I,1);case 2:return C.delete(I);case 3:return C.delete(v.value);default:return delete C[I]}default:Se(17,E)}}),S}function h(S){if(!Ee(S))return S;if(Array.isArray(S))return S.map(h);if(jr(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,h(R)]));if(Mr(S))return new Set(Array.from(S).map(h));let m=Object.create(kt(S));for(let v in S)m[v]=h(S[v]);return Tr(S,Or)&&(m[Or]=S[Or]),m}function y(S){return Pe(S)?h(S):S}rg("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:c})}var Oe=new ag,et=Oe.produce,An=Oe.produceWithPatches.bind(Oe),hw=Oe.setAutoFreeze.bind(Oe),yw=Oe.setUseStrictShallowCopy.bind(Oe),Ao=Oe.applyPatches.bind(Oe),Sw=Oe.createDraft.bind(Oe),vw=Oe.finishDraft.bind(Oe);g();d();f();p();function cg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ug(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lg(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 uc=e=>Array.isArray(e)?e:[e];function dg(e){let t=Array.isArray(e[0])?e[0]:e;return lg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pg(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var Ew=Symbol();var Iw=Object.getPrototypeOf({});var fg=class{constructor(e){this.value=e}deref(){return this.value}},gg=typeof WeakRef<"u"?WeakRef:fg,mg=0,lc=1;function Cn(){return{s:mg,v:void 0,o:null,p:null}}function Wt(e,t={}){let r=Cn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let u=r,{length:c}=arguments;for(let y=0,S=c;y<S;y++){let m=arguments[y];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let R=v.get(m);R===void 0?(u=Cn(),v.set(m,u)):u=R}else{let v=u.p;v===null&&(u.p=v=new Map);let R=v.get(m);R===void 0?(u=Cn(),v.set(m,u)):u=R}}let a=u,h;if(u.s===lc)h=u.v;else if(h=e.apply(null,arguments),o++,n){let y=i?.deref?.()??i;y!=null&&n(y,h)&&(h=y,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new gg(h):h}return a.s=lc,a.v=h,h}return s.clearCache=()=>{r=Cn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function dc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,c={},a=i.pop();typeof a=="object"&&(c=a,a=i.pop()),cg(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let h={...r,...c},{memoize:y,memoizeOptions:S=[],argsMemoize:m=Wt,argsMemoizeOptions:v=[],devModeChecks:R={}}=h,E=uc(S),C=uc(v),P=dg(i),b=y(function(){return o++,a.apply(null,arguments)},...E),I=!0,j=m(function(){s++;let k=pg(P,arguments);return u=b.apply(null,k),u},...C);return Object.assign(j,{resultFunc:a,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var ae=dc(Wt),hg=Object.assign((e,t=ae)=>{ug(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>hg});g();d();f();p();function pc(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var fc=pc(),gc=pc;var yg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gt:Gt.apply(null,arguments)},Hw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Sg=e=>e&&typeof e.match=="function";function B(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ue(0));return{type:e,payload:i.payload,...("meta"in i&&{meta:i.meta}),...("error"in i&&{error:i.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>mn(n)&&n.type===e,r}var vc=class Nr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nr.prototype)}static get[Symbol.species](){return Nr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nr(...t[0].concat(this)):new Nr(...t.concat(this))}};function mc(e){return Ee(e)?et(e,()=>{}):e}function hc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function vg(e){return typeof e=="boolean"}var Ag=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new vc;return r&&(vg(r)?s.push(fc):s.push(gc(r.extraArgument))),s},_r="RTK_autoBatch",Kt=()=>e=>({payload:e,meta:{[_r]:!0}}),yc=e=>t=>{setTimeout(t,e)},Cg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yc(10):e.type==="callback"?e.queueNotification:yc(e.timeout),a=()=>{s=!1,o&&(o=!1,u.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let y=()=>i&&h(),S=n.subscribe(y);return u.add(h),()=>{S(),u.delete(h)}},dispatch(h){try{return i=!h?.meta?.[_r],o=!i,o&&(s||(s=!0,c(a))),n.dispatch(h)}finally{i=!0}}})},bg=e=>function(r){let{autoBatch:n=!0}=r??{},i=new vc(e);return n&&i.push(Cg(typeof n=="object"?n:void 0)),i};function Ac(e){let t=Ag(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Qe(r))u=zt(r);else throw new Error(Ue(1));let c;typeof n=="function"?c=n(t):c=t();let a=Gt;i&&(a=yg({trace:!1,...(typeof i=="object"&&i)}));let h=Ja(...c),y=bg(h),S=typeof s=="function"?s(y):y(),m=a(...S);return so(u,o,m)}function Cc(e){let t={},r=[],n,i={addCase(o,s){let u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ue(28));if(u in t)throw new Error(Ue(29));return t[u]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function wg(e){return typeof e=="function"}function fe(e,t){let[r,n,i]=Cc(t),o;if(wg(e))o=()=>mc(e());else{let u=mc(e);o=()=>u}function s(u=o(),c){let a=[r[c.type],...n.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return a.filter(h=>!!h).length===0&&(a=[i]),a.reduce((h,y)=>{if(y)if(Pe(h)){let m=y(h,c);return m===void 0?h:m}else{if(Ee(h))return et(h,S=>y(S,c));{let S=y(h,c);if(S===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return h},u)}return s.getInitialState=o,s}var bc=(e,t)=>Sg(e)?e.match(t):e(t);function $e(...e){return t=>e.some(r=>bc(r,t))}function Yt(...e){return t=>e.every(r=>bc(r,t))}function wn(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 Lr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Rn(...e){return e.length===0?t=>wn(t,["pending"]):Lr(e)?$e(...e.map(t=>t.pending)):Rn()(e[0])}function Ft(...e){return e.length===0?t=>wn(t,["rejected"]):Lr(e)?$e(...e.map(t=>t.rejected)):Ft()(e[0])}function Ur(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Yt(Ft(...e),t):Lr(e)?Yt(Ft(...e),t):Ur()(e[0])}function tt(...e){return e.length===0?t=>wn(t,["fulfilled"]):Lr(e)?$e(...e.map(t=>t.fulfilled)):tt()(e[0])}function xn(...e){return e.length===0?t=>wn(t,["pending","fulfilled","rejected"]):Lr(e)?$e(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):xn()(e[0])}var Rg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",En=(e=21)=>{let t="",r=e;for(;r--;)t+=Rg[Math.random()*64|0];return t},xg=["name","message","stack","code"],Co=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Sc=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Eg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of xg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},oe=(()=>{function e(t,r,n){let i=B(t+"/fulfilled",(c,a,h,y)=>({payload:c,meta:{...(y||{}),arg:h,requestId:a,requestStatus:"fulfilled"}})),o=B(t+"/pending",(c,a,h)=>({payload:void 0,meta:{...(h||{}),arg:a,requestId:c,requestStatus:"pending"}})),s=B(t+"/rejected",(c,a,h,y,S)=>({payload:y,error:(n&&n.serializeError||Eg)(c||"Rejected"),meta:{...(S||{}),arg:h,requestId:a,rejectedWithValue:!!y,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,h,y)=>{let S=n?.idGenerator?n.idGenerator(c):En(),m=new l.AbortController,v,R;function E(P){R=P,m.abort()}let C=_asyncToGenerator(function*(){let P;try{let I=n?.condition?.(c,{getState:h,extra:y});if(kg(I)&&(I=yield I),I===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((F,k)=>{v=()=>{k({name:"AbortError",message:R||"Aborted"})},m.signal.addEventListener("abort",v)});a(o(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:h,extra:y}))),P=yield Promise.race([j,Promise.resolve(r(c,{dispatch:a,getState:h,extra:y,requestId:S,signal:m.signal,abort:E,rejectWithValue:(F,k)=>new Co(F,k),fulfillWithValue:(F,k)=>new Sc(F,k)})).then(F=>{if(F instanceof Co)throw F;return F instanceof Sc?i(F.payload,S,c,F.meta):i(F,S,c)})])}catch(I){P=I instanceof Co?s(null,S,c,I.payload,I.meta):s(I,S,c)}finally{v&&m.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(P)&&P.meta.condition||a(P),P})();return Object.assign(C,{abort:E,requestId:S,arg:c,unwrap(){return C.then(Ig)}})}}return Object.assign(u,{pending:o,rejected:s,fulfilled:i,settled:$e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ig(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var wc=Symbol.for("rtk-slice-createasyncthunk"),Kw={[wc]:oe};function Pg(e,t){return`${e}/${t}`}function Og({creators:e}={}){let t=e?.asyncThunk?.[wc];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ue(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Tg()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(P,b){let I=typeof P=="string"?P:P.type;if(!I)throw new Error(Ue(12));if(I in c.sliceCaseReducersByType)throw new Error(Ue(13));return c.sliceCaseReducersByType[I]=b,a},addMatcher(P,b){return c.sliceMatchers.push({matcher:P,reducer:b}),a},exposeAction(P,b){return c.actionCreators[P]=b,a},exposeCaseReducer(P,b){return c.sliceCaseReducersByName[P]=b,a}};u.forEach(P=>{let b=s[P],I={reducerName:P,type:Pg(i,P),createNotation:typeof n.reducers=="function"};qg(b)?Mg(I,b,a,t):Dg(I,b,a)});function h(){let[P={},b=[],I=void 0]=typeof n.extraReducers=="function"?Cc(n.extraReducers):[n.extraReducers],j={...P,...c.sliceCaseReducersByType};return fe(n.initialState,F=>{for(let k in j)F.addCase(k,j[k]);for(let k of c.sliceMatchers)F.addMatcher(k.matcher,k.reducer);for(let k of b)F.addMatcher(k.matcher,k.reducer);I&&F.addDefaultCase(I)})}let y=P=>P,S=new Map,m;function v(P,b){return m||(m=h()),m(P,b)}function R(){return m||(m=h()),m.getInitialState()}function E(P,b=!1){function I(F){let k=F[P];return typeof k>"u"&&b&&(k=R()),k}function j(F=y){let k=hc(S,b,()=>new WeakMap);return hc(k,F,()=>{let O={};for(let[T,M]of Object.entries(n.selectors??{}))O[T]=Fg(M,F,R,b);return O})}return{reducerPath:P,getSelectors:j,get selectors(){return j(I)},selectSlice:I}}let C={name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:R,...E(o),injectInto(P,{reducerPath:b,...I}={}){let j=b??o;return P.inject({reducerPath:j,reducer:v},I),{...C,...E(j,!0)}}};return C}}function Fg(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Tt=Og();function Tg(){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 Dg({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!jg(n))throw new Error(Ue(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?B(e,s):B(e))}function qg(e){return e._reducerDefinitionType==="asyncThunk"}function jg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Mg({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ue(18));let{payloadCreator:o,fulfilled:s,pending:u,rejected:c,settled:a,options:h}=r,y=i(e,o,h);n.exposeAction(t,y),s&&n.addCase(y.fulfilled,s),u&&n.addCase(y.pending,u),c&&n.addCase(y.rejected,c),a&&n.addMatcher(y.settled,a),n.exposeCaseReducer(t,{fulfilled:s||bn,pending:u||bn,rejected:c||bn,settled:a||bn})}function bn(){}var Rc="listener",xc="completed",Ec="cancelled",Jw=`task-${Ec}`,Xw=`task-${xc}`,Zw=`${Rc}-${Ec}`,eR=`${Rc}-${xc}`;var{assign:Ic}=Object;var bo="listenerMiddleware";var Ng=Ic(B(`${bo}/add`),{withTypes:()=>Ng}),tR=B(`${bo}/removeAll`),_g=Ic(B(`${bo}/remove`),{withTypes:()=>_g});var rR=Symbol.for("rtk-state-proxy-original");function Ue(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. `}g();d();f();p();var ee=new W({required:!0,emptyAllowed:!1}),ge=new W({required:!1,emptyAllowed:!1}),Ve=new W({required:!0,emptyAllowed:!0}),fR=new W({required:!1,emptyAllowed:!0}),kc=new Ze({each:ee,required:!0}),Pc=new W({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Oc=new W({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),gR=new W({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Lg=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wo=(e,t)=>{if("required"in t)return{payload:new Le({value:t}).validate({value:e}).value};let i=new ce({options:{required:!0},values:t}).validate(e);if(i)throw new Zi(i);return{payload:e}},z=(e,t)=>{try{return wo(e,t)}catch(r){return{payload:e,error:Lg(r)}}};var In=(e,t,r,n)=>{let i=`Check the options of ${n}`;return Ug(e,t,r,i,"Controller initialization error")},Ug=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var kn=B("caseAssistConfiguration/set",e=>z(e,{caseAssistId:ee,locale:ge,proxyBaseUrl:new W({required:!1,url:!0})}));g();d();f();p();g();d();f();p();var Fc=()=>({caseAssistId:"",locale:"en-US"});var ut=fe(Fc(),e=>{e.addCase(kn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});g();d();f();p();g();d();f();p();g();d();f();p();var Tc={q:new W,enableQuerySyntax:new he,aq:new W,cq:new W,firstResult:new Re({min:0}),numberOfResults:new Re({min:0}),sortCriteria:new W,f:new ce,fExcluded:new ce,cf:new ce,nf:new ce,mnf:new ce,df:new ce,debug:new he,sf:new ce,tab:new W,af:new ce};var Pn=B("searchParameters/restore",e=>z(e,Tc)),Dc=B("searchParameters/restoreTab",e=>z(e,ee));g();d();f();p();var qc=B("debug/enable"),jc=B("debug/disable");g();d();f();p();var On=()=>!1;var Mc=fe(On(),e=>{e.addCase(qc,()=>!0).addCase(jc,()=>!1).addCase(Pn,(t,r)=>r.payload.debug??t)});g();d();f();p();var Fn=B("searchHub/set",e=>z(e,new W({required:!0,emptyAllowed:!0})));g();d();f();p();g();d();f();p();g();d();f();p();var Jt="3.28.0-pre.bc5fc96bfc",Nc=["@coveo/atomic","@coveo/quantic"];var Ro=()=>ge,_c=()=>ee,Xt=B("configuration/updateBasicConfiguration",e=>z(e,{accessToken:ge,environment:new W({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ge})),Tn=B("configuration/updateSearchConfiguration",e=>z(e,{proxyBaseUrl:new W({required:!1,url:!0}),pipeline:new W({required:!1,emptyAllowed:!0}),searchHub:ge,timezone:ge,locale:ge,authenticationProviders:new Ze({required:!1,each:ee})})),Vg={enabled:new he({default:!0}),originContext:Ro(),originLevel2:Ro(),originLevel3:Ro(),proxyBaseUrl:new W({required:!1,url:!0}),runtimeEnvironment:new Et,anonymous:new he({default:!1}),deviceId:ge,userDisplayName:ge,documentLocation:ge,trackingId:Oc,analyticsMode:new W({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ce({options:{required:!1},values:Nc.reduce((e,t)=>(e[t]=Pc,e),{})})},Dn=B("configuration/updateAnalyticsConfiguration",e=>z(e,Vg)),qn=B("configuration/analytics/disable"),jn=B("configuration/analytics/enable"),Lc=B("configuration/analytics/originlevel2",e=>z(e,{originLevel2:_c()})),Uc=B("configuration/analytics/originlevel3",e=>z(e,{originLevel3:_c()}));g();d();f();p();var Bg=B("history/undo"),Qg=B("history/redo"),He=B("history/snapshot"),$x=oe("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Bg()),yield t(Mn())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),Hx=oe("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Qg()),yield t(Mn())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Mn=oe("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());g();d();f();p();var Zt=()=>"default";var Vc=fe(Zt(),e=>{e.addCase(Fn,(t,r)=>r.payload).addCase(Mn.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Tn,(t,r)=>r.payload.searchHub||t)});g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var Bc=/^(?:[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 $g(e){return typeof e=="string"&&Bc.test(e)}var xo=$g;g();d();f();p();var ve=[];for(let e=0;e<256;++e)ve.push((e+256).toString(16).slice(1));function Qc(e,t=0){return(ve[e[t+0]]+ve[e[t+1]]+ve[e[t+2]]+ve[e[t+3]]+"-"+ve[e[t+4]]+ve[e[t+5]]+"-"+ve[e[t+6]]+ve[e[t+7]]+"-"+ve[e[t+8]]+ve[e[t+9]]+"-"+ve[e[t+10]]+ve[e[t+11]]+ve[e[t+12]]+ve[e[t+13]]+ve[e[t+14]]+ve[e[t+15]]).toLowerCase()}g();d();f();p();var Eo,Hg=new Uint8Array(16);function Io(){if(!Eo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Eo=crypto.getRandomValues.bind(crypto)}return Eo(Hg)}g();d();f();p();g();d();f();p();var zg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ko={randomUUID:zg};function Gg(e,t,r){if(ko.randomUUID&&!t&&!e)return ko.randomUUID();e=e||{};let n=e.random??e.rng?.()??Io();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 i=0;i<16;++i)t[r+i]=n[i];return t}return Qc(n)}var Po=Gg;g();d();f();p();function $c(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Wg({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var Hc="visitorId";function Yg(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Hc),i=n&&xo(n)?n:t.generateUUID();return r.setItem(Hc,i),i}}}var Kc="1.2.6",Oo=128,Jc=192,zc=224,Gc=240,Kg=248;function Jg(e){return(e&Kg)===Gc?4:(e&Gc)===zc?3:(e&zc)===Jc?2:1}function Xg(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&Oo)!=Oo)break;if(r-=3,(n&Jc)!=Oo){t-r>=Jg(n)*3&&(r=t);break}}return e.substring(0,r)}function Zg(e){let{trackingId:t}=e;return{trackingId:t}}function em(e){return(e.source||[]).concat([`relay@${Kc}`])}function Xc(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,u=Zg(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:em(t),clientId:c,userAgent:s(),referrer:Wc(i()),location:Wc(o())})}function Wc(e){return e!==null?Xg(e,1024):null}function tm(e,t,r,n,i){return{...t,meta:Xc(e,r,n,i)}}var rm="*";function nm(){let e=[];function t({type:c,callback:a}){return e.findIndex(h=>h.type===c&&h.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function i(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(h){console.error(h)}})}function o(c){if(c===rm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):o(c)}return{add:n,call:i,remove:u}}function Yc({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 im(e){let t=Yc(e);return{get:()=>t,update:r=>{t=Yc({...t,...r})}}}var Fo=om();function om(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,u=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function sm(){return{getItem(e){return Fo.getItem(e)||localStorage.getItem(e)},removeItem(e){Fo.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Fo.setItem(e,t,31556952e3)}}}function am(){let e=document.referrer;return e===""?null:e}function cm(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if($c().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:()=>am(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Po(),storage:sm()}}function um(){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 lm(){return{getItem(){return null},removeItem(){},setItem(){}}}function dm(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:lm()}}function pm(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=dm();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&fm()&&um()?cm():n}function fm(){try{return typeof window=="object"}catch{return!1}}function gm(e){return{get:()=>Object.freeze(pm(e))}}function Zc(e){let t=im(e),r=nm(),n=gm(t),i=Yg(n);return{emit:(o,s)=>{let u=t.get(),c=n.get(),a=tm(o,s,u,c,i);return Wg({config:u,environment:c,event:a,listenerManager:r})},getMeta:o=>Xc(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Kc}}g();d();f();p();var er=ae(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Jt}`));var Vr=ae(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>er(e.configuration.analytics),(e,t)=>mm(t),(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s,u)=>Zc({mode:o?"emit":"disabled",url:i??an(e,t),token:r,trackingId:n??null,source:s,environment:u})),mm=e=>{if(!e)return;let t=e();return{getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent,generateUUID:()=>t.clientId}};g();d();f();p();g();d();f();p();var eu=()=>({referrer:null,userAgent:null,location:null,clientId:""}),To=(e,t)=>{let{referrer:r,userAgent:n,location:i,clientId:o}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:i,clientId:o}};g();d();f();p();var Do=ae(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:i}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(i&&{lq:i})}});g();d();f();p();var tr=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:er(e)}});g();d();f();p();var tu=ae(e=>e.context,e=>e);g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();function rt(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function D(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(h){try{a(n.next(h))}catch(y){s(y)}}function c(h){try{a(n.throw(h))}catch(y){s(y)}}function a(h){h.done?o(h.value):i(h.value).then(u,c)}a((n=n.apply(e,t||[])).next())})}var re;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(re||(re={}));function Mo(){return typeof window<"u"}function Yo(){return typeof navigator<"u"}function rr(){return typeof document<"u"}function No(){try{return typeof localStorage<"u"}catch{return!1}}function hm(){try{return typeof sessionStorage<"u"}catch{return!1}}function mu(){return Yo()&&navigator.cookieEnabled}var ym=[re.click,re.custom,re.search,re.view],Sm=(e,t)=>ym.indexOf(e)!==-1?Object.assign({language:rr()?document.documentElement.lang:"unknown",userAgent:Yo()?navigator.userAgent:"unknown"},t):t,Qr=class e{static set(t,r,n){var i,o,s,u;n&&(o=new Date,o.setTime(o.getTime()+n)),u=window.location.hostname,u.indexOf(".")===-1?ru(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],ru(t,r,o,i))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function ru(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function vm(){return No()?localStorage:mu()?new $r:hm()?sessionStorage:new ir}var $r=class e{getItem(t){return Qr.get(`${e.prefix}${t}`)}removeItem(t){Qr.erase(`${e.prefix}${t}`)}setItem(t,r,n){Qr.set(`${e.prefix}${t}`,r,n)}};$r.prefix="coveo_";var _o=class{constructor(){this.cookieStorage=new $r}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)}},ir=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Nn="__coveo.analytics.history",Am=20,Cm=1e3*60,bm=75,Un=class{constructor(t){this.store=t||vm()}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 D(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 D(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Nn);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return D(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Nn);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Nn,JSON.stringify(t.slice(0,Am)))}catch{}}clear(){try{this.store.removeItem(Nn)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,bm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Cm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var wm=(e,t)=>D(void 0,void 0,void 0,function*(){return e===re.view?(yield Rm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Rm=e=>D(void 0,void 0,void 0,function*(){let t=new Un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),_n,xm=new Uint8Array(16);function Em(){if(!_n&&(_n=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _n(xm)}var Im=/^(?:[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 Vn(e){return typeof e=="string"&&Im.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function hu(e,t=0){return(Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]).toLowerCase()}function km(e){if(!Vn(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 Pm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Om="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Fm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Tm(e,t,r){function n(i,o,s,u){var c;if(typeof i=="string"&&(i=Pm(i)),typeof o=="string"&&(o=km(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(o),a.set(i,o.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){u=u||0;for(let h=0;h<16;++h)s[u+h]=a[h];return s}return hu(a)}try{n.name=e}catch{}return n.DNS=Om,n.URL=Fm,n}var Dm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nu={randomUUID:Dm};function Dt(e,t,r){if(nu.randomUUID&&!t&&!e)return nu.randomUUID();e=e||{};let n=e.random||(e.rng||Em)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return hu(n)}function qm(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 qo(e,t){return e<<t|e>>>32-t}function jm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let s=unescape(encodeURIComponent(e));e=[];for(let u=0;u<s.length;++u)e.push(s.charCodeAt(u))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let s=0;s<i;++s){let u=new Uint32Array(16);for(let c=0;c<16;++c)u[c]=e[s*64+c*4]<<24|e[s*64+c*4+1]<<16|e[s*64+c*4+2]<<8|e[s*64+c*4+3];o[s]=u}o[i-1][14]=(e.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let u=new Uint32Array(80);for(let m=0;m<16;++m)u[m]=o[s][m];for(let m=16;m<80;++m)u[m]=qo(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);let c=r[0],a=r[1],h=r[2],y=r[3],S=r[4];for(let m=0;m<80;++m){let v=Math.floor(m/20),R=qo(c,5)+qm(v,a,h,y)+S+t[v]+u[m]>>>0;S=y,y=h,h=qo(a,30)>>>0,a=c,c=R}r[0]=r[0]+c>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Mm=Tm("v5",80,jm),iu=Mm,yu="2.30.45",ou=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Br={pageview:"pageview",event:"event"},Bn=class{constructor({client:t,uuidGenerator:r=Dt}){this.client=t,this.uuidGenerator=r}},Lo=class extends Bn{constructor({client:t,uuidGenerator:r=Dt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ou(window.location),this.lastReferrer=rr()?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:rr()?document.title:"",encoding:rr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},i={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),i),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:i,location:o}=this.getNextValues(t,r);this.lastReferrer=i,this.pageViewId=n,this.currentLocation=o,t===Br.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Br.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Br.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Br.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=i=>i.replace(/^\/?(.*)$/,"/$1");return`${(i=>i.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ou(window.location)}},lt=class e{constructor(t,r){if(!Vn(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(i=>new RegExp(i.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,i]=r;if(n.length!==32||isNaN(parseInt(i)))return null;let o=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Vn(o)?new e(o,Number.parseInt(i)*1e3):null}};lt.cvo_cid="cvo_cid";lt.expirationTime=120;var Uo=class extends Bn{constructor({client:t,uuidGenerator:r=Dt}){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 D(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(lt.cvo_cid,new lt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Uo.Id="link";var Me=Object.keys;function Ln(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var jo=128,Su=192,su=224,au=240;function Nm(e){return(e&248)===au?4:(e&au)===su?3:(e&su)===Su?2:1}function _m(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&jo)!=jo)break;if(r-=3,(n&Su)!=jo){t-r>=Nm(n)*3&&(r=t);break}}return e.substring(0,r)}var Vo={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"},Lm=Me(Vo).map(e=>Vo[e]),Um=[...Lm].join("|"),Vm=new RegExp(`^(${Um}$)`),Bm={svcAction:"svc_action",svcActionData:"svc_action_data"},Qm=e=>Me(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Vo[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),$m=e=>Vm.test(e),Hm=[$m],cu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},uu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ce={action:"pa",list:"pal",listSource:"pls"},Qn={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},zm=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Bo={id:"quoteId",affiliation:"quoteAffiliation"},Qo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Gm={add:Ce,bookmark_add:Ce,bookmark_remove:Ce,click:Ce,checkout:Ce,checkout_option:Ce,detail:Ce,impression:Ce,remove:Ce,refund:Object.assign(Object.assign({},Ce),Qn),purchase:Object.assign(Object.assign({},Ce),Qn),quickview:Ce,quote:Object.assign(Object.assign({},Ce),Bo),review:Object.assign(Object.assign({},Ce),Qo)},Wm=Me(cu).map(e=>cu[e]),Ym=Me(uu).map(e=>uu[e]),Km=Me(Ce).map(e=>Ce[e]),Jm=Me(Qn).map(e=>Qn[e]),Xm=Me(Qo).map(e=>Qo[e]),Zm=Me(Bo).map(e=>Bo[e]),eh=[...Wm,"custom"].join("|"),th=[...Ym,"custom"].join("|"),vu="(pr[0-9]+)",Au="(il[0-9]+pi[0-9]+)",rh=new RegExp(`^${vu}(${eh})$`),nh=new RegExp(`^(${Au}(${th}))|(il[0-9]+nm)$`),ih=new RegExp(`^(${Km.join("|")})$`),oh=new RegExp(`^(${Jm.join("|")})$`),sh=new RegExp(`^${vu}custom$`),ah=new RegExp(`^${Au}custom$`),ch=new RegExp(`^(${[...zm,...Xm,...Zm].join("|")})$`),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>ih.test(e),ph=e=>oh.test(e),fh=e=>ch.test(e),gh=[lh,uh,dh,ph,fh],mh=[sh,ah],hh={anonymizeIp:"aip"},yh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Sh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},vh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Ah=Object.assign(Object.assign(Object.assign(Object.assign({},hh),yh),Sh),vh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),$o=Object.assign(Object.assign({},Ah),Bm),Ch=e=>{let t=!!e.action&&Gm[e.action]||{};return Me(e).reduce((r,n)=>{let i=t[n]||$o[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})},bh=Me($o).map(e=>$o[e]),wh=e=>bh.indexOf(e)!==-1,Rh=e=>e==="custom",xh=e=>[...gh,...Hm,wh,Rh].some(t=>t(e)),Eh=e=>Me(e).reduce((t,r)=>{let n=Ih(r);return n?Object.assign(Object.assign({},t),kh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ih=e=>{let t;return[...mh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},kh=(e,t)=>Me(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ho=class{constructor(t){this.opts=t}sendEvent(t,r){return D(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:i}=this.opts,o=yield this.getQueryParamsForEventType(t),{url:s,payload:u}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${o}`,r,i),c=this.encodeForEventType(t,u),a=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return D(this,void 0,void 0,function*(){let i=t,o=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:u,body:c}=s;i=u||t;try{o=JSON.parse(c)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:o,url:i}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return D(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,i=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",i?`visitorId=${i}`:"","discardVisitInfo=true"].filter(o=>!!o).join("&")})}isEventTypeLegacy(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let i=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(i=`access_token=${encodeURIComponent(n)}&${i}`),i}},zo=class{sendEvent(t,r){return D(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){return Promise.resolve()})}},lu=A.fetch,$n=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:i,preprocessRequest:o}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},u),o?yield o(u,"analyticsFetch"):{}),{url:a}=c,h=rt(c,["url"]),y;try{y=yield lu(a,h)}catch(S){console.error("An error has occured when sending the event.",S);return}if(y.ok){let S=yield y.json();return S.visitorId&&i.setCurrentVisitorId(S.visitorId),S}else{try{y.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,y,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield lu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}getVisitorIdParam(){return D(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"})}},Go=class{constructor(t,r){No()&&mu()?this.storage=new _o:No()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ir),this.client=new $n(t),this.beaconClient=new Ho(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:i,payload:o}of n)this.beaconClient.sendEvent(i,o)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Wo=class{constructor(t,r){this.storage=r||new ir,this.client=new $n(t)}getClientDependingOnEventType(t){return this.client}},Hn=class{constructor(){this.storage=new ir,this.client=new zo}getClientDependingOnEventType(t){return this.client}},Ph="xx",Oh=e=>e?.startsWith(Ph)||!1,Fh=`
|
|
26
|
+
`;return new Zi(r)}var Zi=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Le=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Df(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}},Et=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&Y(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 $t(e){return e===void 0}function qf(e){return e===null}function Y(e){return $t(e)||qf(e)}var he=class{constructor(e={}){se(this,"value");this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(jf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function jf(e){return $t(e)||Va(e)}function Va(e){return typeof e=="boolean"}var Re=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Mf(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 Mf(e){return $t(e)||Ba(e)}function Ba(e){return typeof e=="number"&&!Number.isNaN(e)}var Nf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,W=class{constructor(e={}){se(this,"value");se(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Et(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if($t(e))return null;if(!Qa(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!(Nf.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 Qa(e){return Object.prototype.toString.call(e)==="[object String]"}var ce=class{constructor(e={}){se(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if($t(e))return this.config.options.required?"value is required and is currently undefined":null;if(!$a(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&Y(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=` ${o}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function $a(e){return e!==void 0&&typeof e=="object"}var Ze=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Et(this.config)}validate(e){if(!Y(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(Y(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&&Y(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=` ${i}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Va(e)||Qa(e)||Ba(e)||$a(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ha(e){return Array.isArray(e)}var eo=class{constructor(e){se(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t!==null?t:$t(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}};g();d();f();p();var cn=e=>e;g();d();f();p();g();d();f();p();g();d();f();p();var Ht=class{constructor(t){se(this,"_basePath");se(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}};g();d();f();p();function to(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var ro=e=>{let{response:t}=e;return t.body?_f(e):Lf(t)},_f=e=>Vf(e)?Bf(e):Uf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Lf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Uf(e){return e.body.statusCode!==void 0}function Vf(e){return e.body.exception!==void 0}var Bf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});g();d();f();p();function za(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}g();d();f();p();var no=(e,t,r,n)=>{let i=new Ht(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var Ga=(e,t)=>{let r=new Ht(`${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},io=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield ct.call({...no(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:to(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=za(r),i=yield r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Qf(s)?{success:s}:{error:ro({response:r,body:s})}});return function io(_x,_x2){return _ref2.apply(this,arguments)}}();function Qf(e){return typeof e=="string"}g();d();f();p();function $f(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Hf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function un(e,t){if(t&&e.name==="AbortError")return{error:Hf(e)};if(e instanceof xt)return{error:$f(e)};throw e}g();d();f();p();g();d();f();p();var ln=(e,t,r,n,i={})=>{zf(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=Gf(i),u=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},dn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r],t),{}),pn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r].value,t),{}),zf=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.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},Gf=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Wa=e=>{let t=e.debug?{debug:"1"}:{};return{...ln(e,"POST","application/json","/classify",t),requestParams:Wf(e)}},Wf=e=>({clientId:e.clientId,locale:e.locale,fields:dn(e.fields)});g();d();f();p();var Ya=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...ln(e,"POST","application/json","/documents/suggest",t),requestParams:Yf(e)}},Yf=e=>({clientId:e.clientId,locale:e.locale,fields:dn(e.fields),context:e.context,analytics:e.analytics});var fn=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield ct.call({...Wa(t),..._this.options});if(r instanceof Error)return un(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield ct.call({...Ya(t),..._this2.options});if(r instanceof Error)return un(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return io(t,_this3.options)})()}};g();d();f();p();g();d();f();p();g();d();f();p();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 Kf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ka=Kf,oo=()=>Math.random().toString(36).substring(7).split("").join("."),Jf={INIT:`@@redux/INIT${oo()}`,REPLACE:`@@redux/REPLACE${oo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${oo()}`},gn=Jf;function Qe(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 so(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(so)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,c=!1;function a(){s===o&&(s=new Map,o.forEach((E,C)=>{s.set(C,E)}))}function h(){if(c)throw new Error(ye(3));return i}function y(E){if(typeof E!="function")throw new Error(ye(4));if(c)throw new Error(ye(5));let C=!0;a();let P=u++;return s.set(P,E),function(){if(C){if(c)throw new Error(ye(6));C=!1,a(),s.delete(P),o=null}}}function S(E){if(!Qe(E))throw new Error(ye(7));if(typeof E.type>"u")throw new Error(ye(8));if(typeof E.type!="string")throw new Error(ye(17));if(c)throw new Error(ye(9));try{c=!0,i=n(i,E)}finally{c=!1}return(o=s).forEach(P=>{P()}),E}function m(E){if(typeof E!="function")throw new Error(ye(10));n=E,S({type:gn.REPLACE})}function v(){let E=y;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(ye(11));function P(){let I=C;I.next&&I.next(h())}return P(),{unsubscribe:E(P)}},[Ka](){return this}}}return S({type:gn.INIT}),{dispatch:S,subscribe:y,getState:h,replaceReducer:m,[Ka]:v}}function Xf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:gn.INIT})>"u")throw new Error(ye(12));if(typeof r(void 0,{type:gn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function zt(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),i,o;try{Xf(r)}catch(s){o=s}return function(u={},c){if(o)throw o;let a=!1,h={};for(let y=0;y<n.length;y++){let S=n[y],m=r[S],v=u[S],R=m(v,c);if(typeof R>"u"){let E=c&&c.type;throw new Error(ye(14))}h[S]=R,a=a||R!==v}return a=a||n.length!==Object.keys(u).length,a?h:u}}function Gt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Ja(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(ye(15))},s={getState:i.getState,dispatch:(c,...a)=>o(c,...a)},u=e.map(c=>c(s));return o=Gt(...u)(i.dispatch),{...i,dispatch:o}}}function mn(e){return Qe(e)&&"type"in e&&typeof e.type=="string"}g();d();f();p();var yo=Symbol.for("immer-nothing"),Or=Symbol.for("immer-draftable"),xe=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var kt=Object.getPrototypeOf;function Pe(e){return!!e&&!!e[xe]}function Ee(e){return e?rc(e)||Array.isArray(e)||!!e[Or]||!!e.constructor?.[Or]||jr(e)||Mr(e):!1}var Zf=Object.prototype.constructor.toString();function rc(e){if(!e||typeof e!="object")return!1;let t=kt(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)===Zf}function So(e){return Pe(e)||Se(15,e),e[xe].base_}function Fr(e,t){Pt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Pt(e){let t=e[xe];return t?t.type_:Array.isArray(e)?1:jr(e)?2:Mr(e)?3:0}function Tr(e,t){return Pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ao(e,t){return Pt(e)===2?e.get(t):e[t]}function nc(e,t,r){let n=Pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eg(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function jr(e){return e instanceof Map}function Mr(e){return e instanceof Set}function It(e){return e.copy_||e.base_}function lo(e,t){if(jr(e))return new Map(e);if(Mr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[xe];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(kt(e),n)}else{let n=kt(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function Sn(e,t=!1){return vn(e)||Pe(e)||!Ee(e)||(Pt(e)>1&&(e.set=e.add=e.clear=e.delete=tg),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Sn(n,!0))),e}function tg(){Se(2)}function vn(e){return Object.isFrozen(e)}var po={};function Ot(e){let t=po[e];return t||Se(0,e),t}function rg(e,t){po[e]||(po[e]=t)}var Dr;function ic(){return Dr}function ng(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xa(e,t){t&&(Ot("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fo(e){go(e),e.drafts_.forEach(ig),e.drafts_=null}function go(e){e===Dr&&(Dr=e.parent_)}function Za(e){return Dr=ng(Dr,e)}function ig(e){let t=e[xe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ec(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[xe].modified_&&(fo(t),Se(4)),Ee(e)&&(e=hn(t,e),t.parent_||yn(t,e)),t.patches_&&Ot("Patches").generateReplacementPatches_(r[xe].base_,e,t.patches_,t.inversePatches_)):e=hn(t,r,[]),fo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yo?e:void 0}function hn(e,t,r){if(vn(t))return t;let n=t[xe];if(!n)return Fr(t,(i,o)=>tc(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return yn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Fr(o,(u,c)=>tc(e,n,i,u,c,r,s)),yn(e,i,!1),r&&e.patches_&&Ot("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function tc(e,t,r,n,i,o,s){if(Pe(i)){let u=o&&t&&t.type_!==3&&!Tr(t.assigned_,n)?o.concat(n):void 0,c=hn(e,i,u);if(nc(r,n,c),Pe(c))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Ee(i)&&!vn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;hn(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&yn(e,i)}}function yn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Sn(t,r)}function og(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ic(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=vo;r&&(i=[n],o=qr);let{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var vo={get(e,t){if(t===xe)return e;let r=It(e);if(!Tr(r,t))return sg(e,r,t);let n=r[t];return e.finalized_||!Ee(n)?n:n===co(e.base_,t)?(uo(e),e.copy_[t]=ho(n,e)):n},has(e,t){return t in It(e)},ownKeys(e){return Reflect.ownKeys(It(e))},set(e,t,r){let n=oc(It(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=co(It(e),t),o=i?.[xe];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eg(r,i)&&(r!==void 0||Tr(e.base_,t)))return!0;uo(e),mo(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 co(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uo(e),mo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=It(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return kt(e.base_)},setPrototypeOf(){Se(12)}},qr={};Fr(vo,(e,t)=>{qr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qr.deleteProperty=function(e,t){return qr.set.call(this,e,t,void 0)};qr.set=function(e,t,r){return vo.set.call(this,e[0],t,r,e[0])};function co(e,t){let r=e[xe];return(r?It(r):e)[t]}function sg(e,t,r){let n=oc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function oc(e,t){if(!(t in e))return;let r=kt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=kt(r)}}function mo(e){e.modified_||(e.modified_=!0,e.parent_&&mo(e.parent_))}function uo(e){e.copy_||(e.copy_=lo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ag=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(c=o,...a){return s.produce(c,h=>r.call(this,h,...a))}}typeof r!="function"&&Se(6),n!==void 0&&typeof n!="function"&&Se(7);let i;if(Ee(t)){let o=Za(this),s=ho(t,void 0),u=!0;try{i=r(s),u=!1}finally{u?fo(o):go(o)}return Xa(o,n),ec(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===yo&&(i=void 0),this.autoFreeze_&&Sn(i,!0),n){let o=[],s=[];Ot("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else Se(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ee(e)||Se(8),Pe(e)&&(e=sc(e));let t=Za(this),r=ho(e,void 0);return r[xe].isManual_=!0,go(t),r}finishDraft(e,t){let r=e&&e[xe];(!r||!r.isManual_)&&Se(9);let{scope_:n}=r;return Xa(n,t),ec(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Ot("Patches").applyPatches_;return Pe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function ho(e,t){let r=jr(e)?Ot("MapSet").proxyMap_(e,t):Mr(e)?Ot("MapSet").proxySet_(e,t):og(e,t);return(t?t.scope_:ic()).drafts_.push(r),r}function sc(e){return Pe(e)||Se(10,e),ac(e)}function ac(e){if(!Ee(e)||vn(e))return e;let t=e[xe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=lo(e,t.scope_.immer_.useStrictShallowCopy_)}else r=lo(e,!0);return Fr(r,(n,i)=>{nc(r,n,ac(i))}),t&&(t.finalized_=!1),r}function cc(){let t="replace",r="add",n="remove";function i(S,m,v,R){switch(S.type_){case 0:case 2:return s(S,m,v,R);case 1:return o(S,m,v,R);case 3:return u(S,m,v,R)}}function o(S,m,v,R){let{base_:E,assigned_:C}=S,P=S.copy_;P.length<E.length&&([E,P]=[P,E],[v,R]=[R,v]);for(let b=0;b<E.length;b++)if(C[b]&&P[b]!==E[b]){let I=m.concat([b]);v.push({op:t,path:I,value:y(P[b])}),R.push({op:t,path:I,value:y(E[b])})}for(let b=E.length;b<P.length;b++){let I=m.concat([b]);v.push({op:r,path:I,value:y(P[b])})}for(let b=P.length-1;E.length<=b;--b){let I=m.concat([b]);R.push({op:n,path:I})}}function s(S,m,v,R){let{base_:E,copy_:C}=S;Fr(S.assigned_,(P,b)=>{let I=ao(E,P),j=ao(C,P),F=b?Tr(E,P)?t:r:n;if(I===j&&F===t)return;let k=m.concat(P);v.push(F===n?{op:F,path:k}:{op:F,path:k,value:j}),R.push(F===r?{op:n,path:k}:F===n?{op:r,path:k,value:y(I)}:{op:t,path:k,value:y(I)})})}function u(S,m,v,R){let{base_:E,copy_:C}=S,P=0;E.forEach(b=>{if(!C.has(b)){let I=m.concat([P]);v.push({op:n,path:I,value:b}),R.unshift({op:r,path:I,value:b})}P++}),P=0,C.forEach(b=>{if(!E.has(b)){let I=m.concat([P]);v.push({op:r,path:I,value:b}),R.unshift({op:n,path:I,value:b})}P++})}function c(S,m,v,R){v.push({op:t,path:[],value:m===yo?void 0:m}),R.push({op:t,path:[],value:S})}function a(S,m){return m.forEach(v=>{let{path:R,op:E}=v,C=S;for(let j=0;j<R.length-1;j++){let F=Pt(C),k=R[j];typeof k!="string"&&typeof k!="number"&&(k=""+k),(F===0||F===1)&&(k==="__proto__"||k==="constructor")&&Se(19),typeof C=="function"&&k==="prototype"&&Se(19),C=ao(C,k),typeof C!="object"&&Se(18,R.join("/"))}let P=Pt(C),b=h(v.value),I=R[R.length-1];switch(E){case t:switch(P){case 2:return C.set(I,b);case 3:Se(16);default:return C[I]=b}case r:switch(P){case 1:return I==="-"?C.push(b):C.splice(I,0,b);case 2:return C.set(I,b);case 3:return C.add(b);default:return C[I]=b}case n:switch(P){case 1:return C.splice(I,1);case 2:return C.delete(I);case 3:return C.delete(v.value);default:return delete C[I]}default:Se(17,E)}}),S}function h(S){if(!Ee(S))return S;if(Array.isArray(S))return S.map(h);if(jr(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,h(R)]));if(Mr(S))return new Set(Array.from(S).map(h));let m=Object.create(kt(S));for(let v in S)m[v]=h(S[v]);return Tr(S,Or)&&(m[Or]=S[Or]),m}function y(S){return Pe(S)?h(S):S}rg("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:c})}var Oe=new ag,et=Oe.produce,An=Oe.produceWithPatches.bind(Oe),hw=Oe.setAutoFreeze.bind(Oe),yw=Oe.setUseStrictShallowCopy.bind(Oe),Ao=Oe.applyPatches.bind(Oe),Sw=Oe.createDraft.bind(Oe),vw=Oe.finishDraft.bind(Oe);g();d();f();p();function cg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ug(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lg(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 uc=e=>Array.isArray(e)?e:[e];function dg(e){let t=Array.isArray(e[0])?e[0]:e;return lg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pg(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var Ew=Symbol();var Iw=Object.getPrototypeOf({});var fg=class{constructor(e){this.value=e}deref(){return this.value}},gg=typeof WeakRef<"u"?WeakRef:fg,mg=0,lc=1;function Cn(){return{s:mg,v:void 0,o:null,p:null}}function Wt(e,t={}){let r=Cn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let u=r,{length:c}=arguments;for(let y=0,S=c;y<S;y++){let m=arguments[y];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let R=v.get(m);R===void 0?(u=Cn(),v.set(m,u)):u=R}else{let v=u.p;v===null&&(u.p=v=new Map);let R=v.get(m);R===void 0?(u=Cn(),v.set(m,u)):u=R}}let a=u,h;if(u.s===lc)h=u.v;else if(h=e.apply(null,arguments),o++,n){let y=i?.deref?.()??i;y!=null&&n(y,h)&&(h=y,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new gg(h):h}return a.s=lc,a.v=h,h}return s.clearCache=()=>{r=Cn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function dc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,c={},a=i.pop();typeof a=="object"&&(c=a,a=i.pop()),cg(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let h={...r,...c},{memoize:y,memoizeOptions:S=[],argsMemoize:m=Wt,argsMemoizeOptions:v=[],devModeChecks:R={}}=h,E=uc(S),C=uc(v),P=dg(i),b=y(function(){return o++,a.apply(null,arguments)},...E),I=!0,j=m(function(){s++;let k=pg(P,arguments);return u=b.apply(null,k),u},...C);return Object.assign(j,{resultFunc:a,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var ae=dc(Wt),hg=Object.assign((e,t=ae)=>{ug(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>hg});g();d();f();p();function pc(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var fc=pc(),gc=pc;var yg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gt:Gt.apply(null,arguments)},Hw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Sg=e=>e&&typeof e.match=="function";function B(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ue(0));return{type:e,payload:i.payload,...("meta"in i&&{meta:i.meta}),...("error"in i&&{error:i.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>mn(n)&&n.type===e,r}var vc=class Nr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nr.prototype)}static get[Symbol.species](){return Nr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nr(...t[0].concat(this)):new Nr(...t.concat(this))}};function mc(e){return Ee(e)?et(e,()=>{}):e}function hc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function vg(e){return typeof e=="boolean"}var Ag=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new vc;return r&&(vg(r)?s.push(fc):s.push(gc(r.extraArgument))),s},_r="RTK_autoBatch",Kt=()=>e=>({payload:e,meta:{[_r]:!0}}),yc=e=>t=>{setTimeout(t,e)},Cg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yc(10):e.type==="callback"?e.queueNotification:yc(e.timeout),a=()=>{s=!1,o&&(o=!1,u.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let y=()=>i&&h(),S=n.subscribe(y);return u.add(h),()=>{S(),u.delete(h)}},dispatch(h){try{return i=!h?.meta?.[_r],o=!i,o&&(s||(s=!0,c(a))),n.dispatch(h)}finally{i=!0}}})},bg=e=>function(r){let{autoBatch:n=!0}=r??{},i=new vc(e);return n&&i.push(Cg(typeof n=="object"?n:void 0)),i};function Ac(e){let t=Ag(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Qe(r))u=zt(r);else throw new Error(Ue(1));let c;typeof n=="function"?c=n(t):c=t();let a=Gt;i&&(a=yg({trace:!1,...(typeof i=="object"&&i)}));let h=Ja(...c),y=bg(h),S=typeof s=="function"?s(y):y(),m=a(...S);return so(u,o,m)}function Cc(e){let t={},r=[],n,i={addCase(o,s){let u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ue(28));if(u in t)throw new Error(Ue(29));return t[u]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function wg(e){return typeof e=="function"}function fe(e,t){let[r,n,i]=Cc(t),o;if(wg(e))o=()=>mc(e());else{let u=mc(e);o=()=>u}function s(u=o(),c){let a=[r[c.type],...n.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return a.filter(h=>!!h).length===0&&(a=[i]),a.reduce((h,y)=>{if(y)if(Pe(h)){let m=y(h,c);return m===void 0?h:m}else{if(Ee(h))return et(h,S=>y(S,c));{let S=y(h,c);if(S===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return h},u)}return s.getInitialState=o,s}var bc=(e,t)=>Sg(e)?e.match(t):e(t);function $e(...e){return t=>e.some(r=>bc(r,t))}function Yt(...e){return t=>e.every(r=>bc(r,t))}function wn(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 Lr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Rn(...e){return e.length===0?t=>wn(t,["pending"]):Lr(e)?$e(...e.map(t=>t.pending)):Rn()(e[0])}function Ft(...e){return e.length===0?t=>wn(t,["rejected"]):Lr(e)?$e(...e.map(t=>t.rejected)):Ft()(e[0])}function Ur(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Yt(Ft(...e),t):Lr(e)?Yt(Ft(...e),t):Ur()(e[0])}function tt(...e){return e.length===0?t=>wn(t,["fulfilled"]):Lr(e)?$e(...e.map(t=>t.fulfilled)):tt()(e[0])}function xn(...e){return e.length===0?t=>wn(t,["pending","fulfilled","rejected"]):Lr(e)?$e(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):xn()(e[0])}var Rg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",En=(e=21)=>{let t="",r=e;for(;r--;)t+=Rg[Math.random()*64|0];return t},xg=["name","message","stack","code"],Co=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Sc=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Eg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of xg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},oe=(()=>{function e(t,r,n){let i=B(t+"/fulfilled",(c,a,h,y)=>({payload:c,meta:{...(y||{}),arg:h,requestId:a,requestStatus:"fulfilled"}})),o=B(t+"/pending",(c,a,h)=>({payload:void 0,meta:{...(h||{}),arg:a,requestId:c,requestStatus:"pending"}})),s=B(t+"/rejected",(c,a,h,y,S)=>({payload:y,error:(n&&n.serializeError||Eg)(c||"Rejected"),meta:{...(S||{}),arg:h,requestId:a,rejectedWithValue:!!y,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,h,y)=>{let S=n?.idGenerator?n.idGenerator(c):En(),m=new l.AbortController,v,R;function E(P){R=P,m.abort()}let C=_asyncToGenerator(function*(){let P;try{let I=n?.condition?.(c,{getState:h,extra:y});if(kg(I)&&(I=yield I),I===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((F,k)=>{v=()=>{k({name:"AbortError",message:R||"Aborted"})},m.signal.addEventListener("abort",v)});a(o(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:h,extra:y}))),P=yield Promise.race([j,Promise.resolve(r(c,{dispatch:a,getState:h,extra:y,requestId:S,signal:m.signal,abort:E,rejectWithValue:(F,k)=>new Co(F,k),fulfillWithValue:(F,k)=>new Sc(F,k)})).then(F=>{if(F instanceof Co)throw F;return F instanceof Sc?i(F.payload,S,c,F.meta):i(F,S,c)})])}catch(I){P=I instanceof Co?s(null,S,c,I.payload,I.meta):s(I,S,c)}finally{v&&m.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(P)&&P.meta.condition||a(P),P})();return Object.assign(C,{abort:E,requestId:S,arg:c,unwrap(){return C.then(Ig)}})}}return Object.assign(u,{pending:o,rejected:s,fulfilled:i,settled:$e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ig(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var wc=Symbol.for("rtk-slice-createasyncthunk"),Kw={[wc]:oe};function Pg(e,t){return`${e}/${t}`}function Og({creators:e}={}){let t=e?.asyncThunk?.[wc];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ue(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Tg()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(P,b){let I=typeof P=="string"?P:P.type;if(!I)throw new Error(Ue(12));if(I in c.sliceCaseReducersByType)throw new Error(Ue(13));return c.sliceCaseReducersByType[I]=b,a},addMatcher(P,b){return c.sliceMatchers.push({matcher:P,reducer:b}),a},exposeAction(P,b){return c.actionCreators[P]=b,a},exposeCaseReducer(P,b){return c.sliceCaseReducersByName[P]=b,a}};u.forEach(P=>{let b=s[P],I={reducerName:P,type:Pg(i,P),createNotation:typeof n.reducers=="function"};qg(b)?Mg(I,b,a,t):Dg(I,b,a)});function h(){let[P={},b=[],I=void 0]=typeof n.extraReducers=="function"?Cc(n.extraReducers):[n.extraReducers],j={...P,...c.sliceCaseReducersByType};return fe(n.initialState,F=>{for(let k in j)F.addCase(k,j[k]);for(let k of c.sliceMatchers)F.addMatcher(k.matcher,k.reducer);for(let k of b)F.addMatcher(k.matcher,k.reducer);I&&F.addDefaultCase(I)})}let y=P=>P,S=new Map,m;function v(P,b){return m||(m=h()),m(P,b)}function R(){return m||(m=h()),m.getInitialState()}function E(P,b=!1){function I(F){let k=F[P];return typeof k>"u"&&b&&(k=R()),k}function j(F=y){let k=hc(S,b,()=>new WeakMap);return hc(k,F,()=>{let O={};for(let[T,M]of Object.entries(n.selectors??{}))O[T]=Fg(M,F,R,b);return O})}return{reducerPath:P,getSelectors:j,get selectors(){return j(I)},selectSlice:I}}let C={name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:R,...E(o),injectInto(P,{reducerPath:b,...I}={}){let j=b??o;return P.inject({reducerPath:j,reducer:v},I),{...C,...E(j,!0)}}};return C}}function Fg(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Tt=Og();function Tg(){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 Dg({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!jg(n))throw new Error(Ue(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?B(e,s):B(e))}function qg(e){return e._reducerDefinitionType==="asyncThunk"}function jg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Mg({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ue(18));let{payloadCreator:o,fulfilled:s,pending:u,rejected:c,settled:a,options:h}=r,y=i(e,o,h);n.exposeAction(t,y),s&&n.addCase(y.fulfilled,s),u&&n.addCase(y.pending,u),c&&n.addCase(y.rejected,c),a&&n.addMatcher(y.settled,a),n.exposeCaseReducer(t,{fulfilled:s||bn,pending:u||bn,rejected:c||bn,settled:a||bn})}function bn(){}var Rc="listener",xc="completed",Ec="cancelled",Jw=`task-${Ec}`,Xw=`task-${xc}`,Zw=`${Rc}-${Ec}`,eR=`${Rc}-${xc}`;var{assign:Ic}=Object;var bo="listenerMiddleware";var Ng=Ic(B(`${bo}/add`),{withTypes:()=>Ng}),tR=B(`${bo}/removeAll`),_g=Ic(B(`${bo}/remove`),{withTypes:()=>_g});var rR=Symbol.for("rtk-state-proxy-original");function Ue(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. `}g();d();f();p();var ee=new W({required:!0,emptyAllowed:!1}),ge=new W({required:!1,emptyAllowed:!1}),Ve=new W({required:!0,emptyAllowed:!0}),fR=new W({required:!1,emptyAllowed:!0}),kc=new Ze({each:ee,required:!0}),Pc=new W({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Oc=new W({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),gR=new W({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Lg=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wo=(e,t)=>{if("required"in t)return{payload:new Le({value:t}).validate({value:e}).value};let i=new ce({options:{required:!0},values:t}).validate(e);if(i)throw new Zi(i);return{payload:e}},z=(e,t)=>{try{return wo(e,t)}catch(r){return{payload:e,error:Lg(r)}}};var In=(e,t,r,n)=>{let i=`Check the options of ${n}`;return Ug(e,t,r,i,"Controller initialization error")},Ug=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var kn=B("caseAssistConfiguration/set",e=>z(e,{caseAssistId:ee,locale:ge,proxyBaseUrl:new W({required:!1,url:!0})}));g();d();f();p();g();d();f();p();var Fc=()=>({caseAssistId:"",locale:"en-US"});var ut=fe(Fc(),e=>{e.addCase(kn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});g();d();f();p();g();d();f();p();g();d();f();p();var Tc={q:new W,enableQuerySyntax:new he,aq:new W,cq:new W,firstResult:new Re({min:0}),numberOfResults:new Re({min:0}),sortCriteria:new W,f:new ce,fExcluded:new ce,cf:new ce,nf:new ce,mnf:new ce,df:new ce,debug:new he,sf:new ce,tab:new W,af:new ce};var Pn=B("searchParameters/restore",e=>z(e,Tc)),Dc=B("searchParameters/restoreTab",e=>z(e,ee));g();d();f();p();var qc=B("debug/enable"),jc=B("debug/disable");g();d();f();p();var On=()=>!1;var Mc=fe(On(),e=>{e.addCase(qc,()=>!0).addCase(jc,()=>!1).addCase(Pn,(t,r)=>r.payload.debug??t)});g();d();f();p();var Fn=B("searchHub/set",e=>z(e,new W({required:!0,emptyAllowed:!0})));g();d();f();p();g();d();f();p();g();d();f();p();var Jt="3.28.0-pre.bf3a34cede",Nc=["@coveo/atomic","@coveo/quantic"];var Ro=()=>ge,_c=()=>ee,Xt=B("configuration/updateBasicConfiguration",e=>z(e,{accessToken:ge,environment:new W({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ge})),Tn=B("configuration/updateSearchConfiguration",e=>z(e,{proxyBaseUrl:new W({required:!1,url:!0}),pipeline:new W({required:!1,emptyAllowed:!0}),searchHub:ge,timezone:ge,locale:ge,authenticationProviders:new Ze({required:!1,each:ee})})),Vg={enabled:new he({default:!0}),originContext:Ro(),originLevel2:Ro(),originLevel3:Ro(),proxyBaseUrl:new W({required:!1,url:!0}),runtimeEnvironment:new Et,anonymous:new he({default:!1}),deviceId:ge,userDisplayName:ge,documentLocation:ge,trackingId:Oc,analyticsMode:new W({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ce({options:{required:!1},values:Nc.reduce((e,t)=>(e[t]=Pc,e),{})})},Dn=B("configuration/updateAnalyticsConfiguration",e=>z(e,Vg)),qn=B("configuration/analytics/disable"),jn=B("configuration/analytics/enable"),Lc=B("configuration/analytics/originlevel2",e=>z(e,{originLevel2:_c()})),Uc=B("configuration/analytics/originlevel3",e=>z(e,{originLevel3:_c()}));g();d();f();p();var Bg=B("history/undo"),Qg=B("history/redo"),He=B("history/snapshot"),$x=oe("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Bg()),yield t(Mn())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),Hx=oe("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Qg()),yield t(Mn())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Mn=oe("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());g();d();f();p();var Zt=()=>"default";var Vc=fe(Zt(),e=>{e.addCase(Fn,(t,r)=>r.payload).addCase(Mn.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Tn,(t,r)=>r.payload.searchHub||t)});g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var Bc=/^(?:[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 $g(e){return typeof e=="string"&&Bc.test(e)}var xo=$g;g();d();f();p();var ve=[];for(let e=0;e<256;++e)ve.push((e+256).toString(16).slice(1));function Qc(e,t=0){return(ve[e[t+0]]+ve[e[t+1]]+ve[e[t+2]]+ve[e[t+3]]+"-"+ve[e[t+4]]+ve[e[t+5]]+"-"+ve[e[t+6]]+ve[e[t+7]]+"-"+ve[e[t+8]]+ve[e[t+9]]+"-"+ve[e[t+10]]+ve[e[t+11]]+ve[e[t+12]]+ve[e[t+13]]+ve[e[t+14]]+ve[e[t+15]]).toLowerCase()}g();d();f();p();var Eo,Hg=new Uint8Array(16);function Io(){if(!Eo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Eo=crypto.getRandomValues.bind(crypto)}return Eo(Hg)}g();d();f();p();g();d();f();p();var zg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ko={randomUUID:zg};function Gg(e,t,r){if(ko.randomUUID&&!t&&!e)return ko.randomUUID();e=e||{};let n=e.random??e.rng?.()??Io();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 i=0;i<16;++i)t[r+i]=n[i];return t}return Qc(n)}var Po=Gg;g();d();f();p();function $c(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Wg({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var Hc="visitorId";function Yg(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Hc),i=n&&xo(n)?n:t.generateUUID();return r.setItem(Hc,i),i}}}var Kc="1.2.6",Oo=128,Jc=192,zc=224,Gc=240,Kg=248;function Jg(e){return(e&Kg)===Gc?4:(e&Gc)===zc?3:(e&zc)===Jc?2:1}function Xg(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&Oo)!=Oo)break;if(r-=3,(n&Jc)!=Oo){t-r>=Jg(n)*3&&(r=t);break}}return e.substring(0,r)}function Zg(e){let{trackingId:t}=e;return{trackingId:t}}function em(e){return(e.source||[]).concat([`relay@${Kc}`])}function Xc(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,u=Zg(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:em(t),clientId:c,userAgent:s(),referrer:Wc(i()),location:Wc(o())})}function Wc(e){return e!==null?Xg(e,1024):null}function tm(e,t,r,n,i){return{...t,meta:Xc(e,r,n,i)}}var rm="*";function nm(){let e=[];function t({type:c,callback:a}){return e.findIndex(h=>h.type===c&&h.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function i(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(h){console.error(h)}})}function o(c){if(c===rm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):o(c)}return{add:n,call:i,remove:u}}function Yc({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 im(e){let t=Yc(e);return{get:()=>t,update:r=>{t=Yc({...t,...r})}}}var Fo=om();function om(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,u=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function sm(){return{getItem(e){return Fo.getItem(e)||localStorage.getItem(e)},removeItem(e){Fo.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Fo.setItem(e,t,31556952e3)}}}function am(){let e=document.referrer;return e===""?null:e}function cm(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if($c().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:()=>am(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Po(),storage:sm()}}function um(){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 lm(){return{getItem(){return null},removeItem(){},setItem(){}}}function dm(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:lm()}}function pm(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=dm();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&fm()&&um()?cm():n}function fm(){try{return typeof window=="object"}catch{return!1}}function gm(e){return{get:()=>Object.freeze(pm(e))}}function Zc(e){let t=im(e),r=nm(),n=gm(t),i=Yg(n);return{emit:(o,s)=>{let u=t.get(),c=n.get(),a=tm(o,s,u,c,i);return Wg({config:u,environment:c,event:a,listenerManager:r})},getMeta:o=>Xc(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Kc}}g();d();f();p();var er=ae(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Jt}`));var Vr=ae(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>er(e.configuration.analytics),(e,t)=>mm(t),(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s,u)=>Zc({mode:o?"emit":"disabled",url:i??an(e,t),token:r,trackingId:n??null,source:s,environment:u})),mm=e=>{if(!e)return;let t=e();return{getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent,generateUUID:()=>t.clientId}};g();d();f();p();g();d();f();p();var eu=()=>({referrer:null,userAgent:null,location:null,clientId:""}),To=(e,t)=>{let{referrer:r,userAgent:n,location:i,clientId:o}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:i,clientId:o}};g();d();f();p();var Do=ae(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:i}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(i&&{lq:i})}});g();d();f();p();var tr=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:er(e)}});g();d();f();p();var tu=ae(e=>e.context,e=>e);g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();function rt(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function D(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(h){try{a(n.next(h))}catch(y){s(y)}}function c(h){try{a(n.throw(h))}catch(y){s(y)}}function a(h){h.done?o(h.value):i(h.value).then(u,c)}a((n=n.apply(e,t||[])).next())})}var re;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(re||(re={}));function Mo(){return typeof window<"u"}function Yo(){return typeof navigator<"u"}function rr(){return typeof document<"u"}function No(){try{return typeof localStorage<"u"}catch{return!1}}function hm(){try{return typeof sessionStorage<"u"}catch{return!1}}function mu(){return Yo()&&navigator.cookieEnabled}var ym=[re.click,re.custom,re.search,re.view],Sm=(e,t)=>ym.indexOf(e)!==-1?Object.assign({language:rr()?document.documentElement.lang:"unknown",userAgent:Yo()?navigator.userAgent:"unknown"},t):t,Qr=class e{static set(t,r,n){var i,o,s,u;n&&(o=new Date,o.setTime(o.getTime()+n)),u=window.location.hostname,u.indexOf(".")===-1?ru(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],ru(t,r,o,i))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function ru(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function vm(){return No()?localStorage:mu()?new $r:hm()?sessionStorage:new ir}var $r=class e{getItem(t){return Qr.get(`${e.prefix}${t}`)}removeItem(t){Qr.erase(`${e.prefix}${t}`)}setItem(t,r,n){Qr.set(`${e.prefix}${t}`,r,n)}};$r.prefix="coveo_";var _o=class{constructor(){this.cookieStorage=new $r}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)}},ir=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Nn="__coveo.analytics.history",Am=20,Cm=1e3*60,bm=75,Un=class{constructor(t){this.store=t||vm()}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 D(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 D(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Nn);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return D(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Nn);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Nn,JSON.stringify(t.slice(0,Am)))}catch{}}clear(){try{this.store.removeItem(Nn)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,bm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Cm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var wm=(e,t)=>D(void 0,void 0,void 0,function*(){return e===re.view?(yield Rm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Rm=e=>D(void 0,void 0,void 0,function*(){let t=new Un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),_n,xm=new Uint8Array(16);function Em(){if(!_n&&(_n=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _n(xm)}var Im=/^(?:[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 Vn(e){return typeof e=="string"&&Im.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function hu(e,t=0){return(Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]).toLowerCase()}function km(e){if(!Vn(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 Pm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Om="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Fm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Tm(e,t,r){function n(i,o,s,u){var c;if(typeof i=="string"&&(i=Pm(i)),typeof o=="string"&&(o=km(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(o),a.set(i,o.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){u=u||0;for(let h=0;h<16;++h)s[u+h]=a[h];return s}return hu(a)}try{n.name=e}catch{}return n.DNS=Om,n.URL=Fm,n}var Dm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nu={randomUUID:Dm};function Dt(e,t,r){if(nu.randomUUID&&!t&&!e)return nu.randomUUID();e=e||{};let n=e.random||(e.rng||Em)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return hu(n)}function qm(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 qo(e,t){return e<<t|e>>>32-t}function jm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let s=unescape(encodeURIComponent(e));e=[];for(let u=0;u<s.length;++u)e.push(s.charCodeAt(u))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let s=0;s<i;++s){let u=new Uint32Array(16);for(let c=0;c<16;++c)u[c]=e[s*64+c*4]<<24|e[s*64+c*4+1]<<16|e[s*64+c*4+2]<<8|e[s*64+c*4+3];o[s]=u}o[i-1][14]=(e.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let u=new Uint32Array(80);for(let m=0;m<16;++m)u[m]=o[s][m];for(let m=16;m<80;++m)u[m]=qo(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);let c=r[0],a=r[1],h=r[2],y=r[3],S=r[4];for(let m=0;m<80;++m){let v=Math.floor(m/20),R=qo(c,5)+qm(v,a,h,y)+S+t[v]+u[m]>>>0;S=y,y=h,h=qo(a,30)>>>0,a=c,c=R}r[0]=r[0]+c>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Mm=Tm("v5",80,jm),iu=Mm,yu="2.30.45",ou=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Br={pageview:"pageview",event:"event"},Bn=class{constructor({client:t,uuidGenerator:r=Dt}){this.client=t,this.uuidGenerator=r}},Lo=class extends Bn{constructor({client:t,uuidGenerator:r=Dt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ou(window.location),this.lastReferrer=rr()?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:rr()?document.title:"",encoding:rr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},i={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),i),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:i,location:o}=this.getNextValues(t,r);this.lastReferrer=i,this.pageViewId=n,this.currentLocation=o,t===Br.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Br.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Br.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Br.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=i=>i.replace(/^\/?(.*)$/,"/$1");return`${(i=>i.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ou(window.location)}},lt=class e{constructor(t,r){if(!Vn(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(i=>new RegExp(i.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,i]=r;if(n.length!==32||isNaN(parseInt(i)))return null;let o=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Vn(o)?new e(o,Number.parseInt(i)*1e3):null}};lt.cvo_cid="cvo_cid";lt.expirationTime=120;var Uo=class extends Bn{constructor({client:t,uuidGenerator:r=Dt}){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 D(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(lt.cvo_cid,new lt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Uo.Id="link";var Me=Object.keys;function Ln(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var jo=128,Su=192,su=224,au=240;function Nm(e){return(e&248)===au?4:(e&au)===su?3:(e&su)===Su?2:1}function _m(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&jo)!=jo)break;if(r-=3,(n&Su)!=jo){t-r>=Nm(n)*3&&(r=t);break}}return e.substring(0,r)}var Vo={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"},Lm=Me(Vo).map(e=>Vo[e]),Um=[...Lm].join("|"),Vm=new RegExp(`^(${Um}$)`),Bm={svcAction:"svc_action",svcActionData:"svc_action_data"},Qm=e=>Me(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Vo[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),$m=e=>Vm.test(e),Hm=[$m],cu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},uu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ce={action:"pa",list:"pal",listSource:"pls"},Qn={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},zm=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Bo={id:"quoteId",affiliation:"quoteAffiliation"},Qo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Gm={add:Ce,bookmark_add:Ce,bookmark_remove:Ce,click:Ce,checkout:Ce,checkout_option:Ce,detail:Ce,impression:Ce,remove:Ce,refund:Object.assign(Object.assign({},Ce),Qn),purchase:Object.assign(Object.assign({},Ce),Qn),quickview:Ce,quote:Object.assign(Object.assign({},Ce),Bo),review:Object.assign(Object.assign({},Ce),Qo)},Wm=Me(cu).map(e=>cu[e]),Ym=Me(uu).map(e=>uu[e]),Km=Me(Ce).map(e=>Ce[e]),Jm=Me(Qn).map(e=>Qn[e]),Xm=Me(Qo).map(e=>Qo[e]),Zm=Me(Bo).map(e=>Bo[e]),eh=[...Wm,"custom"].join("|"),th=[...Ym,"custom"].join("|"),vu="(pr[0-9]+)",Au="(il[0-9]+pi[0-9]+)",rh=new RegExp(`^${vu}(${eh})$`),nh=new RegExp(`^(${Au}(${th}))|(il[0-9]+nm)$`),ih=new RegExp(`^(${Km.join("|")})$`),oh=new RegExp(`^(${Jm.join("|")})$`),sh=new RegExp(`^${vu}custom$`),ah=new RegExp(`^${Au}custom$`),ch=new RegExp(`^(${[...zm,...Xm,...Zm].join("|")})$`),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>ih.test(e),ph=e=>oh.test(e),fh=e=>ch.test(e),gh=[lh,uh,dh,ph,fh],mh=[sh,ah],hh={anonymizeIp:"aip"},yh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Sh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},vh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Ah=Object.assign(Object.assign(Object.assign(Object.assign({},hh),yh),Sh),vh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),$o=Object.assign(Object.assign({},Ah),Bm),Ch=e=>{let t=!!e.action&&Gm[e.action]||{};return Me(e).reduce((r,n)=>{let i=t[n]||$o[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})},bh=Me($o).map(e=>$o[e]),wh=e=>bh.indexOf(e)!==-1,Rh=e=>e==="custom",xh=e=>[...gh,...Hm,wh,Rh].some(t=>t(e)),Eh=e=>Me(e).reduce((t,r)=>{let n=Ih(r);return n?Object.assign(Object.assign({},t),kh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ih=e=>{let t;return[...mh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},kh=(e,t)=>Me(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ho=class{constructor(t){this.opts=t}sendEvent(t,r){return D(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:i}=this.opts,o=yield this.getQueryParamsForEventType(t),{url:s,payload:u}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${o}`,r,i),c=this.encodeForEventType(t,u),a=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return D(this,void 0,void 0,function*(){let i=t,o=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:u,body:c}=s;i=u||t;try{o=JSON.parse(c)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:o,url:i}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return D(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,i=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",i?`visitorId=${i}`:"","discardVisitInfo=true"].filter(o=>!!o).join("&")})}isEventTypeLegacy(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let i=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(i=`access_token=${encodeURIComponent(n)}&${i}`),i}},zo=class{sendEvent(t,r){return D(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){return Promise.resolve()})}},lu=A.fetch,$n=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:i,preprocessRequest:o}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},u),o?yield o(u,"analyticsFetch"):{}),{url:a}=c,h=rt(c,["url"]),y;try{y=yield lu(a,h)}catch(S){console.error("An error has occured when sending the event.",S);return}if(y.ok){let S=yield y.json();return S.visitorId&&i.setCurrentVisitorId(S.visitorId),S}else{try{y.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,y,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield lu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}getVisitorIdParam(){return D(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"})}},Go=class{constructor(t,r){No()&&mu()?this.storage=new _o:No()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ir),this.client=new $n(t),this.beaconClient=new Ho(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:i,payload:o}of n)this.beaconClient.sendEvent(i,o)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Wo=class{constructor(t,r){this.storage=r||new ir,this.client=new $n(t)}getClientDependingOnEventType(t){return this.client}},Hn=class{constructor(){this.storage=new ir,this.client=new zo}getClientDependingOnEventType(t){return this.client}},Ph="xx",Oh=e=>e?.startsWith(Ph)||!1,Fh=`
|
|
27
27
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
28
28
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
29
29
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
@@ -49,4 +49,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
|
|
|
49
49
|
* limitations under the License.
|
|
50
50
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
51
51
|
|
|
52
|
-
window.coveoQuanticVersion = '3.29.0-pre.
|
|
52
|
+
window.coveoQuanticVersion = '3.29.0-pre.bf3a34cede';
|
|
@@ -4,7 +4,15 @@ import type { OptionsExtender, OptionsTuple } from '../../common/types/utilities
|
|
|
4
4
|
import type { SSRCommerceEngine } from '../factories/build-factory.js';
|
|
5
5
|
import type { SolutionType } from './controller-constants.js';
|
|
6
6
|
import type { ControllerDefinitionsMap, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './controller-definitions.js';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated This type should not be used directly.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
7
11
|
export interface BuildOptions<TEngineOptions> {
|
|
8
12
|
extend?: OptionsExtender<TEngineOptions>;
|
|
9
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This type should not be used directly.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
10
18
|
export type Build<TEngineOptions, TControllersMap extends ControllersMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = (...params: OptionsTuple<BuildOptions<TEngineOptions> & EngineDefinitionControllersPropsOption<TControllersDefinitionsMap, TControllersProps, TSolutionType>>) => Promise<EngineDefinitionBuildResult<SSRCommerceEngine, TControllersMap>>;
|