@burdenoff/fe-libs 2026.925.6 → 2026.925.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chrome/MobileTabBar.js +6 -6
- package/dist/chrome/ProductSideNav.js +9 -9
- package/dist/chrome/sideNavigation/useSideNavigationState.js +3 -3
- package/dist/chrome.js +8 -8
- package/dist/shared/assistant/autoRouting.d.ts +3 -0
- package/dist/shared/assistant/autoRouting.d.ts.map +1 -1
- package/dist/shared/assistant/autoRouting.js +1 -1
- package/dist/shared/assistant/conversation.d.ts +20 -0
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts +11 -0
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +11 -0
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommandCopy.d.ts +26 -0
- package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -0
- package/dist/shared/assistant/localUiCommandCopy.js +37 -0
- package/dist/shared/assistant/localUiCommands.d.ts +124 -0
- package/dist/shared/assistant/localUiCommands.d.ts.map +1 -0
- package/dist/shared/assistant/localUiCommands.js +173 -0
- package/dist/shared/assistant/product.d.ts +13 -1
- package/dist/shared/assistant/product.d.ts.map +1 -1
- package/dist/shared/assistant/product.js +8 -6
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +615 -524
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +6 -0
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.js +3 -3
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageList.js +14 -7
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts +9 -0
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +243 -196
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +44 -43
- package/dist/shared/assistant/voice/captionText.d.ts.map +1 -1
- package/dist/shared/assistant/voice/captionText.js +1 -1
- package/dist/shared/assistant/voice/speakableText.d.ts.map +1 -1
- package/dist/shared/assistant/voice/speakableText.js +63 -62
- package/dist/shared/hooks/shell/index.d.ts +1 -1
- package/dist/shared/hooks/shell/index.d.ts.map +1 -1
- package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -0
- package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ThemeProvider.js +28 -25
- package/dist/shared-assistant.js +16 -14
- package/dist/shared-hooks-shell.js +12 -12
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useVoiceInput as e } from "../voice/useVoiceInput.js";
|
|
2
|
-
import { INITIAL_SESSION as t, INTERRUPT_MAX_MS as n, NOTHING_HEARD as r, SILENCE_SUBMIT_MS as
|
|
3
|
-
import { turnClockMs as
|
|
4
|
-
import { useAssistantSpeech as
|
|
5
|
-
import { useCallback as
|
|
2
|
+
import { INITIAL_SESSION as t, INTERRUPT_MAX_MS as n, NOTHING_HEARD as r, SILENCE_SUBMIT_MS as i, advanceHeardClock as a, isCapturing as o, isSubmittable as s, planReplyConsumption as c, spokenSoFar as l, voiceSessionReducer as ee } from "../voice/voiceSession.js";
|
|
3
|
+
import { turnClockMs as u } from "../turnTimeline.js";
|
|
4
|
+
import { useAssistantSpeech as d } from "./AssistantSpeechProvider.js";
|
|
5
|
+
import { useCallback as f, useEffect as p, useMemo as m, useReducer as h, useRef as g, useState as _ } from "react";
|
|
6
6
|
//#region src/shared/assistant/ui/useVoiceSession.ts
|
|
7
|
-
var
|
|
7
|
+
var v = 4e3, te = 2500, ne = 5e3, y = 12e3, b = "data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=";
|
|
8
8
|
function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
9
|
-
let w =
|
|
9
|
+
let w = g(null), [T, E] = h(f((e, t) => ee(e, t, w.current), []), t), D = d(), { setSessionSpeaking: O, setSessionMicOpen: k, speakingMessageId: A, stop: j } = D, M = g(null), N = g({}), P = g(r), F = g(null), I = g(!1), [L, R] = _(null), [z, B] = _(!1), [V, H] = _(!1), U = g(T);
|
|
10
10
|
U.current = T;
|
|
11
|
-
let W =
|
|
12
|
-
W.current = S,
|
|
11
|
+
let W = g(S);
|
|
12
|
+
W.current = S, p(() => {
|
|
13
13
|
if (T.phase === "speaking") {
|
|
14
14
|
w.current = S?.text ?? null;
|
|
15
15
|
return;
|
|
@@ -17,70 +17,71 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
17
17
|
if (w.current === null) return;
|
|
18
18
|
let e = setTimeout(() => {
|
|
19
19
|
w.current = null;
|
|
20
|
-
},
|
|
20
|
+
}, te);
|
|
21
21
|
return () => clearTimeout(e);
|
|
22
22
|
}, [T.phase, S]);
|
|
23
|
-
let G =
|
|
23
|
+
let G = f((e, t) => {
|
|
24
24
|
E({
|
|
25
25
|
type: "speech",
|
|
26
26
|
transcript: e,
|
|
27
27
|
final: t
|
|
28
28
|
});
|
|
29
|
-
}, []), K =
|
|
29
|
+
}, []), K = g(0), q = f(() => {
|
|
30
30
|
j(), K.current = Date.now(), B(!0), E({ type: "interrupt" });
|
|
31
31
|
}, [j]), J = e({
|
|
32
|
-
onFinalize:
|
|
32
|
+
onFinalize: f((e) => G(e, !0), [G]),
|
|
33
33
|
language: C
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
p(() => {
|
|
36
36
|
J.interim && G(J.interim, !1);
|
|
37
|
-
}, [J.interim, G]),
|
|
38
|
-
if (M.current && clearTimeout(M.current), H(!1), P.current =
|
|
39
|
-
let e = setTimeout(() => H(!0), 800), t =
|
|
37
|
+
}, [J.interim, G]), p(() => {
|
|
38
|
+
if (M.current && clearTimeout(M.current), H(!1), P.current = a(P.current, T, u()), T.phase !== "listening" || T.muted || !s(l(T))) return;
|
|
39
|
+
let e = setTimeout(() => H(!0), 800), t = u();
|
|
40
40
|
return M.current = setTimeout(() => {
|
|
41
41
|
N.current = {
|
|
42
42
|
speechEnded: P.current.at ?? t,
|
|
43
43
|
graceStarted: t,
|
|
44
|
-
graceEnded:
|
|
44
|
+
graceEnded: u()
|
|
45
45
|
}, E({ type: "silence" });
|
|
46
|
-
},
|
|
46
|
+
}, i), () => {
|
|
47
47
|
clearTimeout(e), M.current && clearTimeout(M.current);
|
|
48
48
|
};
|
|
49
|
-
}, [T]),
|
|
49
|
+
}, [T]), p(() => {
|
|
50
50
|
if (!z) return;
|
|
51
51
|
let e = Date.now() - K.current, t = J.isListening ? Math.max(0, 500 - e) : Math.max(0, n - e), r = setTimeout(() => B(!1), t);
|
|
52
52
|
return () => clearTimeout(r);
|
|
53
53
|
}, [z, J.isListening]);
|
|
54
|
-
let Y =
|
|
55
|
-
T.phase === "listening" && (Y.current =
|
|
54
|
+
let Y = g("");
|
|
55
|
+
T.phase === "listening" && (Y.current = l(T)), p(() => {
|
|
56
56
|
if (T.phase !== "thinking") return;
|
|
57
|
+
k(!1);
|
|
57
58
|
let e = Y.current.trim();
|
|
58
59
|
e && x(e, X.current ?? `vs-orphan-${Date.now().toString(36)}`, N.current), N.current = {}, P.current = r;
|
|
59
|
-
}, [T.phase]),
|
|
60
|
-
let e =
|
|
60
|
+
}, [T.phase]), p(() => {
|
|
61
|
+
let e = c(S?.id, T.phase, F.current);
|
|
61
62
|
e.claim && (F.current = S?.id ?? null, e.advance && S && E({
|
|
62
63
|
type: "reply",
|
|
63
64
|
text: S.text
|
|
64
65
|
}));
|
|
65
|
-
}, [S, T.phase]),
|
|
66
|
+
}, [S, T.phase]), p(() => {
|
|
66
67
|
let e = A !== null;
|
|
67
68
|
I.current && !e && E({ type: "speech-ended" }), I.current = e;
|
|
68
|
-
}, [A]),
|
|
69
|
+
}, [A]), p(() => {
|
|
69
70
|
T.phase !== "listening" && R((e) => e === "nothing-heard" ? null : e);
|
|
70
|
-
}, [T.phase]),
|
|
71
|
+
}, [T.phase]), p(() => {
|
|
71
72
|
if (T.phase !== "speaking" || A !== null) return;
|
|
72
73
|
let e = setTimeout(() => {
|
|
73
74
|
I.current || E({ type: "speech-ended" });
|
|
74
|
-
},
|
|
75
|
+
}, v);
|
|
75
76
|
return () => clearTimeout(e);
|
|
76
|
-
}, [T.phase, A]),
|
|
77
|
-
let e =
|
|
77
|
+
}, [T.phase, A]), p(() => {
|
|
78
|
+
let e = o(T);
|
|
78
79
|
k(e), e ? J.isActive || J.start("auto") : J.isActive && J.stop();
|
|
79
80
|
}, [
|
|
80
81
|
T,
|
|
81
82
|
J,
|
|
82
83
|
k
|
|
83
|
-
]),
|
|
84
|
+
]), p(() => {
|
|
84
85
|
J.error === "not-allowed" || J.error === "audio-capture" ? E({
|
|
85
86
|
type: "fail",
|
|
86
87
|
error: "mic-denied"
|
|
@@ -88,20 +89,20 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
88
89
|
type: "fail",
|
|
89
90
|
error: "no-speech-support"
|
|
90
91
|
}) : J.error === "network" ? R("network") : J.error === "unknown" && R("recognition-failed");
|
|
91
|
-
}, [J.error]),
|
|
92
|
+
}, [J.error]), p(() => {
|
|
92
93
|
J.error !== null || !J.isListening || R((e) => e === "network" || e === "recognition-failed" ? null : e);
|
|
93
|
-
}, [J.error, J.isListening]),
|
|
94
|
-
if (J.isListening && R((e) => e === "not-capturing" ? null : e), !
|
|
95
|
-
let e = setTimeout(() => R("not-capturing"),
|
|
94
|
+
}, [J.error, J.isListening]), p(() => {
|
|
95
|
+
if (J.isListening && R((e) => e === "not-capturing" ? null : e), !o(T) || J.isListening) return;
|
|
96
|
+
let e = setTimeout(() => R("not-capturing"), ne);
|
|
96
97
|
return () => clearTimeout(e);
|
|
97
|
-
}, [T, J.isListening]),
|
|
98
|
-
if (T.phase !== "listening" || T.muted || !J.isListening ||
|
|
98
|
+
}, [T, J.isListening]), p(() => {
|
|
99
|
+
if (T.phase !== "listening" || T.muted || !J.isListening || l(T) !== "") return;
|
|
99
100
|
let e = setTimeout(() => R("nothing-heard"), y);
|
|
100
101
|
return () => clearTimeout(e);
|
|
101
|
-
}, [T, J.isListening]),
|
|
102
|
-
|
|
102
|
+
}, [T, J.isListening]), p(() => {
|
|
103
|
+
l(T) !== "" && R(null);
|
|
103
104
|
}, [T]);
|
|
104
|
-
let X =
|
|
105
|
+
let X = g(null), Z = f(() => {
|
|
105
106
|
if (B(!1), H(!1), !J.isSupported) {
|
|
106
107
|
E({
|
|
107
108
|
type: "fail",
|
|
@@ -134,17 +135,17 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
134
135
|
J.isSupported,
|
|
135
136
|
D.isBlocked,
|
|
136
137
|
O
|
|
137
|
-
]), Q =
|
|
138
|
+
]), Q = f(() => {
|
|
138
139
|
B(!1), H(!1), X.current = null, E({ type: "end" }), j(), O(!1);
|
|
139
|
-
}, [j, O]), $ =
|
|
140
|
+
}, [j, O]), $ = f(() => {
|
|
140
141
|
E({
|
|
141
142
|
type: "mute",
|
|
142
143
|
muted: !U.current.muted
|
|
143
144
|
});
|
|
144
145
|
}, []);
|
|
145
|
-
return
|
|
146
|
+
return p(() => () => {
|
|
146
147
|
O(!1), k(!1);
|
|
147
|
-
}, [O, k]),
|
|
148
|
+
}, [O, k]), m(() => ({
|
|
148
149
|
session: T,
|
|
149
150
|
notice: L,
|
|
150
151
|
spokenChunks: D.spokenChunks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captionText.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/captionText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;
|
|
1
|
+
{"version":3,"file":"captionText.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/captionText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAuKH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2CtD"}
|
|
@@ -18,7 +18,7 @@ function o(e) {
|
|
|
18
18
|
}
|
|
19
19
|
function s(n, r) {
|
|
20
20
|
let i = (t) => (r.push(t), `${e}${r.length - 1}${e}`);
|
|
21
|
-
return n.replace(/^ {0,3}```[^\n]*\n([\s\S]*?)^ {0,3}```[^\n]*$/gm, (e, t) => i(t.replace(/\n$/, ""))).replace(/^ {0,3}```[^\n]*\n?([\s\S]*)$/m, (e, t) => i(t)).replace(/`([^`\n]+)`/g, (e, t) => i(t)).replace(RegExp(`<((?:https?://|mailto:)[^>\\s${t}]+)>`, "gi"), (e, t) => i(t)).replace(RegExp(`<([^@<>\\s${t}]+@[^@<>\\s${t}]+\\.[^@<>\\s${t}]+)>`, "g"), (e, t) => i(t)).replace(RegExp(`\\b(?:https?://|www\\.)[^\\s<>()\\[\\]${t}]+`, "gi"), (e) => i(e)).replace(/\b[\w.+-]{1,64}@[\w-]{1,63}\.[\w.-]{1,63}\b/g, (e) => i(e));
|
|
21
|
+
return n.replace(/^ {0,3}```[^\n]*\n([\s\S]*?)^ {0,3}```[^\n]*$/gm, (e, t) => i(t.replace(/\n$/, ""))).replace(/^ {0,3}```[^\n]*\n?([\s\S]*)$/m, (e, t) => i(t)).replace(/`([^`\n]+)`/g, (e, t) => i(t)).replace(/\\([!-/:-@[-`{-~])/g, (e, t) => i(t)).replace(RegExp(`<((?:https?://|mailto:)[^>\\s${t}]+)>`, "gi"), (e, t) => i(t)).replace(RegExp(`<([^@<>\\s${t}]+@[^@<>\\s${t}]+\\.[^@<>\\s${t}]+)>`, "g"), (e, t) => i(t)).replace(RegExp(`\\b(?:https?://|www\\.)[^\\s<>()\\[\\]${t}]+`, "gi"), (e) => i(e)).replace(/\b[\w.+-]{1,64}@[\w-]{1,63}\.[\w.-]{1,63}\b/g, (e) => i(e));
|
|
22
22
|
}
|
|
23
23
|
function c(t, n) {
|
|
24
24
|
let r = RegExp(`${e}(\\d+)${e}`, "g"), i = t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"speakableText.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/speakableText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,eAStC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA6CD;;;;;GAKG;AACH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MAAM,EAAE,CAsBpD;AAkBD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAO,EAAE,GAAG,SAAQ,GAAG,MAAM,CAE9E;AAkLD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAiJxF;AAiMD,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAkFD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA2B,EACrC,WAAW,GAAE,MAA+B,GAC3C,MAAM,EAAE,CAoEV"}
|
|
@@ -44,34 +44,35 @@ var _ = {
|
|
|
44
44
|
function S(e, t = "at", n = "dot") {
|
|
45
45
|
return e.replace(/@/g, ` ${t} `).replace(/\./g, ` ${n} `).replace(/\s+/g, " ").trim();
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
var C = 57600, w = /[\ue121-\ue17e]/g, T = "", E = /\ue180/g, D = /[\ue100-\ue1ff]/g;
|
|
48
|
+
function O(e, t) {
|
|
49
|
+
let n = e.replace(D, "").replace(/\\[!-/:-@[-`{-~]|(`+)[^`]*?\1(?!`)/g, (e, t) => t ? e.replace(/\\/g, T) : e).replace(/\\([!-/:-@[-`{-~])/g, (e, t) => String.fromCharCode(C + t.charCodeAt(0)));
|
|
49
50
|
n = n.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.image} `), n = n.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/\[([^\]]*)\]\[[^\]]*\]/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/<https?:\/\/[^>\s]+>/g, ` ${t.link} `), n = n.replace(/\bhttps?:\/\/\S+/g, ` ${t.link} `), n = n.replace(y, (e, n) => ` ${S(n, t.emailAt, t.emailDot)} `), n = n.replace(b, (e, n) => ` ${S(n, t.emailAt, t.emailDot)} `), n = n.replace(x, (e) => ` ${S(e, t.emailAt, t.emailDot)} `), n = n.replace(/`+([^`]*)`+/g, (e, t) => t), n = n.replace(/<\/?[a-zA-Z][^>]*>/g, " ");
|
|
50
51
|
for (let [e, t] of Object.entries(_)) n = n.split(e).join(t);
|
|
51
|
-
return n = n.replace(/(\*\*\*|___)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/(\*\*|__)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/~~(\S(?:[\s\S]*?\S)?)~~/g, "$1"), n = n.replace(/(^|[\s([{"'])\*(\S(?:[\s\S]*?\S)?)\*(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/(^|[\s([{"'])_(\S(?:[\s\S]*?\S)?)_(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/[\p{Extended_Pictographic}\uFE0F\u200D]/gu, " "), n = n.replace(/[•·▪▫◦‣⁃∙●○■□▶▸►➤➜→←↑↓⇒⇔★☆⭐✦✧✓✔✗✘✕✖]/gu, " "), n = n.replace(/(\d)?\s*[—–―]\s*(\d)?/g, (e, t, n) => t !== void 0 && n !== void 0 ? e : `${t ?? ""}, ${n ?? ""}`), n = n.replace(/\*{2,}/g, ""), n.replace(/\s+/g, " ").replace(/\s+([.,!?;:)\]}])/g, "$1").replace(/([([{])\s+/g, "$1").trim();
|
|
52
|
+
return n = n.replace(/(\*\*\*|___)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/(\*\*|__)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/~~(\S(?:[\s\S]*?\S)?)~~/g, "$1"), n = n.replace(/(^|[\s([{"'])\*(\S(?:[\s\S]*?\S)?)\*(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/(^|[\s([{"'])_(\S(?:[\s\S]*?\S)?)_(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/[\p{Extended_Pictographic}\uFE0F\u200D]/gu, " "), n = n.replace(/[•·▪▫◦‣⁃∙●○■□▶▸►➤➜→←↑↓⇒⇔★☆⭐✦✧✓✔✗✘✕✖]/gu, " "), n = n.replace(/(\d)?\s*[—–―]\s*(\d)?/g, (e, t, n) => t !== void 0 && n !== void 0 ? e : `${t ?? ""}, ${n ?? ""}`), n = n.replace(/\*{2,}/g, ""), n.replace(/\s+/g, " ").replace(/\s+([.,!?;:)\]}])/g, "$1").replace(/([([{])\s+/g, "$1").trim().replace(w, (e) => String.fromCharCode(e.charCodeAt(0) - C)).replace(E, "\\");
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function k(e) {
|
|
54
55
|
let t = e.trim();
|
|
55
56
|
return t ? d.test(t) ? t : `${t}.` : "";
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function A(e, t, n) {
|
|
58
59
|
if (e.length <= t) return e;
|
|
59
60
|
let r = e.slice(0, t), i = Math.max(r.lastIndexOf(". "), r.lastIndexOf("\n")), a = r.lastIndexOf(" "), o = i > t * .5 ? i + 1 : a > 0 ? a : t;
|
|
60
61
|
return `${r.slice(0, o).trim()}\n${n}`;
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function j(e) {
|
|
63
64
|
let t = 0;
|
|
64
65
|
for (let n of e) t += n === " " ? 4 : 1;
|
|
65
66
|
return t;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function M(e, t) {
|
|
68
69
|
let n = e[e.length - 1];
|
|
69
70
|
if (!n?.ordinal) return "";
|
|
70
71
|
if (e.length === 1) return `${n.ordinal}. `;
|
|
71
72
|
let r = e.map((e) => e.ordinal);
|
|
72
73
|
return r.every((e) => !!e) ? `${r.join(".")}. ` : `${m(t.nestedItem, { ordinal: n.ordinal })}. `;
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function N(t, n = {}) {
|
|
75
76
|
let r = {
|
|
76
77
|
...e,
|
|
77
78
|
...n.labels
|
|
@@ -82,7 +83,7 @@ function O(t, n = {}) {
|
|
|
82
83
|
let e = _[b].replace(c, ""), t = b === 0 || !_[b - 1].replace(c, "").trim();
|
|
83
84
|
if (a.test(e)) {
|
|
84
85
|
for (b += 1; b < _.length && !a.test(_[b].replace(c, ""));) b += 1;
|
|
85
|
-
b += 1, v.push(
|
|
86
|
+
b += 1, v.push(k(r.codeBlock));
|
|
86
87
|
continue;
|
|
87
88
|
}
|
|
88
89
|
if (t && y.length === 0 && e.trim() && p.test(e)) {
|
|
@@ -99,7 +100,7 @@ function O(t, n = {}) {
|
|
|
99
100
|
if (!n.trim() || !p.test(n)) break;
|
|
100
101
|
b = t;
|
|
101
102
|
}
|
|
102
|
-
v.push(
|
|
103
|
+
v.push(k(r.codeBlock));
|
|
103
104
|
continue;
|
|
104
105
|
}
|
|
105
106
|
if (s.test(e)) {
|
|
@@ -113,15 +114,15 @@ function O(t, n = {}) {
|
|
|
113
114
|
let n = b + 1 < _.length ? _[b + 1].replace(c, "") : "";
|
|
114
115
|
if (e.includes("|") && h(n)) {
|
|
115
116
|
y.length = 0;
|
|
116
|
-
let t = g(e).map((e) =>
|
|
117
|
+
let t = g(e).map((e) => O(e, r));
|
|
117
118
|
b += 2;
|
|
118
119
|
let n = [];
|
|
119
120
|
for (; b < _.length;) {
|
|
120
121
|
let e = _[b].replace(c, "");
|
|
121
122
|
if (!e.includes("|") || !e.trim()) break;
|
|
122
|
-
n.push(g(e).map((e) =>
|
|
123
|
+
n.push(g(e).map((e) => O(e, r))), b += 1;
|
|
123
124
|
}
|
|
124
|
-
if (n.length > d) v.push(
|
|
125
|
+
if (n.length > d) v.push(k(m(r.largeTable, {
|
|
125
126
|
rows: n.length,
|
|
126
127
|
columns: t.length
|
|
127
128
|
})));
|
|
@@ -131,7 +132,7 @@ function O(t, n = {}) {
|
|
|
131
132
|
let r = t[n];
|
|
132
133
|
return r ? `${r}: ${e}` : e;
|
|
133
134
|
}).filter(Boolean);
|
|
134
|
-
n.length && v.push(
|
|
135
|
+
n.length && v.push(k(n.join(", ")));
|
|
135
136
|
}
|
|
136
137
|
continue;
|
|
137
138
|
}
|
|
@@ -139,36 +140,36 @@ function O(t, n = {}) {
|
|
|
139
140
|
let i = o.exec(e);
|
|
140
141
|
if (i) {
|
|
141
142
|
y.length = 0;
|
|
142
|
-
let e =
|
|
143
|
-
e && v.push(
|
|
143
|
+
let e = O(i[1].replace(/\s+#+\s*$/, ""), r);
|
|
144
|
+
e && v.push(k(e));
|
|
144
145
|
continue;
|
|
145
146
|
}
|
|
146
|
-
let x = l.exec(e), S = e,
|
|
147
|
+
let x = l.exec(e), S = e, C = "";
|
|
147
148
|
if (x) {
|
|
148
149
|
S = e.slice(x[0].length).replace(u, "");
|
|
149
|
-
let t =
|
|
150
|
+
let t = j(x[1]);
|
|
150
151
|
for (; y.length > 0 && y[y.length - 1].indent >= t;) y.pop();
|
|
151
152
|
y.push({
|
|
152
153
|
indent: t,
|
|
153
154
|
ordinal: x[2] ?? null
|
|
154
|
-
}),
|
|
155
|
+
}), C = M(y, r);
|
|
155
156
|
} else /^\s/.test(e) || (y.length = 0);
|
|
156
157
|
if (!x && f.test(n)) {
|
|
157
158
|
y.length = 0, b += 1;
|
|
158
|
-
let t =
|
|
159
|
-
t && v.push(
|
|
159
|
+
let t = O(e, r);
|
|
160
|
+
t && v.push(k(t));
|
|
160
161
|
continue;
|
|
161
162
|
}
|
|
162
|
-
let
|
|
163
|
-
|
|
163
|
+
let w = O(S, r);
|
|
164
|
+
w && v.push(k(`${C}${w}`));
|
|
164
165
|
}
|
|
165
|
-
return
|
|
166
|
+
return A(v.join("\n").replace(/\n{2,}/g, "\n").trim(), i, k(r.truncated));
|
|
166
167
|
}
|
|
167
|
-
var
|
|
168
|
+
var P = new Set([
|
|
168
169
|
".",
|
|
169
170
|
"!",
|
|
170
171
|
"?"
|
|
171
|
-
]),
|
|
172
|
+
]), F = new Set([
|
|
172
173
|
"。",
|
|
173
174
|
"!",
|
|
174
175
|
"?",
|
|
@@ -182,7 +183,7 @@ var k = new Set([
|
|
|
182
183
|
"۔",
|
|
183
184
|
"؟",
|
|
184
185
|
"؛"
|
|
185
|
-
]),
|
|
186
|
+
]), I = new Set([
|
|
186
187
|
"\"",
|
|
187
188
|
"'",
|
|
188
189
|
")",
|
|
@@ -197,25 +198,25 @@ var k = new Set([
|
|
|
197
198
|
"』",
|
|
198
199
|
"】",
|
|
199
200
|
")"
|
|
200
|
-
]),
|
|
201
|
+
]), L = new Set(/* @__PURE__ */ "i.e,e.g,etc,approx,vs,cf,viz,al,est,dept,fig,figs,ref,min,max,avg,qty,temp,mr,mrs,ms,dr,prof,sr,jr,st,inc,ltd,co,corp,univ,ca,kg,mg,gm,ha,cm,mm,km,ml,lb,oz,sq,hrs,wk,yr,mo,vol,pp".split(",")), R = new Set([
|
|
201
202
|
"no",
|
|
202
203
|
"nos",
|
|
203
204
|
"p",
|
|
204
205
|
"ch",
|
|
205
206
|
"sec",
|
|
206
207
|
"art"
|
|
207
|
-
]),
|
|
208
|
-
function
|
|
209
|
-
for (let r = t; r < n; r += 1) if (
|
|
208
|
+
]), z = /^\d+(?:\.\d+)*$/, B = /^[A-Za-z]$/;
|
|
209
|
+
function V(e, t, n) {
|
|
210
|
+
for (let r = t; r < n; r += 1) if (F.has(e[r])) return !0;
|
|
210
211
|
if (n < e.length && !/\s/.test(e[n])) return !1;
|
|
211
212
|
if (e[t] !== ".") return !0;
|
|
212
213
|
let r = e.slice(0, t), i = /(\S+)$/.exec(r)?.[1] ?? "";
|
|
213
214
|
if (!i) return !0;
|
|
214
|
-
if (
|
|
215
|
+
if (z.test(i) && !r.slice(0, r.length - i.length).trim()) return !1;
|
|
215
216
|
let a = i.toLowerCase();
|
|
216
|
-
return
|
|
217
|
+
return B.test(i) || L.has(a) ? !1 : R.has(a) ? !/^\s*\d/.test(e.slice(n)) : !0;
|
|
217
218
|
}
|
|
218
|
-
function
|
|
219
|
+
function H(e) {
|
|
219
220
|
let t = [];
|
|
220
221
|
for (let n of e.split("\n")) {
|
|
221
222
|
let e = n.trim();
|
|
@@ -223,14 +224,14 @@ function L(e) {
|
|
|
223
224
|
let r = 0, i = 0;
|
|
224
225
|
for (; i < e.length;) {
|
|
225
226
|
let n = e[i];
|
|
226
|
-
if (!
|
|
227
|
+
if (!P.has(n) && !F.has(n)) {
|
|
227
228
|
i += 1;
|
|
228
229
|
continue;
|
|
229
230
|
}
|
|
230
231
|
let a = i;
|
|
231
|
-
for (; a < e.length && (
|
|
232
|
-
for (; a < e.length &&
|
|
233
|
-
if (
|
|
232
|
+
for (; a < e.length && (P.has(e[a]) || F.has(e[a]));) a += 1;
|
|
233
|
+
for (; a < e.length && I.has(e[a]);) a += 1;
|
|
234
|
+
if (V(e, i, a)) {
|
|
234
235
|
let n = e.slice(r, a).trim();
|
|
235
236
|
n && t.push(n), r = a;
|
|
236
237
|
}
|
|
@@ -241,40 +242,40 @@ function L(e) {
|
|
|
241
242
|
}
|
|
242
243
|
return t;
|
|
243
244
|
}
|
|
244
|
-
var
|
|
245
|
-
function
|
|
246
|
-
return
|
|
245
|
+
var U = /[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/, W = /[\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff01-\uff9f]/, G = /[、,,;;::。!?!?]/, K = /[A-Za-z0-9][A-Za-z0-9._,:%/+-]*[A-Za-z0-9%]|[\s\S]/gu;
|
|
246
|
+
function q(e) {
|
|
247
|
+
return U.test(e);
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
+
function J(e, t) {
|
|
249
250
|
let n = `${e.slice(-1)}${t.slice(0, 1)}`;
|
|
250
|
-
return
|
|
251
|
+
return W.test(n) ? `${e}${t}` : `${e} ${t}`;
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
+
function Y(e, t) {
|
|
253
254
|
let n = t.trim();
|
|
254
255
|
n && e.push(n);
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
+
function X(e, t) {
|
|
257
258
|
let n = [], r = "", i = -1;
|
|
258
|
-
for (let a of e.match(
|
|
259
|
+
for (let a of e.match(K) ?? []) {
|
|
259
260
|
if (r.length + a.length > t && r.trim()) {
|
|
260
261
|
if (i > 0 && i < r.length && i >= t * .4) {
|
|
261
|
-
|
|
262
|
+
Y(n, r.slice(0, i));
|
|
262
263
|
let e = r.slice(i);
|
|
263
|
-
e.trim().length + a.length > t ? (
|
|
264
|
-
} else
|
|
264
|
+
e.trim().length + a.length > t ? (Y(n, e), r = "") : r = e;
|
|
265
|
+
} else Y(n, r), r = "";
|
|
265
266
|
i = -1;
|
|
266
267
|
}
|
|
267
268
|
if (a.length > t) {
|
|
268
|
-
|
|
269
|
+
Y(n, r), r = "", i = -1;
|
|
269
270
|
for (let e = 0; e < a.length; e += t) n.push(a.slice(e, e + t));
|
|
270
271
|
continue;
|
|
271
272
|
}
|
|
272
|
-
r += a,
|
|
273
|
+
r += a, G.test(a) && (i = r.length);
|
|
273
274
|
}
|
|
274
|
-
return
|
|
275
|
+
return Y(n, r), n;
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
if (
|
|
277
|
+
function Z(e, t) {
|
|
278
|
+
if (q(e)) return X(e, t);
|
|
278
279
|
let n = [], r = "";
|
|
279
280
|
for (let i of e.split(/\s+/)) {
|
|
280
281
|
if (i.length > t) {
|
|
@@ -286,29 +287,29 @@ function K(e, t) {
|
|
|
286
287
|
}
|
|
287
288
|
return r && n.push(r), n;
|
|
288
289
|
}
|
|
289
|
-
function
|
|
290
|
+
function Q(e, t = 180, n = 40) {
|
|
290
291
|
let r = Math.max(1, t), i = Math.max(1, Math.min(n, r)), a = [], o = "", s = r;
|
|
291
|
-
for (let t of
|
|
292
|
-
let e =
|
|
292
|
+
for (let t of H(e)) {
|
|
293
|
+
let e = q(t) ? i : r;
|
|
293
294
|
if (t.length > e) {
|
|
294
|
-
o &&= (a.push(o), ""), a.push(...
|
|
295
|
+
o &&= (a.push(o), ""), a.push(...Z(t, e)), s = r;
|
|
295
296
|
continue;
|
|
296
297
|
}
|
|
297
298
|
if (!o) {
|
|
298
299
|
o = t, s = e;
|
|
299
300
|
continue;
|
|
300
301
|
}
|
|
301
|
-
let n =
|
|
302
|
+
let n = J(o, t), c = Math.min(s, e);
|
|
302
303
|
n.length <= c ? (o = n, s = c) : (a.push(o), o = t, s = e);
|
|
303
304
|
}
|
|
304
305
|
if (o && a.push(o), a.length > 1) {
|
|
305
|
-
let e =
|
|
306
|
+
let e = H(a[0]);
|
|
306
307
|
if (e.length > 1) {
|
|
307
308
|
let [t, ...n] = e;
|
|
308
|
-
a.splice(0, 1, t, n.reduce((e, t) =>
|
|
309
|
+
a.splice(0, 1, t, n.reduce((e, t) => J(e, t)));
|
|
309
310
|
}
|
|
310
311
|
}
|
|
311
312
|
return a;
|
|
312
313
|
}
|
|
313
314
|
//#endregion
|
|
314
|
-
export { e as DEFAULT_SPEAKABLE_LABELS, n as MAX_SPEAKABLE_CHARS, t as MAX_SPOKEN_TABLE_ROWS, r as SPEECH_CHUNK_CHARS, i as SPEECH_CHUNK_CJK_CHARS,
|
|
315
|
+
export { e as DEFAULT_SPEAKABLE_LABELS, n as MAX_SPEAKABLE_CHARS, t as MAX_SPOKEN_TABLE_ROWS, r as SPEECH_CHUNK_CHARS, i as SPEECH_CHUNK_CJK_CHARS, Q as chunkForSpeech, q as containsCjk, S as speakableEmail, g as splitTableRow, N as toSpeakableText };
|
|
@@ -8,7 +8,7 @@ export type { UseGlobalSearchReturn, SearchFilters, MetadataCondition, DateRange
|
|
|
8
8
|
export type { User, MicrofrontendRootProps, NavItem as NavItemType, FooterItem as FooterItemType, FooterSection as FooterSectionType, } from '../../types';
|
|
9
9
|
export { useAuth } from '../../providers/shell/AuthProvider';
|
|
10
10
|
export { useActiveContext } from '../../providers/shell/ActiveContextProvider';
|
|
11
|
-
export { useTheme } from '../../providers/shell/ThemeProvider';
|
|
11
|
+
export { useTheme, useThemeOrNull } from '../../providers/shell/ThemeProvider';
|
|
12
12
|
export { useI18n } from '../../providers/shell/I18nProvider';
|
|
13
13
|
export { useGeography } from '../../geography/GeographyProvider';
|
|
14
14
|
export { useFeatureFlags } from '../../feature-flags/FeatureFlagProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/hooks/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,gBAAgB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,IAAI,EACJ,sBAAsB,EACtB,OAAO,IAAI,WAAW,EACtB,UAAU,IAAI,cAAc,EAC5B,aAAa,IAAI,iBAAiB,GACnC,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/hooks/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM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AAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -77,4 +77,10 @@ export interface ThemeProviderProps {
|
|
|
77
77
|
}
|
|
78
78
|
export declare function ThemeProvider({ children, defaultMode, defaultBrand, defaultDensity, defaultTypography, defaultGlass, storageKey, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
79
79
|
export declare function useTheme(): ThemeContextValue;
|
|
80
|
+
/**
|
|
81
|
+
* The theme, or null outside a ThemeProvider — for a surface that must work
|
|
82
|
+
* without one (the assistant panel sets the theme when asked, BOFF-7802, and is
|
|
83
|
+
* also mounted by hosts with no provider). Use `useTheme` everywhere else.
|
|
84
|
+
*/
|
|
85
|
+
export declare function useThemeOrNull(): ThemeContextValue | null;
|
|
80
86
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,eAAe,GACf,QAAQ,GACR,QAAQ,CAAC;AACb,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,KAAK,GAEb,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,aAAa,GACb,cAAc,GAKd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,S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AgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAsB,EACtB,YAAwB,EACxB,cAA8B,EAC9B,iBAA6B,EAC7B,YAAqB,EACrB,UAA8B,GAC/B,EAAE,kBAAkB,2CA0RpB;AAED,wBAAgB,QAAQ,sBAMvB"}
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,eAAe,GACf,QAAQ,GACR,QAAQ,CAAC;AACb,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,KAAK,GAEb,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,aAAa,GACb,cAAc,GAKd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,SAAS,GACT,eAAe,GACf,mBAAmB,GACnB,YAAY,GACZ,iBAAiB,GACjB,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,SAAS,CAAC;AACd,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAC7D,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AACvD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,Q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