bridgeapp-ai-chat-widget 0.2.18 → 0.2.19
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/bridge-ai-chat-widget.es.js +281 -319
- package/dist/dev/constants.d.ts +3 -2
- package/dist/index.types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as P, jsx as v, Fragment as Xt } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import xe, { useRef as O, useCallback as F, useEffect as D, useState as B, useMemo as Je, useLayoutEffect as
|
|
3
|
+
import xe, { useRef as O, useCallback as F, useEffect as D, useState as B, useMemo as Je, useLayoutEffect as dr, useContext as pe, createContext as Se, forwardRef as Pi, isValidElement as Ai, cloneElement as Ni, createElement as Qt, Fragment as Oi, useId as dn, Component as Di } from "react";
|
|
4
4
|
import { createRoot as ji } from "react-dom/client";
|
|
5
|
-
function
|
|
5
|
+
function _n(t) {
|
|
6
6
|
return typeof t == "object" && t != null && "pathname" in t && "search" in t && "hash" in t && "state" in t && "key" in t;
|
|
7
7
|
}
|
|
8
8
|
function Fi(t = {}) {
|
|
@@ -66,12 +66,12 @@ function Fi(t = {}) {
|
|
|
66
66
|
},
|
|
67
67
|
push(h, m) {
|
|
68
68
|
s = "PUSH";
|
|
69
|
-
let g =
|
|
69
|
+
let g = _n(h) ? h : d(h, m);
|
|
70
70
|
o += 1, i.splice(o, i.length, g), r && a && a({ action: s, location: g, delta: 1 });
|
|
71
71
|
},
|
|
72
72
|
replace(h, m) {
|
|
73
73
|
s = "REPLACE";
|
|
74
|
-
let g =
|
|
74
|
+
let g = _n(h) ? h : d(h, m);
|
|
75
75
|
i[o] = g, r && a && a({ action: s, location: g, delta: 0 });
|
|
76
76
|
},
|
|
77
77
|
go(h) {
|
|
@@ -134,14 +134,14 @@ function Te(t) {
|
|
|
134
134
|
}
|
|
135
135
|
return e;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function ur(t, e, n = "/") {
|
|
138
138
|
return Hi(t, e, n, !1);
|
|
139
139
|
}
|
|
140
140
|
function Hi(t, e, n, r) {
|
|
141
141
|
let i = typeof e == "string" ? Te(e) : e, o = le(i.pathname || "/", n);
|
|
142
142
|
if (o == null)
|
|
143
143
|
return null;
|
|
144
|
-
let s =
|
|
144
|
+
let s = hr(t);
|
|
145
145
|
Ui(s);
|
|
146
146
|
let a = null;
|
|
147
147
|
for (let c = 0; a == null && c < s.length; ++c) {
|
|
@@ -154,7 +154,7 @@ function Hi(t, e, n, r) {
|
|
|
154
154
|
}
|
|
155
155
|
return a;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function hr(t, e = [], n = [], r = "", i = !1) {
|
|
158
158
|
let o = (s, a, c = i, l) => {
|
|
159
159
|
let d = {
|
|
160
160
|
relativePath: l === void 0 ? s.path || "" : l,
|
|
@@ -176,7 +176,7 @@ function fr(t, e = [], n = [], r = "", i = !1) {
|
|
|
176
176
|
// @ts-expect-error
|
|
177
177
|
s.index !== !0,
|
|
178
178
|
`Index routes must not have child routes. Please remove all child routes from route path "${u}".`
|
|
179
|
-
),
|
|
179
|
+
), hr(
|
|
180
180
|
s.children,
|
|
181
181
|
e,
|
|
182
182
|
f,
|
|
@@ -192,17 +192,17 @@ function fr(t, e = [], n = [], r = "", i = !1) {
|
|
|
192
192
|
if (s.path === "" || !s.path?.includes("?"))
|
|
193
193
|
o(s, a);
|
|
194
194
|
else
|
|
195
|
-
for (let c of
|
|
195
|
+
for (let c of fr(s.path))
|
|
196
196
|
o(s, a, !0, c);
|
|
197
197
|
}), e;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function fr(t) {
|
|
200
200
|
let e = t.split("/");
|
|
201
201
|
if (e.length === 0) return [];
|
|
202
202
|
let [n, ...r] = e, i = n.endsWith("?"), o = n.replace(/\?$/, "");
|
|
203
203
|
if (r.length === 0)
|
|
204
204
|
return i ? [o, ""] : [o];
|
|
205
|
-
let s =
|
|
205
|
+
let s = fr(r.join("/")), a = [];
|
|
206
206
|
return a.push(
|
|
207
207
|
...s.map(
|
|
208
208
|
(c) => c === "" ? o : [o, c].join("/")
|
|
@@ -219,10 +219,10 @@ function Ui(t) {
|
|
|
219
219
|
)
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
|
-
var Bi = /^:[\w-]+$/, Wi = 3, Gi = 2, qi = 1, Ki = 10, Ji = -2,
|
|
222
|
+
var Bi = /^:[\w-]+$/, Wi = 3, Gi = 2, qi = 1, Ki = 10, Ji = -2, Pn = (t) => t === "*";
|
|
223
223
|
function Yi(t, e) {
|
|
224
224
|
let n = t.split("/"), r = n.length;
|
|
225
|
-
return n.some(
|
|
225
|
+
return n.some(Pn) && (r += Ji), e && (r += Gi), n.filter((i) => !Pn(i)).reduce(
|
|
226
226
|
(i, o) => i + (Bi.test(o) ? Wi : o === "" ? qi : Ki),
|
|
227
227
|
r
|
|
228
228
|
);
|
|
@@ -335,13 +335,13 @@ function no(t, e = "/") {
|
|
|
335
335
|
search: r = "",
|
|
336
336
|
hash: i = ""
|
|
337
337
|
} = typeof t == "string" ? Te(t) : t, o;
|
|
338
|
-
return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ? o =
|
|
338
|
+
return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ? o = An(n.substring(1), "/") : o = An(n, e)) : o = e, {
|
|
339
339
|
pathname: o,
|
|
340
340
|
search: oo(r),
|
|
341
341
|
hash: so(i)
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function An(t, e) {
|
|
345
345
|
let n = e.replace(/\/+$/, "").split("/");
|
|
346
346
|
return t.split("/").forEach((i) => {
|
|
347
347
|
i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i);
|
|
@@ -402,8 +402,8 @@ function co(t) {
|
|
|
402
402
|
function lo(t) {
|
|
403
403
|
return t.map((e) => e.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
404
404
|
}
|
|
405
|
-
var
|
|
406
|
-
function
|
|
405
|
+
var pr = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
406
|
+
function gr(t, e) {
|
|
407
407
|
let n = t;
|
|
408
408
|
if (typeof n != "string" || !to.test(n))
|
|
409
409
|
return {
|
|
@@ -412,7 +412,7 @@ function mr(t, e) {
|
|
|
412
412
|
to: n
|
|
413
413
|
};
|
|
414
414
|
let r = n, i = !1;
|
|
415
|
-
if (
|
|
415
|
+
if (pr)
|
|
416
416
|
try {
|
|
417
417
|
let o = new URL(window.location.href), s = n.startsWith("//") ? new URL(o.protocol + n) : new URL(n), a = le(s.pathname, e);
|
|
418
418
|
s.origin === o.origin && a != null ? n = a + s.search + s.hash : i = !0;
|
|
@@ -429,28 +429,28 @@ function mr(t, e) {
|
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
432
|
-
var
|
|
432
|
+
var mr = [
|
|
433
433
|
"POST",
|
|
434
434
|
"PUT",
|
|
435
435
|
"PATCH",
|
|
436
436
|
"DELETE"
|
|
437
437
|
];
|
|
438
438
|
new Set(
|
|
439
|
-
|
|
439
|
+
mr
|
|
440
440
|
);
|
|
441
441
|
var uo = [
|
|
442
442
|
"GET",
|
|
443
|
-
...
|
|
443
|
+
...mr
|
|
444
444
|
];
|
|
445
445
|
new Set(uo);
|
|
446
446
|
var Ne = p.createContext(null);
|
|
447
447
|
Ne.displayName = "DataRouter";
|
|
448
448
|
var It = p.createContext(null);
|
|
449
449
|
It.displayName = "DataRouterState";
|
|
450
|
-
var ho = p.createContext(!1),
|
|
450
|
+
var ho = p.createContext(!1), br = p.createContext({
|
|
451
451
|
isTransitioning: !1
|
|
452
452
|
});
|
|
453
|
-
|
|
453
|
+
br.displayName = "ViewTransition";
|
|
454
454
|
var fo = p.createContext(
|
|
455
455
|
/* @__PURE__ */ new Map()
|
|
456
456
|
);
|
|
@@ -473,9 +473,9 @@ var se = p.createContext({
|
|
|
473
473
|
se.displayName = "Route";
|
|
474
474
|
var hn = p.createContext(null);
|
|
475
475
|
hn.displayName = "RouteError";
|
|
476
|
-
var
|
|
476
|
+
var vr = "REACT_ROUTER_ERROR", go = "REDIRECT", mo = "ROUTE_ERROR_RESPONSE";
|
|
477
477
|
function bo(t) {
|
|
478
|
-
if (t.startsWith(`${
|
|
478
|
+
if (t.startsWith(`${vr}:${go}:{`))
|
|
479
479
|
try {
|
|
480
480
|
let e = JSON.parse(t.slice(28));
|
|
481
481
|
if (typeof e == "object" && e && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.location == "string" && typeof e.reloadDocument == "boolean" && typeof e.replace == "boolean")
|
|
@@ -485,7 +485,7 @@ function bo(t) {
|
|
|
485
485
|
}
|
|
486
486
|
function vo(t) {
|
|
487
487
|
if (t.startsWith(
|
|
488
|
-
`${
|
|
488
|
+
`${vr}:${mo}:{`
|
|
489
489
|
))
|
|
490
490
|
try {
|
|
491
491
|
let e = JSON.parse(t.slice(40));
|
|
@@ -519,8 +519,8 @@ function ie() {
|
|
|
519
519
|
"useLocation() may be used only in the context of a <Router> component."
|
|
520
520
|
), p.useContext(Xe).location;
|
|
521
521
|
}
|
|
522
|
-
var
|
|
523
|
-
function
|
|
522
|
+
var wr = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
523
|
+
function yr(t) {
|
|
524
524
|
p.useContext(Y).static || p.useLayoutEffect(t);
|
|
525
525
|
}
|
|
526
526
|
function $e() {
|
|
@@ -535,11 +535,11 @@ function yo() {
|
|
|
535
535
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
536
536
|
);
|
|
537
537
|
let t = p.useContext(Ne), { basename: e, navigator: n } = p.useContext(Y), { matches: r } = p.useContext(se), { pathname: i } = ie(), o = JSON.stringify(un(r)), s = p.useRef(!1);
|
|
538
|
-
return
|
|
538
|
+
return yr(() => {
|
|
539
539
|
s.current = !0;
|
|
540
540
|
}), p.useCallback(
|
|
541
541
|
(c, l = {}) => {
|
|
542
|
-
if (ee(s.current,
|
|
542
|
+
if (ee(s.current, wr), !s.current) return;
|
|
543
543
|
if (typeof c == "number") {
|
|
544
544
|
n.go(c);
|
|
545
545
|
return;
|
|
@@ -579,9 +579,9 @@ function Qe(t, { relative: e } = {}) {
|
|
|
579
579
|
);
|
|
580
580
|
}
|
|
581
581
|
function xo(t, e) {
|
|
582
|
-
return
|
|
582
|
+
return xr(t, e);
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function xr(t, e, n) {
|
|
585
585
|
j(
|
|
586
586
|
Oe(),
|
|
587
587
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
@@ -591,7 +591,7 @@ function Cr(t, e, n) {
|
|
|
591
591
|
let { navigator: r } = p.useContext(Y), { matches: i } = p.useContext(se), o = i[i.length - 1], s = o ? o.params : {}, a = o ? o.pathname : "/", c = o ? o.pathnameBase : "/", l = o && o.route;
|
|
592
592
|
{
|
|
593
593
|
let b = l && l.path || "";
|
|
594
|
-
|
|
594
|
+
kr(
|
|
595
595
|
a,
|
|
596
596
|
!l || b.endsWith("*") || b.endsWith("*?"),
|
|
597
597
|
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
@@ -613,7 +613,7 @@ Please change the parent <Route path="${b}"> to <Route path="${b === "/" ? "*" :
|
|
|
613
613
|
let b = c.replace(/^\//, "").split("/");
|
|
614
614
|
h = "/" + f.replace(/^\//, "").split("/").slice(b.length).join("/");
|
|
615
615
|
}
|
|
616
|
-
let m =
|
|
616
|
+
let m = ur(t, { pathname: h });
|
|
617
617
|
ee(
|
|
618
618
|
l || m != null,
|
|
619
619
|
`No routes matched location "${u.pathname}${u.search}${u.hash}" `
|
|
@@ -677,7 +677,7 @@ function Co() {
|
|
|
677
677
|
t
|
|
678
678
|
), s = /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ p.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ p.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ p.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ p.createElement("h3", { style: { fontStyle: "italic" } }, e), n ? /* @__PURE__ */ p.createElement("pre", { style: i }, n) : null, s);
|
|
679
679
|
}
|
|
680
|
-
var ko = /* @__PURE__ */ p.createElement(Co, null),
|
|
680
|
+
var ko = /* @__PURE__ */ p.createElement(Co, null), Cr = class extends p.Component {
|
|
681
681
|
constructor(t) {
|
|
682
682
|
super(t), this.state = {
|
|
683
683
|
location: t.location,
|
|
@@ -721,7 +721,7 @@ var ko = /* @__PURE__ */ p.createElement(Co, null), kr = class extends p.Compone
|
|
|
721
721
|
return this.context ? /* @__PURE__ */ p.createElement(Eo, { error: t }, e) : e;
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
|
-
|
|
724
|
+
Cr.contextType = ho;
|
|
725
725
|
var Vt = /* @__PURE__ */ new WeakMap();
|
|
726
726
|
function Eo({
|
|
727
727
|
children: t,
|
|
@@ -733,8 +733,8 @@ function Eo({
|
|
|
733
733
|
if (r) {
|
|
734
734
|
let i = Vt.get(e);
|
|
735
735
|
if (i) throw i;
|
|
736
|
-
let o =
|
|
737
|
-
if (
|
|
736
|
+
let o = gr(r.location, n);
|
|
737
|
+
if (pr && !Vt.get(e))
|
|
738
738
|
if (o.isExternal || r.reloadDocument)
|
|
739
739
|
window.location.href = o.absoluteURL || o.to;
|
|
740
740
|
else {
|
|
@@ -812,7 +812,7 @@ function To(t, e = [], n) {
|
|
|
812
812
|
return i.reduceRight(
|
|
813
813
|
(d, u, f) => {
|
|
814
814
|
let h, m = !1, g = null, b = null;
|
|
815
|
-
r && (h = o && u.route.id ? o[u.route.id] : void 0, g = u.route.errorElement || ko, s && (a < 0 && f === 0 ? (
|
|
815
|
+
r && (h = o && u.route.id ? o[u.route.id] : void 0, g = u.route.errorElement || ko, s && (a < 0 && f === 0 ? (kr(
|
|
816
816
|
"route-fallback",
|
|
817
817
|
!1,
|
|
818
818
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
@@ -833,7 +833,7 @@ function To(t, e = [], n) {
|
|
|
833
833
|
);
|
|
834
834
|
};
|
|
835
835
|
return r && (u.route.ErrorBoundary || u.route.errorElement || f === 0) ? /* @__PURE__ */ p.createElement(
|
|
836
|
-
|
|
836
|
+
Cr,
|
|
837
837
|
{
|
|
838
838
|
location: r.location,
|
|
839
839
|
revalidation: r.revalidation,
|
|
@@ -894,18 +894,18 @@ function _o() {
|
|
|
894
894
|
"useNavigate"
|
|
895
895
|
/* UseNavigateStable */
|
|
896
896
|
), n = p.useRef(!1);
|
|
897
|
-
return
|
|
897
|
+
return yr(() => {
|
|
898
898
|
n.current = !0;
|
|
899
899
|
}), p.useCallback(
|
|
900
900
|
async (i, o = {}) => {
|
|
901
|
-
ee(n.current,
|
|
901
|
+
ee(n.current, wr), n.current && (typeof i == "number" ? await t.navigate(i) : await t.navigate(i, { fromRouteId: e, ...o }));
|
|
902
902
|
},
|
|
903
903
|
[t, e]
|
|
904
904
|
);
|
|
905
905
|
}
|
|
906
|
-
var
|
|
907
|
-
function
|
|
908
|
-
!e && !
|
|
906
|
+
var Nn = {};
|
|
907
|
+
function kr(t, e, n) {
|
|
908
|
+
!e && !Nn[t] && (Nn[t] = !0, ee(!1, n));
|
|
909
909
|
}
|
|
910
910
|
p.memo(Po);
|
|
911
911
|
function Po({
|
|
@@ -915,7 +915,7 @@ function Po({
|
|
|
915
915
|
isStatic: r,
|
|
916
916
|
onError: i
|
|
917
917
|
}) {
|
|
918
|
-
return
|
|
918
|
+
return xr(t, void 0, { state: n, isStatic: r, onError: i });
|
|
919
919
|
}
|
|
920
920
|
function Ao({
|
|
921
921
|
basename: t,
|
|
@@ -951,7 +951,7 @@ function Ao({
|
|
|
951
951
|
}
|
|
952
952
|
);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function On({
|
|
955
955
|
to: t,
|
|
956
956
|
replace: e,
|
|
957
957
|
state: n,
|
|
@@ -1219,7 +1219,7 @@ async function Ko(t, e, n) {
|
|
|
1219
1219
|
)
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function Dn(t, e, n, r, i, o) {
|
|
1223
1223
|
let s = (c, l) => n[l] ? c.route.id !== n[l].route.id : !0, a = (c, l) => (
|
|
1224
1224
|
// param change, /users/123 -> /users/456
|
|
1225
1225
|
n[l].pathname !== c.pathname || // splat param changed, which is not present in match.path
|
|
@@ -1277,7 +1277,7 @@ function Xo(t, e) {
|
|
|
1277
1277
|
return n.has(o) || (n.add(o), r.push({ key: o, link: i })), r;
|
|
1278
1278
|
}, []);
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Er() {
|
|
1281
1281
|
let t = p.useContext(Ne);
|
|
1282
1282
|
return gn(
|
|
1283
1283
|
t,
|
|
@@ -1293,7 +1293,7 @@ function Qo() {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
var mn = p.createContext(void 0);
|
|
1295
1295
|
mn.displayName = "FrameworkContext";
|
|
1296
|
-
function
|
|
1296
|
+
function Sr() {
|
|
1297
1297
|
let t = p.useContext(mn);
|
|
1298
1298
|
return gn(
|
|
1299
1299
|
t,
|
|
@@ -1346,14 +1346,14 @@ function Fe(t, e) {
|
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
1348
1348
|
function ts({ page: t, ...e }) {
|
|
1349
|
-
let { router: n } =
|
|
1350
|
-
() =>
|
|
1349
|
+
let { router: n } = Er(), r = p.useMemo(
|
|
1350
|
+
() => ur(n.routes, t, n.basename),
|
|
1351
1351
|
[n.routes, t, n.basename]
|
|
1352
1352
|
);
|
|
1353
1353
|
return r ? /* @__PURE__ */ p.createElement(rs, { page: t, matches: r, ...e }) : null;
|
|
1354
1354
|
}
|
|
1355
1355
|
function ns(t) {
|
|
1356
|
-
let { manifest: e, routeModules: n } =
|
|
1356
|
+
let { manifest: e, routeModules: n } = Sr(), [r, i] = p.useState([]);
|
|
1357
1357
|
return p.useEffect(() => {
|
|
1358
1358
|
let o = !1;
|
|
1359
1359
|
return Ko(t, e, n).then(
|
|
@@ -1370,8 +1370,8 @@ function rs({
|
|
|
1370
1370
|
matches: e,
|
|
1371
1371
|
...n
|
|
1372
1372
|
}) {
|
|
1373
|
-
let r = ie(), { future: i, manifest: o, routeModules: s } =
|
|
1374
|
-
() =>
|
|
1373
|
+
let r = ie(), { future: i, manifest: o, routeModules: s } = Sr(), { basename: a } = Er(), { loaderData: c, matches: l } = Qo(), d = p.useMemo(
|
|
1374
|
+
() => Dn(
|
|
1375
1375
|
t,
|
|
1376
1376
|
e,
|
|
1377
1377
|
l,
|
|
@@ -1381,7 +1381,7 @@ function rs({
|
|
|
1381
1381
|
),
|
|
1382
1382
|
[t, e, l, o, r]
|
|
1383
1383
|
), u = p.useMemo(
|
|
1384
|
-
() =>
|
|
1384
|
+
() => Dn(
|
|
1385
1385
|
t,
|
|
1386
1386
|
e,
|
|
1387
1387
|
l,
|
|
@@ -1450,7 +1450,7 @@ try {
|
|
|
1450
1450
|
"7.13.1");
|
|
1451
1451
|
} catch {
|
|
1452
1452
|
}
|
|
1453
|
-
var
|
|
1453
|
+
var Tr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, $r = p.forwardRef(
|
|
1454
1454
|
function({
|
|
1455
1455
|
onClick: e,
|
|
1456
1456
|
discover: n = "render",
|
|
@@ -1467,7 +1467,7 @@ var $r = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ir = p.forwardRef(
|
|
|
1467
1467
|
unstable_defaultShouldRevalidate: h,
|
|
1468
1468
|
...m
|
|
1469
1469
|
}, g) {
|
|
1470
|
-
let { basename: b, navigator: w, unstable_useTransitions: C } = p.useContext(Y), T = typeof d == "string" &&
|
|
1470
|
+
let { basename: b, navigator: w, unstable_useTransitions: C } = p.useContext(Y), T = typeof d == "string" && Tr.test(d), L = gr(d, b);
|
|
1471
1471
|
d = L.to;
|
|
1472
1472
|
let S = wo(d, { relative: i }), x = ie(), R = null;
|
|
1473
1473
|
if (a) {
|
|
@@ -1514,7 +1514,7 @@ var $r = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ir = p.forwardRef(
|
|
|
1514
1514
|
return y && !T ? /* @__PURE__ */ p.createElement(p.Fragment, null, Ie, /* @__PURE__ */ p.createElement(ts, { page: S })) : Ie;
|
|
1515
1515
|
}
|
|
1516
1516
|
);
|
|
1517
|
-
|
|
1517
|
+
$r.displayName = "Link";
|
|
1518
1518
|
var ss = p.forwardRef(
|
|
1519
1519
|
function({
|
|
1520
1520
|
"aria-current": e = "page",
|
|
@@ -1545,7 +1545,7 @@ var ss = p.forwardRef(
|
|
|
1545
1545
|
].filter(Boolean).join(" ");
|
|
1546
1546
|
let X = typeof o == "function" ? o(R) : o;
|
|
1547
1547
|
return /* @__PURE__ */ p.createElement(
|
|
1548
|
-
|
|
1548
|
+
$r,
|
|
1549
1549
|
{
|
|
1550
1550
|
...l,
|
|
1551
1551
|
"aria-current": y,
|
|
@@ -1577,7 +1577,7 @@ var as = p.forwardRef(
|
|
|
1577
1577
|
unstable_defaultShouldRevalidate: f,
|
|
1578
1578
|
...h
|
|
1579
1579
|
}, m) => {
|
|
1580
|
-
let { unstable_useTransitions: g } = p.useContext(Y), b = hs(), w = fs(a, { relative: l }), C = s.toLowerCase() === "get" ? "get" : "post", T = typeof a == "string" &&
|
|
1580
|
+
let { unstable_useTransitions: g } = p.useContext(Y), b = hs(), w = fs(a, { relative: l }), C = s.toLowerCase() === "get" ? "get" : "post", T = typeof a == "string" && Tr.test(a), L = (S) => {
|
|
1581
1581
|
if (c && c(S), S.defaultPrevented) return;
|
|
1582
1582
|
S.preventDefault();
|
|
1583
1583
|
let x = S.nativeEvent.submitter, R = x?.getAttribute("formmethod") || s, y = () => b(x || S.currentTarget, {
|
|
@@ -1610,7 +1610,7 @@ as.displayName = "Form";
|
|
|
1610
1610
|
function cs(t) {
|
|
1611
1611
|
return `${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function Ir(t) {
|
|
1614
1614
|
let e = p.useContext(Ne);
|
|
1615
1615
|
return j(e, cs(t)), e;
|
|
1616
1616
|
}
|
|
@@ -1661,7 +1661,7 @@ function ls(t, {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
var ds = 0, us = () => `__${String(++ds)}__`;
|
|
1663
1663
|
function hs() {
|
|
1664
|
-
let { router: t } =
|
|
1664
|
+
let { router: t } = Ir(
|
|
1665
1665
|
"useSubmit"
|
|
1666
1666
|
/* UseSubmit */
|
|
1667
1667
|
), { basename: e } = p.useContext(Y), n = Mo(), r = t.fetch, i = t.navigate;
|
|
@@ -1716,12 +1716,12 @@ function fs(t, { relative: e } = {}) {
|
|
|
1716
1716
|
return (!t || t === ".") && i.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (o.pathname = o.pathname === "/" ? n : oe([n, o.pathname])), wt(o);
|
|
1717
1717
|
}
|
|
1718
1718
|
function ps(t, { relative: e } = {}) {
|
|
1719
|
-
let n = p.useContext(
|
|
1719
|
+
let n = p.useContext(br);
|
|
1720
1720
|
j(
|
|
1721
1721
|
n != null,
|
|
1722
1722
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1723
1723
|
);
|
|
1724
|
-
let { basename: r } =
|
|
1724
|
+
let { basename: r } = Ir(
|
|
1725
1725
|
"useViewTransitionState"
|
|
1726
1726
|
/* useViewTransitionState */
|
|
1727
1727
|
), i = Qe(t, { relative: e });
|
|
@@ -1743,17 +1743,17 @@ function vs(t) {
|
|
|
1743
1743
|
function ws(t) {
|
|
1744
1744
|
return t === H.list || t.endsWith(H.list);
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function Rr(t) {
|
|
1747
1747
|
var e, n, r = "";
|
|
1748
1748
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1749
1749
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1750
1750
|
var i = t.length;
|
|
1751
|
-
for (e = 0; e < i; e++) t[e] && (n =
|
|
1751
|
+
for (e = 0; e < i; e++) t[e] && (n = Rr(t[e])) && (r && (r += " "), r += n);
|
|
1752
1752
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1753
1753
|
return r;
|
|
1754
1754
|
}
|
|
1755
1755
|
function ys() {
|
|
1756
|
-
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e =
|
|
1756
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Rr(t)) && (r && (r += " "), r += e);
|
|
1757
1757
|
return r;
|
|
1758
1758
|
}
|
|
1759
1759
|
const xs = (t, e) => {
|
|
@@ -1766,11 +1766,11 @@ const xs = (t, e) => {
|
|
|
1766
1766
|
}, Cs = (t, e) => ({
|
|
1767
1767
|
classGroupId: t,
|
|
1768
1768
|
validator: e
|
|
1769
|
-
}),
|
|
1769
|
+
}), Mr = (t = /* @__PURE__ */ new Map(), e = null, n) => ({
|
|
1770
1770
|
nextPart: t,
|
|
1771
1771
|
validators: e,
|
|
1772
1772
|
classGroupId: n
|
|
1773
|
-
}), xt = "-",
|
|
1773
|
+
}), xt = "-", jn = [], ks = "arbitrary..", Es = (t) => {
|
|
1774
1774
|
const e = Ts(t), {
|
|
1775
1775
|
conflictingClassGroups: n,
|
|
1776
1776
|
conflictingClassGroupModifiers: r
|
|
@@ -1780,22 +1780,22 @@ const xs = (t, e) => {
|
|
|
1780
1780
|
if (s.startsWith("[") && s.endsWith("]"))
|
|
1781
1781
|
return Ss(s);
|
|
1782
1782
|
const a = s.split(xt), c = a[0] === "" && a.length > 1 ? 1 : 0;
|
|
1783
|
-
return
|
|
1783
|
+
return Lr(a, c, e);
|
|
1784
1784
|
},
|
|
1785
1785
|
getConflictingClassGroupIds: (s, a) => {
|
|
1786
1786
|
if (a) {
|
|
1787
1787
|
const c = r[s], l = n[s];
|
|
1788
|
-
return c ? l ? xs(l, c) : c : l ||
|
|
1788
|
+
return c ? l ? xs(l, c) : c : l || jn;
|
|
1789
1789
|
}
|
|
1790
|
-
return n[s] ||
|
|
1790
|
+
return n[s] || jn;
|
|
1791
1791
|
}
|
|
1792
1792
|
};
|
|
1793
|
-
},
|
|
1793
|
+
}, Lr = (t, e, n) => {
|
|
1794
1794
|
if (t.length - e === 0)
|
|
1795
1795
|
return n.classGroupId;
|
|
1796
1796
|
const i = t[e], o = n.nextPart.get(i);
|
|
1797
1797
|
if (o) {
|
|
1798
|
-
const l =
|
|
1798
|
+
const l = Lr(t, e + 1, o);
|
|
1799
1799
|
if (l) return l;
|
|
1800
1800
|
}
|
|
1801
1801
|
const s = n.validators;
|
|
@@ -1817,7 +1817,7 @@ const xs = (t, e) => {
|
|
|
1817
1817
|
} = t;
|
|
1818
1818
|
return $s(n, e);
|
|
1819
1819
|
}, $s = (t, e) => {
|
|
1820
|
-
const n =
|
|
1820
|
+
const n = Mr();
|
|
1821
1821
|
for (const r in t) {
|
|
1822
1822
|
const i = t[r];
|
|
1823
1823
|
bn(i, n, r, e);
|
|
@@ -1840,7 +1840,7 @@ const xs = (t, e) => {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
Ls(t, e, n, r);
|
|
1842
1842
|
}, Rs = (t, e, n) => {
|
|
1843
|
-
const r = t === "" ? e :
|
|
1843
|
+
const r = t === "" ? e : _r(e, t);
|
|
1844
1844
|
r.classGroupId = n;
|
|
1845
1845
|
}, Ms = (t, e, n, r) => {
|
|
1846
1846
|
if (_s(t)) {
|
|
@@ -1852,15 +1852,15 @@ const xs = (t, e) => {
|
|
|
1852
1852
|
const i = Object.entries(t), o = i.length;
|
|
1853
1853
|
for (let s = 0; s < o; s++) {
|
|
1854
1854
|
const [a, c] = i[s];
|
|
1855
|
-
bn(c,
|
|
1855
|
+
bn(c, _r(e, a), n, r);
|
|
1856
1856
|
}
|
|
1857
|
-
},
|
|
1857
|
+
}, _r = (t, e) => {
|
|
1858
1858
|
let n = t;
|
|
1859
1859
|
const r = e.split(xt), i = r.length;
|
|
1860
1860
|
for (let o = 0; o < i; o++) {
|
|
1861
1861
|
const s = r[o];
|
|
1862
1862
|
let a = n.nextPart.get(s);
|
|
1863
|
-
a || (a =
|
|
1863
|
+
a || (a = Mr(), n.nextPart.set(s, a)), n = a;
|
|
1864
1864
|
}
|
|
1865
1865
|
return n;
|
|
1866
1866
|
}, _s = (t) => "isThemeGetter" in t && t.isThemeGetter === !0, Ps = (t) => {
|
|
@@ -1887,7 +1887,7 @@ const xs = (t, e) => {
|
|
|
1887
1887
|
o in n ? n[o] = s : i(o, s);
|
|
1888
1888
|
}
|
|
1889
1889
|
};
|
|
1890
|
-
}, tn = "!",
|
|
1890
|
+
}, tn = "!", Fn = ":", As = [], zn = (t, e, n, r, i) => ({
|
|
1891
1891
|
modifiers: t,
|
|
1892
1892
|
hasImportantModifier: e,
|
|
1893
1893
|
baseClassName: n,
|
|
@@ -1905,7 +1905,7 @@ const xs = (t, e) => {
|
|
|
1905
1905
|
for (let g = 0; g < d; g++) {
|
|
1906
1906
|
const b = i[g];
|
|
1907
1907
|
if (s === 0 && a === 0) {
|
|
1908
|
-
if (b ===
|
|
1908
|
+
if (b === Fn) {
|
|
1909
1909
|
o.push(i.slice(c, g)), c = g + 1;
|
|
1910
1910
|
continue;
|
|
1911
1911
|
}
|
|
@@ -1926,11 +1926,11 @@ const xs = (t, e) => {
|
|
|
1926
1926
|
u.startsWith(tn) && (f = u.slice(1), h = !0)
|
|
1927
1927
|
);
|
|
1928
1928
|
const m = l && l > c ? l - c : void 0;
|
|
1929
|
-
return
|
|
1929
|
+
return zn(o, h, f, m);
|
|
1930
1930
|
};
|
|
1931
1931
|
if (e) {
|
|
1932
|
-
const i = e +
|
|
1933
|
-
r = (s) => s.startsWith(i) ? o(s.slice(i.length)) :
|
|
1932
|
+
const i = e + Fn, o = r;
|
|
1933
|
+
r = (s) => s.startsWith(i) ? o(s.slice(i.length)) : zn(As, !1, s, void 0, !0);
|
|
1934
1934
|
}
|
|
1935
1935
|
if (n) {
|
|
1936
1936
|
const i = r;
|
|
@@ -2005,14 +2005,14 @@ const xs = (t, e) => {
|
|
|
2005
2005
|
}, zs = (...t) => {
|
|
2006
2006
|
let e = 0, n, r, i = "";
|
|
2007
2007
|
for (; e < t.length; )
|
|
2008
|
-
(n = t[e++]) && (r =
|
|
2008
|
+
(n = t[e++]) && (r = Pr(n)) && (i && (i += " "), i += r);
|
|
2009
2009
|
return i;
|
|
2010
|
-
},
|
|
2010
|
+
}, Pr = (t) => {
|
|
2011
2011
|
if (typeof t == "string")
|
|
2012
2012
|
return t;
|
|
2013
2013
|
let e, n = "";
|
|
2014
2014
|
for (let r = 0; r < t.length; r++)
|
|
2015
|
-
t[r] && (e =
|
|
2015
|
+
t[r] && (e = Pr(t[r])) && (n && (n += " "), n += e);
|
|
2016
2016
|
return n;
|
|
2017
2017
|
}, Vs = (t, ...e) => {
|
|
2018
2018
|
let n, r, i, o;
|
|
@@ -2030,18 +2030,18 @@ const xs = (t, e) => {
|
|
|
2030
2030
|
}, Hs = [], V = (t) => {
|
|
2031
2031
|
const e = (n) => n[t] || Hs;
|
|
2032
2032
|
return e.isThemeGetter = !0, e;
|
|
2033
|
-
},
|
|
2033
|
+
}, Ar = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Nr = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Us = /^\d+\/\d+$/, Bs = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ws = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Gs = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, qs = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ks = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Re = (t) => Us.test(t), M = (t) => !!t && !Number.isNaN(Number(t)), he = (t) => !!t && Number.isInteger(Number(t)), Ut = (t) => t.endsWith("%") && M(t.slice(0, -1)), ce = (t) => Bs.test(t), Js = () => !0, Ys = (t) => (
|
|
2034
2034
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2035
2035
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2036
2036
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2037
2037
|
Ws.test(t) && !Gs.test(t)
|
|
2038
|
-
),
|
|
2039
|
-
const r =
|
|
2038
|
+
), Or = () => !1, Zs = (t) => qs.test(t), Xs = (t) => Ks.test(t), Qs = (t) => !k(t) && !E(t), ea = (t) => De(t, Fr, Or), k = (t) => Ar.test(t), ve = (t) => De(t, zr, Ys), Bt = (t) => De(t, oa, M), Vn = (t) => De(t, Dr, Or), ta = (t) => De(t, jr, Xs), lt = (t) => De(t, Vr, Zs), E = (t) => Nr.test(t), ze = (t) => je(t, zr), na = (t) => je(t, sa), Hn = (t) => je(t, Dr), ra = (t) => je(t, Fr), ia = (t) => je(t, jr), dt = (t) => je(t, Vr, !0), De = (t, e, n) => {
|
|
2039
|
+
const r = Ar.exec(t);
|
|
2040
2040
|
return r ? r[1] ? e(r[1]) : n(r[2]) : !1;
|
|
2041
2041
|
}, je = (t, e, n = !1) => {
|
|
2042
|
-
const r =
|
|
2042
|
+
const r = Nr.exec(t);
|
|
2043
2043
|
return r ? r[1] ? e(r[1]) : n : !1;
|
|
2044
|
-
},
|
|
2044
|
+
}, Dr = (t) => t === "position" || t === "percentage", jr = (t) => t === "image" || t === "url", Fr = (t) => t === "length" || t === "size" || t === "bg-size", zr = (t) => t === "length", oa = (t) => t === "number", sa = (t) => t === "family-name", Vr = (t) => t === "shadow", aa = () => {
|
|
2045
2045
|
const t = V("color"), e = V("font"), n = V("text"), r = V("font-weight"), i = V("tracking"), o = V("leading"), s = V("breakpoint"), a = V("container"), c = V("spacing"), l = V("radius"), d = V("shadow"), u = V("inset-shadow"), f = V("text-shadow"), h = V("drop-shadow"), m = V("blur"), g = V("perspective"), b = V("aspect"), w = V("ease"), C = V("animate"), T = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], L = () => [
|
|
2046
2046
|
"center",
|
|
2047
2047
|
"top",
|
|
@@ -2062,11 +2062,11 @@ const xs = (t, e) => {
|
|
|
2062
2062
|
"left-bottom"
|
|
2063
2063
|
], S = () => [...L(), E, k], x = () => ["auto", "hidden", "clip", "visible", "scroll"], R = () => ["auto", "contain", "none"], y = () => [E, k, c], A = () => [Re, "full", "auto", ...y()], X = () => [he, "none", "subgrid", E, k], _ = () => ["auto", {
|
|
2064
2064
|
span: ["full", he, E, k]
|
|
2065
|
-
}, he, E, k], N = () => [he, "auto", E, k], W = () => ["auto", "min", "max", "fr", E, k], Ie = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ae = () => ["auto", ...y()], be = () => [Re, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], $ = () => [t, E, k],
|
|
2065
|
+
}, he, E, k], N = () => [he, "auto", E, k], W = () => ["auto", "min", "max", "fr", E, k], Ie = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ae = () => ["auto", ...y()], be = () => [Re, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], $ = () => [t, E, k], $n = () => [...L(), Hn, Vn, {
|
|
2066
2066
|
position: [E, k]
|
|
2067
|
-
}],
|
|
2067
|
+
}], In = () => ["no-repeat", {
|
|
2068
2068
|
repeat: ["", "x", "y", "space", "round"]
|
|
2069
|
-
}],
|
|
2069
|
+
}], Rn = () => ["auto", "cover", "contain", ra, ea, {
|
|
2070
2070
|
size: [E, k]
|
|
2071
2071
|
}], jt = () => [Ut, ze, ve], q = () => [
|
|
2072
2072
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -2076,7 +2076,7 @@ const xs = (t, e) => {
|
|
|
2076
2076
|
l,
|
|
2077
2077
|
E,
|
|
2078
2078
|
k
|
|
2079
|
-
], J = () => ["", M, ze, ve], it = () => ["solid", "dashed", "dotted", "double"],
|
|
2079
|
+
], J = () => ["", M, ze, ve], it = () => ["solid", "dashed", "dotted", "double"], Mn = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], U = () => [M, Ut, Hn, Vn], Ln = () => [
|
|
2080
2080
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2081
2081
|
"",
|
|
2082
2082
|
"none",
|
|
@@ -3035,21 +3035,21 @@ const xs = (t, e) => {
|
|
|
3035
3035
|
* @see https://tailwindcss.com/docs/background-position
|
|
3036
3036
|
*/
|
|
3037
3037
|
"bg-position": [{
|
|
3038
|
-
bg:
|
|
3038
|
+
bg: $n()
|
|
3039
3039
|
}],
|
|
3040
3040
|
/**
|
|
3041
3041
|
* Background Repeat
|
|
3042
3042
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
3043
3043
|
*/
|
|
3044
3044
|
"bg-repeat": [{
|
|
3045
|
-
bg:
|
|
3045
|
+
bg: In()
|
|
3046
3046
|
}],
|
|
3047
3047
|
/**
|
|
3048
3048
|
* Background Size
|
|
3049
3049
|
* @see https://tailwindcss.com/docs/background-size
|
|
3050
3050
|
*/
|
|
3051
3051
|
"bg-size": [{
|
|
3052
|
-
bg:
|
|
3052
|
+
bg: Rn()
|
|
3053
3053
|
}],
|
|
3054
3054
|
/**
|
|
3055
3055
|
* Background Image
|
|
@@ -3537,14 +3537,14 @@ const xs = (t, e) => {
|
|
|
3537
3537
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3538
3538
|
*/
|
|
3539
3539
|
"mix-blend": [{
|
|
3540
|
-
"mix-blend": [...
|
|
3540
|
+
"mix-blend": [...Mn(), "plus-darker", "plus-lighter"]
|
|
3541
3541
|
}],
|
|
3542
3542
|
/**
|
|
3543
3543
|
* Background Blend Mode
|
|
3544
3544
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3545
3545
|
*/
|
|
3546
3546
|
"bg-blend": [{
|
|
3547
|
-
"bg-blend":
|
|
3547
|
+
"bg-blend": Mn()
|
|
3548
3548
|
}],
|
|
3549
3549
|
/**
|
|
3550
3550
|
* Mask Clip
|
|
@@ -3712,21 +3712,21 @@ const xs = (t, e) => {
|
|
|
3712
3712
|
* @see https://tailwindcss.com/docs/mask-position
|
|
3713
3713
|
*/
|
|
3714
3714
|
"mask-position": [{
|
|
3715
|
-
mask:
|
|
3715
|
+
mask: $n()
|
|
3716
3716
|
}],
|
|
3717
3717
|
/**
|
|
3718
3718
|
* Mask Repeat
|
|
3719
3719
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
3720
3720
|
*/
|
|
3721
3721
|
"mask-repeat": [{
|
|
3722
|
-
mask:
|
|
3722
|
+
mask: In()
|
|
3723
3723
|
}],
|
|
3724
3724
|
/**
|
|
3725
3725
|
* Mask Size
|
|
3726
3726
|
* @see https://tailwindcss.com/docs/mask-size
|
|
3727
3727
|
*/
|
|
3728
3728
|
"mask-size": [{
|
|
3729
|
-
mask:
|
|
3729
|
+
mask: Rn()
|
|
3730
3730
|
}],
|
|
3731
3731
|
/**
|
|
3732
3732
|
* Mask Type
|
|
@@ -3763,7 +3763,7 @@ const xs = (t, e) => {
|
|
|
3763
3763
|
* @see https://tailwindcss.com/docs/blur
|
|
3764
3764
|
*/
|
|
3765
3765
|
blur: [{
|
|
3766
|
-
blur:
|
|
3766
|
+
blur: Ln()
|
|
3767
3767
|
}],
|
|
3768
3768
|
/**
|
|
3769
3769
|
* Brightness
|
|
@@ -3853,7 +3853,7 @@ const xs = (t, e) => {
|
|
|
3853
3853
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
3854
3854
|
*/
|
|
3855
3855
|
"backdrop-blur": [{
|
|
3856
|
-
"backdrop-blur":
|
|
3856
|
+
"backdrop-blur": Ln()
|
|
3857
3857
|
}],
|
|
3858
3858
|
/**
|
|
3859
3859
|
* Backdrop Brightness
|
|
@@ -4530,7 +4530,7 @@ let ha = !1;
|
|
|
4530
4530
|
function vn() {
|
|
4531
4531
|
return ha;
|
|
4532
4532
|
}
|
|
4533
|
-
function
|
|
4533
|
+
function Hr(t, e) {
|
|
4534
4534
|
if (!vn()) return e && t ? t.contains(e) : !1;
|
|
4535
4535
|
if (!t || !e) return !1;
|
|
4536
4536
|
let n = e;
|
|
@@ -4547,7 +4547,7 @@ const nn = (t = document) => {
|
|
|
4547
4547
|
for (; n && "shadowRoot" in n && (!((e = n.shadowRoot) === null || e === void 0) && e.activeElement); ) n = n.shadowRoot.activeElement;
|
|
4548
4548
|
return n;
|
|
4549
4549
|
};
|
|
4550
|
-
function
|
|
4550
|
+
function Ur(t) {
|
|
4551
4551
|
return vn() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
4552
4552
|
}
|
|
4553
4553
|
function fa(t) {
|
|
@@ -4611,11 +4611,11 @@ const Ye = ue(function() {
|
|
|
4611
4611
|
return wn(/^Mac/i);
|
|
4612
4612
|
}), ba = ue(function() {
|
|
4613
4613
|
return wn(/^iPhone/i);
|
|
4614
|
-
}),
|
|
4614
|
+
}), Br = ue(function() {
|
|
4615
4615
|
return wn(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
4616
4616
|
Ye() && navigator.maxTouchPoints > 1;
|
|
4617
4617
|
}), va = ue(function() {
|
|
4618
|
-
return ba() ||
|
|
4618
|
+
return ba() || Br();
|
|
4619
4619
|
});
|
|
4620
4620
|
ue(function() {
|
|
4621
4621
|
return Ye() || va();
|
|
@@ -4633,7 +4633,7 @@ function Ze(t, e, n = !0) {
|
|
|
4633
4633
|
var r, i;
|
|
4634
4634
|
let { metaKey: o, ctrlKey: s, altKey: a, shiftKey: c } = e;
|
|
4635
4635
|
Ca() && (!((i = window.event) === null || i === void 0 || (r = i.type) === null || r === void 0) && r.startsWith("key")) && t.target === "_blank" && (Ye() ? o = !0 : s = !0);
|
|
4636
|
-
let l = wa() && Ye() && !
|
|
4636
|
+
let l = wa() && Ye() && !Br() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
4637
4637
|
keyIdentifier: "Enter",
|
|
4638
4638
|
metaKey: o,
|
|
4639
4639
|
ctrlKey: s,
|
|
@@ -4651,7 +4651,7 @@ function Ze(t, e, n = !0) {
|
|
|
4651
4651
|
Ze.isOpening = n, fa(t), t.dispatchEvent(l), Ze.isOpening = !1;
|
|
4652
4652
|
}
|
|
4653
4653
|
Ze.isOpening = !1;
|
|
4654
|
-
function
|
|
4654
|
+
function Wr() {
|
|
4655
4655
|
let t = O(/* @__PURE__ */ new Map()), e = F((i, o, s, a) => {
|
|
4656
4656
|
let c = a?.once ? (...l) => {
|
|
4657
4657
|
t.current.delete(s), s(...l);
|
|
@@ -4684,7 +4684,7 @@ function Gr() {
|
|
|
4684
4684
|
function ka(t) {
|
|
4685
4685
|
return t.pointerType === "" && t.isTrusted ? !0 : xa() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
|
4686
4686
|
}
|
|
4687
|
-
function
|
|
4687
|
+
function Gr(t) {
|
|
4688
4688
|
let e = t;
|
|
4689
4689
|
return e.nativeEvent = t, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
|
|
4690
4690
|
}, e;
|
|
@@ -4696,7 +4696,7 @@ function Ea(t, e) {
|
|
|
4696
4696
|
value: e
|
|
4697
4697
|
});
|
|
4698
4698
|
}
|
|
4699
|
-
function
|
|
4699
|
+
function qr(t) {
|
|
4700
4700
|
let e = O({
|
|
4701
4701
|
isFocused: !1,
|
|
4702
4702
|
observer: null
|
|
@@ -4711,7 +4711,7 @@ function Kr(t) {
|
|
|
4711
4711
|
e.current.isFocused = !0;
|
|
4712
4712
|
let r = n.target, i = (o) => {
|
|
4713
4713
|
if (e.current.isFocused = !1, r.disabled) {
|
|
4714
|
-
let s =
|
|
4714
|
+
let s = Gr(o);
|
|
4715
4715
|
t?.(s);
|
|
4716
4716
|
}
|
|
4717
4717
|
e.current.observer && (e.current.observer.disconnect(), e.current.observer = null);
|
|
@@ -4758,13 +4758,13 @@ function Ct(t) {
|
|
|
4758
4758
|
function Q(t) {
|
|
4759
4759
|
et = "pointer", "pointerType" in t && t.pointerType, (t.type === "mousedown" || t.type === "pointerdown") && (Ee = !0, yn("pointer", t));
|
|
4760
4760
|
}
|
|
4761
|
-
function
|
|
4761
|
+
function Kr(t) {
|
|
4762
4762
|
!Ze.isOpening && ka(t) && (Ee = !0, et = "virtual");
|
|
4763
4763
|
}
|
|
4764
|
-
function
|
|
4764
|
+
function Jr(t) {
|
|
4765
4765
|
t.target === window || t.target === document || Sa || !t.isTrusted || (!Ee && !on && (et = "virtual", yn("virtual", t)), Ee = !1, on = !1);
|
|
4766
4766
|
}
|
|
4767
|
-
function
|
|
4767
|
+
function Yr() {
|
|
4768
4768
|
Ee = !1, on = !0;
|
|
4769
4769
|
}
|
|
4770
4770
|
function sn(t) {
|
|
@@ -4773,27 +4773,27 @@ function sn(t) {
|
|
|
4773
4773
|
let r = e.HTMLElement.prototype.focus;
|
|
4774
4774
|
e.HTMLElement.prototype.focus = function() {
|
|
4775
4775
|
Ee = !0, r.apply(this, arguments);
|
|
4776
|
-
}, n.addEventListener("keydown", Ct, !0), n.addEventListener("keyup", Ct, !0), n.addEventListener("click",
|
|
4777
|
-
|
|
4776
|
+
}, n.addEventListener("keydown", Ct, !0), n.addEventListener("keyup", Ct, !0), n.addEventListener("click", Kr, !0), e.addEventListener("focus", Jr, !0), e.addEventListener("blur", Yr, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", Q, !0), n.addEventListener("pointermove", Q, !0), n.addEventListener("pointerup", Q, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", Q, !0), n.addEventListener("mousemove", Q, !0), n.addEventListener("mouseup", Q, !0)), e.addEventListener("beforeunload", () => {
|
|
4777
|
+
Zr(t);
|
|
4778
4778
|
}, {
|
|
4779
4779
|
once: !0
|
|
4780
4780
|
}), Ke.set(e, {
|
|
4781
4781
|
focus: r
|
|
4782
4782
|
});
|
|
4783
4783
|
}
|
|
4784
|
-
const
|
|
4784
|
+
const Zr = (t, e) => {
|
|
4785
4785
|
const n = Ce(t), r = ge(t);
|
|
4786
|
-
e && r.removeEventListener("DOMContentLoaded", e), Ke.has(n) && (n.HTMLElement.prototype.focus = Ke.get(n).focus, r.removeEventListener("keydown", Ct, !0), r.removeEventListener("keyup", Ct, !0), r.removeEventListener("click",
|
|
4786
|
+
e && r.removeEventListener("DOMContentLoaded", e), Ke.has(n) && (n.HTMLElement.prototype.focus = Ke.get(n).focus, r.removeEventListener("keydown", Ct, !0), r.removeEventListener("keyup", Ct, !0), r.removeEventListener("click", Kr, !0), n.removeEventListener("focus", Jr, !0), n.removeEventListener("blur", Yr, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", Q, !0), r.removeEventListener("pointermove", Q, !0), r.removeEventListener("pointerup", Q, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", Q, !0), r.removeEventListener("mousemove", Q, !0), r.removeEventListener("mouseup", Q, !0)), Ke.delete(n));
|
|
4787
4787
|
};
|
|
4788
4788
|
function Ia(t) {
|
|
4789
4789
|
const e = ge(t);
|
|
4790
4790
|
let n;
|
|
4791
4791
|
return e.readyState !== "loading" ? sn(t) : (n = () => {
|
|
4792
4792
|
sn(t);
|
|
4793
|
-
}, e.addEventListener("DOMContentLoaded", n)), () =>
|
|
4793
|
+
}, e.addEventListener("DOMContentLoaded", n)), () => Zr(t, n);
|
|
4794
4794
|
}
|
|
4795
4795
|
typeof document < "u" && Ia();
|
|
4796
|
-
function
|
|
4796
|
+
function Xr() {
|
|
4797
4797
|
return et !== "pointer";
|
|
4798
4798
|
}
|
|
4799
4799
|
const Ra = /* @__PURE__ */ new Set([
|
|
@@ -4815,7 +4815,7 @@ function Ma(t, e, n) {
|
|
|
4815
4815
|
function La(t, e, n) {
|
|
4816
4816
|
sn(), D(() => {
|
|
4817
4817
|
let r = (i, o) => {
|
|
4818
|
-
Ma(!!n?.isTextInput, i, o) && t(
|
|
4818
|
+
Ma(!!n?.isTextInput, i, o) && t(Xr());
|
|
4819
4819
|
};
|
|
4820
4820
|
return rn.add(r), () => {
|
|
4821
4821
|
rn.delete(r);
|
|
@@ -4830,9 +4830,9 @@ function _a(t) {
|
|
|
4830
4830
|
}, [
|
|
4831
4831
|
r,
|
|
4832
4832
|
i
|
|
4833
|
-
]), s =
|
|
4833
|
+
]), s = qr(o), a = F((c) => {
|
|
4834
4834
|
const l = ge(c.target), d = l ? nn(l) : nn();
|
|
4835
|
-
c.target === c.currentTarget && d ===
|
|
4835
|
+
c.target === c.currentTarget && d === Ur(c.nativeEvent) && (n && n(c), i && i(!0), s(c));
|
|
4836
4836
|
}, [
|
|
4837
4837
|
i,
|
|
4838
4838
|
n,
|
|
@@ -4848,26 +4848,26 @@ function _a(t) {
|
|
|
4848
4848
|
function Pa(t) {
|
|
4849
4849
|
let { isDisabled: e, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: i } = t, o = O({
|
|
4850
4850
|
isFocusWithin: !1
|
|
4851
|
-
}), { addGlobalListener: s, removeAllGlobalListeners: a } =
|
|
4851
|
+
}), { addGlobalListener: s, removeAllGlobalListeners: a } = Wr(), c = F((u) => {
|
|
4852
4852
|
u.currentTarget.contains(u.target) && o.current.isFocusWithin && !u.currentTarget.contains(u.relatedTarget) && (o.current.isFocusWithin = !1, a(), n && n(u), i && i(!1));
|
|
4853
4853
|
}, [
|
|
4854
4854
|
n,
|
|
4855
4855
|
i,
|
|
4856
4856
|
o,
|
|
4857
4857
|
a
|
|
4858
|
-
]), l =
|
|
4858
|
+
]), l = qr(c), d = F((u) => {
|
|
4859
4859
|
if (!u.currentTarget.contains(u.target)) return;
|
|
4860
4860
|
const f = ge(u.target), h = nn(f);
|
|
4861
|
-
if (!o.current.isFocusWithin && h ===
|
|
4861
|
+
if (!o.current.isFocusWithin && h === Ur(u.nativeEvent)) {
|
|
4862
4862
|
r && r(u), i && i(!0), o.current.isFocusWithin = !0, l(u);
|
|
4863
4863
|
let m = u.currentTarget;
|
|
4864
4864
|
s(f, "focus", (g) => {
|
|
4865
|
-
if (o.current.isFocusWithin && !
|
|
4865
|
+
if (o.current.isFocusWithin && !Hr(m, g.target)) {
|
|
4866
4866
|
let b = new f.defaultView.FocusEvent("blur", {
|
|
4867
4867
|
relatedTarget: g.target
|
|
4868
4868
|
});
|
|
4869
4869
|
Ea(b, m);
|
|
4870
|
-
let w =
|
|
4870
|
+
let w = Gr(b);
|
|
4871
4871
|
c(w);
|
|
4872
4872
|
}
|
|
4873
4873
|
}, {
|
|
@@ -4900,16 +4900,16 @@ function an() {
|
|
|
4900
4900
|
kt = !1;
|
|
4901
4901
|
}, 50);
|
|
4902
4902
|
}
|
|
4903
|
-
function
|
|
4903
|
+
function Un(t) {
|
|
4904
4904
|
t.pointerType === "touch" && an();
|
|
4905
4905
|
}
|
|
4906
4906
|
function Aa() {
|
|
4907
4907
|
if (!(typeof document > "u"))
|
|
4908
|
-
return ht === 0 && (typeof PointerEvent < "u" ? document.addEventListener("pointerup",
|
|
4909
|
-
ht--, !(ht > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup",
|
|
4908
|
+
return ht === 0 && (typeof PointerEvent < "u" ? document.addEventListener("pointerup", Un) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", an)), ht++, () => {
|
|
4909
|
+
ht--, !(ht > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", Un) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", an));
|
|
4910
4910
|
};
|
|
4911
4911
|
}
|
|
4912
|
-
function
|
|
4912
|
+
function Qr(t) {
|
|
4913
4913
|
let { onHoverStart: e, onHoverChange: n, onHoverEnd: r, isDisabled: i } = t, [o, s] = B(!1), a = O({
|
|
4914
4914
|
isHovered: !1,
|
|
4915
4915
|
ignoreEmulatedMouseEvents: !1,
|
|
@@ -4917,13 +4917,13 @@ function ei(t) {
|
|
|
4917
4917
|
target: null
|
|
4918
4918
|
}).current;
|
|
4919
4919
|
D(Aa, []);
|
|
4920
|
-
let { addGlobalListener: c, removeAllGlobalListeners: l } =
|
|
4920
|
+
let { addGlobalListener: c, removeAllGlobalListeners: l } = Wr(), { hoverProps: d, triggerHoverEnd: u } = Je(() => {
|
|
4921
4921
|
let f = (g, b) => {
|
|
4922
4922
|
if (a.pointerType = b, i || b === "touch" || a.isHovered || !g.currentTarget.contains(g.target)) return;
|
|
4923
4923
|
a.isHovered = !0;
|
|
4924
4924
|
let w = g.currentTarget;
|
|
4925
4925
|
a.target = w, c(ge(g.target), "pointerover", (C) => {
|
|
4926
|
-
a.isHovered && a.target && !
|
|
4926
|
+
a.isHovered && a.target && !Hr(a.target, C.target) && h(C, C.pointerType);
|
|
4927
4927
|
}, {
|
|
4928
4928
|
capture: !0
|
|
4929
4929
|
}), e && e({
|
|
@@ -4973,10 +4973,10 @@ function ei(t) {
|
|
|
4973
4973
|
isHovered: o
|
|
4974
4974
|
};
|
|
4975
4975
|
}
|
|
4976
|
-
function
|
|
4976
|
+
function ei(t = {}) {
|
|
4977
4977
|
let { autoFocus: e = !1, isTextInput: n, within: r } = t, i = O({
|
|
4978
4978
|
isFocused: !1,
|
|
4979
|
-
isFocusVisible: e ||
|
|
4979
|
+
isFocusVisible: e || Xr()
|
|
4980
4980
|
}), [o, s] = B(!1), [a, c] = B(() => i.current.isFocused && i.current.isFocusVisible), l = F(() => c(i.current.isFocused && i.current.isFocusVisible), []), d = F((h) => {
|
|
4981
4981
|
i.current.isFocused = h, s(h), l();
|
|
4982
4982
|
}, [
|
|
@@ -5029,17 +5029,17 @@ let Da = class {
|
|
|
5029
5029
|
get isHandoffComplete() {
|
|
5030
5030
|
return this.handoffState === "complete";
|
|
5031
5031
|
}
|
|
5032
|
-
},
|
|
5032
|
+
}, ti = new Da();
|
|
5033
5033
|
function ja(t) {
|
|
5034
5034
|
var e;
|
|
5035
|
-
return
|
|
5035
|
+
return ti.isServer ? null : t == null ? document : (e = t?.ownerDocument) != null ? e : document;
|
|
5036
5036
|
}
|
|
5037
5037
|
function Fa(t) {
|
|
5038
5038
|
typeof queueMicrotask == "function" ? queueMicrotask(t) : Promise.resolve().then(t).catch((e) => setTimeout(() => {
|
|
5039
5039
|
throw e;
|
|
5040
5040
|
}));
|
|
5041
5041
|
}
|
|
5042
|
-
function
|
|
5042
|
+
function ni() {
|
|
5043
5043
|
let t = [], e = { addEventListener(n, r, i, o) {
|
|
5044
5044
|
return n.addEventListener(r, i, o), e.add(() => n.removeEventListener(r, i, o));
|
|
5045
5045
|
}, requestAnimationFrame(...n) {
|
|
@@ -5063,7 +5063,7 @@ function ri() {
|
|
|
5063
5063
|
Object.assign(n.style, { [r]: o });
|
|
5064
5064
|
});
|
|
5065
5065
|
}, group(n) {
|
|
5066
|
-
let r =
|
|
5066
|
+
let r = ni();
|
|
5067
5067
|
return n(r), this.add(() => r.dispose());
|
|
5068
5068
|
}, add(n) {
|
|
5069
5069
|
return t.includes(n) || t.push(n), () => {
|
|
@@ -5076,11 +5076,11 @@ function ri() {
|
|
|
5076
5076
|
return e;
|
|
5077
5077
|
}
|
|
5078
5078
|
function za() {
|
|
5079
|
-
let [t] = B(
|
|
5079
|
+
let [t] = B(ni);
|
|
5080
5080
|
return D(() => () => t.dispose(), [t]), t;
|
|
5081
5081
|
}
|
|
5082
5082
|
let xn = (t, e) => {
|
|
5083
|
-
|
|
5083
|
+
ti.isServer ? D(t, e) : dr(t, e);
|
|
5084
5084
|
};
|
|
5085
5085
|
function Va(t) {
|
|
5086
5086
|
let e = O(t);
|
|
@@ -5125,16 +5125,16 @@ let Wa = Se(void 0);
|
|
|
5125
5125
|
function _t() {
|
|
5126
5126
|
return pe(Wa);
|
|
5127
5127
|
}
|
|
5128
|
-
function
|
|
5128
|
+
function Bn(...t) {
|
|
5129
5129
|
return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
|
|
5130
5130
|
}
|
|
5131
|
-
function
|
|
5131
|
+
function ri(t, e, ...n) {
|
|
5132
5132
|
if (t in e) {
|
|
5133
5133
|
let i = e[t];
|
|
5134
5134
|
return typeof i == "function" ? i(...n) : i;
|
|
5135
5135
|
}
|
|
5136
5136
|
let r = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((i) => `"${i}"`).join(", ")}.`);
|
|
5137
|
-
throw Error.captureStackTrace && Error.captureStackTrace(r,
|
|
5137
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, ri), r;
|
|
5138
5138
|
}
|
|
5139
5139
|
var Ga = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(Ga || {}), qa = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(qa || {});
|
|
5140
5140
|
function Pt() {
|
|
@@ -5143,7 +5143,7 @@ function Pt() {
|
|
|
5143
5143
|
}
|
|
5144
5144
|
function Ka({ ourProps: t, theirProps: e, slot: n, defaultTag: r, features: i, visible: o = !0, name: s, mergeRefs: a }) {
|
|
5145
5145
|
a = a ?? Ya;
|
|
5146
|
-
let c =
|
|
5146
|
+
let c = ii(e, t);
|
|
5147
5147
|
if (o) return ft(c, n, r, s, a);
|
|
5148
5148
|
let l = i ?? 0;
|
|
5149
5149
|
if (l & 2) {
|
|
@@ -5152,7 +5152,7 @@ function Ka({ ourProps: t, theirProps: e, slot: n, defaultTag: r, features: i, v
|
|
|
5152
5152
|
}
|
|
5153
5153
|
if (l & 1) {
|
|
5154
5154
|
let { unmount: d = !0, ...u } = c;
|
|
5155
|
-
return
|
|
5155
|
+
return ri(d ? 0 : 1, { 0() {
|
|
5156
5156
|
return null;
|
|
5157
5157
|
}, 1() {
|
|
5158
5158
|
return ft({ ...u, hidden: !0, style: { display: "none" } }, n, r, s, a);
|
|
@@ -5178,7 +5178,7 @@ function ft(t, e = {}, n, r, i) {
|
|
|
5178
5178
|
`)].join(`
|
|
5179
5179
|
`));
|
|
5180
5180
|
} else {
|
|
5181
|
-
let f = d.props, h = f?.className, m = typeof h == "function" ? (...w) =>
|
|
5181
|
+
let f = d.props, h = f?.className, m = typeof h == "function" ? (...w) => Bn(h(...w), c.className) : Bn(h, c.className), g = m ? { className: m } : {}, b = ii(d.props, Me(Gt(c, ["ref"])));
|
|
5182
5182
|
for (let w in u) w in b && delete u[w];
|
|
5183
5183
|
return Ni(d, Object.assign({}, b, u, l, { ref: i(Za(d), l.ref) }, g));
|
|
5184
5184
|
}
|
|
@@ -5197,7 +5197,7 @@ function Ya(...t) {
|
|
|
5197
5197
|
for (let n of t) n != null && (typeof n == "function" ? n(e) : n.current = e);
|
|
5198
5198
|
};
|
|
5199
5199
|
}
|
|
5200
|
-
function
|
|
5200
|
+
function ii(...t) {
|
|
5201
5201
|
if (t.length === 0) return {};
|
|
5202
5202
|
if (t.length === 1) return t[0];
|
|
5203
5203
|
let e = {}, n = {};
|
|
@@ -5215,7 +5215,7 @@ function oi(...t) {
|
|
|
5215
5215
|
} });
|
|
5216
5216
|
return e;
|
|
5217
5217
|
}
|
|
5218
|
-
function
|
|
5218
|
+
function oi(...t) {
|
|
5219
5219
|
if (t.length === 0) return {};
|
|
5220
5220
|
if (t.length === 1) return t[0];
|
|
5221
5221
|
let e = {}, n = {};
|
|
@@ -5252,33 +5252,33 @@ function Xa(t) {
|
|
|
5252
5252
|
let Qa = "button";
|
|
5253
5253
|
function ec(t, e) {
|
|
5254
5254
|
var n;
|
|
5255
|
-
let r = _t(), { disabled: i = r || !1, autoFocus: o = !1, ...s } = t, { isFocusVisible: a, focusProps: c } =
|
|
5255
|
+
let r = _t(), { disabled: i = r || !1, autoFocus: o = !1, ...s } = t, { isFocusVisible: a, focusProps: c } = ei({ autoFocus: o }), { isHovered: l, hoverProps: d } = Qr({ isDisabled: i }), { pressed: u, pressProps: f } = Ba({ disabled: i }), h = oi({ ref: e, type: (n = s.type) != null ? n : "button", disabled: i || void 0, autoFocus: o }, c, d, f), m = Lt({ disabled: i, hover: l, focus: a, active: u, autofocus: o });
|
|
5256
5256
|
return Pt()({ ourProps: h, theirProps: s, slot: m, defaultTag: Qa, name: "Button" });
|
|
5257
5257
|
}
|
|
5258
5258
|
let de = At(ec), tc = Se(void 0);
|
|
5259
|
-
function
|
|
5259
|
+
function si() {
|
|
5260
5260
|
return pe(tc);
|
|
5261
5261
|
}
|
|
5262
5262
|
function nc(t) {
|
|
5263
5263
|
return typeof t != "object" || t === null ? !1 : "nodeType" in t;
|
|
5264
5264
|
}
|
|
5265
|
-
function
|
|
5265
|
+
function ai(t) {
|
|
5266
5266
|
return nc(t) && "tagName" in t;
|
|
5267
5267
|
}
|
|
5268
|
-
function
|
|
5269
|
-
return
|
|
5268
|
+
function ci(t) {
|
|
5269
|
+
return ai(t) && "accessKey" in t;
|
|
5270
5270
|
}
|
|
5271
5271
|
function rc(t) {
|
|
5272
|
-
return
|
|
5272
|
+
return ci(t) && t.nodeName === "INPUT";
|
|
5273
5273
|
}
|
|
5274
|
-
function
|
|
5275
|
-
return
|
|
5274
|
+
function Wn(t) {
|
|
5275
|
+
return ci(t) && t.nodeName === "LABEL";
|
|
5276
5276
|
}
|
|
5277
5277
|
function ic(t) {
|
|
5278
|
-
return
|
|
5278
|
+
return ai(t) ? t.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]') : !1;
|
|
5279
5279
|
}
|
|
5280
5280
|
let oc = /* @__PURE__ */ Symbol();
|
|
5281
|
-
function
|
|
5281
|
+
function li(...t) {
|
|
5282
5282
|
let e = O(t);
|
|
5283
5283
|
D(() => {
|
|
5284
5284
|
e.current = t;
|
|
@@ -5290,11 +5290,11 @@ function di(...t) {
|
|
|
5290
5290
|
}
|
|
5291
5291
|
let Cn = Se(null);
|
|
5292
5292
|
Cn.displayName = "DescriptionContext";
|
|
5293
|
-
function
|
|
5293
|
+
function di() {
|
|
5294
5294
|
let t = pe(Cn);
|
|
5295
5295
|
if (t === null) {
|
|
5296
5296
|
let e = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
|
|
5297
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e,
|
|
5297
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e, di), e;
|
|
5298
5298
|
}
|
|
5299
5299
|
return t;
|
|
5300
5300
|
}
|
|
@@ -5304,7 +5304,7 @@ function sc() {
|
|
|
5304
5304
|
}
|
|
5305
5305
|
let ac = "p";
|
|
5306
5306
|
function cc(t, e) {
|
|
5307
|
-
let n = dn(), r = _t(), { id: i = `headlessui-description-${n}`, ...o } = t, s =
|
|
5307
|
+
let n = dn(), r = _t(), { id: i = `headlessui-description-${n}`, ...o } = t, s = di(), a = li(e);
|
|
5308
5308
|
xn(() => s.register(i), [i, s.register]);
|
|
5309
5309
|
let c = Lt({ ...s.slot, disabled: r || !1 }), l = { ref: a, ...s.props, id: i };
|
|
5310
5310
|
return Pt()({ ourProps: l, theirProps: o, slot: c, defaultTag: ac, name: s.name || "Description" });
|
|
@@ -5313,11 +5313,11 @@ let lc = At(cc);
|
|
|
5313
5313
|
Object.assign(lc, {});
|
|
5314
5314
|
let kn = Se(null);
|
|
5315
5315
|
kn.displayName = "LabelContext";
|
|
5316
|
-
function
|
|
5316
|
+
function ui() {
|
|
5317
5317
|
let t = pe(kn);
|
|
5318
5318
|
if (t === null) {
|
|
5319
5319
|
let e = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
|
|
5320
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e,
|
|
5320
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e, ui), e;
|
|
5321
5321
|
}
|
|
5322
5322
|
return t;
|
|
5323
5323
|
}
|
|
@@ -5329,11 +5329,11 @@ function dc(t) {
|
|
|
5329
5329
|
let uc = "label";
|
|
5330
5330
|
function hc(t, e) {
|
|
5331
5331
|
var n;
|
|
5332
|
-
let r = dn(), i =
|
|
5332
|
+
let r = dn(), i = ui(), o = si(), s = _t(), { id: a = `headlessui-label-${r}`, htmlFor: c = o ?? ((n = i.props) == null ? void 0 : n.htmlFor), passive: l = !1, ...d } = t, u = li(e);
|
|
5333
5333
|
xn(() => i.register(a), [a, i.register]);
|
|
5334
5334
|
let f = Et((g) => {
|
|
5335
5335
|
let b = g.currentTarget;
|
|
5336
|
-
if (!(g.target !== g.currentTarget && ic(g.target)) && (
|
|
5336
|
+
if (!(g.target !== g.currentTarget && ic(g.target)) && (Wn(b) && g.preventDefault(), i.props && "onClick" in i.props && typeof i.props.onClick == "function" && i.props.onClick(g), Wn(b))) {
|
|
5337
5337
|
let w = document.getElementById(b.htmlFor);
|
|
5338
5338
|
if (w) {
|
|
5339
5339
|
let C = w.getAttribute("disabled");
|
|
@@ -5350,12 +5350,12 @@ let fc = At(hc);
|
|
|
5350
5350
|
Object.assign(fc, {});
|
|
5351
5351
|
let pc = "textarea";
|
|
5352
5352
|
function gc(t, e) {
|
|
5353
|
-
let n = dn(), r =
|
|
5353
|
+
let n = dn(), r = si(), i = _t(), { id: o = r || `headlessui-textarea-${n}`, disabled: s = i || !1, autoFocus: a = !1, invalid: c = !1, ...l } = t, d = dc(), u = sc(), { isFocused: f, focusProps: h } = ei({ autoFocus: a }), { isHovered: m, hoverProps: g } = Qr({ isDisabled: s }), b = oi({ ref: e, id: o, "aria-labelledby": d, "aria-describedby": u, "aria-invalid": c ? "true" : void 0, disabled: s || void 0, autoFocus: a }, h, g), w = Lt({ disabled: s, invalid: c, hover: m, focus: f, autofocus: a });
|
|
5354
5354
|
return Pt()({ ourProps: b, theirProps: l, slot: w, defaultTag: pc, name: "Textarea" });
|
|
5355
5355
|
}
|
|
5356
5356
|
let mc = At(gc);
|
|
5357
5357
|
const bc = (t) => /* @__PURE__ */ p.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ p.createElement("path", { d: "M8 1.25C6.66498 1.25 5.35994 1.64588 4.2499 2.38758C3.13987 3.12928 2.27471 4.18349 1.76382 5.41689C1.25292 6.65029 1.11925 8.00749 1.3797 9.31686C1.64015 10.6262 2.28303 11.829 3.22703 12.773C4.17104 13.717 5.37377 14.3598 6.68314 14.6203C7.99252 14.8808 9.34971 14.7471 10.5831 14.2362C11.8165 13.7253 12.8707 12.8601 13.6124 11.7501C14.3541 10.6401 14.75 9.33502 14.75 8C14.748 6.2104 14.0362 4.49466 12.7708 3.22922C11.5053 1.96378 9.78961 1.25199 8 1.25ZM8 13.25C6.96165 13.25 5.94662 12.9421 5.08326 12.3652C4.2199 11.7883 3.547 10.9684 3.14964 10.0091C2.75228 9.04978 2.64831 7.99418 2.85088 6.97578C3.05345 5.95738 3.55347 5.02191 4.28769 4.28769C5.02192 3.55346 5.95738 3.05345 6.97578 2.85088C7.99418 2.6483 9.04978 2.75227 10.0091 3.14963C10.9684 3.54699 11.7883 4.2199 12.3652 5.08326C12.9421 5.94661 13.25 6.96165 13.25 8C13.2485 9.39193 12.6949 10.7264 11.7107 11.7107C10.7264 12.6949 9.39193 13.2485 8 13.25ZM7.25 8.25V5C7.25 4.80109 7.32902 4.61032 7.46967 4.46967C7.61032 4.32902 7.80109 4.25 8 4.25C8.19892 4.25 8.38968 4.32902 8.53033 4.46967C8.67098 4.61032 8.75 4.80109 8.75 5V8.25C8.75 8.44891 8.67098 8.63968 8.53033 8.78033C8.38968 8.92098 8.19892 9 8 9C7.80109 9 7.61032 8.92098 7.46967 8.78033C7.32902 8.63968 7.25 8.44891 7.25 8.25ZM9 10.75C9 10.9478 8.94135 11.1411 8.83147 11.3056C8.72159 11.47 8.56541 11.5982 8.38269 11.6739C8.19996 11.7496 7.99889 11.7694 7.80491 11.7308C7.61093 11.6922 7.43275 11.597 7.2929 11.4571C7.15304 11.3173 7.0578 11.1391 7.01922 10.9451C6.98063 10.7511 7.00044 10.55 7.07612 10.3673C7.15181 10.1846 7.27998 10.0284 7.44443 9.91853C7.60888 9.80865 7.80222 9.75 8 9.75C8.26522 9.75 8.51957 9.85536 8.70711 10.0429C8.89465 10.2304 9 10.4848 9 10.75Z", fill: "currentColor" }));
|
|
5358
|
-
function
|
|
5358
|
+
function hi({
|
|
5359
5359
|
message: t,
|
|
5360
5360
|
className: e,
|
|
5361
5361
|
...n
|
|
@@ -5392,7 +5392,7 @@ class tt extends Error {
|
|
|
5392
5392
|
e instanceof Error ? (super(e.message), this.cause = e) : super(e), this.reason = n, this.name = "ReasonError";
|
|
5393
5393
|
}
|
|
5394
5394
|
}
|
|
5395
|
-
class
|
|
5395
|
+
class fi extends tt {
|
|
5396
5396
|
constructor(e) {
|
|
5397
5397
|
super("Rejected", e), this.name = "SubscriptionRejectedError";
|
|
5398
5398
|
}
|
|
@@ -5412,7 +5412,7 @@ class wc extends ne {
|
|
|
5412
5412
|
super(e, "stale_connection"), this.name = "StaleConnectionError";
|
|
5413
5413
|
}
|
|
5414
5414
|
}
|
|
5415
|
-
function
|
|
5415
|
+
function pi(t) {
|
|
5416
5416
|
return t ? `{${Object.keys(t).sort().filter((n) => t[n] !== void 0).map((n) => {
|
|
5417
5417
|
let r = JSON.stringify(t[n]);
|
|
5418
5418
|
return `${JSON.stringify(n)}:${r}`;
|
|
@@ -5474,7 +5474,7 @@ class En {
|
|
|
5474
5474
|
this.emitter = Nt(), this.params = Object.freeze(e), this.presence = new yc(this), this.initialConnect = !0, this[we] = "idle";
|
|
5475
5475
|
}
|
|
5476
5476
|
get identifier() {
|
|
5477
|
-
return this._identifier ? this._identifier : (this._identifier =
|
|
5477
|
+
return this._identifier ? this._identifier : (this._identifier = pi({
|
|
5478
5478
|
channel: this.channelId,
|
|
5479
5479
|
...this.params
|
|
5480
5480
|
}), this._identifier);
|
|
@@ -5716,18 +5716,18 @@ class Ec {
|
|
|
5716
5716
|
this._pendingMessages = n;
|
|
5717
5717
|
}
|
|
5718
5718
|
}
|
|
5719
|
-
const
|
|
5719
|
+
const Gn = {
|
|
5720
5720
|
debug: 0,
|
|
5721
5721
|
info: 1,
|
|
5722
5722
|
warn: 2,
|
|
5723
5723
|
error: 3
|
|
5724
5724
|
};
|
|
5725
|
-
class
|
|
5725
|
+
class gi {
|
|
5726
5726
|
constructor(e) {
|
|
5727
5727
|
this.level = e || "warn";
|
|
5728
5728
|
}
|
|
5729
5729
|
log(e, n, r) {
|
|
5730
|
-
|
|
5730
|
+
Gn[e] < Gn[this.level] || this.writeLogEntry(e, n, r);
|
|
5731
5731
|
}
|
|
5732
5732
|
writeLogEntry() {
|
|
5733
5733
|
throw Error("Not implemented");
|
|
@@ -5745,7 +5745,7 @@ class mi {
|
|
|
5745
5745
|
this.log("error", e, n);
|
|
5746
5746
|
}
|
|
5747
5747
|
}
|
|
5748
|
-
class nt extends
|
|
5748
|
+
class nt extends gi {
|
|
5749
5749
|
writeLogEntry() {
|
|
5750
5750
|
}
|
|
5751
5751
|
}
|
|
@@ -5761,7 +5761,7 @@ class Sc {
|
|
|
5761
5761
|
}
|
|
5762
5762
|
}
|
|
5763
5763
|
let Tc = 0;
|
|
5764
|
-
class
|
|
5764
|
+
class mi {
|
|
5765
5765
|
constructor(e = {}) {
|
|
5766
5766
|
let { logger: n } = e;
|
|
5767
5767
|
this.logger = n || new nt(), this.pendingSubscriptions = {}, this.pendingUnsubscriptions = {}, this.subscribeCooldownInterval = e.subscribeCooldownInterval || 250, this.subscribeRetryInterval = e.subscribeRetryInterval || 5e3;
|
|
@@ -5772,7 +5772,7 @@ class bi {
|
|
|
5772
5772
|
subscribe(e, n) {
|
|
5773
5773
|
let r = { channel: e };
|
|
5774
5774
|
n && Object.assign(r, n);
|
|
5775
|
-
let i =
|
|
5775
|
+
let i = pi(r);
|
|
5776
5776
|
if (this.pendingUnsubscriptions[i]) {
|
|
5777
5777
|
let s = this.subscribeCooldownInterval * 1.5;
|
|
5778
5778
|
return this.logger.debug(
|
|
@@ -5873,7 +5873,7 @@ class bi {
|
|
|
5873
5873
|
}
|
|
5874
5874
|
if (n === "reject_subscription") {
|
|
5875
5875
|
let a = this.pendingSubscriptions[r];
|
|
5876
|
-
return a ? (delete this.pendingSubscriptions[r], a.reject(new
|
|
5876
|
+
return a ? (delete this.pendingSubscriptions[r], a.reject(new fi())) : this.logger.error("subscription not found", { type: n, identifier: r });
|
|
5877
5877
|
}
|
|
5878
5878
|
if (i)
|
|
5879
5879
|
return { identifier: r, message: i };
|
|
@@ -5888,10 +5888,10 @@ class bi {
|
|
|
5888
5888
|
return !1;
|
|
5889
5889
|
}
|
|
5890
5890
|
}
|
|
5891
|
-
const
|
|
5892
|
-
class $c extends
|
|
5891
|
+
const qn = () => Date.now() / 1e3 | 0;
|
|
5892
|
+
class $c extends mi {
|
|
5893
5893
|
constructor(e = {}) {
|
|
5894
|
-
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince =
|
|
5894
|
+
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince = qn()), this.sessionId = void 0, this.sendPongs = e.pongs;
|
|
5895
5895
|
}
|
|
5896
5896
|
reset(e) {
|
|
5897
5897
|
for (let n in this.pendingPresence)
|
|
@@ -5911,7 +5911,7 @@ class $c extends bi {
|
|
|
5911
5911
|
if (n === "confirm_subscription")
|
|
5912
5912
|
return this.subscriptionStreams[r] || (this.subscriptionStreams[r] = /* @__PURE__ */ new Set()), super.receive(e);
|
|
5913
5913
|
if (n === "ping")
|
|
5914
|
-
return this.restoreSince && (this.restoreSince =
|
|
5914
|
+
return this.restoreSince && (this.restoreSince = qn()), this.sendPongs && this.sendPong(), this.cable.keepalive(e.message);
|
|
5915
5915
|
if (this.cable.keepalive(), n === "confirm_history") {
|
|
5916
5916
|
this.logger.debug("history result received", e), this.cable.notify("history_received", r);
|
|
5917
5917
|
return;
|
|
@@ -6050,7 +6050,7 @@ class Rc extends En {
|
|
|
6050
6050
|
}
|
|
6051
6051
|
}
|
|
6052
6052
|
const Mc = "$pubsub";
|
|
6053
|
-
class
|
|
6053
|
+
class Kn extends En {
|
|
6054
6054
|
static identifier = Mc;
|
|
6055
6055
|
async perform(e, n) {
|
|
6056
6056
|
if (e.startsWith("$"))
|
|
@@ -6168,11 +6168,11 @@ class Lc {
|
|
|
6168
6168
|
this.emit("keepalive", e);
|
|
6169
6169
|
}
|
|
6170
6170
|
streamFrom(e) {
|
|
6171
|
-
let n = new
|
|
6171
|
+
let n = new Kn({ stream_name: e });
|
|
6172
6172
|
return this.subscribe(n);
|
|
6173
6173
|
}
|
|
6174
6174
|
streamFromSigned(e) {
|
|
6175
|
-
let n = new
|
|
6175
|
+
let n = new Kn({ signed_stream_name: e });
|
|
6176
6176
|
return this.subscribe(n);
|
|
6177
6177
|
}
|
|
6178
6178
|
subscribeTo(e, n) {
|
|
@@ -6229,7 +6229,7 @@ class Lc {
|
|
|
6229
6229
|
this.hub.subscribe(i, a), this.logger.debug("subscribed", { ...s, remoteId: a }), e.notify("connected");
|
|
6230
6230
|
} catch (a) {
|
|
6231
6231
|
if (a) {
|
|
6232
|
-
if (a instanceof
|
|
6232
|
+
if (a instanceof fi && this.logger.warn("rejected", s), a instanceof ne) {
|
|
6233
6233
|
this.logger.debug(
|
|
6234
6234
|
"disconnected during subscription; will retry on connect",
|
|
6235
6235
|
s
|
|
@@ -6364,7 +6364,7 @@ class Lc {
|
|
|
6364
6364
|
const _c = {
|
|
6365
6365
|
maxMissingPings: 2,
|
|
6366
6366
|
maxReconnectAttempts: 1 / 0
|
|
6367
|
-
}, Le = () => Date.now(),
|
|
6367
|
+
}, Le = () => Date.now(), bi = (t, e) => {
|
|
6368
6368
|
e = e || {};
|
|
6369
6369
|
let { backoffRate: n, jitterRatio: r, maxInterval: i } = e;
|
|
6370
6370
|
return n = n || 2, r === void 0 && (r = 0.5), (o) => {
|
|
@@ -6372,7 +6372,7 @@ const _c = {
|
|
|
6372
6372
|
return c = c * (1 + l), i && i < c && (c = i), c;
|
|
6373
6373
|
};
|
|
6374
6374
|
};
|
|
6375
|
-
let
|
|
6375
|
+
let vi = class {
|
|
6376
6376
|
constructor({ pingInterval: e, ...n }) {
|
|
6377
6377
|
if (this.pingInterval = e, !this.pingInterval)
|
|
6378
6378
|
throw Error(`Incorrect pingInterval is provided: ${e}`);
|
|
@@ -6599,7 +6599,7 @@ class Ac {
|
|
|
6599
6599
|
this.ws.onclose = void 0, this.ws.onmessage = void 0, this.ws.onopen = void 0, this.ws.close(), delete this.ws, this.connected = !1, this.emitter.emit("close");
|
|
6600
6600
|
}
|
|
6601
6601
|
}
|
|
6602
|
-
const
|
|
6602
|
+
const wi = {
|
|
6603
6603
|
protocol: "actioncable-v1-json",
|
|
6604
6604
|
pingInterval: 3e3,
|
|
6605
6605
|
maxReconnectAttempts: 1 / 0,
|
|
@@ -6609,7 +6609,7 @@ const yi = {
|
|
|
6609
6609
|
};
|
|
6610
6610
|
function Nc(t, e) {
|
|
6611
6611
|
if (typeof t == "object" && typeof e > "u" && (e = t, t = void 0), e = e || {}, !t && !e.transport) throw Error("URL or transport must be specified");
|
|
6612
|
-
e = Object.assign({},
|
|
6612
|
+
e = Object.assign({}, wi, e);
|
|
6613
6613
|
let {
|
|
6614
6614
|
protocol: n,
|
|
6615
6615
|
websocketImplementation: r,
|
|
@@ -6640,7 +6640,7 @@ function Nc(t, e) {
|
|
|
6640
6640
|
C = C || n;
|
|
6641
6641
|
let N = n.substring(0, n.lastIndexOf("-")), W = n.substring(n.lastIndexOf("-") + 1);
|
|
6642
6642
|
if (S = S || {}, N === "actioncable-v1")
|
|
6643
|
-
n = new
|
|
6643
|
+
n = new mi({ logger: l, ...S });
|
|
6644
6644
|
else if (N === "actioncable-v1-ext")
|
|
6645
6645
|
n = new $c({
|
|
6646
6646
|
logger: l,
|
|
@@ -6671,7 +6671,7 @@ function Nc(t, e) {
|
|
|
6671
6671
|
subprotocol: C,
|
|
6672
6672
|
authStrategy: s,
|
|
6673
6673
|
format: i
|
|
6674
|
-
}), a && (d = new Pc([d, ...a], { logger: l })), A && A.token && d.setToken(A.token, A.param || "jid"), g = g ||
|
|
6674
|
+
}), a && (d = new Pc([d, ...a], { logger: l })), A && A.token && d.setToken(A.token, A.param || "jid"), g = g || bi(m), h !== !1 && (h = h || new vi({
|
|
6675
6675
|
pingInterval: m,
|
|
6676
6676
|
reconnectStrategy: g,
|
|
6677
6677
|
maxMissingPings: b,
|
|
@@ -6710,12 +6710,12 @@ function Oc(t, e) {
|
|
|
6710
6710
|
}
|
|
6711
6711
|
});
|
|
6712
6712
|
}
|
|
6713
|
-
let Dc = class extends
|
|
6713
|
+
let Dc = class extends gi {
|
|
6714
6714
|
writeLogEntry(e, n, r) {
|
|
6715
6715
|
r ? console[e](n, r) : console[e](n);
|
|
6716
6716
|
}
|
|
6717
6717
|
};
|
|
6718
|
-
class jc extends
|
|
6718
|
+
class jc extends vi {
|
|
6719
6719
|
watch(e) {
|
|
6720
6720
|
super.watch(e), this.initActivityListeners();
|
|
6721
6721
|
}
|
|
@@ -6741,13 +6741,13 @@ const Fc = ["cable", "action-cable"], zc = "/cable", Ot = (t, e) => {
|
|
|
6741
6741
|
if (r)
|
|
6742
6742
|
return r.getAttribute("content");
|
|
6743
6743
|
}
|
|
6744
|
-
},
|
|
6744
|
+
}, Jn = (t) => t.match(/wss?:\/\//) ? t : typeof window < "u" ? `${window.location.protocol.replace("http", "ws")}//${window.location.host}${t}` : t, Vc = () => {
|
|
6745
6745
|
if (typeof document < "u" && document.head) {
|
|
6746
6746
|
let t = Ot(document, "url");
|
|
6747
6747
|
if (t)
|
|
6748
|
-
return
|
|
6748
|
+
return Jn(t);
|
|
6749
6749
|
}
|
|
6750
|
-
return
|
|
6750
|
+
return Jn(zc);
|
|
6751
6751
|
}, Hc = () => {
|
|
6752
6752
|
if (typeof document < "u" && document.head) {
|
|
6753
6753
|
let t = Ot(document, "history-timestamp");
|
|
@@ -6768,7 +6768,7 @@ function Wc(t, e) {
|
|
|
6768
6768
|
let l = Bc();
|
|
6769
6769
|
e.auth = Object.assign({ token: n, param: l }, e.auth || {});
|
|
6770
6770
|
}
|
|
6771
|
-
e = Object.assign({},
|
|
6771
|
+
e = Object.assign({}, wi, e);
|
|
6772
6772
|
let {
|
|
6773
6773
|
logLevel: r,
|
|
6774
6774
|
logger: i,
|
|
@@ -6777,7 +6777,7 @@ function Wc(t, e) {
|
|
|
6777
6777
|
maxMissingPings: a,
|
|
6778
6778
|
maxReconnectAttempts: c
|
|
6779
6779
|
} = e;
|
|
6780
|
-
return i = e.logger = e.logger || new Dc(r), s = e.reconnectStrategy = e.reconnectStrategy ||
|
|
6780
|
+
return i = e.logger = e.logger || new Dc(r), s = e.reconnectStrategy = e.reconnectStrategy || bi(o), e.monitor !== !1 && (e.monitor = e.monitor || new jc({
|
|
6781
6781
|
pingInterval: o,
|
|
6782
6782
|
reconnectStrategy: s,
|
|
6783
6783
|
maxMissingPings: a,
|
|
@@ -6813,9 +6813,9 @@ class qc {
|
|
|
6813
6813
|
this.level <= Ve.error && console.error(this.prefix, ...e);
|
|
6814
6814
|
}
|
|
6815
6815
|
}
|
|
6816
|
-
let
|
|
6817
|
-
window.location.search.includes("widget-debug") && (
|
|
6818
|
-
const I = new qc("BridgeApp-Widget",
|
|
6816
|
+
let yi = "warn";
|
|
6817
|
+
window.location.search.includes("widget-debug") && (yi = "debug");
|
|
6818
|
+
const I = new qc("BridgeApp-Widget", yi);
|
|
6819
6819
|
window.addEventListener("error", (t) => {
|
|
6820
6820
|
console.error("Unhandled error", t.error);
|
|
6821
6821
|
});
|
|
@@ -6876,7 +6876,7 @@ class Kc {
|
|
|
6876
6876
|
}
|
|
6877
6877
|
}
|
|
6878
6878
|
var re = /* @__PURE__ */ ((t) => (t.Pending = "pending", t.Available = "available", t.Offline = "offline", t.Unavailable = "unavailable", t))(re || {});
|
|
6879
|
-
const
|
|
6879
|
+
const xi = Se(void 0), Jc = (t) => {
|
|
6880
6880
|
const [e, n] = B(!1), [r, i] = B(
|
|
6881
6881
|
re.Pending
|
|
6882
6882
|
), o = O(r);
|
|
@@ -6909,9 +6909,9 @@ const Ci = Se(void 0), Jc = (t) => {
|
|
|
6909
6909
|
} : null;
|
|
6910
6910
|
}, Yc = ({ children: t, config: e }) => {
|
|
6911
6911
|
const n = Jc(e);
|
|
6912
|
-
return n ? /* @__PURE__ */ v(
|
|
6912
|
+
return n ? /* @__PURE__ */ v(xi.Provider, { value: n, children: t }) : null;
|
|
6913
6913
|
}, Sn = () => {
|
|
6914
|
-
const t = pe(
|
|
6914
|
+
const t = pe(xi);
|
|
6915
6915
|
if (t === void 0)
|
|
6916
6916
|
throw new Error("useCable must be used within an CableProvider");
|
|
6917
6917
|
return t;
|
|
@@ -6920,7 +6920,7 @@ const Ci = Se(void 0), Jc = (t) => {
|
|
|
6920
6920
|
offline: "You're offline",
|
|
6921
6921
|
agentResponseFailed: "Agent response failed",
|
|
6922
6922
|
sendMessageFallback: "Failed to send message"
|
|
6923
|
-
},
|
|
6923
|
+
}, Yn = (t) => {
|
|
6924
6924
|
let e;
|
|
6925
6925
|
const n = /* @__PURE__ */ new Set(), r = (l, d) => {
|
|
6926
6926
|
const u = typeof l == "function" ? l(e) : l;
|
|
@@ -6930,7 +6930,7 @@ const Ci = Se(void 0), Jc = (t) => {
|
|
|
6930
6930
|
}
|
|
6931
6931
|
}, i = () => e, a = { setState: r, getState: i, getInitialState: () => c, subscribe: (l) => (n.add(l), () => n.delete(l)) }, c = e = t(r, i, a);
|
|
6932
6932
|
return a;
|
|
6933
|
-
}, Zc = ((t) => t ?
|
|
6933
|
+
}, Zc = ((t) => t ? Yn(t) : Yn), Xc = (t) => t;
|
|
6934
6934
|
function Qc(t, e = Xc) {
|
|
6935
6935
|
const n = xe.useSyncExternalStore(
|
|
6936
6936
|
t.subscribe,
|
|
@@ -6939,21 +6939,21 @@ function Qc(t, e = Xc) {
|
|
|
6939
6939
|
);
|
|
6940
6940
|
return xe.useDebugValue(n), n;
|
|
6941
6941
|
}
|
|
6942
|
-
const
|
|
6942
|
+
const Zn = (t) => {
|
|
6943
6943
|
const e = Zc(t), n = (r) => Qc(e, r);
|
|
6944
6944
|
return Object.assign(n, e), n;
|
|
6945
|
-
},
|
|
6945
|
+
}, Ci = ((t) => t ? Zn(t) : Zn);
|
|
6946
6946
|
function rt(t, e) {
|
|
6947
6947
|
t.message.includes("401") && e?.();
|
|
6948
6948
|
}
|
|
6949
|
-
const
|
|
6949
|
+
const el = "odetG11NqDEKRhKpIwVp6LVPJSWaOOyd", cn = "https://img.gamespot.bet/3d-assistant/docs", ki = el, pt = async (t, e) => {
|
|
6950
6950
|
try {
|
|
6951
6951
|
const n = await fetch(
|
|
6952
6952
|
`${t.apiUrl}/agents.Agents/StartVoiceSession`,
|
|
6953
6953
|
{
|
|
6954
6954
|
method: "POST",
|
|
6955
6955
|
headers: {
|
|
6956
|
-
Authorization: `Bearer ${
|
|
6956
|
+
Authorization: `Bearer ${ki}`,
|
|
6957
6957
|
"Content-Type": "application/json",
|
|
6958
6958
|
Accept: "application/json"
|
|
6959
6959
|
},
|
|
@@ -6966,7 +6966,7 @@ const Tn = "SguM3WDPoxJDTxZNoJgvFJq7tgqeLkk8", cn = "https://img.gamespot.bet/3d
|
|
|
6966
6966
|
);
|
|
6967
6967
|
return {
|
|
6968
6968
|
status: n.status,
|
|
6969
|
-
json: await n.json()
|
|
6969
|
+
json: await n.json?.() || {}
|
|
6970
6970
|
};
|
|
6971
6971
|
} catch (n) {
|
|
6972
6972
|
throw rt(n, e.onSessionExpired), n;
|
|
@@ -7101,7 +7101,7 @@ async function rl({
|
|
|
7101
7101
|
`Request failed: ${a.status} ${a.statusText}`
|
|
7102
7102
|
);
|
|
7103
7103
|
}
|
|
7104
|
-
async function
|
|
7104
|
+
async function Xn({
|
|
7105
7105
|
voiceBaseUrl: t,
|
|
7106
7106
|
voiceSessionId: e,
|
|
7107
7107
|
sessionToken: n,
|
|
@@ -7136,7 +7136,7 @@ async function il({
|
|
|
7136
7136
|
const r = await fetch(`${t.apiUrl}/agents.Agents/SendVoiceSessionDirective`, {
|
|
7137
7137
|
method: "POST",
|
|
7138
7138
|
headers: {
|
|
7139
|
-
Authorization: `Bearer ${
|
|
7139
|
+
Authorization: `Bearer ${ki}`,
|
|
7140
7140
|
"Content-Type": "application/json",
|
|
7141
7141
|
Accept: "application/json"
|
|
7142
7142
|
},
|
|
@@ -7146,7 +7146,7 @@ async function il({
|
|
|
7146
7146
|
})
|
|
7147
7147
|
});
|
|
7148
7148
|
if (!r.ok)
|
|
7149
|
-
throw new Error(
|
|
7149
|
+
throw console.log(r, await r.json()), new Error(
|
|
7150
7150
|
`HTTP Error: ${r.status} ${r.statusText}`
|
|
7151
7151
|
);
|
|
7152
7152
|
return await r.json();
|
|
@@ -7186,7 +7186,7 @@ function Be() {
|
|
|
7186
7186
|
function St(t) {
|
|
7187
7187
|
t?.getTracks().forEach((e) => e.stop());
|
|
7188
7188
|
}
|
|
7189
|
-
function
|
|
7189
|
+
function Qn(t) {
|
|
7190
7190
|
if (!(!t || t.readyState === "closed"))
|
|
7191
7191
|
try {
|
|
7192
7192
|
t.close();
|
|
@@ -7203,12 +7203,12 @@ function ol(t) {
|
|
|
7203
7203
|
}
|
|
7204
7204
|
}
|
|
7205
7205
|
function qt(t) {
|
|
7206
|
-
|
|
7206
|
+
Qn(t.voiceEventsChannel), Qn(t.voiceInputChannel), ol(t.connection), St(t.localStream), St(t.downstream), t.remoteAudioElement && (t.remoteAudioElement.pause(), t.remoteAudioElement.srcObject = null);
|
|
7207
7207
|
}
|
|
7208
|
-
function
|
|
7208
|
+
function er(t) {
|
|
7209
7209
|
return t instanceof Error ? t.message : "Voice session failed";
|
|
7210
7210
|
}
|
|
7211
|
-
const z =
|
|
7211
|
+
const z = Ci((t, e) => ({
|
|
7212
7212
|
...Be(),
|
|
7213
7213
|
actions: {
|
|
7214
7214
|
initVoiceStore: async (n, r) => {
|
|
@@ -7244,7 +7244,7 @@ const z = ki((t, e) => ({
|
|
|
7244
7244
|
voiceBaseUrl: c.voiceBaseUrl,
|
|
7245
7245
|
voiceProtocolVersion: c.voiceProtocolVersion
|
|
7246
7246
|
});
|
|
7247
|
-
const l = await
|
|
7247
|
+
const l = await Xn({
|
|
7248
7248
|
voiceBaseUrl: c.voiceBaseUrl,
|
|
7249
7249
|
voiceSessionId: c.session.id,
|
|
7250
7250
|
sessionToken: c.sessionToken,
|
|
@@ -7305,7 +7305,7 @@ const z = ki((t, e) => ({
|
|
|
7305
7305
|
throw qt(e()), t({
|
|
7306
7306
|
...Be(),
|
|
7307
7307
|
status: "error",
|
|
7308
|
-
errorMessage:
|
|
7308
|
+
errorMessage: er(a)
|
|
7309
7309
|
}), a;
|
|
7310
7310
|
}
|
|
7311
7311
|
},
|
|
@@ -7343,7 +7343,7 @@ const z = ki((t, e) => ({
|
|
|
7343
7343
|
voiceBaseUrl: c.voiceBaseUrl,
|
|
7344
7344
|
voiceProtocolVersion: c.voiceProtocolVersion
|
|
7345
7345
|
});
|
|
7346
|
-
const l = await
|
|
7346
|
+
const l = await Xn({
|
|
7347
7347
|
voiceBaseUrl: c.voiceBaseUrl,
|
|
7348
7348
|
voiceSessionId: c.session.id,
|
|
7349
7349
|
sessionToken: c.sessionToken,
|
|
@@ -7404,7 +7404,7 @@ const z = ki((t, e) => ({
|
|
|
7404
7404
|
throw qt(e()), t({
|
|
7405
7405
|
...Be(),
|
|
7406
7406
|
status: "error",
|
|
7407
|
-
errorMessage:
|
|
7407
|
+
errorMessage: er(a)
|
|
7408
7408
|
}), a;
|
|
7409
7409
|
}
|
|
7410
7410
|
},
|
|
@@ -7881,7 +7881,7 @@ const z = ki((t, e) => ({
|
|
|
7881
7881
|
}
|
|
7882
7882
|
}
|
|
7883
7883
|
}
|
|
7884
|
-
})),
|
|
7884
|
+
})), Tn = () => z((t) => t.actions);
|
|
7885
7885
|
var Ei = function(t) {
|
|
7886
7886
|
D(t, []);
|
|
7887
7887
|
}, sl = function(t) {
|
|
@@ -7897,7 +7897,7 @@ var Ei = function(t) {
|
|
|
7897
7897
|
});
|
|
7898
7898
|
};
|
|
7899
7899
|
const cl = () => {
|
|
7900
|
-
const [t, e] = B([]), { switchInputAudioDevice: n } =
|
|
7900
|
+
const [t, e] = B([]), { switchInputAudioDevice: n } = Tn(), { audioInputDevices: r } = z.getState(), i = F(
|
|
7901
7901
|
async (s) => {
|
|
7902
7902
|
const a = z.getState().audioInputDevices, c = s.filter(
|
|
7903
7903
|
(h) => h.kind === "audioinput"
|
|
@@ -7997,7 +7997,7 @@ function fl(t, e, n) {
|
|
|
7997
7997
|
return () => window.clearInterval(a);
|
|
7998
7998
|
}, [s]);
|
|
7999
7999
|
}
|
|
8000
|
-
const vt = 100,
|
|
8000
|
+
const vt = 100, tr = async (t, e, n) => {
|
|
8001
8001
|
const { beforeMessageId: r, afterMessageId: i, pageSize: o } = n || {
|
|
8002
8002
|
pageSize: vt
|
|
8003
8003
|
};
|
|
@@ -8029,7 +8029,7 @@ const vt = 100, nr = async (t, e, n) => {
|
|
|
8029
8029
|
throw rt(s, e.onSessionExpired), s;
|
|
8030
8030
|
}
|
|
8031
8031
|
};
|
|
8032
|
-
async function
|
|
8032
|
+
async function nr(t, e, n) {
|
|
8033
8033
|
try {
|
|
8034
8034
|
const r = await fetch(
|
|
8035
8035
|
`${t.apiUrl}/messenger.Messenger/ListMessagesForThreads`,
|
|
@@ -8053,7 +8053,7 @@ async function rr(t, e, n) {
|
|
|
8053
8053
|
throw rt(r, e.onSessionExpired), r;
|
|
8054
8054
|
}
|
|
8055
8055
|
}
|
|
8056
|
-
async function
|
|
8056
|
+
async function rr(t, e, n, r) {
|
|
8057
8057
|
try {
|
|
8058
8058
|
const i = await fetch(
|
|
8059
8059
|
`${t.apiUrl}/messenger.Messenger/CreateMessage`,
|
|
@@ -8083,7 +8083,7 @@ async function ir(t, e, n, r) {
|
|
|
8083
8083
|
throw rt(i, e.onSessionExpired), console.error("sendMessage error", i), i;
|
|
8084
8084
|
}
|
|
8085
8085
|
}
|
|
8086
|
-
const pl = [], me =
|
|
8086
|
+
const pl = [], me = Ci((t, e) => ({
|
|
8087
8087
|
currentThreadId: void 0,
|
|
8088
8088
|
currentThreadMessages: [],
|
|
8089
8089
|
threadIds: [],
|
|
@@ -8104,9 +8104,9 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8104
8104
|
t({ config: n, api: r }), await e().actions.fetchInitialThreadStarterMessages(), e().actions.fetchAllThreadStarterMessages();
|
|
8105
8105
|
},
|
|
8106
8106
|
fetchInitialThreadStarterMessages: async () => {
|
|
8107
|
-
const r = (await
|
|
8107
|
+
const r = (await tr(e().config, e().api, {
|
|
8108
8108
|
pageSize: 30
|
|
8109
|
-
})).map((o) => o.id), i = await
|
|
8109
|
+
})).map((o) => o.id), i = await nr(
|
|
8110
8110
|
e().config,
|
|
8111
8111
|
e().api,
|
|
8112
8112
|
r
|
|
@@ -8121,7 +8121,7 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8121
8121
|
const r = [], i = [];
|
|
8122
8122
|
let o = e().threadIds[0];
|
|
8123
8123
|
for (; n === vt; ) {
|
|
8124
|
-
const s = await
|
|
8124
|
+
const s = await tr(e().config, e().api, {
|
|
8125
8125
|
beforeMessageId: o,
|
|
8126
8126
|
pageSize: vt
|
|
8127
8127
|
});
|
|
@@ -8158,7 +8158,7 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8158
8158
|
sendMessage: async (n) => {
|
|
8159
8159
|
t({ sendError: null });
|
|
8160
8160
|
try {
|
|
8161
|
-
const r = await
|
|
8161
|
+
const r = await rr(
|
|
8162
8162
|
e().config,
|
|
8163
8163
|
e().api,
|
|
8164
8164
|
n,
|
|
@@ -8197,7 +8197,7 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8197
8197
|
});
|
|
8198
8198
|
},
|
|
8199
8199
|
fetchThreadMessages: async (n) => {
|
|
8200
|
-
const r = await
|
|
8200
|
+
const r = await nr(
|
|
8201
8201
|
e().config,
|
|
8202
8202
|
e().api,
|
|
8203
8203
|
[n]
|
|
@@ -8217,7 +8217,7 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8217
8217
|
);
|
|
8218
8218
|
},
|
|
8219
8219
|
sendServiceMessage: async (n) => {
|
|
8220
|
-
const r = await
|
|
8220
|
+
const r = await rr(e().config, e().api, n, e().currentThreadId);
|
|
8221
8221
|
t({ currentThreadId: r.id, threadIds: [...e().threadIds, r.id] }), e().actions.addMessage(r), e().actions.updateThreads();
|
|
8222
8222
|
}
|
|
8223
8223
|
}
|
|
@@ -8228,7 +8228,7 @@ const pl = [], me = ki((t, e) => ({
|
|
|
8228
8228
|
}) => {
|
|
8229
8229
|
const [r, i] = B(!1), [o, s] = B(null), [a, c] = B(
|
|
8230
8230
|
() => !e.manualOpen
|
|
8231
|
-
), l = $e(), { sendServiceMessage: d } = Dt(), { sendServiceMessageVoice: u } =
|
|
8231
|
+
), l = $e(), { sendServiceMessage: d } = Dt(), { sendServiceMessageVoice: u } = Tn(), f = F(
|
|
8232
8232
|
(N) => {
|
|
8233
8233
|
i(N), e.manualOpen || c(!N);
|
|
8234
8234
|
},
|
|
@@ -8281,7 +8281,7 @@ function te() {
|
|
|
8281
8281
|
return t;
|
|
8282
8282
|
}
|
|
8283
8283
|
function Sl({ className: t }) {
|
|
8284
|
-
const [e, n] = B(!0), { config: r, api: i, reactionMessage: o } = te(), s = $e(), { networkStatus: a } = Sn(), { initVoiceStore: c, endVoiceSession: l, setMicrophoneEnabled: d } =
|
|
8284
|
+
const [e, n] = B(!0), { config: r, api: i, reactionMessage: o } = te(), s = $e(), { networkStatus: a } = Sn(), { initVoiceStore: c, endVoiceSession: l, setMicrophoneEnabled: d } = Tn(), u = z((_) => _.isVoiceBootstrapped), f = z((_) => _.status), h = z((_) => _.errorMessage), m = z(
|
|
8285
8285
|
(_) => _.customerMessageTranscriptVisible
|
|
8286
8286
|
), g = z(
|
|
8287
8287
|
(_) => _.customerMessageTranscript
|
|
@@ -8319,7 +8319,7 @@ function Sl({ className: t }) {
|
|
|
8319
8319
|
source: Si.ReactionMessage
|
|
8320
8320
|
}
|
|
8321
8321
|
),
|
|
8322
|
-
y && /* @__PURE__ */ v(
|
|
8322
|
+
y && /* @__PURE__ */ v(hi, { className: "mb-8", message: x }),
|
|
8323
8323
|
A && /* @__PURE__ */ v(
|
|
8324
8324
|
Kt,
|
|
8325
8325
|
{
|
|
@@ -8421,7 +8421,7 @@ function Ii(t) {
|
|
|
8421
8421
|
function Ll(t) {
|
|
8422
8422
|
return Ii(t).replace(/"/g, """);
|
|
8423
8423
|
}
|
|
8424
|
-
function
|
|
8424
|
+
function ir(t) {
|
|
8425
8425
|
const e = Object.entries(t || {}).filter(([, n]) => n != null).map(([n, r]) => `${n.split(" ").at(-1)}="${Ll(String(r))}"`).join(" ");
|
|
8426
8426
|
return e ? ` ${e}` : "";
|
|
8427
8427
|
}
|
|
@@ -8449,7 +8449,7 @@ const _l = Ml({
|
|
|
8449
8449
|
listItem: We("li"),
|
|
8450
8450
|
codeBlock: ({ node: t, children: e }) => {
|
|
8451
8451
|
const n = t.attrs?.language, r = typeof n == "string" && n ? { class: `language-${n}` } : void 0;
|
|
8452
|
-
return `<pre><code${
|
|
8452
|
+
return `<pre><code${ir(r)}>${Pe(e)}</code></pre>`;
|
|
8453
8453
|
},
|
|
8454
8454
|
hardBreak: () => "<br>",
|
|
8455
8455
|
horizontalRule: () => "<hr>"
|
|
@@ -8468,7 +8468,7 @@ const _l = Ml({
|
|
|
8468
8468
|
...t.attrs?.class ? { class: String(t.attrs.class) } : {},
|
|
8469
8469
|
...t.attrs?.title ? { title: String(t.attrs.title) } : {}
|
|
8470
8470
|
};
|
|
8471
|
-
return `<a${
|
|
8471
|
+
return `<a${ir(n)}>${Pe(e)}</a>`;
|
|
8472
8472
|
}
|
|
8473
8473
|
},
|
|
8474
8474
|
unhandledNode: () => "",
|
|
@@ -8582,7 +8582,7 @@ function Dl() {
|
|
|
8582
8582
|
}
|
|
8583
8583
|
}, [g, e]);
|
|
8584
8584
|
const T = Je(() => m || (g.some((x) => x.author.type === K.Agent && x.status === fe.Failed) ? Ae.agentResponseFailed : C === re.Unavailable ? Ae.connectionFailed : C === re.Offline ? Ae.offline : null), [m, g, C]);
|
|
8585
|
-
|
|
8585
|
+
dr(() => {
|
|
8586
8586
|
const S = d.current;
|
|
8587
8587
|
if (!(!S || b.current === g.length)) {
|
|
8588
8588
|
if (b.current === 0) {
|
|
@@ -8604,7 +8604,7 @@ function Dl() {
|
|
|
8604
8604
|
style: { maxHeight: l + "px" },
|
|
8605
8605
|
children: /* @__PURE__ */ P("div", { className: "z-1 mt-16 flex flex-1 flex-col gap-4", children: [
|
|
8606
8606
|
g.map((S) => /* @__PURE__ */ v(Ol, { message: S }, S.id)),
|
|
8607
|
-
T && /* @__PURE__ */ v(
|
|
8607
|
+
T && /* @__PURE__ */ v(hi, { message: T, className: "mt-2" })
|
|
8608
8608
|
] })
|
|
8609
8609
|
}
|
|
8610
8610
|
),
|
|
@@ -8896,7 +8896,7 @@ function Xl({
|
|
|
8896
8896
|
}
|
|
8897
8897
|
);
|
|
8898
8898
|
}
|
|
8899
|
-
const Ql = 280, ed = 360, td = 400, Mi = 680,
|
|
8899
|
+
const Ql = 280, ed = 360, td = 400, Mi = 680, or = 6;
|
|
8900
8900
|
function nd() {
|
|
8901
8901
|
const { isMobile: t, setWidgetHeight: e, config: n, api: r, isChromeVisible: i } = te(), { anycableService: o } = Sn(), { handleMessagesAgenticSteps: s, handleMessage: a, initMessageStore: c } = Dt(), l = (u) => {
|
|
8902
8902
|
if (u.event.messageAgenticStepsAppended)
|
|
@@ -8992,7 +8992,7 @@ const rd = function(t) {
|
|
|
8992
8992
|
top: 0,
|
|
8993
8993
|
left: 0,
|
|
8994
8994
|
right: 0,
|
|
8995
|
-
height:
|
|
8995
|
+
height: or
|
|
8996
8996
|
},
|
|
8997
8997
|
onMouseDown: g("top")
|
|
8998
8998
|
}
|
|
@@ -9006,7 +9006,7 @@ const rd = function(t) {
|
|
|
9006
9006
|
top: 0,
|
|
9007
9007
|
left: 0,
|
|
9008
9008
|
bottom: 0,
|
|
9009
|
-
width:
|
|
9009
|
+
width: or
|
|
9010
9010
|
},
|
|
9011
9011
|
onMouseDown: g("left")
|
|
9012
9012
|
}
|
|
@@ -9053,7 +9053,7 @@ const rd = function(t) {
|
|
|
9053
9053
|
}
|
|
9054
9054
|
);
|
|
9055
9055
|
};
|
|
9056
|
-
function
|
|
9056
|
+
function sr({ mode: t }) {
|
|
9057
9057
|
const { config: e } = te();
|
|
9058
9058
|
return /* @__PURE__ */ P(Xt, { children: [
|
|
9059
9059
|
/* @__PURE__ */ P("div", { className: "pointer-events-none absolute h-full w-full", children: [
|
|
@@ -9164,16 +9164,16 @@ const od = function() {
|
|
|
9164
9164
|
_e,
|
|
9165
9165
|
{
|
|
9166
9166
|
path: H.voice,
|
|
9167
|
-
element: /* @__PURE__ */ v(
|
|
9167
|
+
element: /* @__PURE__ */ v(sr, { mode: ke.Voice })
|
|
9168
9168
|
}
|
|
9169
9169
|
),
|
|
9170
|
-
/* @__PURE__ */ v(_e, { path: H.text, element: /* @__PURE__ */ v(
|
|
9170
|
+
/* @__PURE__ */ v(_e, { path: H.text, element: /* @__PURE__ */ v(sr, { mode: ke.Text }) }),
|
|
9171
9171
|
/* @__PURE__ */ v(
|
|
9172
9172
|
_e,
|
|
9173
9173
|
{
|
|
9174
9174
|
path: "/",
|
|
9175
9175
|
element: /* @__PURE__ */ v(
|
|
9176
|
-
|
|
9176
|
+
On,
|
|
9177
9177
|
{
|
|
9178
9178
|
to: t.voiceEnabled ? H.voice : H.text,
|
|
9179
9179
|
replace: !0
|
|
@@ -9186,7 +9186,7 @@ const od = function() {
|
|
|
9186
9186
|
{
|
|
9187
9187
|
path: "*",
|
|
9188
9188
|
element: /* @__PURE__ */ v(
|
|
9189
|
-
|
|
9189
|
+
On,
|
|
9190
9190
|
{
|
|
9191
9191
|
to: t.voiceEnabled ? H.voice : H.text,
|
|
9192
9192
|
replace: !0
|
|
@@ -9283,9 +9283,9 @@ var bd = Object.prototype, vd = bd.toString;
|
|
|
9283
9283
|
function wd(t) {
|
|
9284
9284
|
return vd.call(t);
|
|
9285
9285
|
}
|
|
9286
|
-
var yd = "[object Null]", xd = "[object Undefined]",
|
|
9286
|
+
var yd = "[object Null]", xd = "[object Undefined]", ar = Tt ? Tt.toStringTag : void 0;
|
|
9287
9287
|
function Cd(t) {
|
|
9288
|
-
return t == null ? t === void 0 ? xd : yd :
|
|
9288
|
+
return t == null ? t === void 0 ? xd : yd : ar && ar in Object(t) ? md(t) : wd(t);
|
|
9289
9289
|
}
|
|
9290
9290
|
function kd(t) {
|
|
9291
9291
|
return t != null && typeof t == "object";
|
|
@@ -9308,12 +9308,12 @@ function ln(t) {
|
|
|
9308
9308
|
var e = typeof t;
|
|
9309
9309
|
return t != null && (e == "object" || e == "function");
|
|
9310
9310
|
}
|
|
9311
|
-
var
|
|
9312
|
-
function
|
|
9311
|
+
var cr = NaN, Md = /^[-+]0x[0-9a-f]+$/i, Ld = /^0b[01]+$/i, _d = /^0o[0-7]+$/i, Pd = parseInt;
|
|
9312
|
+
function lr(t) {
|
|
9313
9313
|
if (typeof t == "number")
|
|
9314
9314
|
return t;
|
|
9315
9315
|
if (Sd(t))
|
|
9316
|
-
return
|
|
9316
|
+
return cr;
|
|
9317
9317
|
if (ln(t)) {
|
|
9318
9318
|
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
9319
9319
|
t = ln(e) ? e + "" : e;
|
|
@@ -9322,7 +9322,7 @@ function dr(t) {
|
|
|
9322
9322
|
return t === 0 ? t : +t;
|
|
9323
9323
|
t = Rd(t);
|
|
9324
9324
|
var n = Ld.test(t);
|
|
9325
|
-
return n || _d.test(t) ? Pd(t.slice(2), n ? 2 : 8) : Md.test(t) ?
|
|
9325
|
+
return n || _d.test(t) ? Pd(t.slice(2), n ? 2 : 8) : Md.test(t) ? cr : +t;
|
|
9326
9326
|
}
|
|
9327
9327
|
var Zt = function() {
|
|
9328
9328
|
return Li.Date.now();
|
|
@@ -9331,7 +9331,7 @@ function Dd(t, e, n) {
|
|
|
9331
9331
|
var r, i, o, s, a, c, l = 0, d = !1, u = !1, f = !0;
|
|
9332
9332
|
if (typeof t != "function")
|
|
9333
9333
|
throw new TypeError(Ad);
|
|
9334
|
-
e =
|
|
9334
|
+
e = lr(e) || 0, ln(n) && (d = !0, u = "maxWait" in n, o = u ? Nd(lr(n.maxWait) || 0, e) : o, f = "trailing" in n ? !!n.trailing : f);
|
|
9335
9335
|
function h(x) {
|
|
9336
9336
|
var R = r, y = i;
|
|
9337
9337
|
return r = i = void 0, l = x, s = t.apply(y, R), s;
|
|
@@ -9374,38 +9374,7 @@ function Dd(t, e, n) {
|
|
|
9374
9374
|
}
|
|
9375
9375
|
return S.cancel = T, S.flush = L, S;
|
|
9376
9376
|
}
|
|
9377
|
-
|
|
9378
|
-
console.log("createCustomerInteractionSession", t, e, n, r);
|
|
9379
|
-
const i = {
|
|
9380
|
-
customerId: e,
|
|
9381
|
-
recipient: {
|
|
9382
|
-
type: "PARTICIPANT_TYPE_AGENT",
|
|
9383
|
-
id: t
|
|
9384
|
-
},
|
|
9385
|
-
ttlSeconds: 86400
|
|
9386
|
-
};
|
|
9387
|
-
try {
|
|
9388
|
-
const o = await fetch(
|
|
9389
|
-
`${n}/crm.Crm/CreateCustomerInteractionSession`,
|
|
9390
|
-
{
|
|
9391
|
-
method: "POST",
|
|
9392
|
-
headers: {
|
|
9393
|
-
Authorization: `Bearer ${r}`,
|
|
9394
|
-
"Content-Type": "application/json"
|
|
9395
|
-
},
|
|
9396
|
-
body: JSON.stringify(i)
|
|
9397
|
-
}
|
|
9398
|
-
);
|
|
9399
|
-
if (!o.ok) {
|
|
9400
|
-
const s = await o.text();
|
|
9401
|
-
throw new Error(`Request failed: ${o.status} ${s}`);
|
|
9402
|
-
}
|
|
9403
|
-
return await o.json();
|
|
9404
|
-
} catch (o) {
|
|
9405
|
-
console.error("Request failed:", o);
|
|
9406
|
-
}
|
|
9407
|
-
}
|
|
9408
|
-
class Wd extends EventTarget {
|
|
9377
|
+
class Bd extends EventTarget {
|
|
9409
9378
|
root = null;
|
|
9410
9379
|
shadowRoot;
|
|
9411
9380
|
config;
|
|
@@ -9479,37 +9448,30 @@ class Wd extends EventTarget {
|
|
|
9479
9448
|
]), this.gui.add(n, "sendServiceMessage");
|
|
9480
9449
|
}
|
|
9481
9450
|
async init(e, n) {
|
|
9482
|
-
|
|
9483
|
-
const
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
this.config.apiUrl,
|
|
9487
|
-
el
|
|
9488
|
-
);
|
|
9489
|
-
this.config.customerInteractionSession = r;
|
|
9490
|
-
const o = await (await fetch(`${cn}/manifest.json`)).json();
|
|
9491
|
-
this.resolveAssetPath = (a) => `${cn}/${o[a]}`;
|
|
9492
|
-
const s = {
|
|
9451
|
+
this.config = n;
|
|
9452
|
+
const i = await (await fetch(`${cn}/manifest.json`)).json();
|
|
9453
|
+
this.resolveAssetPath = (s) => `${cn}/${i[s]}`;
|
|
9454
|
+
const o = {
|
|
9493
9455
|
onAvatarReady: this.onAvatarReady,
|
|
9494
9456
|
onSessionExpired: this.onSessionExpired,
|
|
9495
|
-
registerSetOpen: (
|
|
9496
|
-
this.setOpenImpl =
|
|
9457
|
+
registerSetOpen: (s) => {
|
|
9458
|
+
this.setOpenImpl = s;
|
|
9497
9459
|
},
|
|
9498
|
-
registerSendServiceMessage: (
|
|
9499
|
-
this.sendServiceMessageImpl =
|
|
9460
|
+
registerSendServiceMessage: (s) => {
|
|
9461
|
+
this.sendServiceMessageImpl = s;
|
|
9500
9462
|
},
|
|
9501
|
-
registerSendServiceMessageVoice: (
|
|
9502
|
-
this.sendServiceMessageVoiceImpl =
|
|
9463
|
+
registerSendServiceMessageVoice: (s) => {
|
|
9464
|
+
this.sendServiceMessageVoiceImpl = s;
|
|
9503
9465
|
},
|
|
9504
9466
|
resolveAssetPath: this.resolveAssetPath,
|
|
9505
|
-
registerExecuteReaction: (
|
|
9506
|
-
this.executeReactionImpl =
|
|
9467
|
+
registerExecuteReaction: (s) => {
|
|
9468
|
+
this.executeReactionImpl = s;
|
|
9507
9469
|
},
|
|
9508
|
-
registerSetLocale: (
|
|
9509
|
-
this.setLocaleImpl =
|
|
9470
|
+
registerSetLocale: (s) => {
|
|
9471
|
+
this.setLocaleImpl = s;
|
|
9510
9472
|
}
|
|
9511
9473
|
};
|
|
9512
|
-
this.root = dd(e, this.config,
|
|
9474
|
+
this.root = dd(e, this.config, o);
|
|
9513
9475
|
}
|
|
9514
9476
|
onAvatarReady = (e) => {
|
|
9515
9477
|
this.playAnimation = e, this.dispatchEvent(new CustomEvent("avatar_ready")), this.config.debug && this.initGui();
|
|
@@ -9560,5 +9522,5 @@ class Wd extends EventTarget {
|
|
|
9560
9522
|
}
|
|
9561
9523
|
}
|
|
9562
9524
|
export {
|
|
9563
|
-
|
|
9525
|
+
Bd as ChatWidgetInstance
|
|
9564
9526
|
};
|