@glydeunity/voice-sdk 1.5.11 → 1.5.13
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/glyde-chat.umd.js +7 -13
- package/dist/glyde-chat.umd.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/voice-sdk.es.js +286 -279
- package/dist/voice-sdk.es.js.map +1 -1
- package/package.json +1 -1
package/dist/voice-sdk.es.js
CHANGED
|
@@ -196,20 +196,20 @@ class yg {
|
|
|
196
196
|
if (!this.active) {
|
|
197
197
|
this.active = !0;
|
|
198
198
|
try {
|
|
199
|
-
this.
|
|
199
|
+
this.serverConfig = await this.fetchConfig(), console.log("[GlydeVoice] Fetched config:", this.serverConfig);
|
|
200
200
|
const f = {
|
|
201
201
|
context_id: this.config.contextId,
|
|
202
202
|
domain: typeof window < "u" ? window.location.hostname : "localhost"
|
|
203
203
|
};
|
|
204
|
-
this.config.
|
|
204
|
+
this.config.deepgramConfig && (f.deepgram_config = this.config.deepgramConfig), this.conversationHistory.length > 0 && (f.conversation_history = this.conversationHistory);
|
|
205
205
|
const y = await fetch(`${this.unityUrl}/api/unity/voice/auth`, {
|
|
206
206
|
method: "POST",
|
|
207
207
|
headers: this.getAuthHeaders(),
|
|
208
208
|
body: JSON.stringify(f)
|
|
209
209
|
});
|
|
210
210
|
if (!y.ok) {
|
|
211
|
-
const
|
|
212
|
-
throw new Error(
|
|
211
|
+
const D = await y.json();
|
|
212
|
+
throw new Error(D.error?.message || D.message || "Failed to authenticate voice session");
|
|
213
213
|
}
|
|
214
214
|
const { data: M } = await y.json(), { token: o, agent_config: O, deepgram_config: H } = M;
|
|
215
215
|
this.setSessionContext({
|
|
@@ -218,26 +218,20 @@ class yg {
|
|
|
218
218
|
contextType: this.config.contextType,
|
|
219
219
|
currentJobUuid: O?.job_uuid
|
|
220
220
|
});
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
`)}
|
|
225
|
-
|
|
226
|
-
IMPORTANT: This is a continuation of a previous conversation. When the user starts speaking, you must first greet them warmly and acknowledge that you're continuing the conversation. Say something like "Welcome back! I'm glad you're continuing our conversation. How can I help you today?" or similar, then continue naturally based on the previous context.
|
|
227
|
-
|
|
228
|
-
${V}`), await this.initializeAudio();
|
|
229
|
-
let D = "wss://agent.deepgram.com/v1/agent/converse";
|
|
221
|
+
const V = O?.instructions || this.serverConfig?.system_prompt || "You are a helpful AI assistant.";
|
|
222
|
+
await this.initializeAudio();
|
|
223
|
+
let U = "wss://agent.deepgram.com/v1/agent/converse";
|
|
230
224
|
const S = this.config.deepgramConfig || H || this.serverConfig?.deepgram_config;
|
|
231
225
|
if (S?.tags && S.tags.length > 0) {
|
|
232
|
-
const
|
|
233
|
-
S.tags.forEach((
|
|
226
|
+
const D = new URLSearchParams();
|
|
227
|
+
S.tags.forEach((R) => D.append("tag", R)), U += `?${D.toString()}`;
|
|
234
228
|
}
|
|
235
|
-
this.ws = new WebSocket(
|
|
236
|
-
const
|
|
229
|
+
this.ws = new WebSocket(U, ["bearer", o]), this.ws.onopen = () => {
|
|
230
|
+
const D = S || {
|
|
237
231
|
think: { provider: { type: "open_ai", model: "gpt-4.1-nano" } },
|
|
238
232
|
speak: { provider: { type: "deepgram", model: "aura-2-thalia-en" } },
|
|
239
233
|
listen: { provider: { type: "deepgram", version: "v2", model: "flux-general-en" } }
|
|
240
|
-
},
|
|
234
|
+
}, R = {
|
|
241
235
|
type: "Settings",
|
|
242
236
|
audio: {
|
|
243
237
|
input: {
|
|
@@ -252,30 +246,36 @@ ${V}`), await this.initializeAudio();
|
|
|
252
246
|
},
|
|
253
247
|
agent: {
|
|
254
248
|
language: "en",
|
|
255
|
-
speak:
|
|
249
|
+
speak: D.speak || {
|
|
256
250
|
provider: { type: "deepgram", model: "aura-2-thalia-en" }
|
|
257
251
|
},
|
|
258
|
-
listen:
|
|
252
|
+
listen: D.listen || {
|
|
259
253
|
provider: { type: "deepgram", version: "v2", model: "flux-general-en" }
|
|
260
254
|
},
|
|
261
255
|
think: {
|
|
262
|
-
provider:
|
|
263
|
-
//
|
|
264
|
-
...
|
|
256
|
+
provider: D.think?.provider || { type: "open_ai", model: "gpt-4.1-nano" },
|
|
257
|
+
// Server functions plus optional client-added tools only
|
|
258
|
+
...((D.think?.functions?.length || 0) > 0 || (this.config.additionalFunctions?.length || 0) > 0) && {
|
|
259
|
+
functions: [
|
|
260
|
+
...D.think?.functions || [],
|
|
261
|
+
...this.config.additionalFunctions || []
|
|
262
|
+
]
|
|
263
|
+
}
|
|
265
264
|
},
|
|
266
|
-
//
|
|
267
|
-
|
|
268
|
-
|
|
265
|
+
// Greeting is server-controlled; only set when server provides it
|
|
266
|
+
...(O?.greeting ?? D?.greeting) && {
|
|
267
|
+
greeting: O?.greeting ?? D?.greeting
|
|
268
|
+
}
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
|
-
|
|
271
|
+
D.tags && D.tags.length > 0 && (R.tags = D.tags), this.ws.send(JSON.stringify(R)), this.emit({ type: "open", payload: { config: O, serverConfig: this.serverConfig } });
|
|
272
272
|
};
|
|
273
273
|
const Y = V;
|
|
274
|
-
this.ws.onmessage = (
|
|
275
|
-
if (typeof
|
|
274
|
+
this.ws.onmessage = (D) => {
|
|
275
|
+
if (typeof D.data == "string") {
|
|
276
276
|
try {
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
277
|
+
const R = JSON.parse(D.data);
|
|
278
|
+
if (R.type === "SettingsApplied") {
|
|
279
279
|
const w = {
|
|
280
280
|
type: "UpdatePrompt",
|
|
281
281
|
prompt: Y
|
|
@@ -286,15 +286,15 @@ ${V}`), await this.initializeAudio();
|
|
|
286
286
|
});
|
|
287
287
|
}, 500);
|
|
288
288
|
}
|
|
289
|
-
|
|
289
|
+
R.type === "PromptUpdated" && (this.mediaStream || this.startMicrophone().catch((w) => {
|
|
290
290
|
console.error("[GlydeVoice] Failed to start microphone:", w);
|
|
291
291
|
}));
|
|
292
292
|
} catch {
|
|
293
293
|
}
|
|
294
|
-
this.handleTextMessage(
|
|
295
|
-
} else
|
|
296
|
-
}, this.ws.onerror = (
|
|
297
|
-
console.error("[GlydeVoice] WebSocket error:",
|
|
294
|
+
this.handleTextMessage(D.data);
|
|
295
|
+
} else D.data instanceof Blob ? this.handleAudioData(D.data) : D.data instanceof ArrayBuffer && this.handleAudioBuffer(D.data);
|
|
296
|
+
}, this.ws.onerror = (D) => {
|
|
297
|
+
console.error("[GlydeVoice] WebSocket error:", D), this.emit({ type: "error", payload: D });
|
|
298
298
|
}, this.ws.onclose = () => {
|
|
299
299
|
this.cleanup(), this.emit({ type: "close" });
|
|
300
300
|
}, this.renderUI();
|
|
@@ -399,11 +399,11 @@ ${V}`), await this.initializeAudio();
|
|
|
399
399
|
H[S] = O[S] / 32768;
|
|
400
400
|
const V = this.resample24kTo48k(H);
|
|
401
401
|
!this.isAgentSpeaking && !this.agentAudioDoneReceived && (this.isAgentSpeaking = !0, this.emit({ type: "agent_speaking", payload: !0 }));
|
|
402
|
-
const
|
|
402
|
+
const U = new Float32Array(V);
|
|
403
403
|
this.playbackWorkletNode.port.postMessage({
|
|
404
404
|
type: "audio",
|
|
405
|
-
data:
|
|
406
|
-
}, [
|
|
405
|
+
data: U
|
|
406
|
+
}, [U.buffer]);
|
|
407
407
|
}
|
|
408
408
|
/**
|
|
409
409
|
* Resample audio from 24kHz to 48kHz using linear interpolation
|
|
@@ -587,17 +587,24 @@ ${V}`), await this.initializeAudio();
|
|
|
587
587
|
})
|
|
588
588
|
});
|
|
589
589
|
if (!o.ok) {
|
|
590
|
-
const H = await o.json().catch(() => ({}))
|
|
591
|
-
throw
|
|
590
|
+
const H = await o.json().catch(() => ({})), V = H.error?.message || H.message || `HTTP ${o.status}`;
|
|
591
|
+
throw console.error("[GlydeVoice] Voice function API call failed:", o.status, V), new Error(V);
|
|
592
592
|
}
|
|
593
593
|
const O = await o.json();
|
|
594
|
-
if (O.success && O.data?.output)
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
if (O.success && O.data?.output !== void 0) {
|
|
595
|
+
const H = O.data.output;
|
|
596
|
+
if (typeof H == "object" && H !== null && H.success === !1) {
|
|
597
|
+
const V = H.error ?? H.fallback_message;
|
|
598
|
+
console.warn("[GlydeVoice] Voice function backend reported failure:", f, V);
|
|
599
|
+
}
|
|
600
|
+
return typeof H == "string" ? H : JSON.stringify(H);
|
|
601
|
+
}
|
|
602
|
+
throw console.error("[GlydeVoice] Voice function invalid response:", O), new Error("Invalid response from voice function endpoint");
|
|
597
603
|
} catch (o) {
|
|
598
|
-
|
|
604
|
+
const O = o instanceof Error ? o.message : "Function execution failed";
|
|
605
|
+
return console.error("[GlydeVoice] Voice function error:", O, o), JSON.stringify({
|
|
599
606
|
success: !1,
|
|
600
|
-
error:
|
|
607
|
+
error: O,
|
|
601
608
|
fallback_message: "I apologize, but I'm having trouble with that request right now. Is there something else I can help you with?"
|
|
602
609
|
});
|
|
603
610
|
}
|
|
@@ -801,7 +808,7 @@ function vg() {
|
|
|
801
808
|
if (Md) return K;
|
|
802
809
|
Md = 1;
|
|
803
810
|
var g = { env: { NODE_ENV: "production" } };
|
|
804
|
-
var f = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), O = /* @__PURE__ */ Symbol.for("react.profiler"), H = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"),
|
|
811
|
+
var f = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), O = /* @__PURE__ */ Symbol.for("react.profiler"), H = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), S = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), R = /* @__PURE__ */ Symbol.for("react.activity"), w = Symbol.iterator;
|
|
805
812
|
function ft(d) {
|
|
806
813
|
return d === null || typeof d != "object" ? null : (d = w && d[w] || d["@@iterator"], typeof d == "function" ? d : null);
|
|
807
814
|
}
|
|
@@ -866,7 +873,7 @@ function vg() {
|
|
|
866
873
|
function Jt(d, E) {
|
|
867
874
|
return typeof d == "object" && d !== null && d.key != null ? Wt("" + d.key) : E.toString(36);
|
|
868
875
|
}
|
|
869
|
-
function
|
|
876
|
+
function j(d) {
|
|
870
877
|
switch (d.status) {
|
|
871
878
|
case "fulfilled":
|
|
872
879
|
return d.value;
|
|
@@ -907,7 +914,7 @@ function vg() {
|
|
|
907
914
|
case y:
|
|
908
915
|
ot = !0;
|
|
909
916
|
break;
|
|
910
|
-
case
|
|
917
|
+
case D:
|
|
911
918
|
return ot = d._init, _(
|
|
912
919
|
ot(d._payload),
|
|
913
920
|
E,
|
|
@@ -950,7 +957,7 @@ function vg() {
|
|
|
950
957
|
else if (I === "object") {
|
|
951
958
|
if (typeof d.then == "function")
|
|
952
959
|
return _(
|
|
953
|
-
|
|
960
|
+
j(d),
|
|
954
961
|
E,
|
|
955
962
|
N,
|
|
956
963
|
G,
|
|
@@ -1028,7 +1035,7 @@ function vg() {
|
|
|
1028
1035
|
return d;
|
|
1029
1036
|
}
|
|
1030
1037
|
};
|
|
1031
|
-
return K.Activity =
|
|
1038
|
+
return K.Activity = R, K.Children = ie, K.Component = yt, K.Fragment = M, K.Profiler = O, K.PureComponent = St, K.StrictMode = o, K.Suspense = S, K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = et, K.__COMPILER_RUNTIME = {
|
|
1032
1039
|
__proto__: null,
|
|
1033
1040
|
c: function(d) {
|
|
1034
1041
|
return et.H.useMemoCache(d);
|
|
@@ -1087,10 +1094,10 @@ function vg() {
|
|
|
1087
1094
|
}, K.createRef = function() {
|
|
1088
1095
|
return { current: null };
|
|
1089
1096
|
}, K.forwardRef = function(d) {
|
|
1090
|
-
return { $$typeof:
|
|
1097
|
+
return { $$typeof: U, render: d };
|
|
1091
1098
|
}, K.isValidElement = Yt, K.lazy = function(d) {
|
|
1092
1099
|
return {
|
|
1093
|
-
$$typeof:
|
|
1100
|
+
$$typeof: D,
|
|
1094
1101
|
_payload: { _status: -1, _result: d },
|
|
1095
1102
|
_init: ut
|
|
1096
1103
|
};
|
|
@@ -1163,16 +1170,16 @@ function Tf() {
|
|
|
1163
1170
|
var Z = Tf();
|
|
1164
1171
|
const Zu = /* @__PURE__ */ mg(Z);
|
|
1165
1172
|
function pg(g) {
|
|
1166
|
-
const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V,
|
|
1173
|
+
const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V, U] = Z.useState(!1), [S, Y] = Z.useState(!1), [D, R] = Z.useState(null), w = Z.useRef(null), ft = Z.useCallback((Q) => {
|
|
1167
1174
|
switch (Q.type) {
|
|
1168
1175
|
case "ready":
|
|
1169
1176
|
y("active");
|
|
1170
1177
|
break;
|
|
1171
1178
|
case "close":
|
|
1172
|
-
y("idle"), H(!1),
|
|
1179
|
+
y("idle"), H(!1), U(!1);
|
|
1173
1180
|
break;
|
|
1174
1181
|
case "error":
|
|
1175
|
-
y("error"),
|
|
1182
|
+
y("error"), R(
|
|
1176
1183
|
typeof Q.payload == "object" && Q.payload !== null && "message" in Q.payload ? String(Q.payload.message) : "Connection error"
|
|
1177
1184
|
);
|
|
1178
1185
|
break;
|
|
@@ -1180,7 +1187,7 @@ function pg(g) {
|
|
|
1180
1187
|
H(!!Q.payload);
|
|
1181
1188
|
break;
|
|
1182
1189
|
case "agent_speaking":
|
|
1183
|
-
|
|
1190
|
+
U(!!Q.payload);
|
|
1184
1191
|
break;
|
|
1185
1192
|
}
|
|
1186
1193
|
}, []), $ = Z.useCallback((Q, Et) => {
|
|
@@ -1190,7 +1197,7 @@ function pg(g) {
|
|
|
1190
1197
|
timestamp: /* @__PURE__ */ new Date()
|
|
1191
1198
|
}]);
|
|
1192
1199
|
}, []), J = Z.useCallback(async () => {
|
|
1193
|
-
y("connecting"),
|
|
1200
|
+
y("connecting"), R(null);
|
|
1194
1201
|
try {
|
|
1195
1202
|
const Q = new yg({
|
|
1196
1203
|
...g,
|
|
@@ -1199,10 +1206,10 @@ function pg(g) {
|
|
|
1199
1206
|
});
|
|
1200
1207
|
w.current = Q, await Q.start();
|
|
1201
1208
|
} catch (Q) {
|
|
1202
|
-
console.error("[useVoiceAgent] Failed to start:", Q), y("error"),
|
|
1209
|
+
console.error("[useVoiceAgent] Failed to start:", Q), y("error"), R(Q instanceof Error ? Q.message : "Failed to connect");
|
|
1203
1210
|
}
|
|
1204
1211
|
}, [g, ft, $]), rt = Z.useCallback(() => {
|
|
1205
|
-
w.current?.stop(), w.current = null, y("idle"), H(!1),
|
|
1212
|
+
w.current?.stop(), w.current = null, y("idle"), H(!1), U(!1);
|
|
1206
1213
|
}, []), yt = Z.useCallback(() => {
|
|
1207
1214
|
const Q = !S;
|
|
1208
1215
|
Y(Q), w.current?.setMuted(Q);
|
|
@@ -1221,7 +1228,7 @@ function pg(g) {
|
|
|
1221
1228
|
isUserSpeaking: O,
|
|
1222
1229
|
isAgentSpeaking: V,
|
|
1223
1230
|
isMuted: S,
|
|
1224
|
-
errorMessage:
|
|
1231
|
+
errorMessage: D,
|
|
1225
1232
|
start: J,
|
|
1226
1233
|
stop: rt,
|
|
1227
1234
|
toggleMute: yt,
|
|
@@ -1231,24 +1238,24 @@ function pg(g) {
|
|
|
1231
1238
|
};
|
|
1232
1239
|
}
|
|
1233
1240
|
function bg(g) {
|
|
1234
|
-
const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V,
|
|
1241
|
+
const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V, U] = Z.useState(null), S = Z.useRef(null), Y = Z.useRef(!1), D = Z.useCallback(() => (S.current || (S.current = new gg({
|
|
1235
1242
|
...g,
|
|
1236
1243
|
onTyping: H
|
|
1237
|
-
})), S.current), [g]),
|
|
1244
|
+
})), S.current), [g]), R = Z.useCallback(async () => {
|
|
1238
1245
|
if (!Y.current) {
|
|
1239
|
-
y("loading"),
|
|
1246
|
+
y("loading"), U(null);
|
|
1240
1247
|
try {
|
|
1241
|
-
const J = await
|
|
1248
|
+
const J = await D().initialize();
|
|
1242
1249
|
o(J), y("ready"), Y.current = !0;
|
|
1243
1250
|
} catch ($) {
|
|
1244
|
-
console.error("[useTextChat] Initialization error:", $), y("error"),
|
|
1251
|
+
console.error("[useTextChat] Initialization error:", $), y("error"), U($ instanceof Error ? $.message : "Failed to initialize chat");
|
|
1245
1252
|
}
|
|
1246
1253
|
}
|
|
1247
|
-
}, [
|
|
1254
|
+
}, [D]), w = Z.useCallback(async ($) => {
|
|
1248
1255
|
if ($.trim()) {
|
|
1249
|
-
|
|
1256
|
+
U(null);
|
|
1250
1257
|
try {
|
|
1251
|
-
const J =
|
|
1258
|
+
const J = D(), rt = {
|
|
1252
1259
|
role: "user",
|
|
1253
1260
|
content: $.trim(),
|
|
1254
1261
|
created: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1257,22 +1264,22 @@ function bg(g) {
|
|
|
1257
1264
|
const yt = J.getHistory();
|
|
1258
1265
|
o(yt), f !== "ready" && (y("ready"), Y.current = !0);
|
|
1259
1266
|
} catch (J) {
|
|
1260
|
-
console.error("[useTextChat] Send message error:", J),
|
|
1267
|
+
console.error("[useTextChat] Send message error:", J), U(J instanceof Error ? J.message : "Failed to send message");
|
|
1261
1268
|
}
|
|
1262
1269
|
}
|
|
1263
|
-
}, [
|
|
1270
|
+
}, [D, f]), ft = Z.useCallback(() => {
|
|
1264
1271
|
S.current?.clearHistory(), o([]), Y.current = !1, y("idle");
|
|
1265
1272
|
}, []);
|
|
1266
1273
|
return Z.useEffect(() => {
|
|
1267
|
-
g.autoInit && !Y.current && g.contextId &&
|
|
1268
|
-
}, [g.autoInit, g.contextId,
|
|
1274
|
+
g.autoInit && !Y.current && g.contextId && R();
|
|
1275
|
+
}, [g.autoInit, g.contextId, R]), Z.useEffect(() => () => {
|
|
1269
1276
|
S.current = null;
|
|
1270
1277
|
}, []), {
|
|
1271
1278
|
status: f,
|
|
1272
1279
|
messages: M,
|
|
1273
1280
|
isLoading: O,
|
|
1274
1281
|
errorMessage: V,
|
|
1275
|
-
initialize:
|
|
1282
|
+
initialize: R,
|
|
1276
1283
|
sendMessage: w,
|
|
1277
1284
|
clearHistory: ft,
|
|
1278
1285
|
textChat: S.current
|
|
@@ -1953,12 +1960,12 @@ const Gd = ({
|
|
|
1953
1960
|
contextType: O = "screening",
|
|
1954
1961
|
height: H = "600px",
|
|
1955
1962
|
onTranscript: V,
|
|
1956
|
-
onCallEnd:
|
|
1963
|
+
onCallEnd: U,
|
|
1957
1964
|
onError: S,
|
|
1958
1965
|
onSwitchToText: Y
|
|
1959
1966
|
}) => {
|
|
1960
|
-
const
|
|
1961
|
-
status:
|
|
1967
|
+
const D = Z.useRef(null), {
|
|
1968
|
+
status: R,
|
|
1962
1969
|
transcripts: w,
|
|
1963
1970
|
isUserSpeaking: ft,
|
|
1964
1971
|
isAgentSpeaking: $,
|
|
@@ -1977,15 +1984,15 @@ const Gd = ({
|
|
|
1977
1984
|
unityBaseUrl: o
|
|
1978
1985
|
});
|
|
1979
1986
|
Z.useEffect(() => {
|
|
1980
|
-
|
|
1987
|
+
D.current?.scrollIntoView({ behavior: "smooth" });
|
|
1981
1988
|
}, [w]), Z.useEffect(() => {
|
|
1982
1989
|
if (V && w.length > 0) {
|
|
1983
1990
|
const xt = w[w.length - 1];
|
|
1984
1991
|
V(xt.content, xt.role);
|
|
1985
1992
|
}
|
|
1986
1993
|
}, [w, V]), Z.useEffect(() => {
|
|
1987
|
-
|
|
1988
|
-
}, [
|
|
1994
|
+
R === "error" && rt && S && S(new Error(rt));
|
|
1995
|
+
}, [R, rt, S]);
|
|
1989
1996
|
const Et = () => {
|
|
1990
1997
|
switch (O) {
|
|
1991
1998
|
case "screening":
|
|
@@ -2002,7 +2009,7 @@ const Gd = ({
|
|
|
2002
2009
|
}, qt = async () => {
|
|
2003
2010
|
Q(), await yt();
|
|
2004
2011
|
}, et = () => {
|
|
2005
|
-
pt(),
|
|
2012
|
+
pt(), U?.();
|
|
2006
2013
|
};
|
|
2007
2014
|
return /* @__PURE__ */ p.jsxs("div", { style: {
|
|
2008
2015
|
background: "var(--glyde-background, white)",
|
|
@@ -2024,7 +2031,7 @@ const Gd = ({
|
|
|
2024
2031
|
/* @__PURE__ */ p.jsx("h2", { style: { margin: 0, fontSize: "1.1rem", fontWeight: 600, color: "var(--glyde-text, #1f2937)" }, children: Et() }),
|
|
2025
2032
|
/* @__PURE__ */ p.jsx("small", { style: { color: "var(--glyde-text-secondary, #6b7280)", fontSize: "0.8rem" }, children: M ? "JWT Auth" : f ? "Publishable Key" : "API Key" })
|
|
2026
2033
|
] }),
|
|
2027
|
-
|
|
2034
|
+
R === "active" && /* @__PURE__ */ p.jsxs("div", { style: {
|
|
2028
2035
|
...Ct.statusBadge,
|
|
2029
2036
|
...Ct.statusBadgeLive
|
|
2030
2037
|
}, children: [
|
|
@@ -2032,7 +2039,7 @@ const Gd = ({
|
|
|
2032
2039
|
" Live"
|
|
2033
2040
|
] })
|
|
2034
2041
|
] }),
|
|
2035
|
-
/* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children:
|
|
2042
|
+
/* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: R === "idle" || R === "error" ? (
|
|
2036
2043
|
/* Idle State */
|
|
2037
2044
|
/* @__PURE__ */ p.jsxs("div", { style: {
|
|
2038
2045
|
flex: 1,
|
|
@@ -2112,16 +2119,16 @@ const Gd = ({
|
|
|
2112
2119
|
padding: "16px",
|
|
2113
2120
|
background: "var(--glyde-surface, #f9fafb)"
|
|
2114
2121
|
}, children: [
|
|
2115
|
-
|
|
2122
|
+
R === "connecting" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-secondary, #6b7280)", padding: "40px" }, children: [
|
|
2116
2123
|
/* @__PURE__ */ p.jsx("div", { className: "glyde-spinner", style: { margin: "0 auto 12px" } }),
|
|
2117
2124
|
"Connecting to AI Agent..."
|
|
2118
2125
|
] }),
|
|
2119
|
-
w.length === 0 &&
|
|
2126
|
+
w.length === 0 && R === "active" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-muted, #9ca3af)", padding: "40px" }, children: [
|
|
2120
2127
|
/* @__PURE__ */ p.jsx(xf, { size: 32, color: "var(--glyde-text-muted, #9ca3af)" }),
|
|
2121
2128
|
/* @__PURE__ */ p.jsx("p", { style: { marginTop: "8px" }, children: "Start speaking - the AI will respond" })
|
|
2122
2129
|
] }),
|
|
2123
2130
|
w.map((xt, It) => /* @__PURE__ */ p.jsx(jg, { transcript: xt, contextType: O }, It)),
|
|
2124
|
-
/* @__PURE__ */ p.jsx("div", { ref:
|
|
2131
|
+
/* @__PURE__ */ p.jsx("div", { ref: D })
|
|
2125
2132
|
] }),
|
|
2126
2133
|
/* @__PURE__ */ p.jsxs("div", { style: {
|
|
2127
2134
|
padding: "16px",
|
|
@@ -2236,11 +2243,11 @@ const Gd = ({
|
|
|
2236
2243
|
height: O = "600px",
|
|
2237
2244
|
title: H = "AI Chat",
|
|
2238
2245
|
placeholder: V = "Type your message...",
|
|
2239
|
-
autoInit:
|
|
2246
|
+
autoInit: U = !0,
|
|
2240
2247
|
onMessage: S,
|
|
2241
2248
|
onError: Y
|
|
2242
2249
|
}) => {
|
|
2243
|
-
const [
|
|
2250
|
+
const [D, R] = Z.useState(""), w = Z.useRef(null), {
|
|
2244
2251
|
status: ft,
|
|
2245
2252
|
messages: $,
|
|
2246
2253
|
isLoading: J,
|
|
@@ -2252,7 +2259,7 @@ const Gd = ({
|
|
|
2252
2259
|
authToken: M,
|
|
2253
2260
|
contextId: g,
|
|
2254
2261
|
unityBaseUrl: o,
|
|
2255
|
-
autoInit:
|
|
2262
|
+
autoInit: U
|
|
2256
2263
|
});
|
|
2257
2264
|
Z.useEffect(() => {
|
|
2258
2265
|
w.current?.scrollIntoView({ behavior: "smooth" });
|
|
@@ -2260,9 +2267,9 @@ const Gd = ({
|
|
|
2260
2267
|
ft === "error" && rt && Y && Y(new Error(rt));
|
|
2261
2268
|
}, [ft, rt, Y]);
|
|
2262
2269
|
const pt = async () => {
|
|
2263
|
-
if (!
|
|
2264
|
-
const Q =
|
|
2265
|
-
|
|
2270
|
+
if (!D.trim() || J) return;
|
|
2271
|
+
const Q = D.trim();
|
|
2272
|
+
R(""), await yt(Q), S && S({ role: "user", content: Q });
|
|
2266
2273
|
}, St = (Q) => {
|
|
2267
2274
|
Q.key === "Enter" && !Q.shiftKey && (Q.preventDefault(), pt());
|
|
2268
2275
|
};
|
|
@@ -2311,8 +2318,8 @@ const Gd = ({
|
|
|
2311
2318
|
"input",
|
|
2312
2319
|
{
|
|
2313
2320
|
type: "text",
|
|
2314
|
-
value:
|
|
2315
|
-
onChange: (Q) =>
|
|
2321
|
+
value: D,
|
|
2322
|
+
onChange: (Q) => R(Q.target.value),
|
|
2316
2323
|
onKeyDown: St,
|
|
2317
2324
|
placeholder: V,
|
|
2318
2325
|
style: {
|
|
@@ -2326,14 +2333,14 @@ const Gd = ({
|
|
|
2326
2333
|
"button",
|
|
2327
2334
|
{
|
|
2328
2335
|
onClick: pt,
|
|
2329
|
-
disabled: J || !
|
|
2336
|
+
disabled: J || !D.trim(),
|
|
2330
2337
|
style: {
|
|
2331
2338
|
...Ct.iconButton,
|
|
2332
2339
|
background: "var(--glyde-secondary, #0284c7)",
|
|
2333
2340
|
width: "48px",
|
|
2334
2341
|
height: "48px",
|
|
2335
|
-
opacity: J || !
|
|
2336
|
-
cursor: J || !
|
|
2342
|
+
opacity: J || !D.trim() ? 0.5 : 1,
|
|
2343
|
+
cursor: J || !D.trim() ? "not-allowed" : "pointer"
|
|
2337
2344
|
},
|
|
2338
2345
|
children: /* @__PURE__ */ p.jsx(Tg, { size: 20, color: "white" })
|
|
2339
2346
|
}
|
|
@@ -2417,11 +2424,11 @@ const Gd = ({
|
|
|
2417
2424
|
contextType: O = "screening",
|
|
2418
2425
|
defaultMode: H = "voice",
|
|
2419
2426
|
position: V = "bottom-right",
|
|
2420
|
-
theme:
|
|
2427
|
+
theme: U = "light",
|
|
2421
2428
|
allowModeSwitch: S = !0,
|
|
2422
2429
|
container: Y,
|
|
2423
|
-
displayMode:
|
|
2424
|
-
dimensions:
|
|
2430
|
+
displayMode: D = "floating",
|
|
2431
|
+
dimensions: R,
|
|
2425
2432
|
showHeader: w = !0,
|
|
2426
2433
|
allowClose: ft = !0,
|
|
2427
2434
|
onReady: $,
|
|
@@ -2433,12 +2440,12 @@ const Gd = ({
|
|
|
2433
2440
|
}) => {
|
|
2434
2441
|
console.log("[ChatWidget] Received unityBaseUrl:", o);
|
|
2435
2442
|
const [Q, Et] = Z.useState(
|
|
2436
|
-
|
|
2443
|
+
D === "floating" ? St : !0
|
|
2437
2444
|
), [qt, et] = Z.useState(!0), [xt, It] = Z.useState(H || "voice");
|
|
2438
2445
|
Z.useEffect(() => {
|
|
2439
|
-
const C =
|
|
2446
|
+
const C = U === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : U;
|
|
2440
2447
|
ku(C);
|
|
2441
|
-
}, [
|
|
2448
|
+
}, [U]), Z.useEffect(() => {
|
|
2442
2449
|
$?.();
|
|
2443
2450
|
}, [$]);
|
|
2444
2451
|
const Ue = Ug(V), Yt = (C) => {
|
|
@@ -2448,10 +2455,10 @@ const Gd = ({
|
|
|
2448
2455
|
}, ve = (C) => {
|
|
2449
2456
|
yt?.(C);
|
|
2450
2457
|
}, Jt = () => {
|
|
2451
|
-
|
|
2452
|
-
},
|
|
2453
|
-
...Bg[
|
|
2454
|
-
...
|
|
2458
|
+
D === "floating" ? Et(!1) : (et(!1), pt?.());
|
|
2459
|
+
}, j = {
|
|
2460
|
+
...Bg[D],
|
|
2461
|
+
...R
|
|
2455
2462
|
}, _ = (C) => {
|
|
2456
2463
|
if (C !== void 0)
|
|
2457
2464
|
return typeof C == "number" ? `${C}px` : C;
|
|
@@ -2469,13 +2476,13 @@ const Gd = ({
|
|
|
2469
2476
|
allowModeSwitch: S,
|
|
2470
2477
|
showHeader: w,
|
|
2471
2478
|
allowClose: ft,
|
|
2472
|
-
dimensions:
|
|
2479
|
+
dimensions: j,
|
|
2473
2480
|
onModeChange: Yt,
|
|
2474
2481
|
onTranscript: Wt,
|
|
2475
2482
|
onError: ve,
|
|
2476
2483
|
onClose: Jt
|
|
2477
2484
|
}
|
|
2478
|
-
) :
|
|
2485
|
+
) : D === "modal" ? /* @__PURE__ */ p.jsx(
|
|
2479
2486
|
qg,
|
|
2480
2487
|
{
|
|
2481
2488
|
publishableKey: g,
|
|
@@ -2488,21 +2495,21 @@ const Gd = ({
|
|
|
2488
2495
|
allowModeSwitch: S,
|
|
2489
2496
|
showHeader: w,
|
|
2490
2497
|
allowClose: ft,
|
|
2491
|
-
dimensions:
|
|
2498
|
+
dimensions: j,
|
|
2492
2499
|
onModeChange: Yt,
|
|
2493
2500
|
onTranscript: Wt,
|
|
2494
2501
|
onError: ve,
|
|
2495
2502
|
onClose: Jt
|
|
2496
2503
|
}
|
|
2497
|
-
) :
|
|
2504
|
+
) : D === "inline" ? /* @__PURE__ */ p.jsx(
|
|
2498
2505
|
"div",
|
|
2499
2506
|
{
|
|
2500
2507
|
className: "glyde-widget-root",
|
|
2501
2508
|
style: {
|
|
2502
|
-
width: _(
|
|
2503
|
-
height: _(
|
|
2504
|
-
maxWidth: _(
|
|
2505
|
-
maxHeight: _(
|
|
2509
|
+
width: _(j.width),
|
|
2510
|
+
height: _(j.height),
|
|
2511
|
+
maxWidth: _(j.maxWidth),
|
|
2512
|
+
maxHeight: _(j.maxHeight),
|
|
2506
2513
|
minHeight: "500px"
|
|
2507
2514
|
// Ensure enough height for voice controls
|
|
2508
2515
|
},
|
|
@@ -2519,7 +2526,7 @@ const Gd = ({
|
|
|
2519
2526
|
allowModeSwitch: S,
|
|
2520
2527
|
showHeader: w,
|
|
2521
2528
|
allowClose: ft,
|
|
2522
|
-
dimensions:
|
|
2529
|
+
dimensions: j,
|
|
2523
2530
|
onModeChange: Yt,
|
|
2524
2531
|
onTranscript: Wt,
|
|
2525
2532
|
onError: ve,
|
|
@@ -2677,11 +2684,11 @@ const Gd = ({
|
|
|
2677
2684
|
contextType: O,
|
|
2678
2685
|
mode: H,
|
|
2679
2686
|
allowModeSwitch: V,
|
|
2680
|
-
showHeader:
|
|
2687
|
+
showHeader: U = !0,
|
|
2681
2688
|
allowClose: S = !0,
|
|
2682
2689
|
dimensions: Y,
|
|
2683
|
-
onModeChange:
|
|
2684
|
-
onTranscript:
|
|
2690
|
+
onModeChange: D,
|
|
2691
|
+
onTranscript: R,
|
|
2685
2692
|
onError: w,
|
|
2686
2693
|
onClose: ft
|
|
2687
2694
|
}) => {
|
|
@@ -2690,7 +2697,7 @@ const Gd = ({
|
|
|
2690
2697
|
J(H);
|
|
2691
2698
|
}, [H]);
|
|
2692
2699
|
const rt = (pt) => {
|
|
2693
|
-
J(pt),
|
|
2700
|
+
J(pt), D(pt);
|
|
2694
2701
|
}, yt = (pt) => {
|
|
2695
2702
|
if (pt !== void 0)
|
|
2696
2703
|
return typeof pt == "number" ? `${pt}px` : pt;
|
|
@@ -2715,7 +2722,7 @@ const Gd = ({
|
|
|
2715
2722
|
background: "var(--glyde-background, white)"
|
|
2716
2723
|
},
|
|
2717
2724
|
children: [
|
|
2718
|
-
|
|
2725
|
+
U && /* @__PURE__ */ p.jsx(
|
|
2719
2726
|
Ld,
|
|
2720
2727
|
{
|
|
2721
2728
|
contextType: O,
|
|
@@ -2739,7 +2746,7 @@ const Gd = ({
|
|
|
2739
2746
|
unityApiUrl: o,
|
|
2740
2747
|
contextType: O,
|
|
2741
2748
|
height: "100%",
|
|
2742
|
-
onTranscript:
|
|
2749
|
+
onTranscript: R,
|
|
2743
2750
|
onSwitchToText: V ? () => rt("text") : void 0,
|
|
2744
2751
|
onError: w
|
|
2745
2752
|
}
|
|
@@ -2809,38 +2816,38 @@ var vf = { exports: {} }, Mn = {}, pf = { exports: {} }, bf = {};
|
|
|
2809
2816
|
var Dd;
|
|
2810
2817
|
function Yg() {
|
|
2811
2818
|
return Dd || (Dd = 1, (function(g) {
|
|
2812
|
-
function f(
|
|
2813
|
-
var C =
|
|
2814
|
-
|
|
2819
|
+
function f(j, _) {
|
|
2820
|
+
var C = j.length;
|
|
2821
|
+
j.push(_);
|
|
2815
2822
|
t: for (; 0 < C; ) {
|
|
2816
|
-
var ut = C - 1 >>> 1, At =
|
|
2823
|
+
var ut = C - 1 >>> 1, At = j[ut];
|
|
2817
2824
|
if (0 < o(At, _))
|
|
2818
|
-
|
|
2825
|
+
j[ut] = _, j[C] = At, C = ut;
|
|
2819
2826
|
else break t;
|
|
2820
2827
|
}
|
|
2821
2828
|
}
|
|
2822
|
-
function y(
|
|
2823
|
-
return
|
|
2829
|
+
function y(j) {
|
|
2830
|
+
return j.length === 0 ? null : j[0];
|
|
2824
2831
|
}
|
|
2825
|
-
function M(
|
|
2826
|
-
if (
|
|
2827
|
-
var _ =
|
|
2832
|
+
function M(j) {
|
|
2833
|
+
if (j.length === 0) return null;
|
|
2834
|
+
var _ = j[0], C = j.pop();
|
|
2828
2835
|
if (C !== _) {
|
|
2829
|
-
|
|
2830
|
-
t: for (var ut = 0, At =
|
|
2831
|
-
var d = 2 * (ut + 1) - 1, E =
|
|
2836
|
+
j[0] = C;
|
|
2837
|
+
t: for (var ut = 0, At = j.length, ie = At >>> 1; ut < ie; ) {
|
|
2838
|
+
var d = 2 * (ut + 1) - 1, E = j[d], N = d + 1, G = j[N];
|
|
2832
2839
|
if (0 > o(E, C))
|
|
2833
|
-
N < At && 0 > o(G, E) ? (
|
|
2840
|
+
N < At && 0 > o(G, E) ? (j[ut] = G, j[N] = C, ut = N) : (j[ut] = E, j[d] = C, ut = d);
|
|
2834
2841
|
else if (N < At && 0 > o(G, C))
|
|
2835
|
-
|
|
2842
|
+
j[ut] = G, j[N] = C, ut = N;
|
|
2836
2843
|
else break t;
|
|
2837
2844
|
}
|
|
2838
2845
|
}
|
|
2839
2846
|
return _;
|
|
2840
2847
|
}
|
|
2841
|
-
function o(
|
|
2842
|
-
var C =
|
|
2843
|
-
return C !== 0 ? C :
|
|
2848
|
+
function o(j, _) {
|
|
2849
|
+
var C = j.sortIndex - _.sortIndex;
|
|
2850
|
+
return C !== 0 ? C : j.id - _.id;
|
|
2844
2851
|
}
|
|
2845
2852
|
if (g.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") {
|
|
2846
2853
|
var O = performance;
|
|
@@ -2853,23 +2860,23 @@ function Yg() {
|
|
|
2853
2860
|
return H.now() - V;
|
|
2854
2861
|
};
|
|
2855
2862
|
}
|
|
2856
|
-
var
|
|
2857
|
-
function St(
|
|
2863
|
+
var U = [], S = [], Y = 1, D = null, R = 3, w = !1, ft = !1, $ = !1, J = !1, rt = typeof setTimeout == "function" ? setTimeout : null, yt = typeof clearTimeout == "function" ? clearTimeout : null, pt = typeof setImmediate < "u" ? setImmediate : null;
|
|
2864
|
+
function St(j) {
|
|
2858
2865
|
for (var _ = y(S); _ !== null; ) {
|
|
2859
2866
|
if (_.callback === null) M(S);
|
|
2860
|
-
else if (_.startTime <=
|
|
2861
|
-
M(S), _.sortIndex = _.expirationTime, f(
|
|
2867
|
+
else if (_.startTime <= j)
|
|
2868
|
+
M(S), _.sortIndex = _.expirationTime, f(U, _);
|
|
2862
2869
|
else break;
|
|
2863
2870
|
_ = y(S);
|
|
2864
2871
|
}
|
|
2865
2872
|
}
|
|
2866
|
-
function Q(
|
|
2867
|
-
if ($ = !1, St(
|
|
2868
|
-
if (y(
|
|
2873
|
+
function Q(j) {
|
|
2874
|
+
if ($ = !1, St(j), !ft)
|
|
2875
|
+
if (y(U) !== null)
|
|
2869
2876
|
ft = !0, Et || (Et = !0, Yt());
|
|
2870
2877
|
else {
|
|
2871
2878
|
var _ = y(S);
|
|
2872
|
-
_ !== null && Jt(Q, _.startTime -
|
|
2879
|
+
_ !== null && Jt(Q, _.startTime - j);
|
|
2873
2880
|
}
|
|
2874
2881
|
}
|
|
2875
2882
|
var Et = !1, qt = -1, et = 5, xt = -1;
|
|
@@ -2878,42 +2885,42 @@ function Yg() {
|
|
|
2878
2885
|
}
|
|
2879
2886
|
function Ue() {
|
|
2880
2887
|
if (J = !1, Et) {
|
|
2881
|
-
var
|
|
2882
|
-
xt =
|
|
2888
|
+
var j = g.unstable_now();
|
|
2889
|
+
xt = j;
|
|
2883
2890
|
var _ = !0;
|
|
2884
2891
|
try {
|
|
2885
2892
|
t: {
|
|
2886
2893
|
ft = !1, $ && ($ = !1, yt(qt), qt = -1), w = !0;
|
|
2887
|
-
var C =
|
|
2894
|
+
var C = R;
|
|
2888
2895
|
try {
|
|
2889
2896
|
e: {
|
|
2890
|
-
for (St(
|
|
2891
|
-
var ut =
|
|
2897
|
+
for (St(j), D = y(U); D !== null && !(D.expirationTime > j && It()); ) {
|
|
2898
|
+
var ut = D.callback;
|
|
2892
2899
|
if (typeof ut == "function") {
|
|
2893
|
-
|
|
2900
|
+
D.callback = null, R = D.priorityLevel;
|
|
2894
2901
|
var At = ut(
|
|
2895
|
-
|
|
2902
|
+
D.expirationTime <= j
|
|
2896
2903
|
);
|
|
2897
|
-
if (
|
|
2898
|
-
|
|
2904
|
+
if (j = g.unstable_now(), typeof At == "function") {
|
|
2905
|
+
D.callback = At, St(j), _ = !0;
|
|
2899
2906
|
break e;
|
|
2900
2907
|
}
|
|
2901
|
-
|
|
2902
|
-
} else M(
|
|
2903
|
-
|
|
2908
|
+
D === y(U) && M(U), St(j);
|
|
2909
|
+
} else M(U);
|
|
2910
|
+
D = y(U);
|
|
2904
2911
|
}
|
|
2905
|
-
if (
|
|
2912
|
+
if (D !== null) _ = !0;
|
|
2906
2913
|
else {
|
|
2907
2914
|
var ie = y(S);
|
|
2908
2915
|
ie !== null && Jt(
|
|
2909
2916
|
Q,
|
|
2910
|
-
ie.startTime -
|
|
2917
|
+
ie.startTime - j
|
|
2911
2918
|
), _ = !1;
|
|
2912
2919
|
}
|
|
2913
2920
|
}
|
|
2914
2921
|
break t;
|
|
2915
2922
|
} finally {
|
|
2916
|
-
|
|
2923
|
+
D = null, R = C, w = !1;
|
|
2917
2924
|
}
|
|
2918
2925
|
_ = void 0;
|
|
2919
2926
|
}
|
|
@@ -2936,40 +2943,40 @@ function Yg() {
|
|
|
2936
2943
|
Yt = function() {
|
|
2937
2944
|
rt(Ue, 0);
|
|
2938
2945
|
};
|
|
2939
|
-
function Jt(
|
|
2946
|
+
function Jt(j, _) {
|
|
2940
2947
|
qt = rt(function() {
|
|
2941
|
-
|
|
2948
|
+
j(g.unstable_now());
|
|
2942
2949
|
}, _);
|
|
2943
2950
|
}
|
|
2944
|
-
g.unstable_IdlePriority = 5, g.unstable_ImmediatePriority = 1, g.unstable_LowPriority = 4, g.unstable_NormalPriority = 3, g.unstable_Profiling = null, g.unstable_UserBlockingPriority = 2, g.unstable_cancelCallback = function(
|
|
2945
|
-
|
|
2946
|
-
}, g.unstable_forceFrameRate = function(
|
|
2947
|
-
0 >
|
|
2951
|
+
g.unstable_IdlePriority = 5, g.unstable_ImmediatePriority = 1, g.unstable_LowPriority = 4, g.unstable_NormalPriority = 3, g.unstable_Profiling = null, g.unstable_UserBlockingPriority = 2, g.unstable_cancelCallback = function(j) {
|
|
2952
|
+
j.callback = null;
|
|
2953
|
+
}, g.unstable_forceFrameRate = function(j) {
|
|
2954
|
+
0 > j || 125 < j ? console.error(
|
|
2948
2955
|
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
|
|
2949
|
-
) : et = 0 <
|
|
2956
|
+
) : et = 0 < j ? Math.floor(1e3 / j) : 5;
|
|
2950
2957
|
}, g.unstable_getCurrentPriorityLevel = function() {
|
|
2951
|
-
return
|
|
2952
|
-
}, g.unstable_next = function(
|
|
2953
|
-
switch (
|
|
2958
|
+
return R;
|
|
2959
|
+
}, g.unstable_next = function(j) {
|
|
2960
|
+
switch (R) {
|
|
2954
2961
|
case 1:
|
|
2955
2962
|
case 2:
|
|
2956
2963
|
case 3:
|
|
2957
2964
|
var _ = 3;
|
|
2958
2965
|
break;
|
|
2959
2966
|
default:
|
|
2960
|
-
_ =
|
|
2967
|
+
_ = R;
|
|
2961
2968
|
}
|
|
2962
|
-
var C =
|
|
2963
|
-
|
|
2969
|
+
var C = R;
|
|
2970
|
+
R = _;
|
|
2964
2971
|
try {
|
|
2965
|
-
return
|
|
2972
|
+
return j();
|
|
2966
2973
|
} finally {
|
|
2967
|
-
|
|
2974
|
+
R = C;
|
|
2968
2975
|
}
|
|
2969
2976
|
}, g.unstable_requestPaint = function() {
|
|
2970
2977
|
J = !0;
|
|
2971
|
-
}, g.unstable_runWithPriority = function(
|
|
2972
|
-
switch (
|
|
2978
|
+
}, g.unstable_runWithPriority = function(j, _) {
|
|
2979
|
+
switch (j) {
|
|
2973
2980
|
case 1:
|
|
2974
2981
|
case 2:
|
|
2975
2982
|
case 3:
|
|
@@ -2977,18 +2984,18 @@ function Yg() {
|
|
|
2977
2984
|
case 5:
|
|
2978
2985
|
break;
|
|
2979
2986
|
default:
|
|
2980
|
-
|
|
2987
|
+
j = 3;
|
|
2981
2988
|
}
|
|
2982
|
-
var C =
|
|
2983
|
-
|
|
2989
|
+
var C = R;
|
|
2990
|
+
R = j;
|
|
2984
2991
|
try {
|
|
2985
2992
|
return _();
|
|
2986
2993
|
} finally {
|
|
2987
|
-
|
|
2994
|
+
R = C;
|
|
2988
2995
|
}
|
|
2989
|
-
}, g.unstable_scheduleCallback = function(
|
|
2996
|
+
}, g.unstable_scheduleCallback = function(j, _, C) {
|
|
2990
2997
|
var ut = g.unstable_now();
|
|
2991
|
-
switch (typeof C == "object" && C !== null ? (C = C.delay, C = typeof C == "number" && 0 < C ? ut + C : ut) : C = ut,
|
|
2998
|
+
switch (typeof C == "object" && C !== null ? (C = C.delay, C = typeof C == "number" && 0 < C ? ut + C : ut) : C = ut, j) {
|
|
2992
2999
|
case 1:
|
|
2993
3000
|
var At = -1;
|
|
2994
3001
|
break;
|
|
@@ -3004,23 +3011,23 @@ function Yg() {
|
|
|
3004
3011
|
default:
|
|
3005
3012
|
At = 5e3;
|
|
3006
3013
|
}
|
|
3007
|
-
return At = C + At,
|
|
3014
|
+
return At = C + At, j = {
|
|
3008
3015
|
id: Y++,
|
|
3009
3016
|
callback: _,
|
|
3010
|
-
priorityLevel:
|
|
3017
|
+
priorityLevel: j,
|
|
3011
3018
|
startTime: C,
|
|
3012
3019
|
expirationTime: At,
|
|
3013
3020
|
sortIndex: -1
|
|
3014
|
-
}, C > ut ? (
|
|
3015
|
-
}, g.unstable_shouldYield = It, g.unstable_wrapCallback = function(
|
|
3016
|
-
var _ =
|
|
3021
|
+
}, C > ut ? (j.sortIndex = C, f(S, j), y(U) === null && j === y(S) && ($ ? (yt(qt), qt = -1) : $ = !0, Jt(Q, C - ut))) : (j.sortIndex = At, f(U, j), ft || w || (ft = !0, Et || (Et = !0, Yt()))), j;
|
|
3022
|
+
}, g.unstable_shouldYield = It, g.unstable_wrapCallback = function(j) {
|
|
3023
|
+
var _ = R;
|
|
3017
3024
|
return function() {
|
|
3018
|
-
var C =
|
|
3019
|
-
|
|
3025
|
+
var C = R;
|
|
3026
|
+
R = _;
|
|
3020
3027
|
try {
|
|
3021
|
-
return
|
|
3028
|
+
return j.apply(this, arguments);
|
|
3022
3029
|
} finally {
|
|
3023
|
-
|
|
3030
|
+
R = C;
|
|
3024
3031
|
}
|
|
3025
3032
|
};
|
|
3026
3033
|
};
|
|
@@ -3036,14 +3043,14 @@ function wg() {
|
|
|
3036
3043
|
if (jd) return kt;
|
|
3037
3044
|
jd = 1;
|
|
3038
3045
|
var g = Tf();
|
|
3039
|
-
function f(
|
|
3040
|
-
var S = "https://react.dev/errors/" +
|
|
3046
|
+
function f(U) {
|
|
3047
|
+
var S = "https://react.dev/errors/" + U;
|
|
3041
3048
|
if (1 < arguments.length) {
|
|
3042
3049
|
S += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
3043
3050
|
for (var Y = 2; Y < arguments.length; Y++)
|
|
3044
3051
|
S += "&args[]=" + encodeURIComponent(arguments[Y]);
|
|
3045
3052
|
}
|
|
3046
|
-
return "Minified React error #" +
|
|
3053
|
+
return "Minified React error #" + U + "; visit " + S + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
3047
3054
|
}
|
|
3048
3055
|
function y() {
|
|
3049
3056
|
}
|
|
@@ -3064,76 +3071,76 @@ function wg() {
|
|
|
3064
3071
|
p: 0,
|
|
3065
3072
|
findDOMNode: null
|
|
3066
3073
|
}, o = /* @__PURE__ */ Symbol.for("react.portal");
|
|
3067
|
-
function O(
|
|
3068
|
-
var
|
|
3074
|
+
function O(U, S, Y) {
|
|
3075
|
+
var D = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
3069
3076
|
return {
|
|
3070
3077
|
$$typeof: o,
|
|
3071
|
-
key:
|
|
3072
|
-
children:
|
|
3078
|
+
key: D == null ? null : "" + D,
|
|
3079
|
+
children: U,
|
|
3073
3080
|
containerInfo: S,
|
|
3074
3081
|
implementation: Y
|
|
3075
3082
|
};
|
|
3076
3083
|
}
|
|
3077
3084
|
var H = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
3078
|
-
function V(
|
|
3079
|
-
if (
|
|
3085
|
+
function V(U, S) {
|
|
3086
|
+
if (U === "font") return "";
|
|
3080
3087
|
if (typeof S == "string")
|
|
3081
3088
|
return S === "use-credentials" ? S : "";
|
|
3082
3089
|
}
|
|
3083
|
-
return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = M, kt.createPortal = function(
|
|
3090
|
+
return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = M, kt.createPortal = function(U, S) {
|
|
3084
3091
|
var Y = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
3085
3092
|
if (!S || S.nodeType !== 1 && S.nodeType !== 9 && S.nodeType !== 11)
|
|
3086
3093
|
throw Error(f(299));
|
|
3087
|
-
return O(
|
|
3088
|
-
}, kt.flushSync = function(
|
|
3094
|
+
return O(U, S, null, Y);
|
|
3095
|
+
}, kt.flushSync = function(U) {
|
|
3089
3096
|
var S = H.T, Y = M.p;
|
|
3090
3097
|
try {
|
|
3091
|
-
if (H.T = null, M.p = 2,
|
|
3098
|
+
if (H.T = null, M.p = 2, U) return U();
|
|
3092
3099
|
} finally {
|
|
3093
3100
|
H.T = S, M.p = Y, M.d.f();
|
|
3094
3101
|
}
|
|
3095
|
-
}, kt.preconnect = function(
|
|
3096
|
-
typeof
|
|
3097
|
-
}, kt.prefetchDNS = function(
|
|
3098
|
-
typeof
|
|
3099
|
-
}, kt.preinit = function(
|
|
3100
|
-
if (typeof
|
|
3101
|
-
var Y = S.as,
|
|
3102
|
+
}, kt.preconnect = function(U, S) {
|
|
3103
|
+
typeof U == "string" && (S ? (S = S.crossOrigin, S = typeof S == "string" ? S === "use-credentials" ? S : "" : void 0) : S = null, M.d.C(U, S));
|
|
3104
|
+
}, kt.prefetchDNS = function(U) {
|
|
3105
|
+
typeof U == "string" && M.d.D(U);
|
|
3106
|
+
}, kt.preinit = function(U, S) {
|
|
3107
|
+
if (typeof U == "string" && S && typeof S.as == "string") {
|
|
3108
|
+
var Y = S.as, D = V(Y, S.crossOrigin), R = typeof S.integrity == "string" ? S.integrity : void 0, w = typeof S.fetchPriority == "string" ? S.fetchPriority : void 0;
|
|
3102
3109
|
Y === "style" ? M.d.S(
|
|
3103
|
-
|
|
3110
|
+
U,
|
|
3104
3111
|
typeof S.precedence == "string" ? S.precedence : void 0,
|
|
3105
3112
|
{
|
|
3106
|
-
crossOrigin:
|
|
3107
|
-
integrity:
|
|
3113
|
+
crossOrigin: D,
|
|
3114
|
+
integrity: R,
|
|
3108
3115
|
fetchPriority: w
|
|
3109
3116
|
}
|
|
3110
|
-
) : Y === "script" && M.d.X(
|
|
3111
|
-
crossOrigin:
|
|
3112
|
-
integrity:
|
|
3117
|
+
) : Y === "script" && M.d.X(U, {
|
|
3118
|
+
crossOrigin: D,
|
|
3119
|
+
integrity: R,
|
|
3113
3120
|
fetchPriority: w,
|
|
3114
3121
|
nonce: typeof S.nonce == "string" ? S.nonce : void 0
|
|
3115
3122
|
});
|
|
3116
3123
|
}
|
|
3117
|
-
}, kt.preinitModule = function(
|
|
3118
|
-
if (typeof
|
|
3124
|
+
}, kt.preinitModule = function(U, S) {
|
|
3125
|
+
if (typeof U == "string")
|
|
3119
3126
|
if (typeof S == "object" && S !== null) {
|
|
3120
3127
|
if (S.as == null || S.as === "script") {
|
|
3121
3128
|
var Y = V(
|
|
3122
3129
|
S.as,
|
|
3123
3130
|
S.crossOrigin
|
|
3124
3131
|
);
|
|
3125
|
-
M.d.M(
|
|
3132
|
+
M.d.M(U, {
|
|
3126
3133
|
crossOrigin: Y,
|
|
3127
3134
|
integrity: typeof S.integrity == "string" ? S.integrity : void 0,
|
|
3128
3135
|
nonce: typeof S.nonce == "string" ? S.nonce : void 0
|
|
3129
3136
|
});
|
|
3130
3137
|
}
|
|
3131
|
-
} else S == null && M.d.M(
|
|
3132
|
-
}, kt.preload = function(
|
|
3133
|
-
if (typeof
|
|
3134
|
-
var Y = S.as,
|
|
3135
|
-
M.d.L(
|
|
3136
|
-
crossOrigin:
|
|
3138
|
+
} else S == null && M.d.M(U);
|
|
3139
|
+
}, kt.preload = function(U, S) {
|
|
3140
|
+
if (typeof U == "string" && typeof S == "object" && S !== null && typeof S.as == "string") {
|
|
3141
|
+
var Y = S.as, D = V(Y, S.crossOrigin);
|
|
3142
|
+
M.d.L(U, Y, {
|
|
3143
|
+
crossOrigin: D,
|
|
3137
3144
|
integrity: typeof S.integrity == "string" ? S.integrity : void 0,
|
|
3138
3145
|
nonce: typeof S.nonce == "string" ? S.nonce : void 0,
|
|
3139
3146
|
type: typeof S.type == "string" ? S.type : void 0,
|
|
@@ -3144,22 +3151,22 @@ function wg() {
|
|
|
3144
3151
|
media: typeof S.media == "string" ? S.media : void 0
|
|
3145
3152
|
});
|
|
3146
3153
|
}
|
|
3147
|
-
}, kt.preloadModule = function(
|
|
3148
|
-
if (typeof
|
|
3154
|
+
}, kt.preloadModule = function(U, S) {
|
|
3155
|
+
if (typeof U == "string")
|
|
3149
3156
|
if (S) {
|
|
3150
3157
|
var Y = V(S.as, S.crossOrigin);
|
|
3151
|
-
M.d.m(
|
|
3158
|
+
M.d.m(U, {
|
|
3152
3159
|
as: typeof S.as == "string" && S.as !== "script" ? S.as : void 0,
|
|
3153
3160
|
crossOrigin: Y,
|
|
3154
3161
|
integrity: typeof S.integrity == "string" ? S.integrity : void 0
|
|
3155
3162
|
});
|
|
3156
|
-
} else M.d.m(
|
|
3157
|
-
}, kt.requestFormReset = function(
|
|
3158
|
-
M.d.r(
|
|
3159
|
-
}, kt.unstable_batchedUpdates = function(
|
|
3160
|
-
return
|
|
3161
|
-
}, kt.useFormState = function(
|
|
3162
|
-
return H.H.useFormState(
|
|
3163
|
+
} else M.d.m(U);
|
|
3164
|
+
}, kt.requestFormReset = function(U) {
|
|
3165
|
+
M.d.r(U);
|
|
3166
|
+
}, kt.unstable_batchedUpdates = function(U, S) {
|
|
3167
|
+
return U(S);
|
|
3168
|
+
}, kt.useFormState = function(U, S, Y) {
|
|
3169
|
+
return H.H.useFormState(U, S, Y);
|
|
3163
3170
|
}, kt.useFormStatus = function() {
|
|
3164
3171
|
return H.H.useHostTransitionStatus();
|
|
3165
3172
|
}, kt.version = "19.2.4", kt;
|
|
@@ -3214,7 +3221,7 @@ function Xg() {
|
|
|
3214
3221
|
}
|
|
3215
3222
|
return null;
|
|
3216
3223
|
}
|
|
3217
|
-
function
|
|
3224
|
+
function U(t) {
|
|
3218
3225
|
if (t.tag === 31) {
|
|
3219
3226
|
var e = t.memoizedState;
|
|
3220
3227
|
if (e === null && (t = t.alternate, t !== null && (e = t.memoizedState)), e !== null) return e.dehydrated;
|
|
@@ -3283,16 +3290,16 @@ function Xg() {
|
|
|
3283
3290
|
if (l.tag !== 3) throw Error(o(188));
|
|
3284
3291
|
return l.stateNode.current === l ? t : e;
|
|
3285
3292
|
}
|
|
3286
|
-
function
|
|
3293
|
+
function D(t) {
|
|
3287
3294
|
var e = t.tag;
|
|
3288
3295
|
if (e === 5 || e === 26 || e === 27 || e === 6) return t;
|
|
3289
3296
|
for (t = t.child; t !== null; ) {
|
|
3290
|
-
if (e =
|
|
3297
|
+
if (e = D(t), e !== null) return e;
|
|
3291
3298
|
t = t.sibling;
|
|
3292
3299
|
}
|
|
3293
3300
|
return null;
|
|
3294
3301
|
}
|
|
3295
|
-
var
|
|
3302
|
+
var R = Object.assign, w = /* @__PURE__ */ Symbol.for("react.element"), ft = /* @__PURE__ */ Symbol.for("react.transitional.element"), $ = /* @__PURE__ */ Symbol.for("react.portal"), J = /* @__PURE__ */ Symbol.for("react.fragment"), rt = /* @__PURE__ */ Symbol.for("react.strict_mode"), yt = /* @__PURE__ */ Symbol.for("react.profiler"), pt = /* @__PURE__ */ Symbol.for("react.consumer"), St = /* @__PURE__ */ Symbol.for("react.context"), Q = /* @__PURE__ */ Symbol.for("react.forward_ref"), Et = /* @__PURE__ */ Symbol.for("react.suspense"), qt = /* @__PURE__ */ Symbol.for("react.suspense_list"), et = /* @__PURE__ */ Symbol.for("react.memo"), xt = /* @__PURE__ */ Symbol.for("react.lazy"), It = /* @__PURE__ */ Symbol.for("react.activity"), Ue = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), Yt = Symbol.iterator;
|
|
3296
3303
|
function Wt(t) {
|
|
3297
3304
|
return t === null || typeof t != "object" ? null : (t = Yt && t[Yt] || t["@@iterator"], typeof t == "function" ? t : null);
|
|
3298
3305
|
}
|
|
@@ -3338,7 +3345,7 @@ function Xg() {
|
|
|
3338
3345
|
}
|
|
3339
3346
|
return null;
|
|
3340
3347
|
}
|
|
3341
|
-
var
|
|
3348
|
+
var j = Array.isArray, _ = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = M.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ut = {
|
|
3342
3349
|
pending: !1,
|
|
3343
3350
|
data: null,
|
|
3344
3351
|
method: null,
|
|
@@ -3977,7 +3984,7 @@ Error generating stack: ` + a.message + `
|
|
|
3977
3984
|
if (e == null) {
|
|
3978
3985
|
if (a != null) {
|
|
3979
3986
|
if (l != null) throw Error(o(92));
|
|
3980
|
-
if (
|
|
3987
|
+
if (j(a)) {
|
|
3981
3988
|
if (1 < a.length) throw Error(o(93));
|
|
3982
3989
|
a = a[0];
|
|
3983
3990
|
}
|
|
@@ -4254,7 +4261,7 @@ Error generating stack: ` + a.message + `
|
|
|
4254
4261
|
t.hasOwnProperty(c) && (l = t[c], this[c] = l ? l(u) : u[c]);
|
|
4255
4262
|
return this.isDefaultPrevented = (u.defaultPrevented != null ? u.defaultPrevented : u.returnValue === !1) ? Gn : $f, this.isPropagationStopped = $f, this;
|
|
4256
4263
|
}
|
|
4257
|
-
return
|
|
4264
|
+
return R(e.prototype, {
|
|
4258
4265
|
preventDefault: function() {
|
|
4259
4266
|
this.defaultPrevented = !0;
|
|
4260
4267
|
var l = this.nativeEvent;
|
|
@@ -4278,7 +4285,7 @@ Error generating stack: ` + a.message + `
|
|
|
4278
4285
|
},
|
|
4279
4286
|
defaultPrevented: 0,
|
|
4280
4287
|
isTrusted: 0
|
|
4281
|
-
}, wn = te(Cl), Ga =
|
|
4288
|
+
}, wn = te(Cl), Ga = R({}, Cl, { view: 0, detail: 0 }), oh = te(Ga), mi, vi, wa, Ln = R({}, Ga, {
|
|
4282
4289
|
screenX: 0,
|
|
4283
4290
|
screenY: 0,
|
|
4284
4291
|
clientX: 0,
|
|
@@ -4301,15 +4308,15 @@ Error generating stack: ` + a.message + `
|
|
|
4301
4308
|
movementY: function(t) {
|
|
4302
4309
|
return "movementY" in t ? t.movementY : vi;
|
|
4303
4310
|
}
|
|
4304
|
-
}), Ff = te(Ln), rh =
|
|
4311
|
+
}), Ff = te(Ln), rh = R({}, Ln, { dataTransfer: 0 }), dh = te(rh), hh = R({}, Ga, { relatedTarget: 0 }), pi = te(hh), yh = R({}, Cl, {
|
|
4305
4312
|
animationName: 0,
|
|
4306
4313
|
elapsedTime: 0,
|
|
4307
4314
|
pseudoElement: 0
|
|
4308
|
-
}), gh = te(yh), mh =
|
|
4315
|
+
}), gh = te(yh), mh = R({}, Cl, {
|
|
4309
4316
|
clipboardData: function(t) {
|
|
4310
4317
|
return "clipboardData" in t ? t.clipboardData : window.clipboardData;
|
|
4311
4318
|
}
|
|
4312
|
-
}), vh = te(mh), ph =
|
|
4319
|
+
}), vh = te(mh), ph = R({}, Cl, { data: 0 }), If = te(ph), bh = {
|
|
4313
4320
|
Esc: "Escape",
|
|
4314
4321
|
Spacebar: " ",
|
|
4315
4322
|
Left: "ArrowLeft",
|
|
@@ -4372,7 +4379,7 @@ Error generating stack: ` + a.message + `
|
|
|
4372
4379
|
function bi() {
|
|
4373
4380
|
return Ah;
|
|
4374
4381
|
}
|
|
4375
|
-
var Th =
|
|
4382
|
+
var Th = R({}, Ga, {
|
|
4376
4383
|
key: function(t) {
|
|
4377
4384
|
if (t.key) {
|
|
4378
4385
|
var e = bh[t.key] || t.key;
|
|
@@ -4398,7 +4405,7 @@ Error generating stack: ` + a.message + `
|
|
|
4398
4405
|
which: function(t) {
|
|
4399
4406
|
return t.type === "keypress" ? Yn(t) : t.type === "keydown" || t.type === "keyup" ? t.keyCode : 0;
|
|
4400
4407
|
}
|
|
4401
|
-
}), zh = te(Th), Eh =
|
|
4408
|
+
}), zh = te(Th), Eh = R({}, Ln, {
|
|
4402
4409
|
pointerId: 0,
|
|
4403
4410
|
width: 0,
|
|
4404
4411
|
height: 0,
|
|
@@ -4409,7 +4416,7 @@ Error generating stack: ` + a.message + `
|
|
|
4409
4416
|
twist: 0,
|
|
4410
4417
|
pointerType: 0,
|
|
4411
4418
|
isPrimary: 0
|
|
4412
|
-
}), Pf = te(Eh), Mh =
|
|
4419
|
+
}), Pf = te(Eh), Mh = R({}, Ga, {
|
|
4413
4420
|
touches: 0,
|
|
4414
4421
|
targetTouches: 0,
|
|
4415
4422
|
changedTouches: 0,
|
|
@@ -4418,11 +4425,11 @@ Error generating stack: ` + a.message + `
|
|
|
4418
4425
|
ctrlKey: 0,
|
|
4419
4426
|
shiftKey: 0,
|
|
4420
4427
|
getModifierState: bi
|
|
4421
|
-
}), _h = te(Mh), Oh =
|
|
4428
|
+
}), _h = te(Mh), Oh = R({}, Cl, {
|
|
4422
4429
|
propertyName: 0,
|
|
4423
4430
|
elapsedTime: 0,
|
|
4424
4431
|
pseudoElement: 0
|
|
4425
|
-
}), Ch = te(Oh), Dh =
|
|
4432
|
+
}), Ch = te(Oh), Dh = R({}, Ln, {
|
|
4426
4433
|
deltaX: function(t) {
|
|
4427
4434
|
return "deltaX" in t ? t.deltaX : "wheelDeltaX" in t ? -t.wheelDeltaX : 0;
|
|
4428
4435
|
},
|
|
@@ -4431,7 +4438,7 @@ Error generating stack: ` + a.message + `
|
|
|
4431
4438
|
},
|
|
4432
4439
|
deltaZ: 0,
|
|
4433
4440
|
deltaMode: 0
|
|
4434
|
-
}), Uh = te(Dh), jh =
|
|
4441
|
+
}), Uh = te(Dh), jh = R({}, Cl, {
|
|
4435
4442
|
newState: 0,
|
|
4436
4443
|
oldState: 0
|
|
4437
4444
|
}), Rh = te(jh), Nh = [9, 13, 27, 32], Si = Ye && "CompositionEvent" in window, La = null;
|
|
@@ -5336,7 +5343,7 @@ Error generating stack: ` + a.message + `
|
|
|
5336
5343
|
case xt:
|
|
5337
5344
|
return r = Yl(r), z(h, r, m);
|
|
5338
5345
|
}
|
|
5339
|
-
if (
|
|
5346
|
+
if (j(r) || Wt(r))
|
|
5340
5347
|
return r = Rl(
|
|
5341
5348
|
r,
|
|
5342
5349
|
h.mode,
|
|
@@ -5368,7 +5375,7 @@ Error generating stack: ` + a.message + `
|
|
|
5368
5375
|
case xt:
|
|
5369
5376
|
return m = Yl(m), b(h, r, m, T);
|
|
5370
5377
|
}
|
|
5371
|
-
if (
|
|
5378
|
+
if (j(m) || Wt(m))
|
|
5372
5379
|
return L !== null ? null : A(h, r, m, T, null);
|
|
5373
5380
|
if (typeof m.then == "function")
|
|
5374
5381
|
return b(
|
|
@@ -5410,7 +5417,7 @@ Error generating stack: ` + a.message + `
|
|
|
5410
5417
|
L
|
|
5411
5418
|
);
|
|
5412
5419
|
}
|
|
5413
|
-
if (
|
|
5420
|
+
if (j(T) || Wt(T))
|
|
5414
5421
|
return h = h.get(m) || null, A(r, h, T, L, null);
|
|
5415
5422
|
if (typeof T.then == "function")
|
|
5416
5423
|
return x(
|
|
@@ -5573,7 +5580,7 @@ Error generating stack: ` + a.message + `
|
|
|
5573
5580
|
T
|
|
5574
5581
|
);
|
|
5575
5582
|
}
|
|
5576
|
-
if (
|
|
5583
|
+
if (j(m))
|
|
5577
5584
|
return B(
|
|
5578
5585
|
h,
|
|
5579
5586
|
r,
|
|
@@ -5737,7 +5744,7 @@ Error generating stack: ` + a.message + `
|
|
|
5737
5744
|
B.flags = B.flags & -65537 | 128;
|
|
5738
5745
|
case 0:
|
|
5739
5746
|
if (B = X.payload, b = typeof B == "function" ? B.call(vt, z, b) : B, b == null) break t;
|
|
5740
|
-
z =
|
|
5747
|
+
z = R({}, z, b);
|
|
5741
5748
|
break t;
|
|
5742
5749
|
case 2:
|
|
5743
5750
|
fl = !0;
|
|
@@ -6844,7 +6851,7 @@ Error generating stack: ` + a.message + `
|
|
|
6844
6851
|
};
|
|
6845
6852
|
Co.useEffectEvent = ro;
|
|
6846
6853
|
function yc(t, e, l, a) {
|
|
6847
|
-
e = t.memoizedState, l = l(a, e), l = l == null ? e :
|
|
6854
|
+
e = t.memoizedState, l = l(a, e), l = l == null ? e : R({}, e, l), t.memoizedState = l, t.lanes === 0 && (t.updateQueue.baseState = l);
|
|
6848
6855
|
}
|
|
6849
6856
|
var gc = {
|
|
6850
6857
|
enqueueSetState: function(t, e, l) {
|
|
@@ -6877,7 +6884,7 @@ Error generating stack: ` + a.message + `
|
|
|
6877
6884
|
a !== "ref" && (l[a] = e[a]);
|
|
6878
6885
|
}
|
|
6879
6886
|
if (t = t.defaultProps) {
|
|
6880
|
-
l === e && (l =
|
|
6887
|
+
l === e && (l = R({}, l));
|
|
6881
6888
|
for (var n in t)
|
|
6882
6889
|
l[n] === void 0 && (l[n] = t[n]);
|
|
6883
6890
|
}
|
|
@@ -11959,7 +11966,7 @@ Error generating stack: ` + a.message + `
|
|
|
11959
11966
|
case "script":
|
|
11960
11967
|
u = Ca(t);
|
|
11961
11968
|
}
|
|
11962
|
-
_e.has(u) || (t =
|
|
11969
|
+
_e.has(u) || (t = R(
|
|
11963
11970
|
{
|
|
11964
11971
|
rel: "preload",
|
|
11965
11972
|
href: e === "image" && l && l.imageSrcSet ? void 0 : t,
|
|
@@ -11983,7 +11990,7 @@ Error generating stack: ` + a.message + `
|
|
|
11983
11990
|
case "script":
|
|
11984
11991
|
u = Ca(t);
|
|
11985
11992
|
}
|
|
11986
|
-
if (!_e.has(u) && (t =
|
|
11993
|
+
if (!_e.has(u) && (t = R({ rel: "modulepreload", href: t }, e), _e.set(u, t), l.querySelector(n) === null)) {
|
|
11987
11994
|
switch (a) {
|
|
11988
11995
|
case "audioworklet":
|
|
11989
11996
|
case "paintworklet":
|
|
@@ -12012,7 +12019,7 @@ Error generating stack: ` + a.message + `
|
|
|
12012
12019
|
))
|
|
12013
12020
|
c.loading = 5;
|
|
12014
12021
|
else {
|
|
12015
|
-
t =
|
|
12022
|
+
t = R(
|
|
12016
12023
|
{ rel: "stylesheet", href: t, "data-precedence": e },
|
|
12017
12024
|
l
|
|
12018
12025
|
), (l = _e.get(u)) && uf(t, l);
|
|
@@ -12039,7 +12046,7 @@ Error generating stack: ` + a.message + `
|
|
|
12039
12046
|
var l = _a;
|
|
12040
12047
|
if (l && t) {
|
|
12041
12048
|
var a = $l(l).hoistableScripts, n = Ca(t), u = a.get(n);
|
|
12042
|
-
u || (u = l.querySelector(Sn(n)), u || (t =
|
|
12049
|
+
u || (u = l.querySelector(Sn(n)), u || (t = R({ src: t, async: !0 }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
|
|
12043
12050
|
type: "script",
|
|
12044
12051
|
instance: u,
|
|
12045
12052
|
count: 1,
|
|
@@ -12052,7 +12059,7 @@ Error generating stack: ` + a.message + `
|
|
|
12052
12059
|
var l = _a;
|
|
12053
12060
|
if (l && t) {
|
|
12054
12061
|
var a = $l(l).hoistableScripts, n = Ca(t), u = a.get(n);
|
|
12055
|
-
u || (u = l.querySelector(Sn(n)), u || (t =
|
|
12062
|
+
u || (u = l.querySelector(Sn(n)), u || (t = R({ src: t, async: !0, type: "module" }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
|
|
12056
12063
|
type: "script",
|
|
12057
12064
|
instance: u,
|
|
12058
12065
|
count: 1,
|
|
@@ -12130,7 +12137,7 @@ Error generating stack: ` + a.message + `
|
|
|
12130
12137
|
return 'link[rel="stylesheet"][' + t + "]";
|
|
12131
12138
|
}
|
|
12132
12139
|
function fd(t) {
|
|
12133
|
-
return
|
|
12140
|
+
return R({}, t, {
|
|
12134
12141
|
"data-precedence": t.precedence,
|
|
12135
12142
|
precedence: null
|
|
12136
12143
|
});
|
|
@@ -12157,7 +12164,7 @@ Error generating stack: ` + a.message + `
|
|
|
12157
12164
|
);
|
|
12158
12165
|
if (a)
|
|
12159
12166
|
return e.instance = a, wt(a), a;
|
|
12160
|
-
var n =
|
|
12167
|
+
var n = R({}, l, {
|
|
12161
12168
|
"data-href": l.href,
|
|
12162
12169
|
"data-precedence": l.precedence,
|
|
12163
12170
|
href: null,
|
|
@@ -12181,7 +12188,7 @@ Error generating stack: ` + a.message + `
|
|
|
12181
12188
|
case "script":
|
|
12182
12189
|
return u = Ca(l.src), (n = t.querySelector(
|
|
12183
12190
|
Sn(u)
|
|
12184
|
-
)) ? (e.instance = n, wt(n), n) : (a = l, (n = _e.get(u)) && (a =
|
|
12191
|
+
)) ? (e.instance = n, wt(n), n) : (a = l, (n = _e.get(u)) && (a = R({}, l), cf(a, n)), t = t.ownerDocument || t, n = t.createElement("script"), wt(n), Kt(n, "link", a), t.head.appendChild(n), e.instance = n);
|
|
12185
12192
|
case "void":
|
|
12186
12193
|
return null;
|
|
12187
12194
|
default:
|
|
@@ -12481,7 +12488,7 @@ Error generating stack: ` + a.message + `
|
|
|
12481
12488
|
if (t = V(e), t !== null) return t;
|
|
12482
12489
|
t = null;
|
|
12483
12490
|
} else if (l === 31) {
|
|
12484
|
-
if (t =
|
|
12491
|
+
if (t = U(e), t !== null) return t;
|
|
12485
12492
|
t = null;
|
|
12486
12493
|
} else if (l === 3) {
|
|
12487
12494
|
if (e.stateNode.current.memoizedState.isDehydrated)
|
|
@@ -12690,7 +12697,7 @@ Error generating stack: ` + a.message + `
|
|
|
12690
12697
|
return;
|
|
12691
12698
|
}
|
|
12692
12699
|
} else if (e === 31) {
|
|
12693
|
-
if (e =
|
|
12700
|
+
if (e = U(l), e !== null) {
|
|
12694
12701
|
t.blockedOn = e, Nf(t.priority, function() {
|
|
12695
12702
|
pd(l);
|
|
12696
12703
|
});
|
|
@@ -12861,7 +12868,7 @@ Error generating stack: ` + a.message + `
|
|
|
12861
12868
|
var e = t._reactInternals;
|
|
12862
12869
|
if (e === void 0)
|
|
12863
12870
|
throw typeof t.render == "function" ? Error(o(188)) : (t = Object.keys(t).join(","), Error(o(268, t)));
|
|
12864
|
-
return t = Y(e), t = t !== null ?
|
|
12871
|
+
return t = Y(e), t = t !== null ? D(t) : null, t = t === null ? null : t.stateNode, t;
|
|
12865
12872
|
};
|
|
12866
12873
|
var og = {
|
|
12867
12874
|
bundleType: 0,
|
|
@@ -13051,11 +13058,11 @@ function Vg() {
|
|
|
13051
13058
|
console.warn("[GlydeChat] Auto-init skipped: no authentication provided (publishableKey, apiKey, or authToken required)");
|
|
13052
13059
|
return;
|
|
13053
13060
|
}
|
|
13054
|
-
const
|
|
13055
|
-
width:
|
|
13061
|
+
const U = f.getAttribute("data-width"), S = f.getAttribute("data-height"), Y = f.getAttribute("data-max-width"), D = f.getAttribute("data-max-height"), R = U || S || Y || D ? {
|
|
13062
|
+
width: U ? isNaN(Number(U)) ? U : Number(U) : void 0,
|
|
13056
13063
|
height: S ? isNaN(Number(S)) ? S : Number(S) : void 0,
|
|
13057
13064
|
maxWidth: Y ? isNaN(Number(Y)) ? Y : Number(Y) : void 0,
|
|
13058
|
-
maxHeight:
|
|
13065
|
+
maxHeight: D ? isNaN(Number(D)) ? D : Number(D) : void 0
|
|
13059
13066
|
} : void 0, w = {
|
|
13060
13067
|
publishableKey: M,
|
|
13061
13068
|
apiKey: o,
|
|
@@ -13068,7 +13075,7 @@ function Vg() {
|
|
|
13068
13075
|
theme: f.getAttribute("data-theme") || "light",
|
|
13069
13076
|
allowModeSwitch: f.getAttribute("data-allow-mode-switch") !== "false",
|
|
13070
13077
|
displayMode: f.getAttribute("data-display-mode") || "floating",
|
|
13071
|
-
dimensions:
|
|
13078
|
+
dimensions: R,
|
|
13072
13079
|
showHeader: f.getAttribute("data-show-header") !== "false",
|
|
13073
13080
|
allowClose: f.getAttribute("data-allow-close") !== "false"
|
|
13074
13081
|
};
|