@tavus/widget 0.19.2 → 0.19.4
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/index.iife.js +9 -9
- package/dist/index.mjs +888 -713
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3048,7 +3048,7 @@ var xn = class extends Error {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
}, Sn = {
|
|
3050
3050
|
name: "@tavus/widget",
|
|
3051
|
-
version: "0.19.
|
|
3051
|
+
version: "0.19.4",
|
|
3052
3052
|
variant: "widget"
|
|
3053
3053
|
}, Cn = /* @__PURE__ */ new Set([
|
|
3054
3054
|
"Error",
|
|
@@ -24911,6 +24911,10 @@ var Vj = {
|
|
|
24911
24911
|
componentOverrides: {}
|
|
24912
24912
|
},
|
|
24913
24913
|
content: { stackedAspect: 16 / 9 },
|
|
24914
|
+
replica: {
|
|
24915
|
+
maxAspect: 16 / 9,
|
|
24916
|
+
landscapeMinAspect: 1
|
|
24917
|
+
},
|
|
24914
24918
|
pip: {
|
|
24915
24919
|
gapPaddingPx: 24,
|
|
24916
24920
|
minWidthPx: 128,
|
|
@@ -25139,6 +25143,81 @@ var Wj = {
|
|
|
25139
25143
|
}
|
|
25140
25144
|
]
|
|
25141
25145
|
},
|
|
25146
|
+
"content-columns-compact": {
|
|
25147
|
+
id: "content-columns-compact",
|
|
25148
|
+
soloVariant: "content-solo",
|
|
25149
|
+
regions: [
|
|
25150
|
+
{
|
|
25151
|
+
name: "replicaColumn",
|
|
25152
|
+
x: { fraction: 0 },
|
|
25153
|
+
y: { fraction: 0 },
|
|
25154
|
+
width: { fraction: 1 / 3 },
|
|
25155
|
+
height: { fraction: 1 },
|
|
25156
|
+
accepts: ["replica", "selfView"],
|
|
25157
|
+
zBase: 0
|
|
25158
|
+
},
|
|
25159
|
+
{
|
|
25160
|
+
name: "contentStage",
|
|
25161
|
+
x: { fraction: 1 / 3 },
|
|
25162
|
+
y: { fraction: 0 },
|
|
25163
|
+
width: { fraction: 2 / 3 },
|
|
25164
|
+
height: { fraction: 1 },
|
|
25165
|
+
accepts: ["content"],
|
|
25166
|
+
zBase: 0
|
|
25167
|
+
},
|
|
25168
|
+
{
|
|
25169
|
+
name: "pip",
|
|
25170
|
+
x: { fraction: .02 },
|
|
25171
|
+
y: { fraction: .76 },
|
|
25172
|
+
width: { fraction: .2 },
|
|
25173
|
+
height: { fraction: .2 },
|
|
25174
|
+
accepts: ["selfView"],
|
|
25175
|
+
zBase: 100
|
|
25176
|
+
}
|
|
25177
|
+
]
|
|
25178
|
+
},
|
|
25179
|
+
"content-sheet-columns": {
|
|
25180
|
+
id: "content-sheet-columns",
|
|
25181
|
+
soloVariant: "content-sheet-solo",
|
|
25182
|
+
regions: [
|
|
25183
|
+
{
|
|
25184
|
+
name: "replicaColumn",
|
|
25185
|
+
x: { fraction: 0 },
|
|
25186
|
+
y: { fraction: 0 },
|
|
25187
|
+
width: { fraction: 1 / 3 },
|
|
25188
|
+
height: { fraction: 1 },
|
|
25189
|
+
accepts: ["replica", "selfView"],
|
|
25190
|
+
zBase: 0
|
|
25191
|
+
},
|
|
25192
|
+
{
|
|
25193
|
+
name: "contentStage",
|
|
25194
|
+
x: { fraction: 1 / 3 },
|
|
25195
|
+
y: { fraction: 0 },
|
|
25196
|
+
width: { fraction: 2 / 3 },
|
|
25197
|
+
height: { fraction: 1 },
|
|
25198
|
+
accepts: ["content"],
|
|
25199
|
+
zBase: 0
|
|
25200
|
+
},
|
|
25201
|
+
{
|
|
25202
|
+
name: "cardSheet",
|
|
25203
|
+
x: { fraction: 1 / 3 },
|
|
25204
|
+
y: { fraction: 0 },
|
|
25205
|
+
width: { fraction: 2 / 3 },
|
|
25206
|
+
height: { fraction: 1 },
|
|
25207
|
+
accepts: ["card"],
|
|
25208
|
+
zBase: 100
|
|
25209
|
+
},
|
|
25210
|
+
{
|
|
25211
|
+
name: "pip",
|
|
25212
|
+
x: { fraction: .02 },
|
|
25213
|
+
y: { fraction: .76 },
|
|
25214
|
+
width: { fraction: .2 },
|
|
25215
|
+
height: { fraction: .2 },
|
|
25216
|
+
accepts: ["selfView"],
|
|
25217
|
+
zBase: 110
|
|
25218
|
+
}
|
|
25219
|
+
]
|
|
25220
|
+
},
|
|
25142
25221
|
"content-stack": {
|
|
25143
25222
|
id: "content-stack",
|
|
25144
25223
|
soloVariant: "content-solo",
|
|
@@ -25364,6 +25443,39 @@ var Wj = {
|
|
|
25364
25443
|
}
|
|
25365
25444
|
]
|
|
25366
25445
|
},
|
|
25446
|
+
"canvas-takeover-columns-compact": {
|
|
25447
|
+
id: "canvas-takeover-columns-compact",
|
|
25448
|
+
soloVariant: "canvas-solo",
|
|
25449
|
+
regions: [
|
|
25450
|
+
{
|
|
25451
|
+
name: "replicaColumn",
|
|
25452
|
+
x: { fraction: 0 },
|
|
25453
|
+
y: { fraction: 0 },
|
|
25454
|
+
width: { fraction: 1 / 3 },
|
|
25455
|
+
height: { fraction: 1 },
|
|
25456
|
+
accepts: ["replica", "selfView"],
|
|
25457
|
+
zBase: 0
|
|
25458
|
+
},
|
|
25459
|
+
{
|
|
25460
|
+
name: "canvasStage",
|
|
25461
|
+
x: { fraction: 1 / 3 },
|
|
25462
|
+
y: { fraction: 0 },
|
|
25463
|
+
width: { fraction: 2 / 3 },
|
|
25464
|
+
height: { fraction: 1 },
|
|
25465
|
+
accepts: ["card"],
|
|
25466
|
+
zBase: 0
|
|
25467
|
+
},
|
|
25468
|
+
{
|
|
25469
|
+
name: "pip",
|
|
25470
|
+
x: { fraction: .02 },
|
|
25471
|
+
y: { fraction: .78 },
|
|
25472
|
+
width: { fraction: .18 },
|
|
25473
|
+
height: { fraction: .18 },
|
|
25474
|
+
accepts: ["selfView"],
|
|
25475
|
+
zBase: 100
|
|
25476
|
+
}
|
|
25477
|
+
]
|
|
25478
|
+
},
|
|
25367
25479
|
"canvas-takeover-strip": {
|
|
25368
25480
|
id: "canvas-takeover-strip",
|
|
25369
25481
|
soloVariant: "canvas-solo",
|
|
@@ -25592,7 +25704,7 @@ var Wj = {
|
|
|
25592
25704
|
"content-focus": {
|
|
25593
25705
|
compact: {
|
|
25594
25706
|
stacked: "content-stack-compact",
|
|
25595
|
-
"side-by-side": "content-
|
|
25707
|
+
"side-by-side": "content-columns-compact"
|
|
25596
25708
|
},
|
|
25597
25709
|
medium: {
|
|
25598
25710
|
stacked: "content-stack",
|
|
@@ -25606,7 +25718,7 @@ var Wj = {
|
|
|
25606
25718
|
"content-plus-canvas": {
|
|
25607
25719
|
compact: {
|
|
25608
25720
|
stacked: "content-sheet-compact",
|
|
25609
|
-
"side-by-side": "content-sheet-
|
|
25721
|
+
"side-by-side": "content-sheet-columns"
|
|
25610
25722
|
},
|
|
25611
25723
|
medium: {
|
|
25612
25724
|
stacked: "content-stack-canvas",
|
|
@@ -25620,7 +25732,7 @@ var Wj = {
|
|
|
25620
25732
|
"canvas-dominant": {
|
|
25621
25733
|
compact: {
|
|
25622
25734
|
stacked: "canvas-takeover-strip",
|
|
25623
|
-
"side-by-side": "canvas-takeover-
|
|
25735
|
+
"side-by-side": "canvas-takeover-columns-compact"
|
|
25624
25736
|
},
|
|
25625
25737
|
medium: {
|
|
25626
25738
|
stacked: "canvas-takeover-strip",
|
|
@@ -25845,21 +25957,28 @@ function lM(e, t) {
|
|
|
25845
25957
|
};
|
|
25846
25958
|
}
|
|
25847
25959
|
function uM(e, t, n) {
|
|
25848
|
-
|
|
25960
|
+
let r = Math.round(e.rail.widthPx);
|
|
25961
|
+
return n > 0 ? Math.max(0, r - lM(e, t).cardsPad) : r;
|
|
25849
25962
|
}
|
|
25850
25963
|
function dM(e, t, n) {
|
|
25964
|
+
return e === "canvas-dominant" && t.width === "compact" ? n.eviction.compactTakeoverMaxCards : n.eviction.maxVisibleCards;
|
|
25965
|
+
}
|
|
25966
|
+
function fM(e, t, n) {
|
|
25851
25967
|
let r = [...e].sort((e, t) => e.dispatchSeq - t.dispatchSeq), i = Math.floor(t);
|
|
25852
25968
|
return r.length <= i ? r : n === "evict-newest" ? r.slice(0, i) : r.slice(r.length - i);
|
|
25853
25969
|
}
|
|
25854
|
-
function
|
|
25855
|
-
let o =
|
|
25970
|
+
function pM(e, t, n, r, i, a) {
|
|
25971
|
+
let o = lM(n, r).cardsPad, { left: s, right: c } = i ?? {
|
|
25972
|
+
left: o,
|
|
25973
|
+
right: o
|
|
25974
|
+
}, l = Math.round(a ?? n.rail.widthPx), u = Math.max(1, Math.min(t - s - c, l - s - c));
|
|
25856
25975
|
return {
|
|
25857
|
-
innerW:
|
|
25976
|
+
innerW: u,
|
|
25858
25977
|
entries: e.map((e) => {
|
|
25859
25978
|
let t = eM(e.component, {
|
|
25860
25979
|
...e.contentOpts,
|
|
25861
25980
|
naturalHeightPx: e.naturalHeightPx,
|
|
25862
|
-
widthPx:
|
|
25981
|
+
widthPx: u,
|
|
25863
25982
|
coldDefaultHeightPx: n.card.coldDefaultHeightPx
|
|
25864
25983
|
}, n.card.componentOverrides);
|
|
25865
25984
|
return {
|
|
@@ -25870,14 +25989,22 @@ function fM(e, t, n, r, i, a) {
|
|
|
25870
25989
|
})
|
|
25871
25990
|
};
|
|
25872
25991
|
}
|
|
25873
|
-
|
|
25992
|
+
var mM = (e) => e.accepts.includes("replica") && e.accepts.includes("selfView");
|
|
25993
|
+
function hM(e, t, n, r, i) {
|
|
25994
|
+
let a = (e, t) => Math.abs(e - t) <= 1, o = e.x + e.width, s = (e, r, i) => n > 0 && a(e, r) || t.some((t) => mM(t.region) && a(i(t.rect), e));
|
|
25995
|
+
return {
|
|
25996
|
+
left: s(e.x, n, (e) => e.x + e.width) ? 0 : i,
|
|
25997
|
+
right: s(o, r - n, (e) => e.x) ? 0 : i
|
|
25998
|
+
};
|
|
25999
|
+
}
|
|
26000
|
+
function gM(e, t) {
|
|
25874
26001
|
return "fraction" in e ? e.fraction * t : e.px >= 0 ? e.px : t + e.px;
|
|
25875
26002
|
}
|
|
25876
|
-
function
|
|
26003
|
+
function _M(e, t, n, r) {
|
|
25877
26004
|
return e.name !== "rail" || "fraction" in t ? t : r === "width" ? { px: n.rail.widthPx } : { px: t.px < 0 ? -n.rail.widthPx : t.px };
|
|
25878
26005
|
}
|
|
25879
|
-
function
|
|
25880
|
-
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) =>
|
|
26006
|
+
function vM(e, t, n, r, i, a) {
|
|
26007
|
+
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) => gM(n === "x" ? e.x : e.y, o) - gM(n === "x" ? t.x : t.y, o)), c = s.map((e) => n === "x" ? _M(e, e.width, r, "width") : e.height), l = 0, u = 0;
|
|
25881
26008
|
for (let e of c) "px" in e ? l += e.px : u += e.fraction;
|
|
25882
26009
|
let d = Math.max(0, o - l), f = c.map((e) => "px" in e ? e.px : u > 0 ? e.fraction / u * d : 0);
|
|
25883
26010
|
if (n === "y" && i !== void 0) {
|
|
@@ -25910,25 +26037,29 @@ function hM(e, t, n, r, i, a) {
|
|
|
25910
26037
|
let _ = [0], v = 0;
|
|
25911
26038
|
for (let e of f) v += e, _.push(cM(Math.round(v), 0, o));
|
|
25912
26039
|
return s.map((e, r) => {
|
|
25913
|
-
let i = _[r] ?? 0,
|
|
26040
|
+
let i = _[r] ?? 0, o = _[r + 1] ?? i;
|
|
26041
|
+
if (n === "y" && a !== void 0 && e.accepts.includes("replica")) {
|
|
26042
|
+
let e = r > 0 ? a.replicaGapPx : 0, t = r < s.length - 1 ? a.replicaGapPx : 0;
|
|
26043
|
+
o - i - e - t >= 48 && (i += e, o -= t);
|
|
26044
|
+
}
|
|
25914
26045
|
return {
|
|
25915
26046
|
region: e,
|
|
25916
26047
|
rect: n === "x" ? {
|
|
25917
26048
|
x: i,
|
|
25918
26049
|
y: 0,
|
|
25919
|
-
width:
|
|
26050
|
+
width: o - i,
|
|
25920
26051
|
height: t.height
|
|
25921
26052
|
} : {
|
|
25922
26053
|
x: 0,
|
|
25923
26054
|
y: i,
|
|
25924
26055
|
width: t.width,
|
|
25925
|
-
height:
|
|
26056
|
+
height: o - i
|
|
25926
26057
|
}
|
|
25927
26058
|
};
|
|
25928
26059
|
});
|
|
25929
26060
|
}
|
|
25930
|
-
function
|
|
25931
|
-
let r = t.width, i = t.height, a =
|
|
26061
|
+
function yM(e, t, n) {
|
|
26062
|
+
let r = t.width, i = t.height, a = _M(e, e.width, n, "width"), o = _M(e, e.x, n, "x"), s = cM(Math.round(gM(o, r)), 0, r), c = cM(Math.round(gM(e.y, i)), 0, i);
|
|
25932
26063
|
return {
|
|
25933
26064
|
x: s,
|
|
25934
26065
|
y: c,
|
|
@@ -25936,37 +26067,43 @@ function gM(e, t, n) {
|
|
|
25936
26067
|
height: cM(Math.round("fraction" in e.height ? e.height.fraction * i : e.height.px), 0, i - c)
|
|
25937
26068
|
};
|
|
25938
26069
|
}
|
|
25939
|
-
function
|
|
26070
|
+
function bM(e, t, n, r, i) {
|
|
25940
26071
|
let a = e.regions.filter((e) => e.zBase < 100), o = (e) => "fraction" in e && e.fraction === 1;
|
|
25941
|
-
return a.length > 1 && a.every((e) => o(e.height)) ?
|
|
26072
|
+
return a.length > 1 && a.every((e) => o(e.height)) ? vM(a, t, "x", n) : a.length > 1 && a.every((e) => o(e.width)) ? vM(a, t, "y", n, r, i) : a.map((e) => ({
|
|
25942
26073
|
region: e,
|
|
25943
|
-
rect:
|
|
26074
|
+
rect: yM(e, t, n)
|
|
25944
26075
|
}));
|
|
25945
26076
|
}
|
|
25946
|
-
function
|
|
26077
|
+
function xM(e, t, n, r, i, a, o, s, c, l, u) {
|
|
25947
26078
|
if (n !== null) return;
|
|
25948
26079
|
let d = e.regions.filter((e) => e.zBase < 100);
|
|
25949
26080
|
if (!(d.length > 1 && d.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
25950
26081
|
let f = d.find((e) => e.accepts.includes("card") && "fraction" in e.height);
|
|
25951
26082
|
if (f === void 0 || r.cards.length === 0) return;
|
|
25952
|
-
let { innerW: p, entries: m } = fM(
|
|
26083
|
+
let { innerW: p, entries: m } = pM(fM(r.cards, u, c.eviction.policy), i.width, c, l, s > 0 ? {
|
|
26084
|
+
left: 0,
|
|
26085
|
+
right: 0
|
|
26086
|
+
} : void 0, c.card.stackMaxWidthPx), h = m.reduce((e, t) => t.constraints.minWidthPx > p ? e : Math.max(e, t.clampedHeightPx), 0), { cardsPad: g } = lM(c, l), _ = gM(f.y, i.height), v = d.every((e) => gM(e.y, i.height) <= _) ? Math.max(0, o - s) : 0, y = h > 0;
|
|
25953
26087
|
return {
|
|
25954
26088
|
neededPx: h + 2 * g + v,
|
|
25955
26089
|
capPx: Math.round(c.card.stackBandMaxFraction * a.height),
|
|
25956
26090
|
...y && { shrinkToContent: y }
|
|
25957
26091
|
};
|
|
25958
26092
|
}
|
|
25959
|
-
function
|
|
26093
|
+
function SM(e, t, n, r, i) {
|
|
25960
26094
|
if (t === null) return;
|
|
25961
|
-
let
|
|
25962
|
-
if (!(
|
|
25963
|
-
let
|
|
25964
|
-
if (!
|
|
25965
|
-
let
|
|
25966
|
-
if (!(!Number.isFinite(
|
|
25967
|
-
|
|
25968
|
-
|
|
25969
|
-
|
|
26095
|
+
let a = e.regions.filter((e) => e.zBase < 100);
|
|
26096
|
+
if (!(a.length > 1 && a.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
26097
|
+
let o = a.some((e) => e.accepts.includes("content") && "fraction" in e.height), s = a.some((e) => e.accepts.includes("replica") && "fraction" in e.height);
|
|
26098
|
+
if (!o || !s) return;
|
|
26099
|
+
let c = i.content.stackedAspect;
|
|
26100
|
+
if (!(!Number.isFinite(c) || c <= 0)) return {
|
|
26101
|
+
maxPx: Math.round(n.width / c),
|
|
26102
|
+
replicaGapPx: r
|
|
26103
|
+
};
|
|
26104
|
+
}
|
|
26105
|
+
var CM = "bottom-left";
|
|
26106
|
+
function wM(e, t, n) {
|
|
25970
26107
|
let r = e.statusStrip;
|
|
25971
26108
|
if (r === void 0) return null;
|
|
25972
26109
|
let i = cM(Math.round(r.heightPx ?? 48), 0, 160), a = e.callControlsRect, o = Math.min(Math.max(Math.round(a?.width ?? 0), 448), t.width - 32);
|
|
@@ -25979,12 +26116,12 @@ function xM(e, t, n) {
|
|
|
25979
26116
|
height: i
|
|
25980
26117
|
};
|
|
25981
26118
|
}
|
|
25982
|
-
function
|
|
26119
|
+
function TM(e, t, n, r, i, a) {
|
|
25983
26120
|
return e.x < 0 || e.width <= 0 || e.height <= 0 || e.x + e.width > n.width || e.y + e.height > n.height || e.y < 48 ? !1 : t.every((e) => r && e.region.accepts.includes("content") ? e.rect.height >= 48 : i && e.region.accepts.includes("card") ? e.rect.height >= a.card.reportedHeightFloorPx : !0);
|
|
25984
26121
|
}
|
|
25985
|
-
var
|
|
25986
|
-
function
|
|
25987
|
-
return t === null || !
|
|
26122
|
+
var EM = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x;
|
|
26123
|
+
function DM(e, t, n) {
|
|
26124
|
+
return t === null || !EM(e.rect, t) ? e : {
|
|
25988
26125
|
...e,
|
|
25989
26126
|
rect: {
|
|
25990
26127
|
...e.rect,
|
|
@@ -25992,7 +26129,7 @@ function wM(e, t, n) {
|
|
|
25992
26129
|
}
|
|
25993
26130
|
};
|
|
25994
26131
|
}
|
|
25995
|
-
function
|
|
26132
|
+
function OM(e, t, n, r, i) {
|
|
25996
26133
|
let a = t.endsWith("right") ? e.x + e.width - n - r : e.x + n, o = t.startsWith("bottom") ? e.y + e.height - n - i : e.y + n;
|
|
25997
26134
|
return {
|
|
25998
26135
|
x: Math.round(a),
|
|
@@ -26001,20 +26138,40 @@ function TM(e, t, n, r, i) {
|
|
|
26001
26138
|
height: i
|
|
26002
26139
|
};
|
|
26003
26140
|
}
|
|
26004
|
-
function
|
|
26141
|
+
function kM(e, t, n) {
|
|
26142
|
+
let { maxAspect: r, landscapeMinAspect: i } = n.replica;
|
|
26143
|
+
if (e.width - e.height * r > 1) {
|
|
26144
|
+
let t = Math.max(Math.min(48, e.width), Math.round(e.height * r));
|
|
26145
|
+
return {
|
|
26146
|
+
...e,
|
|
26147
|
+
x: e.x + Math.round((e.width - t) / 2),
|
|
26148
|
+
width: t
|
|
26149
|
+
};
|
|
26150
|
+
}
|
|
26151
|
+
if (t && e.height - e.width / i > 1) {
|
|
26152
|
+
let t = Math.max(Math.min(48, e.height), Math.round(e.width / i));
|
|
26153
|
+
return {
|
|
26154
|
+
...e,
|
|
26155
|
+
y: e.y + Math.round((e.height - t) / 2),
|
|
26156
|
+
height: t
|
|
26157
|
+
};
|
|
26158
|
+
}
|
|
26159
|
+
return e;
|
|
26160
|
+
}
|
|
26161
|
+
function AM(e, t, n, r) {
|
|
26005
26162
|
let i = Math.max(n.pip.minWidthPx, Math.round(e.width * .25)), a = r ? e.height - t : Math.round((e.height - t) * 16 / 9), o = Math.min(i, e.width - t, a), s = r ? o : Math.round(o * 9 / 16);
|
|
26006
26163
|
return o < n.pip.minWidthPx || o <= 0 || s <= 0 ? null : {
|
|
26007
26164
|
w: o,
|
|
26008
26165
|
h: s
|
|
26009
26166
|
};
|
|
26010
26167
|
}
|
|
26011
|
-
function
|
|
26168
|
+
function jM(e, t, n) {
|
|
26012
26169
|
return t === null || !aM(e, t) ? e : {
|
|
26013
26170
|
...e,
|
|
26014
26171
|
y: Math.round(t.y) - n - e.height
|
|
26015
26172
|
};
|
|
26016
26173
|
}
|
|
26017
|
-
function
|
|
26174
|
+
function MM(e) {
|
|
26018
26175
|
if (typeof e != "object" || !e) return !1;
|
|
26019
26176
|
let t = e;
|
|
26020
26177
|
return [
|
|
@@ -26024,17 +26181,17 @@ function OM(e) {
|
|
|
26024
26181
|
"height"
|
|
26025
26182
|
].every((e) => typeof t[e] == "number" && Number.isFinite(t[e]));
|
|
26026
26183
|
}
|
|
26027
|
-
function
|
|
26184
|
+
function NM(e, t, n) {
|
|
26028
26185
|
let r = e;
|
|
26029
|
-
for (let e of t.filter(
|
|
26186
|
+
for (let e of t.filter(MM).sort((e, t) => t.y - e.y)) r = jM(r, e, n);
|
|
26030
26187
|
return r;
|
|
26031
26188
|
}
|
|
26032
|
-
function
|
|
26189
|
+
function PM(e, t, n) {
|
|
26033
26190
|
if (t <= 0) return e;
|
|
26034
26191
|
let r = Math.min(t, e.length);
|
|
26035
26192
|
return n === "evict-newest" ? e.slice(0, e.length - r) : e.slice(r);
|
|
26036
26193
|
}
|
|
26037
|
-
function
|
|
26194
|
+
function FM(e, t, n, r, i, a) {
|
|
26038
26195
|
let o = n.callControls === !0 ? Math.round(a.insets.callControlsBottomPx) : 0, s = i.height - o, c = n.selfView && n.prefs.hideSelfView !== !0, l = n.replica || c, u = e.regions.some((e) => e.zBase < 100 && e.accepts.includes("card")), d = +!!l + (t.contentKind === null ? 0 : 1) + (n.cards.length > 0 && u ? 1 : 0) >= 2 ? lM(a, r.width).surfacePad : 0, f = {
|
|
26039
26196
|
width: Math.max(0, i.width - 2 * d),
|
|
26040
26197
|
height: Math.max(0, i.height - 2 * d)
|
|
@@ -26043,56 +26200,65 @@ function jM(e, t, n, r, i, a) {
|
|
|
26043
26200
|
y: s,
|
|
26044
26201
|
width: i.width,
|
|
26045
26202
|
height: o
|
|
26046
|
-
} : null), m =
|
|
26203
|
+
} : null), m = xM(e, t.state, t.contentKind, n, f, i, o, d, a, r.width, dM(t.state, r, a)), h = SM(e, t.contentKind, f, d, a), g = bM(e, f, {
|
|
26204
|
+
...a,
|
|
26205
|
+
rail: {
|
|
26206
|
+
...a.rail,
|
|
26207
|
+
widthPx: uM(a, r.width, d)
|
|
26208
|
+
}
|
|
26209
|
+
}, m, h).map((e) => ({
|
|
26047
26210
|
...e,
|
|
26048
26211
|
rect: {
|
|
26049
26212
|
...e.rect,
|
|
26050
26213
|
x: e.rect.x + d,
|
|
26051
26214
|
y: e.rect.y + d
|
|
26052
26215
|
}
|
|
26053
|
-
})),
|
|
26216
|
+
})), _ = t.contentKind !== null, v = (e) => g.map((t) => {
|
|
26054
26217
|
let n = t.region.accepts.includes("card");
|
|
26055
|
-
if (!n && !(
|
|
26056
|
-
let r = n ?
|
|
26057
|
-
return e === null ? r :
|
|
26058
|
-
}),
|
|
26059
|
-
return
|
|
26060
|
-
regions:
|
|
26218
|
+
if (!n && !(_ && t.region.accepts.includes("content"))) return t;
|
|
26219
|
+
let r = n ? DM(t, p, s) : t;
|
|
26220
|
+
return e === null ? r : DM(r, e, e.y - 8);
|
|
26221
|
+
}), y = wM(n, i, s), b = v(y);
|
|
26222
|
+
return y !== null && !TM(y, b, i, _, n.cards.length > 0, a) && (y = null, b = v(null)), {
|
|
26223
|
+
regions: b,
|
|
26061
26224
|
surfacePad: d,
|
|
26062
26225
|
controlsInset: o,
|
|
26063
26226
|
bandTopY: s,
|
|
26064
|
-
statusStrip:
|
|
26227
|
+
statusStrip: y
|
|
26065
26228
|
};
|
|
26066
26229
|
}
|
|
26067
|
-
function
|
|
26068
|
-
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u, statusStrip: d } =
|
|
26069
|
-
|
|
26230
|
+
function IM(e, t, n, r, i, a) {
|
|
26231
|
+
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u, statusStrip: d } = FM(t, e, n, r, i, a), f = n.statusStrip !== void 0, p = s.find((e) => e.region.accepts.includes("replica")), m = s.find((e) => e.region.accepts.includes("content")), h = s.find((e) => e.region.accepts.includes("card")), g = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("selfView")), _ = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("card")), v = Math.round(a.rail.gutterPx), y = Math.round(a.pip.gapPaddingPx), b = (r.composition ?? Uj({
|
|
26232
|
+
widthPx: i.width,
|
|
26233
|
+
heightPx: i.height
|
|
26234
|
+
}, a).composition) === "side-by-side", x = [...n.cards].sort((e, t) => e.dispatchSeq - t.dispatchSeq), S = dM(e.state, r, a), C = h ? fM(n.cards, S, a.eviction.policy) : _ === void 0 ? [] : fM(n.cards, 1, a.eviction.policy), w = (S) => {
|
|
26235
|
+
let w = {
|
|
26070
26236
|
evictedCardIds: [],
|
|
26071
26237
|
selfViewDropped: !1,
|
|
26072
26238
|
replicaCollapsed: !1,
|
|
26073
26239
|
...f && { statusStripDropped: d === null }
|
|
26074
|
-
},
|
|
26075
|
-
if (p &&
|
|
26076
|
-
let e = p.rect, t = o && !
|
|
26077
|
-
o &&
|
|
26078
|
-
let r = +!!n.replica + +!!t,
|
|
26079
|
-
|
|
26080
|
-
let
|
|
26240
|
+
}, T = [], E = null, D = !1, ee = p !== void 0 && p.region.accepts.includes("selfView");
|
|
26241
|
+
if (p && ee && (n.replica || o)) {
|
|
26242
|
+
let e = p.rect, t = o && !S.selfViewDropped;
|
|
26243
|
+
o && S.selfViewDropped && (w.selfViewDropped = !0);
|
|
26244
|
+
let r = +!!n.replica + +!!t, s = Math.round(a.insets.participantsPadPx), l = e.x <= c + 1 ? 0 : s, u = e.x + e.width >= i.width - c - 1 ? 0 : s, d = Math.max(1, e.width - l - u), f = d, m = Math.round(f * 9 / 16), h = (e) => r * e + (r - 1) * s;
|
|
26245
|
+
h(m) > e.height && (m = Math.max(1, Math.floor((e.height - (r - 1) * s) / r)), f = Math.min(d, Math.round(m * 16 / 9))), m = Math.max(m, Math.min(48, e.height)), f = Math.max(f, Math.min(48, e.width));
|
|
26246
|
+
let g = e.x + l + Math.round((d - f) / 2), _ = e.y + Math.round((e.height - h(m)) / 2);
|
|
26081
26247
|
if (n.replica) {
|
|
26082
26248
|
let e = {
|
|
26083
|
-
x:
|
|
26084
|
-
y:
|
|
26085
|
-
width:
|
|
26086
|
-
height:
|
|
26249
|
+
x: g,
|
|
26250
|
+
y: _,
|
|
26251
|
+
width: f,
|
|
26252
|
+
height: m
|
|
26087
26253
|
};
|
|
26088
|
-
if (
|
|
26089
|
-
let t = Math.min(
|
|
26254
|
+
if (S.replicaCollapsed) {
|
|
26255
|
+
let t = Math.min(m, Math.max(64, Math.round(m * .25)));
|
|
26090
26256
|
e = {
|
|
26091
26257
|
...e,
|
|
26092
26258
|
height: t
|
|
26093
|
-
},
|
|
26259
|
+
}, w.replicaCollapsed = !0;
|
|
26094
26260
|
}
|
|
26095
|
-
|
|
26261
|
+
e = kM(e, b, a), E = {
|
|
26096
26262
|
id: "replica",
|
|
26097
26263
|
kind: "replica",
|
|
26098
26264
|
rect: e,
|
|
@@ -26100,31 +26266,32 @@ function MM(e, t, n, r, i, a) {
|
|
|
26100
26266
|
order: p.region.zBase,
|
|
26101
26267
|
fit: { kind: "natural" },
|
|
26102
26268
|
region: p.region.name
|
|
26103
|
-
},
|
|
26269
|
+
}, T.push(E), _ += m + s;
|
|
26104
26270
|
}
|
|
26105
|
-
t && (
|
|
26271
|
+
t && (T.push({
|
|
26106
26272
|
id: "selfView",
|
|
26107
26273
|
kind: "selfView",
|
|
26108
26274
|
rect: {
|
|
26109
|
-
x:
|
|
26110
|
-
y:
|
|
26111
|
-
width:
|
|
26112
|
-
height:
|
|
26275
|
+
x: g,
|
|
26276
|
+
y: _,
|
|
26277
|
+
width: f,
|
|
26278
|
+
height: m
|
|
26113
26279
|
},
|
|
26114
26280
|
layer: "grid",
|
|
26115
26281
|
order: p.region.zBase,
|
|
26116
26282
|
fit: { kind: "natural" },
|
|
26117
26283
|
region: p.region.name
|
|
26118
|
-
}),
|
|
26284
|
+
}), D = !0);
|
|
26119
26285
|
} else if (p && (n.replica || o)) {
|
|
26120
26286
|
let e = !n.replica, t = p.rect;
|
|
26121
|
-
if (!e &&
|
|
26287
|
+
if (!e && S.replicaCollapsed) {
|
|
26122
26288
|
let e = Math.min(t.height, Math.max(64, Math.round(t.height * .25)));
|
|
26123
26289
|
t = {
|
|
26124
26290
|
...t,
|
|
26125
26291
|
height: e
|
|
26126
|
-
},
|
|
26292
|
+
}, w.replicaCollapsed = !0;
|
|
26127
26293
|
}
|
|
26294
|
+
e || (t = kM(t, b, a));
|
|
26128
26295
|
let r = {
|
|
26129
26296
|
id: e ? "selfView" : "replica",
|
|
26130
26297
|
kind: e ? "selfView" : "replica",
|
|
@@ -26134,9 +26301,9 @@ function MM(e, t, n, r, i, a) {
|
|
|
26134
26301
|
fit: { kind: "natural" },
|
|
26135
26302
|
region: p.region.name
|
|
26136
26303
|
};
|
|
26137
|
-
|
|
26304
|
+
T.push(r), e ? D = !0 : E = r;
|
|
26138
26305
|
}
|
|
26139
|
-
e.contentKind !== null && m &&
|
|
26306
|
+
e.contentKind !== null && m && T.push({
|
|
26140
26307
|
id: "content",
|
|
26141
26308
|
kind: "content",
|
|
26142
26309
|
rect: m.rect,
|
|
@@ -26145,51 +26312,51 @@ function MM(e, t, n, r, i, a) {
|
|
|
26145
26312
|
fit: { kind: "natural" },
|
|
26146
26313
|
region: m.region.name
|
|
26147
26314
|
});
|
|
26148
|
-
let
|
|
26149
|
-
if (
|
|
26150
|
-
let
|
|
26151
|
-
if (
|
|
26315
|
+
let O = PM(C, S.extraEvictions, a.eviction.policy), te = new Set(O.map((e) => e.id));
|
|
26316
|
+
if (w.evictedCardIds = x.filter((e) => !te.has(e.id)).map((e) => e.id), h && O.length > 0) {
|
|
26317
|
+
let n = h.rect, o = t.regions.filter((e) => e.zBase < 100), l = o.length > 1 && o.every((e) => "fraction" in e.width && e.width.fraction === 1), u = hM(n, s, c, i.width, lM(a, r.width).cardsPad), { innerW: d, entries: f } = pM(O, n.width, a, r.width, u, l || e.state === "canvas-dominant" && o.length > 1 ? a.card.stackMaxWidthPx : uM(a, r.width, c)), p = n.x + u.left + Math.round((n.width - u.left - u.right - d) / 2), m = n.height - v * (f.length - 1), g = f.reduce((e, t) => e + t.clampedHeightPx, 0), _;
|
|
26318
|
+
if (g <= m) _ = f.map((e) => e.clampedHeightPx);
|
|
26152
26319
|
else {
|
|
26153
|
-
let e =
|
|
26154
|
-
|
|
26155
|
-
let t =
|
|
26320
|
+
let e = m > 0 ? m / g : 0;
|
|
26321
|
+
_ = f.map((t) => Math.max(a.card.reportedHeightFloorPx, Math.floor(t.clampedHeightPx * e)));
|
|
26322
|
+
let t = _.reduce((e, t) => e + t, 0) - Math.max(0, m);
|
|
26156
26323
|
for (; t > 0;) {
|
|
26157
26324
|
let e = -1;
|
|
26158
|
-
for (let t = 0; t <
|
|
26159
|
-
let n =
|
|
26160
|
-
n > a.card.reportedHeightFloorPx && (e === -1 || n > (
|
|
26325
|
+
for (let t = 0; t < _.length; t++) {
|
|
26326
|
+
let n = _[t] ?? 0;
|
|
26327
|
+
n > a.card.reportedHeightFloorPx && (e === -1 || n > (_[e] ?? 0)) && (e = t);
|
|
26161
26328
|
}
|
|
26162
26329
|
if (e === -1) break;
|
|
26163
|
-
|
|
26330
|
+
_[e] = (_[e] ?? 0) - 1, --t;
|
|
26164
26331
|
}
|
|
26165
26332
|
}
|
|
26166
|
-
let
|
|
26167
|
-
|
|
26168
|
-
let r = Math.min(
|
|
26169
|
-
|
|
26170
|
-
id:
|
|
26333
|
+
let y = _.reduce((e, t) => e + t, 0) + v * (f.length - 1), b = n.y + Math.max(0, Math.round((n.height - y) / 2));
|
|
26334
|
+
f.forEach((e, t) => {
|
|
26335
|
+
let r = Math.min(b, n.y + n.height), i = Math.max(0, Math.min(_[t] ?? 0, n.y + n.height - r)), o = iM(e.clampedHeightPx, i, a), s = e.constraints.hardMinHeightPx;
|
|
26336
|
+
s !== void 0 && i < s && o.kind !== "scroll" && (o = { kind: "scroll" }), T.push({
|
|
26337
|
+
id: e.card.id,
|
|
26171
26338
|
kind: "card",
|
|
26172
|
-
component:
|
|
26173
|
-
cardSizeClass:
|
|
26339
|
+
component: e.card.component,
|
|
26340
|
+
cardSizeClass: e.constraints.sizeClass,
|
|
26174
26341
|
rect: {
|
|
26175
|
-
x:
|
|
26342
|
+
x: p,
|
|
26176
26343
|
y: r,
|
|
26177
|
-
width:
|
|
26344
|
+
width: d,
|
|
26178
26345
|
height: i
|
|
26179
26346
|
},
|
|
26180
26347
|
layer: "grid",
|
|
26181
|
-
order: h.region.zBase +
|
|
26182
|
-
fit:
|
|
26348
|
+
order: h.region.zBase + t,
|
|
26349
|
+
fit: o,
|
|
26183
26350
|
region: h.region.name
|
|
26184
|
-
}),
|
|
26351
|
+
}), b = r + i + v;
|
|
26185
26352
|
});
|
|
26186
26353
|
}
|
|
26187
|
-
let
|
|
26188
|
-
if (h === void 0 && _ !== void 0 &&
|
|
26354
|
+
let k = null;
|
|
26355
|
+
if (h === void 0 && _ !== void 0 && O.length > 0) {
|
|
26189
26356
|
let e = {
|
|
26190
26357
|
width: Math.max(0, i.width - 2 * c),
|
|
26191
26358
|
height: Math.max(0, i.height - 2 * c)
|
|
26192
|
-
}, t =
|
|
26359
|
+
}, t = yM(_, e, a), o = _.sheetAnchor === "bottom", s = lM(a, r.width).cardsPad, l = o ? Math.min(u, n.callControlsRect?.y ?? u) - s : u, f = t.x + c, p = d !== null && EM({
|
|
26193
26360
|
...t,
|
|
26194
26361
|
x: f
|
|
26195
26362
|
}, d) ? d.y - 8 : l, m = Math.min(l, p), h = {
|
|
@@ -26197,12 +26364,18 @@ function MM(e, t, n, r, i, a) {
|
|
|
26197
26364
|
y: t.y + c,
|
|
26198
26365
|
width: t.width,
|
|
26199
26366
|
height: Math.max(0, Math.min(t.height, m - (t.y + c)))
|
|
26200
|
-
}, { innerW: g, entries: v } =
|
|
26367
|
+
}, { innerW: g, entries: v } = pM(O, h.width, a, r.width, o ? {
|
|
26368
|
+
left: s,
|
|
26369
|
+
right: s
|
|
26370
|
+
} : {
|
|
26371
|
+
left: 0,
|
|
26372
|
+
right: 0
|
|
26373
|
+
}, a.card.stackMaxWidthPx), y = v[0];
|
|
26201
26374
|
if (y !== void 0) {
|
|
26202
26375
|
let e = h.x + Math.round((h.width - g) / 2), t = Math.max(0, Math.min(y.clampedHeightPx, h.height)), n = iM(y.clampedHeightPx, t, a);
|
|
26203
26376
|
o && y.constraints.naturalHeightPx > t && (n = { kind: "scroll" });
|
|
26204
26377
|
let r = y.constraints.hardMinHeightPx;
|
|
26205
|
-
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }),
|
|
26378
|
+
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }), k = {
|
|
26206
26379
|
id: y.card.id,
|
|
26207
26380
|
kind: "card",
|
|
26208
26381
|
component: y.card.component,
|
|
@@ -26219,26 +26392,26 @@ function MM(e, t, n, r, i, a) {
|
|
|
26219
26392
|
region: _.name,
|
|
26220
26393
|
sheet: !0,
|
|
26221
26394
|
...o && { sheetAnchor: "bottom" }
|
|
26222
|
-
},
|
|
26395
|
+
}, T.push(k);
|
|
26223
26396
|
}
|
|
26224
26397
|
}
|
|
26225
|
-
if (!
|
|
26226
|
-
if (o &&
|
|
26398
|
+
if (!D) {
|
|
26399
|
+
if (o && S.selfViewDropped) w.selfViewDropped = !0;
|
|
26227
26400
|
else if (o) {
|
|
26228
|
-
let t = e.suppressedPrefs.includes("pipCorner") ?
|
|
26401
|
+
let t = e.suppressedPrefs.includes("pipCorner") ? CM : n.prefs.pipCorner ?? "bottom-left", o = n.callControlsVisible === !1 ? null : n.callControlsRect ?? (l > 0 ? {
|
|
26229
26402
|
x: 0,
|
|
26230
26403
|
y: u,
|
|
26231
26404
|
width: i.width,
|
|
26232
26405
|
height: l
|
|
26233
26406
|
} : null), s = [
|
|
26234
26407
|
...o === null ? [] : [o],
|
|
26235
|
-
...
|
|
26408
|
+
...k === null ? [] : [k.rect],
|
|
26236
26409
|
...d === null ? [] : [d],
|
|
26237
26410
|
...n.chromeObstacles ?? []
|
|
26238
26411
|
];
|
|
26239
|
-
if (
|
|
26240
|
-
let e =
|
|
26241
|
-
o !== null && c && l <= a.pip.maxAreaRatio ?
|
|
26412
|
+
if (E) {
|
|
26413
|
+
let e = E.rect, n = AM(e, y, a, r.width === "compact"), i = n === null ? null : OM(e, t, y, n.w, n.h), o = i === null ? null : NM(i, s, y), c = n !== null && o !== null && o.y >= e.y && n.w + y <= e.width && n.h + y <= e.height, l = n !== null && e.width > 0 && e.height > 0 ? n.w * n.h / (e.width * e.height) : Infinity;
|
|
26414
|
+
o !== null && c && l <= a.pip.maxAreaRatio ? T.push({
|
|
26242
26415
|
id: "selfView",
|
|
26243
26416
|
kind: "selfView",
|
|
26244
26417
|
rect: o,
|
|
@@ -26246,15 +26419,15 @@ function MM(e, t, n, r, i, a) {
|
|
|
26246
26419
|
order: g?.zBase ?? 100,
|
|
26247
26420
|
fit: { kind: "natural" },
|
|
26248
26421
|
region: g?.name ?? "pip"
|
|
26249
|
-
}) :
|
|
26422
|
+
}) : w.selfViewDropped = !0;
|
|
26250
26423
|
} else {
|
|
26251
26424
|
let e = a.pip.minWidthPx, n = r.width === "compact" ? e : Math.round(e * 9 / 16), o = {
|
|
26252
26425
|
x: 0,
|
|
26253
26426
|
y: 0,
|
|
26254
26427
|
width: i.width,
|
|
26255
26428
|
height: i.height
|
|
26256
|
-
}, c =
|
|
26257
|
-
l && !u ?
|
|
26429
|
+
}, c = NM(OM(o, t, y, e, n), s, y), l = c.y >= 0 && e + y <= o.width && n + y <= o.height, u = T.some((e) => (e.kind === "content" || e.kind === "card") && aM(e.rect, c));
|
|
26430
|
+
l && !u ? T.push({
|
|
26258
26431
|
id: "selfView",
|
|
26259
26432
|
kind: "selfView",
|
|
26260
26433
|
rect: c,
|
|
@@ -26262,45 +26435,45 @@ function MM(e, t, n, r, i, a) {
|
|
|
26262
26435
|
order: g?.zBase ?? 100,
|
|
26263
26436
|
fit: { kind: "natural" },
|
|
26264
26437
|
region: g?.name ?? "pip"
|
|
26265
|
-
}) :
|
|
26438
|
+
}) : w.selfViewDropped = !0;
|
|
26266
26439
|
}
|
|
26267
26440
|
}
|
|
26268
26441
|
}
|
|
26269
26442
|
return {
|
|
26270
|
-
tiles:
|
|
26271
|
-
degradations:
|
|
26443
|
+
tiles: T,
|
|
26444
|
+
degradations: w,
|
|
26272
26445
|
statusStrip: d
|
|
26273
26446
|
};
|
|
26274
|
-
},
|
|
26447
|
+
}, T = {
|
|
26275
26448
|
extraEvictions: 0,
|
|
26276
26449
|
selfViewDropped: !1,
|
|
26277
26450
|
replicaCollapsed: !1
|
|
26278
|
-
},
|
|
26451
|
+
}, E = w(T), D = sM(E.tiles, i, a, d);
|
|
26279
26452
|
for (let e of a.degradationLadder) {
|
|
26280
|
-
if (
|
|
26281
|
-
if (e === "evict-cards") for (;
|
|
26282
|
-
...
|
|
26283
|
-
extraEvictions:
|
|
26284
|
-
},
|
|
26285
|
-
else e === "drop-self-view" ?
|
|
26286
|
-
...
|
|
26453
|
+
if (D.length === 0) break;
|
|
26454
|
+
if (e === "evict-cards") for (; D.length > 0 && T.extraEvictions < C.length;) T = {
|
|
26455
|
+
...T,
|
|
26456
|
+
extraEvictions: T.extraEvictions + 1
|
|
26457
|
+
}, E = w(T), D = sM(E.tiles, i, a, d);
|
|
26458
|
+
else e === "drop-self-view" ? E.tiles.some((e) => e.kind === "selfView") && (T = {
|
|
26459
|
+
...T,
|
|
26287
26460
|
selfViewDropped: !0
|
|
26288
|
-
},
|
|
26289
|
-
...
|
|
26461
|
+
}, E = w(T), D = sM(E.tiles, i, a, d)) : e === "collapse-replica" && !T.replicaCollapsed && E.tiles.some((e) => e.kind === "replica") && (T = {
|
|
26462
|
+
...T,
|
|
26290
26463
|
replicaCollapsed: !0
|
|
26291
|
-
},
|
|
26464
|
+
}, E = w(T), D = sM(E.tiles, i, a, d));
|
|
26292
26465
|
}
|
|
26293
|
-
return
|
|
26466
|
+
return E;
|
|
26294
26467
|
}
|
|
26295
26468
|
//#endregion
|
|
26296
26469
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/resolveCore.js
|
|
26297
|
-
function
|
|
26470
|
+
function LM(e) {
|
|
26298
26471
|
if (e !== void 0 && e.length !== 0) return {
|
|
26299
26472
|
...Wj,
|
|
26300
26473
|
...Object.fromEntries(e.map((e) => [e.id, e]))
|
|
26301
26474
|
};
|
|
26302
26475
|
}
|
|
26303
|
-
function
|
|
26476
|
+
function RM(e, t, n, r) {
|
|
26304
26477
|
let i = e.callControlsRect, a = i === void 0 ? e : {
|
|
26305
26478
|
...e,
|
|
26306
26479
|
callControlsRect: {
|
|
@@ -26312,7 +26485,7 @@ function PM(e, t, n, r) {
|
|
|
26312
26485
|
}, o = {
|
|
26313
26486
|
width: Math.max(0, Math.round(a.container.widthPx)),
|
|
26314
26487
|
height: Math.max(0, Math.round(a.container.heightPx))
|
|
26315
|
-
}, s = Jj(a, t, n), c = a.replica || a.selfView && a.prefs.hideSelfView !== !0, l = qj(s.state, t,
|
|
26488
|
+
}, s = Jj(a, t, n), c = a.replica || a.selfView && a.prefs.hideSelfView !== !0, l = qj(s.state, t, LM(r?.templates), void 0, c, a.kioskMode === !0), { tiles: u, degradations: d, statusStrip: f } = IM(s, l, a, t, o, n);
|
|
26316
26489
|
return {
|
|
26317
26490
|
state: s.state,
|
|
26318
26491
|
sizeClass: t,
|
|
@@ -26326,32 +26499,32 @@ function PM(e, t, n, r) {
|
|
|
26326
26499
|
}
|
|
26327
26500
|
//#endregion
|
|
26328
26501
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/transitions.js
|
|
26329
|
-
var
|
|
26502
|
+
var zM = {
|
|
26330
26503
|
compact: 0,
|
|
26331
26504
|
medium: 1,
|
|
26332
26505
|
expanded: 2
|
|
26333
26506
|
};
|
|
26334
|
-
function
|
|
26507
|
+
function BM(e, t) {
|
|
26335
26508
|
return e.width === t.width && e.height === t.height && e.composition === t.composition;
|
|
26336
26509
|
}
|
|
26337
|
-
function
|
|
26510
|
+
function VM(e, t, n, r, i) {
|
|
26338
26511
|
let a = e.committedClass;
|
|
26339
26512
|
if (a === null || a.composition === void 0) return {
|
|
26340
26513
|
committedClass: t,
|
|
26341
26514
|
pendingClass: null,
|
|
26342
26515
|
pendingSinceMs: null
|
|
26343
26516
|
};
|
|
26344
|
-
if (
|
|
26517
|
+
if (BM(t, a)) return {
|
|
26345
26518
|
committedClass: a,
|
|
26346
26519
|
pendingClass: null,
|
|
26347
26520
|
pendingSinceMs: null
|
|
26348
26521
|
};
|
|
26349
|
-
let o = Math.abs(
|
|
26522
|
+
let o = Math.abs(zM[t.width] - zM[a.width]), s = e.lastResolution?.containerPx;
|
|
26350
26523
|
return o > 1 || s === void 0 || Math.max(Math.abs(Math.round(n.widthPx) - s.width), Math.abs(Math.round(n.heightPx) - s.height)) >= i.hysteresis.decisiveJumpPxDelta ? {
|
|
26351
26524
|
committedClass: t,
|
|
26352
26525
|
pendingClass: null,
|
|
26353
26526
|
pendingSinceMs: null
|
|
26354
|
-
} : e.pendingClass !== null && e.pendingSinceMs !== null &&
|
|
26527
|
+
} : e.pendingClass !== null && e.pendingSinceMs !== null && BM(e.pendingClass, t) ? r - e.pendingSinceMs >= i.hysteresis.windowMs ? {
|
|
26355
26528
|
committedClass: t,
|
|
26356
26529
|
pendingClass: null,
|
|
26357
26530
|
pendingSinceMs: null
|
|
@@ -26365,15 +26538,15 @@ function LM(e, t, n, r, i) {
|
|
|
26365
26538
|
pendingSinceMs: r
|
|
26366
26539
|
};
|
|
26367
26540
|
}
|
|
26368
|
-
var
|
|
26369
|
-
function
|
|
26541
|
+
var HM = (e, t) => e < t ? -1 : +(e > t);
|
|
26542
|
+
function UM(e, t) {
|
|
26370
26543
|
let n = new Map((e?.tiles ?? []).map((e) => [e.id, e])), r = new Map(t.tiles.map((e) => [e.id, e])), i = [];
|
|
26371
|
-
for (let e of [...n.keys()].sort(
|
|
26544
|
+
for (let e of [...n.keys()].sort(HM)) r.has(e) || i.push({
|
|
26372
26545
|
type: "exit",
|
|
26373
26546
|
tileId: e
|
|
26374
26547
|
});
|
|
26375
26548
|
let a = [], o = [], s = [];
|
|
26376
|
-
for (let e of [...r.keys()].sort(
|
|
26549
|
+
for (let e of [...r.keys()].sort(HM)) {
|
|
26377
26550
|
let t = n.get(e);
|
|
26378
26551
|
if (t === void 0) {
|
|
26379
26552
|
a.push({
|
|
@@ -26415,11 +26588,11 @@ function zM(e, t) {
|
|
|
26415
26588
|
...s
|
|
26416
26589
|
];
|
|
26417
26590
|
}
|
|
26418
|
-
function
|
|
26419
|
-
let a =
|
|
26591
|
+
function WM(e, t, n, r, i) {
|
|
26592
|
+
let a = VM(e, Uj(t.container, r), t.container, n, r), o = RM(t, a.committedClass, r, i);
|
|
26420
26593
|
return {
|
|
26421
26594
|
resolution: o,
|
|
26422
|
-
transitions:
|
|
26595
|
+
transitions: UM(e.lastResolution, o),
|
|
26423
26596
|
nextState: {
|
|
26424
26597
|
committedClass: a.committedClass,
|
|
26425
26598
|
pendingClass: a.pendingClass,
|
|
@@ -26430,26 +26603,26 @@ function BM(e, t, n, r, i) {
|
|
|
26430
26603
|
}
|
|
26431
26604
|
//#endregion
|
|
26432
26605
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/index.js
|
|
26433
|
-
var
|
|
26606
|
+
var GM = "0.1.16", KM = Vj, qM = (() => {
|
|
26434
26607
|
try {
|
|
26435
26608
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_enabled") === "1";
|
|
26436
26609
|
} catch {
|
|
26437
26610
|
return !1;
|
|
26438
26611
|
}
|
|
26439
|
-
})(),
|
|
26612
|
+
})(), JM = (() => {
|
|
26440
26613
|
try {
|
|
26441
26614
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_debug") === "1";
|
|
26442
26615
|
} catch {
|
|
26443
26616
|
return !1;
|
|
26444
26617
|
}
|
|
26445
26618
|
})();
|
|
26446
|
-
function
|
|
26447
|
-
return
|
|
26619
|
+
function YM(e, t) {
|
|
26620
|
+
return qM || e === !0 || t === !0;
|
|
26448
26621
|
}
|
|
26449
|
-
function
|
|
26622
|
+
function XM(e = globalThis.location?.search ?? "") {
|
|
26450
26623
|
return new URLSearchParams(e).get("kiosk") === "1";
|
|
26451
26624
|
}
|
|
26452
|
-
function
|
|
26625
|
+
function ZM({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, statusStripId: s, statusStripHeightPx: c, reportedHeights: l }) {
|
|
26453
26626
|
return {
|
|
26454
26627
|
kioskMode: e,
|
|
26455
26628
|
container: {
|
|
@@ -26476,15 +26649,15 @@ function qM({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26476
26649
|
} }
|
|
26477
26650
|
};
|
|
26478
26651
|
}
|
|
26479
|
-
var
|
|
26480
|
-
function
|
|
26481
|
-
|
|
26652
|
+
var QM = 16, $M = 200, eN = Et(null);
|
|
26653
|
+
function tN(e) {
|
|
26654
|
+
eN.peek() === null && (console.error("Magic Grid engine error; rendering the legacy layout.", e), eN.value = (e instanceof Error ? `${e.name}: ${e.message}` : String(e)).slice(0, $M));
|
|
26482
26655
|
}
|
|
26483
|
-
function
|
|
26484
|
-
|
|
26656
|
+
function nN() {
|
|
26657
|
+
eN.peek() !== null && (eN.value = null);
|
|
26485
26658
|
}
|
|
26486
|
-
function
|
|
26487
|
-
let u = P(
|
|
26659
|
+
function rN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, statusStripId: s, statusStripHeightPx: c, enabled: l }) {
|
|
26660
|
+
let u = P(KM), d = P(null), [f, p] = M({}), [m, h] = M(null), g = I((e, t) => {
|
|
26488
26661
|
l && p((n) => n[e] === t ? n : {
|
|
26489
26662
|
...n,
|
|
26490
26663
|
[e]: t
|
|
@@ -26497,7 +26670,7 @@ function $M({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26497
26670
|
return Object.keys(r).length === Object.keys(e).length ? e : r;
|
|
26498
26671
|
});
|
|
26499
26672
|
}, [t]);
|
|
26500
|
-
let _ = F(() =>
|
|
26673
|
+
let _ = F(() => ZM({
|
|
26501
26674
|
kioskMode: e,
|
|
26502
26675
|
instances: t,
|
|
26503
26676
|
viewport: n,
|
|
@@ -26521,20 +26694,20 @@ function $M({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26521
26694
|
f
|
|
26522
26695
|
]);
|
|
26523
26696
|
return N(() => {
|
|
26524
|
-
if (!l ||
|
|
26697
|
+
if (!l || eN.peek() !== null) return;
|
|
26525
26698
|
d.current === null && (d.current = Date.now());
|
|
26526
26699
|
let e = null, t = () => {
|
|
26527
|
-
if (e = null,
|
|
26700
|
+
if (e = null, eN.peek() !== null) return;
|
|
26528
26701
|
let n = Date.now() - (d.current ?? 0), r;
|
|
26529
26702
|
try {
|
|
26530
|
-
r =
|
|
26703
|
+
r = WM(u.current, _, n, Hj);
|
|
26531
26704
|
} catch (e) {
|
|
26532
|
-
|
|
26705
|
+
tN(e);
|
|
26533
26706
|
return;
|
|
26534
26707
|
}
|
|
26535
26708
|
if (u.current = r.nextState, h(r), r.nextState.pendingClass !== null) {
|
|
26536
26709
|
let i = r.nextState.pendingSinceMs === null ? 0 : Math.max(0, n - r.nextState.pendingSinceMs);
|
|
26537
|
-
e = setTimeout(t, Math.max(
|
|
26710
|
+
e = setTimeout(t, Math.max(QM, Hj.hysteresis.windowMs - i + QM));
|
|
26538
26711
|
}
|
|
26539
26712
|
};
|
|
26540
26713
|
return t(), () => {
|
|
@@ -26548,18 +26721,18 @@ function $M({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26548
26721
|
recordNaturalHeight: g
|
|
26549
26722
|
};
|
|
26550
26723
|
}
|
|
26551
|
-
function
|
|
26724
|
+
function iN(e) {
|
|
26552
26725
|
return e.kind === "card" && e.sheet === !0 && e.sheetAnchor === "bottom";
|
|
26553
26726
|
}
|
|
26554
|
-
function
|
|
26555
|
-
return n ? e === null ? "no-presence" : t.hasPersonaVideo ? e.degradations.evictedCardIds.length > 0 ? "card-dropped" : e.tiles.some((e) => e.kind === "card" && e.fit.kind === "scroll" && !
|
|
26727
|
+
function aN(e, t, n) {
|
|
26728
|
+
return n ? e === null ? "no-presence" : t.hasPersonaVideo ? e.degradations.evictedCardIds.length > 0 ? "card-dropped" : e.tiles.some((e) => e.kind === "card" && e.fit.kind === "scroll" && !iN(e)) ? "card-overflow" : e.degradations.statusStripDropped === !0 ? "status-strip-dropped" : null : "no-persona-video" : "flag-off";
|
|
26556
26729
|
}
|
|
26557
|
-
function
|
|
26730
|
+
function oN(e, t) {
|
|
26558
26731
|
if (t !== null || e === null) return null;
|
|
26559
|
-
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0 && !
|
|
26732
|
+
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0 && !iN(e));
|
|
26560
26733
|
return n === void 0 ? null : n.rect.y + n.rect.height;
|
|
26561
26734
|
}
|
|
26562
|
-
var
|
|
26735
|
+
var sN = {
|
|
26563
26736
|
driving: !1,
|
|
26564
26737
|
containerPx: null,
|
|
26565
26738
|
replica: null,
|
|
@@ -26567,10 +26740,10 @@ var rN = {
|
|
|
26567
26740
|
content: null,
|
|
26568
26741
|
replicaCollapsed: !1
|
|
26569
26742
|
};
|
|
26570
|
-
function
|
|
26571
|
-
if (e === null) return
|
|
26743
|
+
function cN(e, t, n) {
|
|
26744
|
+
if (e === null) return sN;
|
|
26572
26745
|
let r = t === null;
|
|
26573
|
-
if (!r && !(t === "no-persona-video" && n)) return
|
|
26746
|
+
if (!r && !(t === "no-persona-video" && n)) return sN;
|
|
26574
26747
|
let i = (t) => e.tiles.find((e) => e.kind === t)?.rect ?? null;
|
|
26575
26748
|
return {
|
|
26576
26749
|
driving: r,
|
|
@@ -26581,34 +26754,34 @@ function iN(e, t, n) {
|
|
|
26581
26754
|
replicaCollapsed: r ? e.degradations.replicaCollapsed : !1
|
|
26582
26755
|
};
|
|
26583
26756
|
}
|
|
26584
|
-
function
|
|
26757
|
+
function lN(e) {
|
|
26585
26758
|
return e.selfView === null ? e.driving ? "hidden" : "legacy" : "engine";
|
|
26586
26759
|
}
|
|
26587
|
-
function
|
|
26760
|
+
function uN(e, t) {
|
|
26588
26761
|
return e.containerPx === null || t.containerPx === null ? !1 : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
26589
26762
|
}
|
|
26590
26763
|
//#endregion
|
|
26591
26764
|
//#region ../core/src/magic-canvas/grid-composition.ts
|
|
26592
|
-
function
|
|
26765
|
+
function dN(e) {
|
|
26593
26766
|
let t = "composition" in e ? e.composition : void 0;
|
|
26594
26767
|
return t === "stacked" || t === "side-by-side" ? t : void 0;
|
|
26595
26768
|
}
|
|
26596
26769
|
//#endregion
|
|
26597
26770
|
//#region ../core/src/magic-canvas/grid-telemetry.ts
|
|
26598
|
-
var
|
|
26599
|
-
function
|
|
26771
|
+
var fN = "conversation.grid_status", pN = 6e4;
|
|
26772
|
+
function mN(e, t, n) {
|
|
26600
26773
|
return n ? e && t ? "url+config+start" : e ? "url+start" : t ? "config+start" : "start" : e && t ? "both" : e ? "url" : "config";
|
|
26601
26774
|
}
|
|
26602
|
-
function
|
|
26775
|
+
function hN(e, t) {
|
|
26603
26776
|
return {
|
|
26604
26777
|
message_type: "conversation",
|
|
26605
|
-
event_type:
|
|
26778
|
+
event_type: fN,
|
|
26606
26779
|
conversation_id: e,
|
|
26607
26780
|
properties: t
|
|
26608
26781
|
};
|
|
26609
26782
|
}
|
|
26610
|
-
function
|
|
26611
|
-
let t =
|
|
26783
|
+
function gN(e) {
|
|
26784
|
+
let t = dN(e.sizeClass);
|
|
26612
26785
|
return {
|
|
26613
26786
|
template_id: e.templateId,
|
|
26614
26787
|
size_class: `${e.sizeClass.width}/${e.sizeClass.height}`,
|
|
@@ -26620,8 +26793,8 @@ function fN(e) {
|
|
|
26620
26793
|
cards: e.tiles.filter((e) => e.kind === "card").length
|
|
26621
26794
|
};
|
|
26622
26795
|
}
|
|
26623
|
-
function
|
|
26624
|
-
let { send: t, enabledVia: n, engineVersion: r =
|
|
26796
|
+
function _N(e) {
|
|
26797
|
+
let { send: t, enabledVia: n, engineVersion: r = GM, now: i = Date.now, transitionDebounceMs: a = 500, summaryIntervalMs: o = pN } = e, s = i(), c = !1, l = !1, u, d = null, f = null, p = !1, m = null, h = 0, g = 0, _ = {}, v = null, y = (e) => {
|
|
26625
26798
|
try {
|
|
26626
26799
|
t(e);
|
|
26627
26800
|
} catch {}
|
|
@@ -26658,7 +26831,7 @@ function pN(e) {
|
|
|
26658
26831
|
return {
|
|
26659
26832
|
update(e, t) {
|
|
26660
26833
|
if (c) return;
|
|
26661
|
-
t !== null && (v =
|
|
26834
|
+
t !== null && (v = gN(t));
|
|
26662
26835
|
let n = f === null ? u : d;
|
|
26663
26836
|
(n === void 0 || e !== n) && (d = e, f !== null && clearTimeout(f), f = setTimeout(() => x(e), a));
|
|
26664
26837
|
},
|
|
@@ -26673,7 +26846,7 @@ function pN(e) {
|
|
|
26673
26846
|
}
|
|
26674
26847
|
};
|
|
26675
26848
|
}
|
|
26676
|
-
function
|
|
26849
|
+
function vN({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i }) {
|
|
26677
26850
|
let a = zf(), o = Bf(), s = L(qm), c = P({
|
|
26678
26851
|
daily: a,
|
|
26679
26852
|
meetingState: o,
|
|
@@ -26687,7 +26860,7 @@ function mN({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
26687
26860
|
let l = P(null);
|
|
26688
26861
|
N(() => {
|
|
26689
26862
|
if (!e) return;
|
|
26690
|
-
let n =
|
|
26863
|
+
let n = _N({
|
|
26691
26864
|
enabledVia: t,
|
|
26692
26865
|
send: (e) => {
|
|
26693
26866
|
try {
|
|
@@ -26695,7 +26868,7 @@ function mN({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
26695
26868
|
if (!t.daily || t.meetingState !== "joined-meeting") return;
|
|
26696
26869
|
let n = t.conversation?.session.peek()?.conversationId;
|
|
26697
26870
|
if (!n) return;
|
|
26698
|
-
t.daily.sendAppMessage(
|
|
26871
|
+
t.daily.sendAppMessage(hN(n, e), "*");
|
|
26699
26872
|
} catch {}
|
|
26700
26873
|
}
|
|
26701
26874
|
});
|
|
@@ -26710,100 +26883,100 @@ function mN({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
26710
26883
|
}
|
|
26711
26884
|
//#endregion
|
|
26712
26885
|
//#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
26713
|
-
var
|
|
26886
|
+
var yN = (e, t) => {
|
|
26714
26887
|
let n = Array(e.length + t.length);
|
|
26715
26888
|
for (let t = 0; t < e.length; t++) n[t] = e[t];
|
|
26716
26889
|
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
|
|
26717
26890
|
return n;
|
|
26718
|
-
},
|
|
26891
|
+
}, bN = (e, t) => ({
|
|
26719
26892
|
classGroupId: e,
|
|
26720
26893
|
validator: t
|
|
26721
|
-
}),
|
|
26894
|
+
}), xN = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
26722
26895
|
nextPart: e,
|
|
26723
26896
|
validators: t,
|
|
26724
26897
|
classGroupId: n
|
|
26725
|
-
}),
|
|
26726
|
-
let t =
|
|
26898
|
+
}), SN = "-", CN = [], wN = "arbitrary..", TN = (e) => {
|
|
26899
|
+
let t = ON(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
26727
26900
|
return {
|
|
26728
26901
|
getClassGroupId: (e) => {
|
|
26729
|
-
if (e.startsWith("[") && e.endsWith("]")) return
|
|
26730
|
-
let n = e.split(
|
|
26731
|
-
return
|
|
26902
|
+
if (e.startsWith("[") && e.endsWith("]")) return DN(e);
|
|
26903
|
+
let n = e.split(SN);
|
|
26904
|
+
return EN(n, +(n[0] === "" && n.length > 1), t);
|
|
26732
26905
|
},
|
|
26733
26906
|
getConflictingClassGroupIds: (e, t) => {
|
|
26734
26907
|
if (t) {
|
|
26735
26908
|
let t = r[e], i = n[e];
|
|
26736
|
-
return t ? i ?
|
|
26909
|
+
return t ? i ? yN(i, t) : t : i || CN;
|
|
26737
26910
|
}
|
|
26738
|
-
return n[e] ||
|
|
26911
|
+
return n[e] || CN;
|
|
26739
26912
|
}
|
|
26740
26913
|
};
|
|
26741
|
-
},
|
|
26914
|
+
}, EN = (e, t, n) => {
|
|
26742
26915
|
if (e.length - t === 0) return n.classGroupId;
|
|
26743
26916
|
let r = e[t], i = n.nextPart.get(r);
|
|
26744
26917
|
if (i) {
|
|
26745
|
-
let n =
|
|
26918
|
+
let n = EN(e, t + 1, i);
|
|
26746
26919
|
if (n) return n;
|
|
26747
26920
|
}
|
|
26748
26921
|
let a = n.validators;
|
|
26749
26922
|
if (a === null) return;
|
|
26750
|
-
let o = t === 0 ? e.join(
|
|
26923
|
+
let o = t === 0 ? e.join(SN) : e.slice(t).join(SN), s = a.length;
|
|
26751
26924
|
for (let e = 0; e < s; e++) {
|
|
26752
26925
|
let t = a[e];
|
|
26753
26926
|
if (t.validator(o)) return t.classGroupId;
|
|
26754
26927
|
}
|
|
26755
|
-
},
|
|
26928
|
+
}, DN = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
26756
26929
|
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
|
|
26757
|
-
return r ?
|
|
26758
|
-
})(),
|
|
26930
|
+
return r ? wN + r : void 0;
|
|
26931
|
+
})(), ON = (e) => {
|
|
26759
26932
|
let { theme: t, classGroups: n } = e;
|
|
26760
|
-
return
|
|
26761
|
-
},
|
|
26762
|
-
let n =
|
|
26933
|
+
return kN(n, t);
|
|
26934
|
+
}, kN = (e, t) => {
|
|
26935
|
+
let n = xN();
|
|
26763
26936
|
for (let r in e) {
|
|
26764
26937
|
let i = e[r];
|
|
26765
|
-
|
|
26938
|
+
AN(i, n, r, t);
|
|
26766
26939
|
}
|
|
26767
26940
|
return n;
|
|
26768
|
-
},
|
|
26941
|
+
}, AN = (e, t, n, r) => {
|
|
26769
26942
|
let i = e.length;
|
|
26770
26943
|
for (let a = 0; a < i; a++) {
|
|
26771
26944
|
let i = e[a];
|
|
26772
|
-
|
|
26945
|
+
jN(i, t, n, r);
|
|
26773
26946
|
}
|
|
26774
|
-
},
|
|
26947
|
+
}, jN = (e, t, n, r) => {
|
|
26775
26948
|
if (typeof e == "string") {
|
|
26776
|
-
|
|
26949
|
+
MN(e, t, n);
|
|
26777
26950
|
return;
|
|
26778
26951
|
}
|
|
26779
26952
|
if (typeof e == "function") {
|
|
26780
|
-
|
|
26953
|
+
NN(e, t, n, r);
|
|
26781
26954
|
return;
|
|
26782
26955
|
}
|
|
26783
|
-
|
|
26784
|
-
},
|
|
26785
|
-
let r = e === "" ? t :
|
|
26956
|
+
PN(e, t, n, r);
|
|
26957
|
+
}, MN = (e, t, n) => {
|
|
26958
|
+
let r = e === "" ? t : FN(t, e);
|
|
26786
26959
|
r.classGroupId = n;
|
|
26787
|
-
},
|
|
26788
|
-
if (
|
|
26789
|
-
|
|
26960
|
+
}, NN = (e, t, n, r) => {
|
|
26961
|
+
if (IN(e)) {
|
|
26962
|
+
AN(e(r), t, n, r);
|
|
26790
26963
|
return;
|
|
26791
26964
|
}
|
|
26792
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
26793
|
-
},
|
|
26965
|
+
t.validators === null && (t.validators = []), t.validators.push(bN(n, e));
|
|
26966
|
+
}, PN = (e, t, n, r) => {
|
|
26794
26967
|
let i = Object.entries(e), a = i.length;
|
|
26795
26968
|
for (let e = 0; e < a; e++) {
|
|
26796
26969
|
let [a, o] = i[e];
|
|
26797
|
-
|
|
26970
|
+
AN(o, FN(t, a), n, r);
|
|
26798
26971
|
}
|
|
26799
|
-
},
|
|
26800
|
-
let n = e, r = t.split(
|
|
26972
|
+
}, FN = (e, t) => {
|
|
26973
|
+
let n = e, r = t.split(SN), i = r.length;
|
|
26801
26974
|
for (let e = 0; e < i; e++) {
|
|
26802
26975
|
let t = r[e], i = n.nextPart.get(t);
|
|
26803
|
-
i || (i =
|
|
26976
|
+
i || (i = xN(), n.nextPart.set(t, i)), n = i;
|
|
26804
26977
|
}
|
|
26805
26978
|
return n;
|
|
26806
|
-
},
|
|
26979
|
+
}, IN = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, LN = (e) => {
|
|
26807
26980
|
if (e < 1) return {
|
|
26808
26981
|
get: () => void 0,
|
|
26809
26982
|
set: () => {}
|
|
@@ -26821,19 +26994,19 @@ var hN = (e, t) => {
|
|
|
26821
26994
|
e in n ? n[e] = t : i(e, t);
|
|
26822
26995
|
}
|
|
26823
26996
|
};
|
|
26824
|
-
},
|
|
26997
|
+
}, RN = "!", zN = ":", BN = [], VN = (e, t, n, r, i) => ({
|
|
26825
26998
|
modifiers: e,
|
|
26826
26999
|
hasImportantModifier: t,
|
|
26827
27000
|
baseClassName: n,
|
|
26828
27001
|
maybePostfixModifierPosition: r,
|
|
26829
27002
|
isExternal: i
|
|
26830
|
-
}),
|
|
27003
|
+
}), HN = (e) => {
|
|
26831
27004
|
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
26832
27005
|
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
|
|
26833
27006
|
for (let s = 0; s < o; s++) {
|
|
26834
27007
|
let o = e[s];
|
|
26835
27008
|
if (n === 0 && r === 0) {
|
|
26836
|
-
if (o ===
|
|
27009
|
+
if (o === zN) {
|
|
26837
27010
|
t.push(e.slice(i, s)), i = s + 1;
|
|
26838
27011
|
continue;
|
|
26839
27012
|
}
|
|
@@ -26845,13 +27018,13 @@ var hN = (e, t) => {
|
|
|
26845
27018
|
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
|
|
26846
27019
|
}
|
|
26847
27020
|
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
|
|
26848
|
-
s.endsWith(
|
|
27021
|
+
s.endsWith(RN) ? (c = s.slice(0, -1), l = !0) : s.startsWith(RN) && (c = s.slice(1), l = !0);
|
|
26849
27022
|
let u = a && a > i ? a - i : void 0;
|
|
26850
|
-
return
|
|
27023
|
+
return VN(t, l, c, u);
|
|
26851
27024
|
};
|
|
26852
27025
|
if (t) {
|
|
26853
|
-
let e = t +
|
|
26854
|
-
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) :
|
|
27026
|
+
let e = t + zN, n = r;
|
|
27027
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : VN(BN, !1, t, void 0, !0);
|
|
26855
27028
|
}
|
|
26856
27029
|
if (n) {
|
|
26857
27030
|
let e = r;
|
|
@@ -26861,7 +27034,7 @@ var hN = (e, t) => {
|
|
|
26861
27034
|
});
|
|
26862
27035
|
}
|
|
26863
27036
|
return r;
|
|
26864
|
-
},
|
|
27037
|
+
}, UN = (e) => {
|
|
26865
27038
|
let t = /* @__PURE__ */ new Map();
|
|
26866
27039
|
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
26867
27040
|
t.set(e, 1e6 + n);
|
|
@@ -26873,18 +27046,18 @@ var hN = (e, t) => {
|
|
|
26873
27046
|
}
|
|
26874
27047
|
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
26875
27048
|
};
|
|
26876
|
-
},
|
|
26877
|
-
cache:
|
|
26878
|
-
parseClassName:
|
|
26879
|
-
sortModifiers:
|
|
26880
|
-
postfixLookupClassGroupIds:
|
|
26881
|
-
...
|
|
26882
|
-
}),
|
|
27049
|
+
}, WN = (e) => ({
|
|
27050
|
+
cache: LN(e.cacheSize),
|
|
27051
|
+
parseClassName: HN(e),
|
|
27052
|
+
sortModifiers: UN(e),
|
|
27053
|
+
postfixLookupClassGroupIds: GN(e),
|
|
27054
|
+
...TN(e)
|
|
27055
|
+
}), GN = (e) => {
|
|
26883
27056
|
let t = Object.create(null), n = e.postfixLookupClassGroups;
|
|
26884
27057
|
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
|
|
26885
27058
|
return t;
|
|
26886
|
-
},
|
|
26887
|
-
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(
|
|
27059
|
+
}, KN = /\s+/, qN = (e, t) => {
|
|
27060
|
+
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(KN), l = "";
|
|
26888
27061
|
for (let e = c.length - 1; e >= 0; --e) {
|
|
26889
27062
|
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
|
|
26890
27063
|
if (u) {
|
|
@@ -26908,7 +27081,7 @@ var hN = (e, t) => {
|
|
|
26908
27081
|
}
|
|
26909
27082
|
h = !1;
|
|
26910
27083
|
}
|
|
26911
|
-
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ +
|
|
27084
|
+
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + RN : _, y = v + g;
|
|
26912
27085
|
if (s.indexOf(y) > -1) continue;
|
|
26913
27086
|
s.push(y);
|
|
26914
27087
|
let b = i(g, h);
|
|
@@ -26919,34 +27092,34 @@ var hN = (e, t) => {
|
|
|
26919
27092
|
l = t + (l.length > 0 ? " " + l : l);
|
|
26920
27093
|
}
|
|
26921
27094
|
return l;
|
|
26922
|
-
},
|
|
27095
|
+
}, JN = (...e) => {
|
|
26923
27096
|
let t = 0, n, r, i = "";
|
|
26924
|
-
for (; t < e.length;) (n = e[t++]) && (r =
|
|
27097
|
+
for (; t < e.length;) (n = e[t++]) && (r = YN(n)) && (i && (i += " "), i += r);
|
|
26925
27098
|
return i;
|
|
26926
|
-
},
|
|
27099
|
+
}, YN = (e) => {
|
|
26927
27100
|
if (typeof e == "string") return e;
|
|
26928
27101
|
let t, n = "";
|
|
26929
|
-
for (let r = 0; r < e.length; r++) e[r] && (t =
|
|
27102
|
+
for (let r = 0; r < e.length; r++) e[r] && (t = YN(e[r])) && (n && (n += " "), n += t);
|
|
26930
27103
|
return n;
|
|
26931
|
-
},
|
|
26932
|
-
let n, r, i, a, o = (o) => (n =
|
|
27104
|
+
}, XN = (e, ...t) => {
|
|
27105
|
+
let n, r, i, a, o = (o) => (n = WN(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
|
|
26933
27106
|
let t = r(e);
|
|
26934
27107
|
if (t) return t;
|
|
26935
|
-
let a =
|
|
27108
|
+
let a = qN(e, n);
|
|
26936
27109
|
return i(e, a), a;
|
|
26937
27110
|
};
|
|
26938
|
-
return a = o, (...e) => a(
|
|
26939
|
-
},
|
|
26940
|
-
let t = (t) => t[e] ||
|
|
27111
|
+
return a = o, (...e) => a(JN(...e));
|
|
27112
|
+
}, ZN = [], QN = (e) => {
|
|
27113
|
+
let t = (t) => t[e] || ZN;
|
|
26941
27114
|
return t.isThemeGetter = !0, t;
|
|
26942
|
-
},
|
|
26943
|
-
let r =
|
|
27115
|
+
}, $N = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, eP = /^\((?:(\w[\w-]*):)?(.+)\)$/i, tP = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, nP = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, rP = /\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$/, iP = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, aP = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, oP = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, sP = (e) => tP.test(e), cP = (e) => !!e && !Number.isNaN(Number(e)), lP = (e) => !!e && Number.isInteger(Number(e)), uP = (e) => e.endsWith("%") && cP(e.slice(0, -1)), dP = (e) => nP.test(e), fP = () => !0, pP = (e) => rP.test(e) && !iP.test(e), mP = () => !1, hP = (e) => aP.test(e), gP = (e) => oP.test(e), _P = (e) => !Q(e) && !$(e), vP = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), yP = (e) => PP(e, RP, mP), Q = (e) => $N.test(e), bP = (e) => PP(e, zP, pP), xP = (e) => PP(e, BP, cP), SP = (e) => PP(e, HP, fP), CP = (e) => PP(e, VP, mP), wP = (e) => PP(e, IP, mP), TP = (e) => PP(e, LP, gP), EP = (e) => PP(e, UP, hP), $ = (e) => eP.test(e), DP = (e) => FP(e, zP), OP = (e) => FP(e, VP), kP = (e) => FP(e, IP), AP = (e) => FP(e, RP), jP = (e) => FP(e, LP), MP = (e) => FP(e, UP, !0), NP = (e) => FP(e, HP, !0), PP = (e, t, n) => {
|
|
27116
|
+
let r = $N.exec(e);
|
|
26944
27117
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
26945
|
-
},
|
|
26946
|
-
let r =
|
|
27118
|
+
}, FP = (e, t, n = !1) => {
|
|
27119
|
+
let r = eP.exec(e);
|
|
26947
27120
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
26948
|
-
},
|
|
26949
|
-
let e =
|
|
27121
|
+
}, IP = (e) => e === "position" || e === "percentage", LP = (e) => e === "image" || e === "url", RP = (e) => e === "length" || e === "size" || e === "bg-size", zP = (e) => e === "length", BP = (e) => e === "number", VP = (e) => e === "family-name", HP = (e) => e === "number" || e === "weight", UP = (e) => e === "shadow", WP = /* @__PURE__ */ XN(() => {
|
|
27122
|
+
let e = QN("color"), t = QN("font"), n = QN("text"), r = QN("font-weight"), i = QN("tracking"), a = QN("leading"), o = QN("breakpoint"), s = QN("container"), c = QN("spacing"), l = QN("radius"), u = QN("shadow"), d = QN("inset-shadow"), f = QN("text-shadow"), p = QN("drop-shadow"), m = QN("blur"), h = QN("perspective"), g = QN("aspect"), _ = QN("ease"), v = QN("animate"), y = () => [
|
|
26950
27123
|
"auto",
|
|
26951
27124
|
"avoid",
|
|
26952
27125
|
"all",
|
|
@@ -26988,12 +27161,12 @@ var hN = (e, t) => {
|
|
|
26988
27161
|
Q,
|
|
26989
27162
|
c
|
|
26990
27163
|
], T = () => [
|
|
26991
|
-
|
|
27164
|
+
sP,
|
|
26992
27165
|
"full",
|
|
26993
27166
|
"auto",
|
|
26994
27167
|
...w()
|
|
26995
27168
|
], E = () => [
|
|
26996
|
-
|
|
27169
|
+
lP,
|
|
26997
27170
|
"none",
|
|
26998
27171
|
"subgrid",
|
|
26999
27172
|
$,
|
|
@@ -27002,15 +27175,15 @@ var hN = (e, t) => {
|
|
|
27002
27175
|
"auto",
|
|
27003
27176
|
{ span: [
|
|
27004
27177
|
"full",
|
|
27005
|
-
|
|
27178
|
+
lP,
|
|
27006
27179
|
$,
|
|
27007
27180
|
Q
|
|
27008
27181
|
] },
|
|
27009
|
-
|
|
27182
|
+
lP,
|
|
27010
27183
|
$,
|
|
27011
27184
|
Q
|
|
27012
27185
|
], ee = () => [
|
|
27013
|
-
|
|
27186
|
+
lP,
|
|
27014
27187
|
"auto",
|
|
27015
27188
|
$,
|
|
27016
27189
|
Q
|
|
@@ -27040,7 +27213,7 @@ var hN = (e, t) => {
|
|
|
27040
27213
|
"center-safe",
|
|
27041
27214
|
"end-safe"
|
|
27042
27215
|
], A = () => ["auto", ...w()], ne = () => [
|
|
27043
|
-
|
|
27216
|
+
sP,
|
|
27044
27217
|
"auto",
|
|
27045
27218
|
"full",
|
|
27046
27219
|
"dvw",
|
|
@@ -27054,7 +27227,7 @@ var hN = (e, t) => {
|
|
|
27054
27227
|
"fit",
|
|
27055
27228
|
...w()
|
|
27056
27229
|
], re = () => [
|
|
27057
|
-
|
|
27230
|
+
sP,
|
|
27058
27231
|
"screen",
|
|
27059
27232
|
"full",
|
|
27060
27233
|
"dvw",
|
|
@@ -27065,7 +27238,7 @@ var hN = (e, t) => {
|
|
|
27065
27238
|
"fit",
|
|
27066
27239
|
...w()
|
|
27067
27240
|
], ie = () => [
|
|
27068
|
-
|
|
27241
|
+
sP,
|
|
27069
27242
|
"screen",
|
|
27070
27243
|
"full",
|
|
27071
27244
|
"lh",
|
|
@@ -27082,8 +27255,8 @@ var hN = (e, t) => {
|
|
|
27082
27255
|
Q
|
|
27083
27256
|
], ae = () => [
|
|
27084
27257
|
...b(),
|
|
27085
|
-
|
|
27086
|
-
|
|
27258
|
+
kP,
|
|
27259
|
+
wP,
|
|
27087
27260
|
{ position: [$, Q] }
|
|
27088
27261
|
], oe = () => ["no-repeat", { repeat: [
|
|
27089
27262
|
"",
|
|
@@ -27095,13 +27268,13 @@ var hN = (e, t) => {
|
|
|
27095
27268
|
"auto",
|
|
27096
27269
|
"cover",
|
|
27097
27270
|
"contain",
|
|
27098
|
-
|
|
27099
|
-
|
|
27271
|
+
AP,
|
|
27272
|
+
yP,
|
|
27100
27273
|
{ size: [$, Q] }
|
|
27101
27274
|
], ce = () => [
|
|
27102
|
-
|
|
27103
|
-
|
|
27104
|
-
|
|
27275
|
+
uP,
|
|
27276
|
+
DP,
|
|
27277
|
+
bP
|
|
27105
27278
|
], le = () => [
|
|
27106
27279
|
"",
|
|
27107
27280
|
"none",
|
|
@@ -27111,9 +27284,9 @@ var hN = (e, t) => {
|
|
|
27111
27284
|
Q
|
|
27112
27285
|
], ue = () => [
|
|
27113
27286
|
"",
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27287
|
+
cP,
|
|
27288
|
+
DP,
|
|
27289
|
+
bP
|
|
27117
27290
|
], de = () => [
|
|
27118
27291
|
"solid",
|
|
27119
27292
|
"dashed",
|
|
@@ -27137,10 +27310,10 @@ var hN = (e, t) => {
|
|
|
27137
27310
|
"color",
|
|
27138
27311
|
"luminosity"
|
|
27139
27312
|
], pe = () => [
|
|
27140
|
-
|
|
27141
|
-
|
|
27142
|
-
|
|
27143
|
-
|
|
27313
|
+
cP,
|
|
27314
|
+
uP,
|
|
27315
|
+
kP,
|
|
27316
|
+
wP
|
|
27144
27317
|
], me = () => [
|
|
27145
27318
|
"",
|
|
27146
27319
|
"none",
|
|
@@ -27149,20 +27322,20 @@ var hN = (e, t) => {
|
|
|
27149
27322
|
Q
|
|
27150
27323
|
], he = () => [
|
|
27151
27324
|
"none",
|
|
27152
|
-
|
|
27325
|
+
cP,
|
|
27153
27326
|
$,
|
|
27154
27327
|
Q
|
|
27155
27328
|
], ge = () => [
|
|
27156
27329
|
"none",
|
|
27157
|
-
|
|
27330
|
+
cP,
|
|
27158
27331
|
$,
|
|
27159
27332
|
Q
|
|
27160
27333
|
], _e = () => [
|
|
27161
|
-
|
|
27334
|
+
cP,
|
|
27162
27335
|
$,
|
|
27163
27336
|
Q
|
|
27164
27337
|
], ve = () => [
|
|
27165
|
-
|
|
27338
|
+
sP,
|
|
27166
27339
|
"full",
|
|
27167
27340
|
...w()
|
|
27168
27341
|
];
|
|
@@ -27176,17 +27349,17 @@ var hN = (e, t) => {
|
|
|
27176
27349
|
"bounce"
|
|
27177
27350
|
],
|
|
27178
27351
|
aspect: ["video"],
|
|
27179
|
-
blur: [
|
|
27180
|
-
breakpoint: [
|
|
27181
|
-
color: [
|
|
27182
|
-
container: [
|
|
27183
|
-
"drop-shadow": [
|
|
27352
|
+
blur: [dP],
|
|
27353
|
+
breakpoint: [dP],
|
|
27354
|
+
color: [fP],
|
|
27355
|
+
container: [dP],
|
|
27356
|
+
"drop-shadow": [dP],
|
|
27184
27357
|
ease: [
|
|
27185
27358
|
"in",
|
|
27186
27359
|
"out",
|
|
27187
27360
|
"in-out"
|
|
27188
27361
|
],
|
|
27189
|
-
font: [
|
|
27362
|
+
font: [_P],
|
|
27190
27363
|
"font-weight": [
|
|
27191
27364
|
"thin",
|
|
27192
27365
|
"extralight",
|
|
@@ -27198,7 +27371,7 @@ var hN = (e, t) => {
|
|
|
27198
27371
|
"extrabold",
|
|
27199
27372
|
"black"
|
|
27200
27373
|
],
|
|
27201
|
-
"inset-shadow": [
|
|
27374
|
+
"inset-shadow": [dP],
|
|
27202
27375
|
leading: [
|
|
27203
27376
|
"none",
|
|
27204
27377
|
"tight",
|
|
@@ -27215,11 +27388,11 @@ var hN = (e, t) => {
|
|
|
27215
27388
|
"distant",
|
|
27216
27389
|
"none"
|
|
27217
27390
|
],
|
|
27218
|
-
radius: [
|
|
27219
|
-
shadow: [
|
|
27220
|
-
spacing: ["px",
|
|
27221
|
-
text: [
|
|
27222
|
-
"text-shadow": [
|
|
27391
|
+
radius: [dP],
|
|
27392
|
+
shadow: [dP],
|
|
27393
|
+
spacing: ["px", cP],
|
|
27394
|
+
text: [dP],
|
|
27395
|
+
"text-shadow": [dP],
|
|
27223
27396
|
tracking: [
|
|
27224
27397
|
"tighter",
|
|
27225
27398
|
"tight",
|
|
@@ -27233,7 +27406,7 @@ var hN = (e, t) => {
|
|
|
27233
27406
|
aspect: [{ aspect: [
|
|
27234
27407
|
"auto",
|
|
27235
27408
|
"square",
|
|
27236
|
-
|
|
27409
|
+
sP,
|
|
27237
27410
|
Q,
|
|
27238
27411
|
$,
|
|
27239
27412
|
g
|
|
@@ -27246,9 +27419,9 @@ var hN = (e, t) => {
|
|
|
27246
27419
|
$,
|
|
27247
27420
|
Q
|
|
27248
27421
|
] }],
|
|
27249
|
-
"container-named": [
|
|
27422
|
+
"container-named": [vP],
|
|
27250
27423
|
columns: [{ columns: [
|
|
27251
|
-
|
|
27424
|
+
cP,
|
|
27252
27425
|
Q,
|
|
27253
27426
|
$,
|
|
27254
27427
|
s
|
|
@@ -27347,13 +27520,13 @@ var hN = (e, t) => {
|
|
|
27347
27520
|
"collapse"
|
|
27348
27521
|
],
|
|
27349
27522
|
z: [{ z: [
|
|
27350
|
-
|
|
27523
|
+
lP,
|
|
27351
27524
|
"auto",
|
|
27352
27525
|
$,
|
|
27353
27526
|
Q
|
|
27354
27527
|
] }],
|
|
27355
27528
|
basis: [{ basis: [
|
|
27356
|
-
|
|
27529
|
+
sP,
|
|
27357
27530
|
"full",
|
|
27358
27531
|
"auto",
|
|
27359
27532
|
s,
|
|
@@ -27371,8 +27544,8 @@ var hN = (e, t) => {
|
|
|
27371
27544
|
"wrap-reverse"
|
|
27372
27545
|
] }],
|
|
27373
27546
|
flex: [{ flex: [
|
|
27374
|
-
|
|
27375
|
-
|
|
27547
|
+
cP,
|
|
27548
|
+
sP,
|
|
27376
27549
|
"auto",
|
|
27377
27550
|
"initial",
|
|
27378
27551
|
"none",
|
|
@@ -27380,18 +27553,18 @@ var hN = (e, t) => {
|
|
|
27380
27553
|
] }],
|
|
27381
27554
|
grow: [{ grow: [
|
|
27382
27555
|
"",
|
|
27383
|
-
|
|
27556
|
+
cP,
|
|
27384
27557
|
$,
|
|
27385
27558
|
Q
|
|
27386
27559
|
] }],
|
|
27387
27560
|
shrink: [{ shrink: [
|
|
27388
27561
|
"",
|
|
27389
|
-
|
|
27562
|
+
cP,
|
|
27390
27563
|
$,
|
|
27391
27564
|
Q
|
|
27392
27565
|
] }],
|
|
27393
27566
|
order: [{ order: [
|
|
27394
|
-
|
|
27567
|
+
lP,
|
|
27395
27568
|
"first",
|
|
27396
27569
|
"last",
|
|
27397
27570
|
"none",
|
|
@@ -27502,15 +27675,15 @@ var hN = (e, t) => {
|
|
|
27502
27675
|
"font-size": [{ text: [
|
|
27503
27676
|
"base",
|
|
27504
27677
|
n,
|
|
27505
|
-
|
|
27506
|
-
|
|
27678
|
+
DP,
|
|
27679
|
+
bP
|
|
27507
27680
|
] }],
|
|
27508
27681
|
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
27509
27682
|
"font-style": ["italic", "not-italic"],
|
|
27510
27683
|
"font-weight": [{ font: [
|
|
27511
27684
|
r,
|
|
27512
|
-
|
|
27513
|
-
|
|
27685
|
+
NP,
|
|
27686
|
+
SP
|
|
27514
27687
|
] }],
|
|
27515
27688
|
"font-stretch": [{ "font-stretch": [
|
|
27516
27689
|
"ultra-condensed",
|
|
@@ -27522,12 +27695,12 @@ var hN = (e, t) => {
|
|
|
27522
27695
|
"expanded",
|
|
27523
27696
|
"extra-expanded",
|
|
27524
27697
|
"ultra-expanded",
|
|
27525
|
-
|
|
27698
|
+
uP,
|
|
27526
27699
|
Q
|
|
27527
27700
|
] }],
|
|
27528
27701
|
"font-family": [{ font: [
|
|
27529
|
-
|
|
27530
|
-
|
|
27702
|
+
OP,
|
|
27703
|
+
CP,
|
|
27531
27704
|
t
|
|
27532
27705
|
] }],
|
|
27533
27706
|
"font-features": [{ "font-features": [Q] }],
|
|
@@ -27543,10 +27716,10 @@ var hN = (e, t) => {
|
|
|
27543
27716
|
Q
|
|
27544
27717
|
] }],
|
|
27545
27718
|
"line-clamp": [{ "line-clamp": [
|
|
27546
|
-
|
|
27719
|
+
cP,
|
|
27547
27720
|
"none",
|
|
27548
27721
|
$,
|
|
27549
|
-
|
|
27722
|
+
xP
|
|
27550
27723
|
] }],
|
|
27551
27724
|
leading: [{ leading: [a, ...w()] }],
|
|
27552
27725
|
"list-image": [{ "list-image": [
|
|
@@ -27580,15 +27753,15 @@ var hN = (e, t) => {
|
|
|
27580
27753
|
],
|
|
27581
27754
|
"text-decoration-style": [{ decoration: [...de(), "wavy"] }],
|
|
27582
27755
|
"text-decoration-thickness": [{ decoration: [
|
|
27583
|
-
|
|
27756
|
+
cP,
|
|
27584
27757
|
"from-font",
|
|
27585
27758
|
"auto",
|
|
27586
27759
|
$,
|
|
27587
|
-
|
|
27760
|
+
bP
|
|
27588
27761
|
] }],
|
|
27589
27762
|
"text-decoration-color": [{ decoration: j() }],
|
|
27590
27763
|
"underline-offset": [{ "underline-offset": [
|
|
27591
|
-
|
|
27764
|
+
cP,
|
|
27592
27765
|
"auto",
|
|
27593
27766
|
$,
|
|
27594
27767
|
Q
|
|
@@ -27612,7 +27785,7 @@ var hN = (e, t) => {
|
|
|
27612
27785
|
] }],
|
|
27613
27786
|
indent: [{ indent: w() }],
|
|
27614
27787
|
"tab-size": [{ tab: [
|
|
27615
|
-
|
|
27788
|
+
lP,
|
|
27616
27789
|
$,
|
|
27617
27790
|
Q
|
|
27618
27791
|
] }],
|
|
@@ -27690,7 +27863,7 @@ var hN = (e, t) => {
|
|
|
27690
27863
|
"l",
|
|
27691
27864
|
"tl"
|
|
27692
27865
|
] },
|
|
27693
|
-
|
|
27866
|
+
lP,
|
|
27694
27867
|
$,
|
|
27695
27868
|
Q
|
|
27696
27869
|
],
|
|
@@ -27700,13 +27873,13 @@ var hN = (e, t) => {
|
|
|
27700
27873
|
Q
|
|
27701
27874
|
],
|
|
27702
27875
|
conic: [
|
|
27703
|
-
|
|
27876
|
+
lP,
|
|
27704
27877
|
$,
|
|
27705
27878
|
Q
|
|
27706
27879
|
]
|
|
27707
27880
|
},
|
|
27708
|
-
|
|
27709
|
-
|
|
27881
|
+
jP,
|
|
27882
|
+
TP
|
|
27710
27883
|
] }],
|
|
27711
27884
|
"bg-color": [{ bg: j() }],
|
|
27712
27885
|
"gradient-from-pos": [{ from: ce() }],
|
|
@@ -27773,48 +27946,48 @@ var hN = (e, t) => {
|
|
|
27773
27946
|
"hidden"
|
|
27774
27947
|
] }],
|
|
27775
27948
|
"outline-offset": [{ "outline-offset": [
|
|
27776
|
-
|
|
27949
|
+
cP,
|
|
27777
27950
|
$,
|
|
27778
27951
|
Q
|
|
27779
27952
|
] }],
|
|
27780
27953
|
"outline-w": [{ outline: [
|
|
27781
27954
|
"",
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27955
|
+
cP,
|
|
27956
|
+
DP,
|
|
27957
|
+
bP
|
|
27785
27958
|
] }],
|
|
27786
27959
|
"outline-color": [{ outline: j() }],
|
|
27787
27960
|
shadow: [{ shadow: [
|
|
27788
27961
|
"",
|
|
27789
27962
|
"none",
|
|
27790
27963
|
u,
|
|
27791
|
-
|
|
27792
|
-
|
|
27964
|
+
MP,
|
|
27965
|
+
EP
|
|
27793
27966
|
] }],
|
|
27794
27967
|
"shadow-color": [{ shadow: j() }],
|
|
27795
27968
|
"inset-shadow": [{ "inset-shadow": [
|
|
27796
27969
|
"none",
|
|
27797
27970
|
d,
|
|
27798
|
-
|
|
27799
|
-
|
|
27971
|
+
MP,
|
|
27972
|
+
EP
|
|
27800
27973
|
] }],
|
|
27801
27974
|
"inset-shadow-color": [{ "inset-shadow": j() }],
|
|
27802
27975
|
"ring-w": [{ ring: ue() }],
|
|
27803
27976
|
"ring-w-inset": ["ring-inset"],
|
|
27804
27977
|
"ring-color": [{ ring: j() }],
|
|
27805
|
-
"ring-offset-w": [{ "ring-offset": [
|
|
27978
|
+
"ring-offset-w": [{ "ring-offset": [cP, bP] }],
|
|
27806
27979
|
"ring-offset-color": [{ "ring-offset": j() }],
|
|
27807
27980
|
"inset-ring-w": [{ "inset-ring": ue() }],
|
|
27808
27981
|
"inset-ring-color": [{ "inset-ring": j() }],
|
|
27809
27982
|
"text-shadow": [{ "text-shadow": [
|
|
27810
27983
|
"none",
|
|
27811
27984
|
f,
|
|
27812
|
-
|
|
27813
|
-
|
|
27985
|
+
MP,
|
|
27986
|
+
EP
|
|
27814
27987
|
] }],
|
|
27815
27988
|
"text-shadow-color": [{ "text-shadow": j() }],
|
|
27816
27989
|
opacity: [{ opacity: [
|
|
27817
|
-
|
|
27990
|
+
cP,
|
|
27818
27991
|
$,
|
|
27819
27992
|
Q
|
|
27820
27993
|
] }],
|
|
@@ -27838,7 +28011,7 @@ var hN = (e, t) => {
|
|
|
27838
28011
|
"intersect",
|
|
27839
28012
|
"exclude"
|
|
27840
28013
|
] }],
|
|
27841
|
-
"mask-image-linear-pos": [{ "mask-linear": [
|
|
28014
|
+
"mask-image-linear-pos": [{ "mask-linear": [cP] }],
|
|
27842
28015
|
"mask-image-linear-from-pos": [{ "mask-linear-from": pe() }],
|
|
27843
28016
|
"mask-image-linear-to-pos": [{ "mask-linear-to": pe() }],
|
|
27844
28017
|
"mask-image-linear-from-color": [{ "mask-linear-from": j() }],
|
|
@@ -27878,7 +28051,7 @@ var hN = (e, t) => {
|
|
|
27878
28051
|
farthest: ["side", "corner"]
|
|
27879
28052
|
}] }],
|
|
27880
28053
|
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
|
|
27881
|
-
"mask-image-conic-pos": [{ "mask-conic": [
|
|
28054
|
+
"mask-image-conic-pos": [{ "mask-conic": [cP] }],
|
|
27882
28055
|
"mask-image-conic-from-pos": [{ "mask-conic-from": pe() }],
|
|
27883
28056
|
"mask-image-conic-to-pos": [{ "mask-conic-to": pe() }],
|
|
27884
28057
|
"mask-image-conic-from-color": [{ "mask-conic-from": j() }],
|
|
@@ -27913,12 +28086,12 @@ var hN = (e, t) => {
|
|
|
27913
28086
|
] }],
|
|
27914
28087
|
blur: [{ blur: me() }],
|
|
27915
28088
|
brightness: [{ brightness: [
|
|
27916
|
-
|
|
28089
|
+
cP,
|
|
27917
28090
|
$,
|
|
27918
28091
|
Q
|
|
27919
28092
|
] }],
|
|
27920
28093
|
contrast: [{ contrast: [
|
|
27921
|
-
|
|
28094
|
+
cP,
|
|
27922
28095
|
$,
|
|
27923
28096
|
Q
|
|
27924
28097
|
] }],
|
|
@@ -27926,35 +28099,35 @@ var hN = (e, t) => {
|
|
|
27926
28099
|
"",
|
|
27927
28100
|
"none",
|
|
27928
28101
|
p,
|
|
27929
|
-
|
|
27930
|
-
|
|
28102
|
+
MP,
|
|
28103
|
+
EP
|
|
27931
28104
|
] }],
|
|
27932
28105
|
"drop-shadow-color": [{ "drop-shadow": j() }],
|
|
27933
28106
|
grayscale: [{ grayscale: [
|
|
27934
28107
|
"",
|
|
27935
|
-
|
|
28108
|
+
cP,
|
|
27936
28109
|
$,
|
|
27937
28110
|
Q
|
|
27938
28111
|
] }],
|
|
27939
28112
|
"hue-rotate": [{ "hue-rotate": [
|
|
27940
|
-
|
|
28113
|
+
cP,
|
|
27941
28114
|
$,
|
|
27942
28115
|
Q
|
|
27943
28116
|
] }],
|
|
27944
28117
|
invert: [{ invert: [
|
|
27945
28118
|
"",
|
|
27946
|
-
|
|
28119
|
+
cP,
|
|
27947
28120
|
$,
|
|
27948
28121
|
Q
|
|
27949
28122
|
] }],
|
|
27950
28123
|
saturate: [{ saturate: [
|
|
27951
|
-
|
|
28124
|
+
cP,
|
|
27952
28125
|
$,
|
|
27953
28126
|
Q
|
|
27954
28127
|
] }],
|
|
27955
28128
|
sepia: [{ sepia: [
|
|
27956
28129
|
"",
|
|
27957
|
-
|
|
28130
|
+
cP,
|
|
27958
28131
|
$,
|
|
27959
28132
|
Q
|
|
27960
28133
|
] }],
|
|
@@ -27966,45 +28139,45 @@ var hN = (e, t) => {
|
|
|
27966
28139
|
] }],
|
|
27967
28140
|
"backdrop-blur": [{ "backdrop-blur": me() }],
|
|
27968
28141
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
27969
|
-
|
|
28142
|
+
cP,
|
|
27970
28143
|
$,
|
|
27971
28144
|
Q
|
|
27972
28145
|
] }],
|
|
27973
28146
|
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
27974
|
-
|
|
28147
|
+
cP,
|
|
27975
28148
|
$,
|
|
27976
28149
|
Q
|
|
27977
28150
|
] }],
|
|
27978
28151
|
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
27979
28152
|
"",
|
|
27980
|
-
|
|
28153
|
+
cP,
|
|
27981
28154
|
$,
|
|
27982
28155
|
Q
|
|
27983
28156
|
] }],
|
|
27984
28157
|
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
27985
|
-
|
|
28158
|
+
cP,
|
|
27986
28159
|
$,
|
|
27987
28160
|
Q
|
|
27988
28161
|
] }],
|
|
27989
28162
|
"backdrop-invert": [{ "backdrop-invert": [
|
|
27990
28163
|
"",
|
|
27991
|
-
|
|
28164
|
+
cP,
|
|
27992
28165
|
$,
|
|
27993
28166
|
Q
|
|
27994
28167
|
] }],
|
|
27995
28168
|
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
27996
|
-
|
|
28169
|
+
cP,
|
|
27997
28170
|
$,
|
|
27998
28171
|
Q
|
|
27999
28172
|
] }],
|
|
28000
28173
|
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
28001
|
-
|
|
28174
|
+
cP,
|
|
28002
28175
|
$,
|
|
28003
28176
|
Q
|
|
28004
28177
|
] }],
|
|
28005
28178
|
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
28006
28179
|
"",
|
|
28007
|
-
|
|
28180
|
+
cP,
|
|
28008
28181
|
$,
|
|
28009
28182
|
Q
|
|
28010
28183
|
] }],
|
|
@@ -28027,7 +28200,7 @@ var hN = (e, t) => {
|
|
|
28027
28200
|
] }],
|
|
28028
28201
|
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
28029
28202
|
duration: [{ duration: [
|
|
28030
|
-
|
|
28203
|
+
cP,
|
|
28031
28204
|
"initial",
|
|
28032
28205
|
$,
|
|
28033
28206
|
Q
|
|
@@ -28040,7 +28213,7 @@ var hN = (e, t) => {
|
|
|
28040
28213
|
Q
|
|
28041
28214
|
] }],
|
|
28042
28215
|
delay: [{ delay: [
|
|
28043
|
-
|
|
28216
|
+
cP,
|
|
28044
28217
|
$,
|
|
28045
28218
|
Q
|
|
28046
28219
|
] }],
|
|
@@ -28085,7 +28258,7 @@ var hN = (e, t) => {
|
|
|
28085
28258
|
"translate-z": [{ "translate-z": ve() }],
|
|
28086
28259
|
"translate-none": ["translate-none"],
|
|
28087
28260
|
zoom: [{ zoom: [
|
|
28088
|
-
|
|
28261
|
+
lP,
|
|
28089
28262
|
$,
|
|
28090
28263
|
Q
|
|
28091
28264
|
] }],
|
|
@@ -28229,10 +28402,10 @@ var hN = (e, t) => {
|
|
|
28229
28402
|
] }],
|
|
28230
28403
|
fill: [{ fill: ["none", ...j()] }],
|
|
28231
28404
|
"stroke-w": [{ stroke: [
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28405
|
+
cP,
|
|
28406
|
+
DP,
|
|
28407
|
+
bP,
|
|
28408
|
+
xP
|
|
28236
28409
|
] }],
|
|
28237
28410
|
stroke: [{ stroke: ["none", ...j()] }],
|
|
28238
28411
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
@@ -28423,11 +28596,11 @@ var hN = (e, t) => {
|
|
|
28423
28596
|
});
|
|
28424
28597
|
//#endregion
|
|
28425
28598
|
//#region ../core/src/magic-canvas/grid-overlay.tsx
|
|
28426
|
-
function
|
|
28599
|
+
function GP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
28427
28600
|
if (e === null || t === null) return null;
|
|
28428
28601
|
let i = Wj[e.templateId];
|
|
28429
28602
|
if (i === void 0) return null;
|
|
28430
|
-
let a = r !== null, o = a ? "border-warning/70 bg-warning/5" : "border-info/80 bg-info/5", s = a ? "bg-warning/85 text-warning-content" : "bg-info/85 text-info-content", c = a ? "border-warning" : "border-success", l = a ? "bg-warning/85 text-warning-content" : "bg-success/85 text-success-content", u = t.userShare ? "userShare" : t.presentation ? "presentation" : null, { regions: d } =
|
|
28603
|
+
let a = r !== null, o = a ? "border-warning/70 bg-warning/5" : "border-info/80 bg-info/5", s = a ? "bg-warning/85 text-warning-content" : "bg-info/85 text-info-content", c = a ? "border-warning" : "border-success", l = a ? "bg-warning/85 text-warning-content" : "bg-success/85 text-success-content", u = t.userShare ? "userShare" : t.presentation ? "presentation" : null, { regions: d } = FM(i, {
|
|
28431
28604
|
state: e.state,
|
|
28432
28605
|
contentKind: u
|
|
28433
28606
|
}, t, e.sizeClass, e.containerPx, n);
|
|
@@ -28440,7 +28613,7 @@ function VP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28440
28613
|
children: ["engine plan only · legacy: ", r]
|
|
28441
28614
|
}),
|
|
28442
28615
|
d.map((e) => /* @__PURE__ */ R("div", {
|
|
28443
|
-
class:
|
|
28616
|
+
class: WP("absolute rounded-box border border-dashed", o),
|
|
28444
28617
|
style: {
|
|
28445
28618
|
left: `${e.rect.x}px`,
|
|
28446
28619
|
top: `${e.rect.y}px`,
|
|
@@ -28448,7 +28621,7 @@ function VP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28448
28621
|
height: `${e.rect.height}px`
|
|
28449
28622
|
},
|
|
28450
28623
|
children: /* @__PURE__ */ R("span", {
|
|
28451
|
-
class:
|
|
28624
|
+
class: WP("absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight", s),
|
|
28452
28625
|
children: [/* @__PURE__ */ R("span", { children: e.region.name }), /* @__PURE__ */ R("span", {
|
|
28453
28626
|
class: "opacity-75",
|
|
28454
28627
|
children: e.region.accepts.join(" · ")
|
|
@@ -28456,7 +28629,7 @@ function VP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28456
28629
|
})
|
|
28457
28630
|
}, e.region.name)),
|
|
28458
28631
|
e.tiles.map((e) => /* @__PURE__ */ R("div", {
|
|
28459
|
-
class:
|
|
28632
|
+
class: WP("absolute border", c),
|
|
28460
28633
|
style: {
|
|
28461
28634
|
left: `${e.rect.x}px`,
|
|
28462
28635
|
top: `${e.rect.y}px`,
|
|
@@ -28464,7 +28637,7 @@ function VP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28464
28637
|
height: `${e.rect.height}px`
|
|
28465
28638
|
},
|
|
28466
28639
|
children: /* @__PURE__ */ R("span", {
|
|
28467
|
-
class:
|
|
28640
|
+
class: WP("absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]", l),
|
|
28468
28641
|
children: [
|
|
28469
28642
|
e.kind,
|
|
28470
28643
|
" ",
|
|
@@ -28479,11 +28652,11 @@ function VP({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28479
28652
|
}
|
|
28480
28653
|
//#endregion
|
|
28481
28654
|
//#region ../core/src/magic-canvas/grid-readout.tsx
|
|
28482
|
-
function
|
|
28655
|
+
function KP(e) {
|
|
28483
28656
|
return {
|
|
28484
28657
|
version: 1,
|
|
28485
|
-
buildSha:
|
|
28486
|
-
engineVersion:
|
|
28658
|
+
buildSha: GM,
|
|
28659
|
+
engineVersion: GM,
|
|
28487
28660
|
config: Hj,
|
|
28488
28661
|
session: {
|
|
28489
28662
|
containerPx: {
|
|
@@ -28506,7 +28679,7 @@ function HP(e) {
|
|
|
28506
28679
|
}
|
|
28507
28680
|
};
|
|
28508
28681
|
}
|
|
28509
|
-
function
|
|
28682
|
+
function qP({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError: i = null }) {
|
|
28510
28683
|
let [a, o] = M(!1), s = P(null);
|
|
28511
28684
|
if (N(() => () => {
|
|
28512
28685
|
s.current !== null && clearTimeout(s.current);
|
|
@@ -28544,11 +28717,11 @@ function UP({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
28544
28717
|
})]
|
|
28545
28718
|
});
|
|
28546
28719
|
let c = () => {
|
|
28547
|
-
let e = JSON.stringify(
|
|
28720
|
+
let e = JSON.stringify(KP(t), null, 2);
|
|
28548
28721
|
s.current !== null && clearTimeout(s.current), navigator.clipboard?.writeText(e).then(() => {
|
|
28549
28722
|
o(!0), s.current = setTimeout(() => o(!1), 1500);
|
|
28550
28723
|
}, () => o(!1));
|
|
28551
|
-
}, l = e.degradations.evictedCardIds, u =
|
|
28724
|
+
}, l = e.degradations.evictedCardIds, u = dN(e.sizeClass);
|
|
28552
28725
|
return /* @__PURE__ */ R("div", {
|
|
28553
28726
|
class: "pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg",
|
|
28554
28727
|
children: [
|
|
@@ -28646,10 +28819,10 @@ function UP({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
28646
28819
|
}
|
|
28647
28820
|
//#endregion
|
|
28648
28821
|
//#region ../core/src/magic-canvas/grid-host.tsx
|
|
28649
|
-
var
|
|
28650
|
-
effect:
|
|
28822
|
+
var JP = {
|
|
28823
|
+
effect: sN,
|
|
28651
28824
|
animate: !1
|
|
28652
|
-
},
|
|
28825
|
+
}, YP = Et(JP), XP = {
|
|
28653
28826
|
presence: { phase: "connecting" },
|
|
28654
28827
|
localId: null,
|
|
28655
28828
|
isScreenSharing: !1,
|
|
@@ -28657,17 +28830,17 @@ var WP = {
|
|
|
28657
28830
|
hasPersonaVideo: !1,
|
|
28658
28831
|
hasSelfView: !1
|
|
28659
28832
|
};
|
|
28660
|
-
function
|
|
28833
|
+
function ZP(e, t) {
|
|
28661
28834
|
return e === null || t === null ? e === t : e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
28662
28835
|
}
|
|
28663
|
-
function
|
|
28836
|
+
function QP(e, t) {
|
|
28664
28837
|
let n = e.containerPx === null || t.containerPx === null ? e.containerPx === t.containerPx : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
28665
|
-
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n &&
|
|
28838
|
+
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n && ZP(e.replica, t.replica) && ZP(e.selfView, t.selfView) && ZP(e.content, t.content);
|
|
28666
28839
|
}
|
|
28667
|
-
var
|
|
28668
|
-
function
|
|
28669
|
-
let u =
|
|
28670
|
-
kioskMode: F(() =>
|
|
28840
|
+
var $P = /* @__PURE__ */ new Map(), eF = /* @__PURE__ */ new Set();
|
|
28841
|
+
function tF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r, callControlsVisible: i, callControlsRect: a, statusStripId: o, statusStripHeightPx: s, gridConfigEnabled: c, gridStartEnabled: l }) {
|
|
28842
|
+
let u = YM(c, l) && r !== void 0, d = r ?? XP, f = globalThis.location?.search ?? "", p = rN({
|
|
28843
|
+
kioskMode: F(() => XM(f), [f]),
|
|
28671
28844
|
instances: e,
|
|
28672
28845
|
viewport: t,
|
|
28673
28846
|
presence: d,
|
|
@@ -28677,10 +28850,10 @@ function ZP({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28677
28850
|
statusStripId: o,
|
|
28678
28851
|
statusStripHeightPx: s,
|
|
28679
28852
|
enabled: u
|
|
28680
|
-
}), m = u ?
|
|
28681
|
-
|
|
28853
|
+
}), m = u ? eN.value : null, h = m === null ? aN(p.resolution, d, u) : "engine-error";
|
|
28854
|
+
vN({
|
|
28682
28855
|
enabled: u,
|
|
28683
|
-
enabledVia:
|
|
28856
|
+
enabledVia: mN(qM, c === !0, l === !0),
|
|
28684
28857
|
bail: h,
|
|
28685
28858
|
resolution: p.resolution,
|
|
28686
28859
|
engineError: m
|
|
@@ -28689,39 +28862,39 @@ function ZP({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28689
28862
|
d.presence.phase === "ready" ? d.hasPersonaVideo && (g.current = !0) : g.current = !1;
|
|
28690
28863
|
let _ = !g.current, v;
|
|
28691
28864
|
try {
|
|
28692
|
-
v =
|
|
28865
|
+
v = cN(p.resolution, h, _);
|
|
28693
28866
|
} catch (e) {
|
|
28694
|
-
|
|
28867
|
+
tN(e), v = sN;
|
|
28695
28868
|
}
|
|
28696
|
-
let y = P(
|
|
28869
|
+
let y = P(sN), b = uN(y.current, v);
|
|
28697
28870
|
N(() => {
|
|
28698
|
-
y.current = v,
|
|
28871
|
+
y.current = v, QP(YP.peek().effect, v) || (YP.value = {
|
|
28699
28872
|
effect: v,
|
|
28700
28873
|
animate: b
|
|
28701
28874
|
});
|
|
28702
28875
|
}), N(() => () => {
|
|
28703
|
-
|
|
28876
|
+
nN(), YP.peek() !== JP && (YP.value = JP);
|
|
28704
28877
|
}, []);
|
|
28705
28878
|
let x = p.resolution, S = F(() => {
|
|
28706
|
-
if (h !== null || x === null) return
|
|
28879
|
+
if (h !== null || x === null) return $P;
|
|
28707
28880
|
try {
|
|
28708
28881
|
let e = /* @__PURE__ */ new Map();
|
|
28709
28882
|
for (let t of x.tiles) t.kind === "card" && e.set(t.id, t.rect);
|
|
28710
28883
|
return e;
|
|
28711
28884
|
} catch (e) {
|
|
28712
|
-
return
|
|
28885
|
+
return tN(e), $P;
|
|
28713
28886
|
}
|
|
28714
|
-
}, [h, x]), C = F(() => h !== null || x === null ?
|
|
28887
|
+
}, [h, x]), C = F(() => h !== null || x === null ? eF : new Set(x.tiles.filter(iN).map((e) => e.id)), [h, x]), w = JM ? /* @__PURE__ */ R("div", {
|
|
28715
28888
|
class: "contents",
|
|
28716
28889
|
"data-grid-debug": !0,
|
|
28717
|
-
children: [/* @__PURE__ */ R(
|
|
28890
|
+
children: [/* @__PURE__ */ R(GP, {
|
|
28718
28891
|
resolution: p.resolution,
|
|
28719
28892
|
inputs: p.inputs,
|
|
28720
28893
|
config: Hj,
|
|
28721
28894
|
bailReason: h
|
|
28722
28895
|
}), /* @__PURE__ */ R("div", {
|
|
28723
28896
|
class: "pointer-events-none absolute bottom-4 left-4 z-50",
|
|
28724
|
-
children: /* @__PURE__ */ R(
|
|
28897
|
+
children: /* @__PURE__ */ R(qP, {
|
|
28725
28898
|
resolution: p.resolution,
|
|
28726
28899
|
inputs: p.inputs,
|
|
28727
28900
|
shadowing: h !== null,
|
|
@@ -28733,7 +28906,7 @@ function ZP({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28733
28906
|
return {
|
|
28734
28907
|
cardRects: S,
|
|
28735
28908
|
kioskCardIds: C,
|
|
28736
|
-
sheetBottomPx:
|
|
28909
|
+
sheetBottomPx: oN(x, h),
|
|
28737
28910
|
animate: b,
|
|
28738
28911
|
recordNaturalHeight: p.recordNaturalHeight,
|
|
28739
28912
|
debug: w
|
|
@@ -28741,24 +28914,24 @@ function ZP({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28741
28914
|
}
|
|
28742
28915
|
//#endregion
|
|
28743
28916
|
//#region ../core/src/magic-canvas/grid-motion.ts
|
|
28744
|
-
var
|
|
28917
|
+
var nF = [
|
|
28745
28918
|
"left",
|
|
28746
28919
|
"top",
|
|
28747
28920
|
"width",
|
|
28748
28921
|
"height"
|
|
28749
28922
|
].map((e) => `${e} ${ix}`).join(", ");
|
|
28750
|
-
function
|
|
28923
|
+
function rF(e, t) {
|
|
28751
28924
|
return {
|
|
28752
28925
|
left: `${e.x}px`,
|
|
28753
28926
|
top: `${e.y}px`,
|
|
28754
28927
|
width: `${e.width}px`,
|
|
28755
28928
|
height: `${e.height}px`,
|
|
28756
|
-
transition: t && !mx() ?
|
|
28929
|
+
transition: t && !mx() ? nF : "none"
|
|
28757
28930
|
};
|
|
28758
28931
|
}
|
|
28759
28932
|
//#endregion
|
|
28760
28933
|
//#region ../core/src/magic-canvas/debug-panel.tsx
|
|
28761
|
-
function
|
|
28934
|
+
function iF({ state: e }) {
|
|
28762
28935
|
return e.enabled ? /* @__PURE__ */ R("details", {
|
|
28763
28936
|
class: "pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur",
|
|
28764
28937
|
children: [/* @__PURE__ */ R("summary", {
|
|
@@ -28767,27 +28940,27 @@ function eF({ state: e }) {
|
|
|
28767
28940
|
}), /* @__PURE__ */ R("dl", {
|
|
28768
28941
|
class: "mt-2 grid gap-2",
|
|
28769
28942
|
children: [
|
|
28770
|
-
/* @__PURE__ */ R(
|
|
28943
|
+
/* @__PURE__ */ R(aF, {
|
|
28771
28944
|
label: "iframe",
|
|
28772
28945
|
value: e.iframeLifecycleState
|
|
28773
28946
|
}),
|
|
28774
|
-
/* @__PURE__ */ R(
|
|
28947
|
+
/* @__PURE__ */ R(aF, {
|
|
28775
28948
|
label: "post",
|
|
28776
28949
|
value: e.lastInteractionPostResult
|
|
28777
28950
|
}),
|
|
28778
|
-
/* @__PURE__ */ R(
|
|
28951
|
+
/* @__PURE__ */ R(aF, {
|
|
28779
28952
|
label: "context",
|
|
28780
28953
|
value: e.lastModelContextUpdate
|
|
28781
28954
|
}),
|
|
28782
|
-
/* @__PURE__ */ R(
|
|
28955
|
+
/* @__PURE__ */ R(aF, {
|
|
28783
28956
|
label: "error",
|
|
28784
28957
|
value: e.lastError
|
|
28785
28958
|
}),
|
|
28786
|
-
/* @__PURE__ */ R(
|
|
28959
|
+
/* @__PURE__ */ R(oF, {
|
|
28787
28960
|
label: "tool_call",
|
|
28788
28961
|
value: e.lastToolCall
|
|
28789
28962
|
}),
|
|
28790
|
-
/* @__PURE__ */ R(
|
|
28963
|
+
/* @__PURE__ */ R(oF, {
|
|
28791
28964
|
label: "canvas_config",
|
|
28792
28965
|
value: e.parsedCanvasConfig
|
|
28793
28966
|
})
|
|
@@ -28795,7 +28968,7 @@ function eF({ state: e }) {
|
|
|
28795
28968
|
})]
|
|
28796
28969
|
}) : null;
|
|
28797
28970
|
}
|
|
28798
|
-
function
|
|
28971
|
+
function aF({ label: e, value: t }) {
|
|
28799
28972
|
return t ? /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ R("dt", {
|
|
28800
28973
|
class: "font-semibold",
|
|
28801
28974
|
children: e
|
|
@@ -28804,7 +28977,7 @@ function tF({ label: e, value: t }) {
|
|
|
28804
28977
|
children: t
|
|
28805
28978
|
})] }) : null;
|
|
28806
28979
|
}
|
|
28807
|
-
function
|
|
28980
|
+
function oF({ label: e, value: t }) {
|
|
28808
28981
|
return t === void 0 ? null : /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ R("dt", {
|
|
28809
28982
|
class: "font-semibold",
|
|
28810
28983
|
children: e
|
|
@@ -28815,43 +28988,43 @@ function nF({ label: e, value: t }) {
|
|
|
28815
28988
|
}
|
|
28816
28989
|
//#endregion
|
|
28817
28990
|
//#region ../core/src/magic-canvas/status-strip.ts
|
|
28818
|
-
var
|
|
28991
|
+
var sF = {
|
|
28819
28992
|
compact: 32,
|
|
28820
28993
|
regular: 40,
|
|
28821
28994
|
roomy: 68
|
|
28822
|
-
},
|
|
28995
|
+
}, cF = 6e3, lF = "ease-out", uF = {
|
|
28823
28996
|
stiffness: 2822,
|
|
28824
28997
|
damping: 84,
|
|
28825
28998
|
mass: 3.5
|
|
28826
|
-
},
|
|
28827
|
-
function
|
|
28828
|
-
if (typeof document > "u" || typeof getComputedStyle != "function") return
|
|
28999
|
+
}, dF = .25, fF = 16;
|
|
29000
|
+
function pF() {
|
|
29001
|
+
if (typeof document > "u" || typeof getComputedStyle != "function") return fF;
|
|
28829
29002
|
let e = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
28830
|
-
return Number.isFinite(e) ? e :
|
|
29003
|
+
return Number.isFinite(e) ? e : fF;
|
|
28831
29004
|
}
|
|
28832
|
-
function
|
|
29005
|
+
function mF(e, t) {
|
|
28833
29006
|
return e === "widget" || t !== void 0 && t > 0 && t < 640 ? "compact" : "regular";
|
|
28834
29007
|
}
|
|
28835
|
-
function
|
|
29008
|
+
function hF(e) {
|
|
28836
29009
|
if (typeof e == "string") try {
|
|
28837
29010
|
let t = JSON.parse(e);
|
|
28838
|
-
return
|
|
29011
|
+
return gF(t) ? t : null;
|
|
28839
29012
|
} catch {
|
|
28840
29013
|
return null;
|
|
28841
29014
|
}
|
|
28842
|
-
return
|
|
29015
|
+
return gF(e) ? e : null;
|
|
28843
29016
|
}
|
|
28844
|
-
function
|
|
29017
|
+
function gF(e) {
|
|
28845
29018
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
28846
29019
|
}
|
|
28847
|
-
function
|
|
28848
|
-
let t =
|
|
29020
|
+
function _F(e) {
|
|
29021
|
+
let t = hF(e)?.state;
|
|
28849
29022
|
return t === "success" || t === "error";
|
|
28850
29023
|
}
|
|
28851
|
-
function
|
|
28852
|
-
return
|
|
29024
|
+
function vF(e) {
|
|
29025
|
+
return hF(e)?.state === "error";
|
|
28853
29026
|
}
|
|
28854
|
-
function
|
|
29027
|
+
function yF(e, t, n) {
|
|
28855
29028
|
let r = `${t + 8}px`;
|
|
28856
29029
|
if (n === void 0 || !Number.isFinite(n) || n <= 0) return {
|
|
28857
29030
|
left: "1rem",
|
|
@@ -28865,83 +29038,83 @@ function hF(e, t, n) {
|
|
|
28865
29038
|
bottom: r
|
|
28866
29039
|
};
|
|
28867
29040
|
}
|
|
28868
|
-
function
|
|
29041
|
+
function bF(e) {
|
|
28869
29042
|
let t = e?.trim();
|
|
28870
|
-
if (!t) return
|
|
29043
|
+
if (!t) return dF * pF();
|
|
28871
29044
|
let n = Number.parseFloat(t);
|
|
28872
|
-
if (!Number.isFinite(n)) return
|
|
28873
|
-
if (t.endsWith("rem")) return n *
|
|
29045
|
+
if (!Number.isFinite(n)) return dF * pF();
|
|
29046
|
+
if (t.endsWith("rem")) return n * pF();
|
|
28874
29047
|
if (t.endsWith("px")) return n;
|
|
28875
29048
|
}
|
|
28876
|
-
function
|
|
28877
|
-
let n = e["--color-neutral"], r = e["--color-neutral-content"], i =
|
|
29049
|
+
function xF(e, t) {
|
|
29050
|
+
let n = e["--color-neutral"], r = e["--color-neutral-content"], i = bF(e["--radius-field"]);
|
|
28878
29051
|
return {
|
|
28879
29052
|
...n ? { "--activity-bg": n } : {},
|
|
28880
29053
|
...r ? { "--activity-fg": r } : {},
|
|
28881
29054
|
"--activity-border": "transparent",
|
|
28882
29055
|
...i === void 0 ? {} : { "--activity-radius": `${i}px` },
|
|
28883
|
-
"--activity-height": `${
|
|
29056
|
+
"--activity-height": `${sF[t.density]}px`,
|
|
28884
29057
|
"--activity-align": t.align
|
|
28885
29058
|
};
|
|
28886
29059
|
}
|
|
28887
29060
|
//#endregion
|
|
28888
29061
|
//#region ../core/src/magic-canvas/magic-canvas.tsx
|
|
28889
|
-
var
|
|
28890
|
-
async function
|
|
28891
|
-
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(),
|
|
29062
|
+
var SF = 1e3, CF = 5e3, wF = 1200, TF = [2e3, 6e3];
|
|
29063
|
+
async function EF(e, t, n) {
|
|
29064
|
+
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(), CF);
|
|
28892
29065
|
try {
|
|
28893
29066
|
await pn(e, t, n, { signal: r.signal });
|
|
28894
29067
|
} finally {
|
|
28895
29068
|
globalThis.clearTimeout(i);
|
|
28896
29069
|
}
|
|
28897
29070
|
}
|
|
28898
|
-
function
|
|
29071
|
+
function DF(e) {
|
|
28899
29072
|
return e instanceof sn && e.status >= 400 && e.status < 500 && e.status !== 408 && e.status !== 429;
|
|
28900
29073
|
}
|
|
28901
|
-
function
|
|
29074
|
+
function OF(e, t) {
|
|
28902
29075
|
console.error("Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.", e), t({
|
|
28903
29076
|
lastInteractionPostResult: "error",
|
|
28904
|
-
lastError:
|
|
29077
|
+
lastError: cI(e).message
|
|
28905
29078
|
}, {
|
|
28906
29079
|
error: e,
|
|
28907
29080
|
operation: "canvas.bridge"
|
|
28908
29081
|
});
|
|
28909
29082
|
}
|
|
28910
|
-
function
|
|
29083
|
+
function kF(e) {
|
|
28911
29084
|
return e.content.some((e) => e.type === "text" && typeof e.text == "string" && e.text.trim() !== "");
|
|
28912
29085
|
}
|
|
28913
|
-
function
|
|
29086
|
+
function AF(e, t, n, r) {
|
|
28914
29087
|
(async () => {
|
|
28915
29088
|
let i;
|
|
28916
|
-
for (let a of
|
|
29089
|
+
for (let a of TF) {
|
|
28917
29090
|
await new Promise((e) => setTimeout(e, a));
|
|
28918
29091
|
try {
|
|
28919
|
-
await
|
|
29092
|
+
await EF(e, t, n), r({
|
|
28920
29093
|
lastInteractionPostResult: "recovered",
|
|
28921
29094
|
lastError: void 0
|
|
28922
29095
|
});
|
|
28923
29096
|
return;
|
|
28924
29097
|
} catch (e) {
|
|
28925
|
-
if (i = e,
|
|
29098
|
+
if (i = e, DF(e)) break;
|
|
28926
29099
|
}
|
|
28927
29100
|
}
|
|
28928
|
-
|
|
29101
|
+
OF(i, r);
|
|
28929
29102
|
})();
|
|
28930
29103
|
}
|
|
28931
|
-
var
|
|
28932
|
-
function
|
|
28933
|
-
return e.correct_answer === void 0 ?
|
|
29104
|
+
var jF = 2e3;
|
|
29105
|
+
function MF(e) {
|
|
29106
|
+
return e.correct_answer === void 0 ? wF : jF;
|
|
28934
29107
|
}
|
|
28935
|
-
var
|
|
29108
|
+
var NF = 48, PF = 24, FF = "ui-monospace, SFMono-Regular, Menlo, monospace", IF = 160, LF = () => {}, RF = "allow-scripts", zF = {
|
|
28936
29109
|
"canvas.scheduling_embed": "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
28937
29110
|
"canvas.text": "allow-scripts allow-popups allow-popups-to-escape-sandbox"
|
|
28938
29111
|
};
|
|
28939
|
-
function
|
|
29112
|
+
function BF(e, t) {
|
|
28940
29113
|
if (!t.contentWindow || e.source !== t.contentWindow) return !1;
|
|
28941
29114
|
let n = e.data;
|
|
28942
29115
|
return !!n && typeof n == "object" && n?.jsonrpc === "2.0";
|
|
28943
29116
|
}
|
|
28944
|
-
var
|
|
29117
|
+
var VF = class {
|
|
28945
29118
|
onmessage;
|
|
28946
29119
|
onerror;
|
|
28947
29120
|
onclose;
|
|
@@ -28952,7 +29125,7 @@ var LF = class {
|
|
|
28952
29125
|
}
|
|
28953
29126
|
start() {
|
|
28954
29127
|
let e = (e) => {
|
|
28955
|
-
|
|
29128
|
+
BF(e, this.#e) && this.onmessage?.(e.data);
|
|
28956
29129
|
};
|
|
28957
29130
|
return this.#t = e, globalThis.addEventListener("message", e), Promise.resolve();
|
|
28958
29131
|
}
|
|
@@ -28963,12 +29136,12 @@ var LF = class {
|
|
|
28963
29136
|
return this.#t && globalThis.removeEventListener("message", this.#t), this.#t = void 0, this.onclose?.(), Promise.resolve();
|
|
28964
29137
|
}
|
|
28965
29138
|
};
|
|
28966
|
-
function
|
|
28967
|
-
for (let t of Wy) if (e.some((e) =>
|
|
29139
|
+
function HF(e) {
|
|
29140
|
+
for (let t of Wy) if (e.some((e) => iI(e) === t)) return t;
|
|
28968
29141
|
return null;
|
|
28969
29142
|
}
|
|
28970
|
-
function
|
|
28971
|
-
let { client: l, telemetry: u } = _h(), { isDark: d, cssVars: f } = Bj(), p = zf(), m = Bf(), [h, g] = M([]), [_, v] = M(null), [y, b] = M(!1), x = P(null), S = P(null), C = P(null), [w, T] =
|
|
29143
|
+
function UF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n = aI(), callPresence: r, callControlsVisible: i, callControlsRect: a, gridConfigEnabled: o, gridStartEnabled: s, onStatusStripChange: c } = {}) {
|
|
29144
|
+
let { client: l, telemetry: u } = _h(), { isDark: d, cssVars: f } = Bj(), p = zf(), m = Bf(), [h, g] = M([]), [_, v] = M(null), [y, b] = M(!1), x = P(null), S = P(null), C = P(null), [w, T] = eI(), E = L(ot)?.surface, D = mF(E, T.width), ee = sF[D], O = y ? null : _, te = O ? ee + 8 : 0, k = I(() => {
|
|
28972
29145
|
S.current !== null && (clearTimeout(S.current), S.current = null);
|
|
28973
29146
|
}, []), A = I(() => {
|
|
28974
29147
|
C.current !== null && (clearTimeout(C.current), C.current = null);
|
|
@@ -28979,7 +29152,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
28979
29152
|
}, [k, A]), re = I(() => {
|
|
28980
29153
|
x.current && (A(), C.current = setTimeout(() => {
|
|
28981
29154
|
C.current = null, ne();
|
|
28982
|
-
},
|
|
29155
|
+
}, cF));
|
|
28983
29156
|
}, [ne, A]);
|
|
28984
29157
|
N(() => () => {
|
|
28985
29158
|
k(), A();
|
|
@@ -28993,7 +29166,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
28993
29166
|
let [ie, j] = M(() => ({
|
|
28994
29167
|
enabled: n,
|
|
28995
29168
|
iframeLifecycleState: "idle"
|
|
28996
|
-
})), ae =
|
|
29169
|
+
})), ae = tF({
|
|
28997
29170
|
instances: h,
|
|
28998
29171
|
viewport: T,
|
|
28999
29172
|
callControlsBandPx: 72,
|
|
@@ -29063,7 +29236,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29063
29236
|
let n = x.current, r = cb(n, t);
|
|
29064
29237
|
if (r.consumed) {
|
|
29065
29238
|
let e = n !== null && r.strip !== null && n.tool_call_id === r.strip.tool_call_id && n.conversation_id === r.strip.conversation_id, t = C.current !== null;
|
|
29066
|
-
r.strip ?
|
|
29239
|
+
r.strip ? _F(r.strip.arguments) ? e && (vF(r.strip.arguments) && !t && (x.current = r.strip, v(r.strip)), re()) : e && t || (k(), A(), x.current = r.strip, b(!1), v(r.strip)) : ne();
|
|
29067
29240
|
} else g((e) => ib(e, t));
|
|
29068
29241
|
oe({
|
|
29069
29242
|
lastToolCall: e.data,
|
|
@@ -29074,7 +29247,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29074
29247
|
} catch (e) {
|
|
29075
29248
|
oe({
|
|
29076
29249
|
iframeLifecycleState: "error",
|
|
29077
|
-
lastError:
|
|
29250
|
+
lastError: cI(e).message
|
|
29078
29251
|
}, {
|
|
29079
29252
|
error: e,
|
|
29080
29253
|
operation: "canvas.validate"
|
|
@@ -29112,7 +29285,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29112
29285
|
ue.safe_area?.width,
|
|
29113
29286
|
ue.safe_area?.height
|
|
29114
29287
|
]);
|
|
29115
|
-
let fe =
|
|
29288
|
+
let fe = HF(le.map(({ layout: e }) => e));
|
|
29116
29289
|
N(() => {
|
|
29117
29290
|
t?.(fe);
|
|
29118
29291
|
}, [t, fe]);
|
|
@@ -29121,7 +29294,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29121
29294
|
ref: w,
|
|
29122
29295
|
"data-magic-canvas-root": !0,
|
|
29123
29296
|
class: "pointer-events-none absolute inset-0 z-30",
|
|
29124
|
-
style: `--mc-strip-band: ${te}px; --cvi-status-strip-drop: ${80 -
|
|
29297
|
+
style: `--mc-strip-band: ${te}px; --cvi-status-strip-drop: ${80 - PF}px`,
|
|
29125
29298
|
children: [
|
|
29126
29299
|
pe && de && /* @__PURE__ */ R("div", { class: "absolute inset-0 bg-black/45" }),
|
|
29127
29300
|
pe && !de && ae.sheetBottomPx !== null && /* @__PURE__ */ R("div", {
|
|
@@ -29132,15 +29305,15 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29132
29305
|
backgroundImage: "linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))"
|
|
29133
29306
|
}
|
|
29134
29307
|
}),
|
|
29135
|
-
pe && le.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ R(
|
|
29136
|
-
slot:
|
|
29308
|
+
pe && le.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ R(qF, {
|
|
29309
|
+
slot: iI(t),
|
|
29137
29310
|
safeAreaTop: ue.safe_area?.y,
|
|
29138
29311
|
frameWidth: T.width,
|
|
29139
29312
|
...n ? {
|
|
29140
29313
|
gridRect: n,
|
|
29141
29314
|
gridAnimate: ae.animate
|
|
29142
29315
|
} : {},
|
|
29143
|
-
children: (r) => /* @__PURE__ */ R(
|
|
29316
|
+
children: (r) => /* @__PURE__ */ R(JF, {
|
|
29144
29317
|
availableHeight: r,
|
|
29145
29318
|
client: l,
|
|
29146
29319
|
gridDriven: n !== null,
|
|
@@ -29166,7 +29339,7 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29166
29339
|
sendAppMessage: se
|
|
29167
29340
|
})
|
|
29168
29341
|
}, e.id)),
|
|
29169
|
-
_ && /* @__PURE__ */ R(
|
|
29342
|
+
_ && /* @__PURE__ */ R(WF, {
|
|
29170
29343
|
client: l,
|
|
29171
29344
|
controlsRect: a,
|
|
29172
29345
|
density: D,
|
|
@@ -29180,14 +29353,14 @@ function zF({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29180
29353
|
}),
|
|
29181
29354
|
pe && /* @__PURE__ */ R("div", {
|
|
29182
29355
|
class: "absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20",
|
|
29183
|
-
children: /* @__PURE__ */ R(
|
|
29356
|
+
children: /* @__PURE__ */ R(iF, { state: ie })
|
|
29184
29357
|
}),
|
|
29185
29358
|
ae.debug
|
|
29186
29359
|
]
|
|
29187
29360
|
});
|
|
29188
29361
|
}
|
|
29189
|
-
function
|
|
29190
|
-
let u =
|
|
29362
|
+
function WF({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i, hostTheme: a, instance: o, onComplete: s, onDebug: c, sendAppMessage: l }) {
|
|
29363
|
+
let u = sF[n], d = {
|
|
29191
29364
|
...o.layout,
|
|
29192
29365
|
preferred_slot: "safe-area-bottom",
|
|
29193
29366
|
display_mode: "inline",
|
|
@@ -29196,7 +29369,7 @@ function BF({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29196
29369
|
...a,
|
|
29197
29370
|
cssVars: {
|
|
29198
29371
|
...a.cssVars,
|
|
29199
|
-
"--font-mono":
|
|
29372
|
+
"--font-mono": FF
|
|
29200
29373
|
},
|
|
29201
29374
|
activity: {
|
|
29202
29375
|
density: n,
|
|
@@ -29205,13 +29378,13 @@ function BF({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29205
29378
|
}), [n, a]);
|
|
29206
29379
|
return /* @__PURE__ */ R("div", {
|
|
29207
29380
|
class: "cvi-status-strip absolute flex justify-center",
|
|
29208
|
-
style:
|
|
29381
|
+
style: yF(t, 72, i),
|
|
29209
29382
|
"data-canvas-status-strip": !0,
|
|
29210
|
-
children: /* @__PURE__ */ R(
|
|
29383
|
+
children: /* @__PURE__ */ R(GF, {
|
|
29211
29384
|
exiting: r,
|
|
29212
29385
|
instanceId: o.id,
|
|
29213
|
-
children: /* @__PURE__ */ R(
|
|
29214
|
-
availableHeight:
|
|
29386
|
+
children: /* @__PURE__ */ R(JF, {
|
|
29387
|
+
availableHeight: IF,
|
|
29215
29388
|
client: e,
|
|
29216
29389
|
fixedHeightPx: u,
|
|
29217
29390
|
hostTheme: f,
|
|
@@ -29219,27 +29392,27 @@ function BF({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29219
29392
|
layout: d,
|
|
29220
29393
|
onComplete: s,
|
|
29221
29394
|
onDebug: c,
|
|
29222
|
-
onDisplayModeChange:
|
|
29223
|
-
onNaturalHeightChange:
|
|
29395
|
+
onDisplayModeChange: LF,
|
|
29396
|
+
onNaturalHeightChange: LF,
|
|
29224
29397
|
sendAppMessage: l,
|
|
29225
29398
|
variant: "strip"
|
|
29226
29399
|
})
|
|
29227
29400
|
})
|
|
29228
29401
|
});
|
|
29229
29402
|
}
|
|
29230
|
-
function
|
|
29403
|
+
function GF({ exiting: e, instanceId: t, children: n }) {
|
|
29231
29404
|
let r = P(null);
|
|
29232
29405
|
return Ye(() => {
|
|
29233
29406
|
let t = r.current;
|
|
29234
29407
|
if (!t || e) return;
|
|
29235
29408
|
if (mx()) {
|
|
29236
|
-
t.style.transition = `opacity 300ms ${
|
|
29409
|
+
t.style.transition = `opacity 300ms ${lF}`, t.style.opacity = "0";
|
|
29237
29410
|
let e = globalThis.requestAnimationFrame(() => {
|
|
29238
29411
|
t.style.opacity = "1";
|
|
29239
29412
|
});
|
|
29240
29413
|
return () => globalThis.cancelAnimationFrame(e);
|
|
29241
29414
|
}
|
|
29242
|
-
let { stiffness: n, damping: i, mass: a } =
|
|
29415
|
+
let { stiffness: n, damping: i, mass: a } = uF, o = 0, s = 0, c = performance.now(), l = 0, u = () => {
|
|
29243
29416
|
let e = (1 - o) * 40;
|
|
29244
29417
|
t.style.transform = `translateY(${e.toFixed(2)}px)`, t.style.opacity = `${Math.min(Math.max(o, 0), 1)}`;
|
|
29245
29418
|
};
|
|
@@ -29255,7 +29428,7 @@ function VF({ exiting: e, instanceId: t, children: n }) {
|
|
|
29255
29428
|
return l = globalThis.requestAnimationFrame(d), () => globalThis.cancelAnimationFrame(l);
|
|
29256
29429
|
}, [e, t]), N(() => {
|
|
29257
29430
|
let t = r.current;
|
|
29258
|
-
t && e && (t.style.transition = `opacity 300ms ${
|
|
29431
|
+
t && e && (t.style.transition = `opacity 300ms ${lF}`, t.style.opacity = "0");
|
|
29259
29432
|
}, [e]), /* @__PURE__ */ R("div", {
|
|
29260
29433
|
ref: r,
|
|
29261
29434
|
class: "w-full",
|
|
@@ -29263,13 +29436,13 @@ function VF({ exiting: e, instanceId: t, children: n }) {
|
|
|
29263
29436
|
children: n
|
|
29264
29437
|
});
|
|
29265
29438
|
}
|
|
29266
|
-
var
|
|
29267
|
-
function
|
|
29268
|
-
let [o, s] =
|
|
29439
|
+
var KF = 16;
|
|
29440
|
+
function qF({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate: i = !1, children: a }) {
|
|
29441
|
+
let [o, s] = tI(), c = a(r ? r.height : e === "full" ? void 0 : s);
|
|
29269
29442
|
if (r) return /* @__PURE__ */ R("div", {
|
|
29270
29443
|
ref: o,
|
|
29271
29444
|
class: "pointer-events-auto absolute",
|
|
29272
|
-
style:
|
|
29445
|
+
style: rF(r, i),
|
|
29273
29446
|
"data-canvas-slot": e,
|
|
29274
29447
|
"data-grid-driven": "true",
|
|
29275
29448
|
children: /* @__PURE__ */ R("div", {
|
|
@@ -29281,7 +29454,7 @@ function UF({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29281
29454
|
let r = t == null ? "1rem" : `${t * 100}%`, i = n != null && n > 0 ? Math.max(0, n - 32) : void 0;
|
|
29282
29455
|
return /* @__PURE__ */ R("div", {
|
|
29283
29456
|
ref: o,
|
|
29284
|
-
class: `cvi-strip-lift ${
|
|
29457
|
+
class: `cvi-strip-lift ${rI(e)}`,
|
|
29285
29458
|
style: {
|
|
29286
29459
|
top: r,
|
|
29287
29460
|
bottom: "calc(72px + var(--mc-strip-band, 0px))",
|
|
@@ -29296,8 +29469,8 @@ function UF({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29296
29469
|
}
|
|
29297
29470
|
return e === "safe-area-bottom" ? /* @__PURE__ */ R("div", {
|
|
29298
29471
|
ref: o,
|
|
29299
|
-
class:
|
|
29300
|
-
style: { top: `${
|
|
29472
|
+
class: rI(e),
|
|
29473
|
+
style: { top: `${KF}px` },
|
|
29301
29474
|
"data-canvas-slot": e,
|
|
29302
29475
|
children: /* @__PURE__ */ R("div", {
|
|
29303
29476
|
class: "contents",
|
|
@@ -29305,7 +29478,7 @@ function UF({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29305
29478
|
})
|
|
29306
29479
|
}) : /* @__PURE__ */ R("div", {
|
|
29307
29480
|
ref: o,
|
|
29308
|
-
class:
|
|
29481
|
+
class: rI(e),
|
|
29309
29482
|
"data-canvas-slot": e,
|
|
29310
29483
|
children: /* @__PURE__ */ R("div", {
|
|
29311
29484
|
class: "contents",
|
|
@@ -29313,7 +29486,7 @@ function UF({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29313
29486
|
})
|
|
29314
29487
|
});
|
|
29315
29488
|
}
|
|
29316
|
-
function
|
|
29489
|
+
function JF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard: r = !1, hostTheme: i, instance: a, layout: o, dimmed: s, onDebug: c, onComplete: l, onDisplayModeChange: u, onNaturalHeightChange: d, sendAppMessage: f, variant: p = "card", fixedHeightPx: m }) {
|
|
29317
29490
|
let h = p === "strip", g = m ?? 720, _ = P(null), v = P(null), y = P(e), b = P(r), x = P(m ?? 320), S = P({
|
|
29318
29491
|
fixed: m,
|
|
29319
29492
|
max: g
|
|
@@ -29326,17 +29499,17 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29326
29499
|
}, [m, g]), N(() => {
|
|
29327
29500
|
w.current = a;
|
|
29328
29501
|
}, [a]), N(() => {
|
|
29329
|
-
x.current = k, v.current?.setHostContext(
|
|
29502
|
+
x.current = k, v.current?.setHostContext(QF(w.current, C.current, T.current, y.current, k, b.current));
|
|
29330
29503
|
}, [k]), N(() => {
|
|
29331
29504
|
y.current = e, b.current = r;
|
|
29332
|
-
let t =
|
|
29333
|
-
C.current = t, v.current?.setHostContext(
|
|
29505
|
+
let t = ZF(i, _.current);
|
|
29506
|
+
C.current = t, v.current?.setHostContext(QF(w.current, t, T.current, e, x.current, r));
|
|
29334
29507
|
}, [
|
|
29335
29508
|
e,
|
|
29336
29509
|
i,
|
|
29337
29510
|
r
|
|
29338
29511
|
]), N(() => {
|
|
29339
|
-
T.current = o, v.current?.setHostContext(
|
|
29512
|
+
T.current = o, v.current?.setHostContext(QF(w.current, C.current, o, e, x.current, b.current));
|
|
29340
29513
|
}, [e, o]), N(() => {
|
|
29341
29514
|
D.current = l, ee.current = u, O.current = d, te.current = f;
|
|
29342
29515
|
}, [
|
|
@@ -29350,7 +29523,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29350
29523
|
let n = !1, r = null, i = null, o = null, s = null, l = new URL(a.canvas_config.sandbox_url, globalThis.location.href).href, u = (e) => {
|
|
29351
29524
|
n || c({
|
|
29352
29525
|
iframeLifecycleState: "error",
|
|
29353
|
-
lastError:
|
|
29526
|
+
lastError: cI(e).message
|
|
29354
29527
|
}, {
|
|
29355
29528
|
error: e,
|
|
29356
29529
|
operation: "canvas.bridge"
|
|
@@ -29387,18 +29560,18 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29387
29560
|
text: {},
|
|
29388
29561
|
structuredContent: {}
|
|
29389
29562
|
}
|
|
29390
|
-
}, { hostContext:
|
|
29563
|
+
}, { hostContext: QF(a, ZF(C.current, e), T.current, y.current, x.current, b.current) });
|
|
29391
29564
|
r = f, v.current = f, f.oninitialized = () => {
|
|
29392
29565
|
n || (c({ iframeLifecycleState: "ready" }), E.current = w.current.revision, f.sendToolInput({ arguments: w.current.arguments }).catch(u));
|
|
29393
29566
|
}, f.onsizechange = ({ height: e }) => {
|
|
29394
29567
|
if (!n && typeof e == "number" && Number.isFinite(e)) {
|
|
29395
|
-
let { fixed: t, max: n } = S.current, r = t === void 0 ? Math.min(Math.max(e,
|
|
29568
|
+
let { fixed: t, max: n } = S.current, r = t === void 0 ? Math.min(Math.max(e, NF), n) : e === t ? t : Math.min(e, IF);
|
|
29396
29569
|
A(r), O.current(w.current.id, r);
|
|
29397
29570
|
}
|
|
29398
29571
|
}, f.onmessage = async (e) => {
|
|
29399
29572
|
let r = lb(e);
|
|
29400
29573
|
if (!r) {
|
|
29401
|
-
if (
|
|
29574
|
+
if (kF(e)) {
|
|
29402
29575
|
let e = "Magic Canvas message included text without interaction metadata; no interaction row was recorded.";
|
|
29403
29576
|
return c({
|
|
29404
29577
|
lastInteractionPostResult: "error",
|
|
@@ -29423,7 +29596,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29423
29596
|
}
|
|
29424
29597
|
})();
|
|
29425
29598
|
if ("error" in a) {
|
|
29426
|
-
let e =
|
|
29599
|
+
let e = cI(a.error).message;
|
|
29427
29600
|
return c({
|
|
29428
29601
|
lastInteractionPostResult: "error",
|
|
29429
29602
|
lastError: e
|
|
@@ -29440,19 +29613,19 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29440
29613
|
try {
|
|
29441
29614
|
u = fb(e, o);
|
|
29442
29615
|
} catch (e) {
|
|
29443
|
-
c({ lastError:
|
|
29616
|
+
c({ lastError: cI(e).message }), o.type === "submit" && console.warn("Magic Canvas dropped the response text of a submitted card.", e);
|
|
29444
29617
|
}
|
|
29445
29618
|
let d = !0;
|
|
29446
29619
|
try {
|
|
29447
|
-
await
|
|
29620
|
+
await EF(t, o.conversation_id, l.body);
|
|
29448
29621
|
} catch (e) {
|
|
29449
|
-
d = !1,
|
|
29622
|
+
d = !1, DF(e) ? OF(e, c) : (console.warn("Magic Canvas interaction POST failed; continuing without it and retrying in the background.", e), c({
|
|
29450
29623
|
lastInteractionPostResult: "failed_open",
|
|
29451
|
-
lastError:
|
|
29624
|
+
lastError: cI(e).message
|
|
29452
29625
|
}, {
|
|
29453
29626
|
error: e,
|
|
29454
29627
|
operation: "canvas.bridge"
|
|
29455
|
-
}),
|
|
29628
|
+
}), AF(t, o.conversation_id, l.body, c));
|
|
29456
29629
|
}
|
|
29457
29630
|
if (n) return {};
|
|
29458
29631
|
if (u) try {
|
|
@@ -29463,7 +29636,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29463
29636
|
properties: { text: u }
|
|
29464
29637
|
});
|
|
29465
29638
|
} catch (e) {
|
|
29466
|
-
console.error("Magic Canvas respond send failed.", e), c({ lastError:
|
|
29639
|
+
console.error("Magic Canvas respond send failed.", e), c({ lastError: cI(e).message }, {
|
|
29467
29640
|
error: e,
|
|
29468
29641
|
operation: "canvas.bridge"
|
|
29469
29642
|
});
|
|
@@ -29473,18 +29646,18 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29473
29646
|
lastError: void 0
|
|
29474
29647
|
}), db(o) && (o.type === "submit" ? (s && clearTimeout(s), s = setTimeout(() => {
|
|
29475
29648
|
s = null, n || D.current();
|
|
29476
|
-
},
|
|
29649
|
+
}, MF(i.arguments))) : D.current()), {};
|
|
29477
29650
|
}, f.onupdatemodelcontext = async (e) => (i = e, o ||= setTimeout(() => {
|
|
29478
29651
|
o = null, d();
|
|
29479
|
-
},
|
|
29652
|
+
}, SF), {}), f.onrequestdisplaymode = async ({ mode: e }) => {
|
|
29480
29653
|
if (h) return { mode: "inline" };
|
|
29481
29654
|
let t = e === "fullscreen" ? "fullscreen" : "inline";
|
|
29482
29655
|
return ee.current(t), T.current = {
|
|
29483
29656
|
...T.current,
|
|
29484
29657
|
display_mode: t,
|
|
29485
29658
|
viable_slot: t === "fullscreen" ? "full" : T.current.viable_slot
|
|
29486
|
-
}, f.setHostContext(
|
|
29487
|
-
}, f.connect(new
|
|
29659
|
+
}, f.setHostContext(QF(w.current, C.current, T.current, y.current, x.current, b.current)), { mode: t };
|
|
29660
|
+
}, f.connect(new VF(e)).then(() => void 0).catch(u);
|
|
29488
29661
|
};
|
|
29489
29662
|
c({
|
|
29490
29663
|
iframeLifecycleState: "mounting",
|
|
@@ -29506,7 +29679,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29506
29679
|
a.revision !== 0 && (a.revision <= E.current || (E.current = a.revision, v.current?.sendToolInput({ arguments: a.arguments }).catch((e) => {
|
|
29507
29680
|
c({
|
|
29508
29681
|
iframeLifecycleState: "error",
|
|
29509
|
-
lastError:
|
|
29682
|
+
lastError: cI(e).message
|
|
29510
29683
|
}, {
|
|
29511
29684
|
error: e,
|
|
29512
29685
|
operation: "canvas.bridge"
|
|
@@ -29517,7 +29690,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29517
29690
|
a.revision,
|
|
29518
29691
|
c
|
|
29519
29692
|
]);
|
|
29520
|
-
let ne = o.viable_slot === "full" || o.display_mode === "fullscreen", re = ne ? null :
|
|
29693
|
+
let ne = o.viable_slot === "full" || o.display_mode === "fullscreen", re = ne ? null : $F(k, e, r), ie = re?.placeholderStyle, j = re?.cardStyle, ae = ne ? { height: "100%" } : re?.iframeStyle ?? {
|
|
29521
29694
|
width: "100%",
|
|
29522
29695
|
height: `${k}px`
|
|
29523
29696
|
}, oe = h ? "pointer-events-auto w-full overflow-hidden" : [
|
|
@@ -29525,7 +29698,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29525
29698
|
r ? "" : "shadow-xl",
|
|
29526
29699
|
ne ? "fixed inset-4 z-10 max-w-none" : n ? "max-w-none" : "max-w-md",
|
|
29527
29700
|
s ? "scale-[0.98] opacity-40" : ""
|
|
29528
|
-
].filter(Boolean).join(" "), se =
|
|
29701
|
+
].filter(Boolean).join(" "), se = zF[a.canvas_config.component] ?? RF, ce = /* @__PURE__ */ R("div", {
|
|
29529
29702
|
class: oe,
|
|
29530
29703
|
style: j,
|
|
29531
29704
|
...h ? { "data-canvas-strip": o.viable_slot } : { "data-canvas-card": o.viable_slot },
|
|
@@ -29544,7 +29717,7 @@ function WF({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29544
29717
|
children: ce
|
|
29545
29718
|
});
|
|
29546
29719
|
}
|
|
29547
|
-
var
|
|
29720
|
+
var YF = [
|
|
29548
29721
|
"--color-base-100",
|
|
29549
29722
|
"--color-base-200",
|
|
29550
29723
|
"--color-base-300",
|
|
@@ -29554,17 +29727,17 @@ var GF = [
|
|
|
29554
29727
|
"--color-neutral",
|
|
29555
29728
|
"--color-neutral-content"
|
|
29556
29729
|
];
|
|
29557
|
-
function
|
|
29730
|
+
function XF(e) {
|
|
29558
29731
|
if (!e || typeof getComputedStyle != "function") return {};
|
|
29559
29732
|
let t = getComputedStyle(e), n = {};
|
|
29560
|
-
for (let e of
|
|
29733
|
+
for (let e of YF) {
|
|
29561
29734
|
let r = t.getPropertyValue(e).trim();
|
|
29562
29735
|
r && (n[e] = r);
|
|
29563
29736
|
}
|
|
29564
29737
|
return n;
|
|
29565
29738
|
}
|
|
29566
|
-
function
|
|
29567
|
-
let n =
|
|
29739
|
+
function ZF(e, t) {
|
|
29740
|
+
let n = XF(t);
|
|
29568
29741
|
return Object.keys(n).length === 0 ? e : {
|
|
29569
29742
|
...e,
|
|
29570
29743
|
cssVars: {
|
|
@@ -29573,20 +29746,20 @@ function qF(e, t) {
|
|
|
29573
29746
|
}
|
|
29574
29747
|
};
|
|
29575
29748
|
}
|
|
29576
|
-
function
|
|
29577
|
-
let o = Kb(t, n), s = n.viable_slot === "full" || n.display_mode === "fullscreen", c = s ? void 0 :
|
|
29749
|
+
function QF(e, t, n, r, i, a = !1) {
|
|
29750
|
+
let o = Kb(t, n), s = n.viable_slot === "full" || n.display_mode === "fullscreen", c = s ? void 0 : oI(r), l = t.activity ? xF(t.cssVars, t.activity) : {}, u = s ? 1 : $F(i ?? 0, r, a)?.displayScale ?? 1;
|
|
29578
29751
|
return {
|
|
29579
29752
|
...e.canvas_config.host_context,
|
|
29580
29753
|
...o,
|
|
29581
29754
|
...l,
|
|
29582
29755
|
containerDimensions: {
|
|
29583
|
-
...
|
|
29756
|
+
...sI(o.containerDimensions) ? o.containerDimensions : {},
|
|
29584
29757
|
...c === void 0 ? {} : { maxHeight: c },
|
|
29585
29758
|
displayScale: u
|
|
29586
29759
|
}
|
|
29587
29760
|
};
|
|
29588
29761
|
}
|
|
29589
|
-
function
|
|
29762
|
+
function $F(e, t, n = !1) {
|
|
29590
29763
|
if (t === void 0 || !Number.isFinite(t) || t <= 0) return null;
|
|
29591
29764
|
let r = Math.min(e, 720);
|
|
29592
29765
|
if (n) return {
|
|
@@ -29626,11 +29799,11 @@ function YF(e, t, n = !1) {
|
|
|
29626
29799
|
}
|
|
29627
29800
|
};
|
|
29628
29801
|
}
|
|
29629
|
-
function
|
|
29630
|
-
let e = P(null), [t, n] = M(() =>
|
|
29802
|
+
function eI() {
|
|
29803
|
+
let e = P(null), [t, n] = M(() => nI(null));
|
|
29631
29804
|
return N(() => {
|
|
29632
29805
|
let t = () => n((t) => {
|
|
29633
|
-
let n =
|
|
29806
|
+
let n = nI(e.current);
|
|
29634
29807
|
return t.width === n.width && t.height === n.height && t.visualViewportHeight === n.visualViewportHeight ? t : n;
|
|
29635
29808
|
});
|
|
29636
29809
|
t(), globalThis.addEventListener("resize", t), globalThis.visualViewport?.addEventListener("resize", t);
|
|
@@ -29640,7 +29813,7 @@ function XF() {
|
|
|
29640
29813
|
};
|
|
29641
29814
|
}, []), [e, t];
|
|
29642
29815
|
}
|
|
29643
|
-
function
|
|
29816
|
+
function tI() {
|
|
29644
29817
|
let e = P(null), [t, n] = M();
|
|
29645
29818
|
return N(() => {
|
|
29646
29819
|
let t = e.current;
|
|
@@ -29656,7 +29829,7 @@ function ZF() {
|
|
|
29656
29829
|
return a.observe(t), () => a.disconnect();
|
|
29657
29830
|
}, []), [e, t];
|
|
29658
29831
|
}
|
|
29659
|
-
function
|
|
29832
|
+
function nI(e) {
|
|
29660
29833
|
let t = globalThis.visualViewport?.height, n = e?.getBoundingClientRect();
|
|
29661
29834
|
if (n && n.width > 0 && n.height > 0) {
|
|
29662
29835
|
let e = t === void 0 ? void 0 : Math.max(0, (globalThis.innerHeight || 0) - t);
|
|
@@ -29672,7 +29845,7 @@ function QF(e) {
|
|
|
29672
29845
|
visualViewportHeight: t
|
|
29673
29846
|
};
|
|
29674
29847
|
}
|
|
29675
|
-
function
|
|
29848
|
+
function rI(e) {
|
|
29676
29849
|
let t = "absolute flex gap-2";
|
|
29677
29850
|
switch (e) {
|
|
29678
29851
|
case "safe-area-left": return `${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;
|
|
@@ -29681,24 +29854,24 @@ function $F(e) {
|
|
|
29681
29854
|
case "full": return `${t} inset-4 flex-col items-stretch justify-stretch`;
|
|
29682
29855
|
}
|
|
29683
29856
|
}
|
|
29684
|
-
function
|
|
29857
|
+
function iI(e) {
|
|
29685
29858
|
return e.display_mode === "fullscreen" && e.preferred_slot !== "full" ? e.preferred_slot : e.viable_slot;
|
|
29686
29859
|
}
|
|
29687
|
-
function
|
|
29860
|
+
function aI() {
|
|
29688
29861
|
return !1;
|
|
29689
29862
|
}
|
|
29690
|
-
function
|
|
29863
|
+
function oI(e) {
|
|
29691
29864
|
return e === void 0 || !Number.isFinite(e) || e <= 0 ? 720 : Math.min(Math.floor(e), 720);
|
|
29692
29865
|
}
|
|
29693
|
-
function
|
|
29866
|
+
function sI(e) {
|
|
29694
29867
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
29695
29868
|
}
|
|
29696
|
-
function
|
|
29869
|
+
function cI(e) {
|
|
29697
29870
|
return e instanceof Error ? e : Error(String(e));
|
|
29698
29871
|
}
|
|
29699
29872
|
//#endregion
|
|
29700
29873
|
//#region ../core/src/magic-canvas/grid-error-boundary.tsx
|
|
29701
|
-
var
|
|
29874
|
+
var lI = class extends D {
|
|
29702
29875
|
state = { errored: !1 };
|
|
29703
29876
|
componentDidCatch(e) {
|
|
29704
29877
|
this.props.onError(e), this.setState({ errored: !0 });
|
|
@@ -29706,8 +29879,8 @@ var aI = class extends D {
|
|
|
29706
29879
|
render() {
|
|
29707
29880
|
return this.state.errored ? null : this.props.children;
|
|
29708
29881
|
}
|
|
29709
|
-
},
|
|
29710
|
-
function
|
|
29882
|
+
}, uI = 1e4;
|
|
29883
|
+
function dI(e, t = uI) {
|
|
29711
29884
|
let [n, r] = M(!1), i = P(!1);
|
|
29712
29885
|
return N(() => {
|
|
29713
29886
|
if (!e) {
|
|
@@ -29722,7 +29895,7 @@ function sI(e, t = oI) {
|
|
|
29722
29895
|
}
|
|
29723
29896
|
//#endregion
|
|
29724
29897
|
//#region ../core/src/hooks/use-call-presence.ts
|
|
29725
|
-
function
|
|
29898
|
+
function fI(e) {
|
|
29726
29899
|
let t = Vf(), n = qf(t ?? ""), r = !Yf(t ?? "").isOff, i = Sy(e), a = i.phase === "ready" ? i.replicaId : "", o = Yf(a), s = !r && (o.state === "playable" || o.state === "loading"), c = i.phase === "ready" && !e && !i.videoState.isOff, l = !e && t !== null && !n.isOff, u = i.phase !== "ready" || i.videoState.isOff;
|
|
29727
29900
|
return F(() => ({
|
|
29728
29901
|
presence: i,
|
|
@@ -29744,7 +29917,7 @@ function cI(e) {
|
|
|
29744
29917
|
}
|
|
29745
29918
|
//#endregion
|
|
29746
29919
|
//#region ../core/src/hooks/use-call-controls-visible.ts
|
|
29747
|
-
function
|
|
29920
|
+
function pI(e, t, n) {
|
|
29748
29921
|
let [r, i] = M(!0);
|
|
29749
29922
|
return N(() => {
|
|
29750
29923
|
if (!t) return;
|
|
@@ -29774,7 +29947,7 @@ function lI(e, t, n) {
|
|
|
29774
29947
|
}
|
|
29775
29948
|
//#endregion
|
|
29776
29949
|
//#region ../core/src/hooks/use-call-controls-rect.ts
|
|
29777
|
-
function
|
|
29950
|
+
function mI(e, t, n, r, i) {
|
|
29778
29951
|
let [a, o] = M(void 0);
|
|
29779
29952
|
return N(() => {
|
|
29780
29953
|
if (!r) return;
|
|
@@ -29808,8 +29981,8 @@ function uI(e, t, n, r, i) {
|
|
|
29808
29981
|
}
|
|
29809
29982
|
//#endregion
|
|
29810
29983
|
//#region ../core/src/hooks/use-replica-join-timeout.ts
|
|
29811
|
-
var
|
|
29812
|
-
function
|
|
29984
|
+
var hI = 1e4;
|
|
29985
|
+
function gI({ onTimeout: e, timeoutMs: t = hI, active: n = !0 }) {
|
|
29813
29986
|
let r = xy().length > 0, [i, a] = M(!1), o = P(e);
|
|
29814
29987
|
return N(() => {
|
|
29815
29988
|
o.current = e;
|
|
@@ -29833,39 +30006,39 @@ function fI({ onTimeout: e, timeoutMs: t = dI, active: n = !0 }) {
|
|
|
29833
30006
|
}
|
|
29834
30007
|
//#endregion
|
|
29835
30008
|
//#region ../core/src/hooks/use-system-shutdown.ts
|
|
29836
|
-
function
|
|
30009
|
+
function _I(e) {
|
|
29837
30010
|
if (typeof e != "object" || !e) return !1;
|
|
29838
30011
|
let t = e;
|
|
29839
30012
|
return t.message_type === "system" && t.event_type === "system.shutdown";
|
|
29840
30013
|
}
|
|
29841
|
-
function
|
|
30014
|
+
function vI({ onShutdown: e }) {
|
|
29842
30015
|
let t = P(e);
|
|
29843
30016
|
N(() => {
|
|
29844
30017
|
t.current = e;
|
|
29845
30018
|
}, [e]), Wf({ onAppMessage: I((e) => {
|
|
29846
|
-
|
|
30019
|
+
_I(e?.data) && t.current();
|
|
29847
30020
|
}, []) });
|
|
29848
30021
|
}
|
|
29849
30022
|
//#endregion
|
|
29850
30023
|
//#region ../core/src/hooks/use-picture-in-picture.ts
|
|
29851
|
-
var
|
|
29852
|
-
function
|
|
29853
|
-
return globalThis.window !== void 0 && "documentPictureInPicture" in globalThis.window;
|
|
30024
|
+
var yI = en("PiP"), bI = 360, xI = 280;
|
|
30025
|
+
function SI() {
|
|
30026
|
+
return globalThis.window !== void 0 && "documentPictureInPicture" in globalThis.window && !navigator.userAgent.includes("Firefox/");
|
|
29854
30027
|
}
|
|
29855
|
-
function
|
|
29856
|
-
let { enabled: t, active: n } = e, [r, i] = M(null), a =
|
|
30028
|
+
function CI(e) {
|
|
30029
|
+
let { enabled: t, active: n } = e, [r, i] = M(null), a = SI(), o = L(Kh), s = I(() => {
|
|
29857
30030
|
i((e) => (e && !e.closed && e.close(), null));
|
|
29858
30031
|
}, []), c = I(async () => {
|
|
29859
30032
|
if (a && t && n && (!r || r.closed)) try {
|
|
29860
30033
|
let e = await globalThis.window.documentPictureInPicture.requestWindow({
|
|
29861
|
-
width:
|
|
29862
|
-
height:
|
|
30034
|
+
width: bI,
|
|
30035
|
+
height: xI
|
|
29863
30036
|
}), t = Ne.replace(/:host(?=[\s,{])/g, ":host, :root"), n = e.document.createElement("style");
|
|
29864
30037
|
n.textContent = t, e.document.head.appendChild(n), e.document.body.style.margin = "0", e.document.body.style.width = "100%", e.document.body.style.height = "100vh", e.document.body.style.overflow = "hidden", e.addEventListener("pagehide", () => {
|
|
29865
30038
|
i((t) => t === e ? null : t);
|
|
29866
30039
|
}, { once: !0 }), i(e);
|
|
29867
30040
|
} catch (e) {
|
|
29868
|
-
|
|
30041
|
+
yI.warn("Failed to open PiP window", e);
|
|
29869
30042
|
}
|
|
29870
30043
|
}, [
|
|
29871
30044
|
a,
|
|
@@ -29879,20 +30052,22 @@ function yI(e) {
|
|
|
29879
30052
|
document.visibilityState === "hidden" ? c() : document.visibilityState === "visible" && s();
|
|
29880
30053
|
};
|
|
29881
30054
|
document.addEventListener("visibilitychange", e);
|
|
29882
|
-
let r =
|
|
30055
|
+
let r = () => s();
|
|
30056
|
+
globalThis.window.addEventListener("focus", r);
|
|
30057
|
+
let i = [], o = null, l = "none", u = !1;
|
|
29883
30058
|
if (typeof navigator < "u" && "mediaSession" in navigator) {
|
|
29884
30059
|
let e = navigator.mediaSession;
|
|
29885
|
-
|
|
30060
|
+
o = e.metadata, l = e.playbackState;
|
|
29886
30061
|
try {
|
|
29887
|
-
e.metadata = new MediaMetadata({ title: "Tavus conversation" }), e.playbackState = "playing",
|
|
30062
|
+
e.metadata = new MediaMetadata({ title: "Tavus conversation" }), e.playbackState = "playing", u = !0;
|
|
29888
30063
|
} catch (e) {
|
|
29889
|
-
|
|
30064
|
+
yI.warn("mediaSession metadata setup failed", e);
|
|
29890
30065
|
}
|
|
29891
30066
|
let t = (t, n) => {
|
|
29892
30067
|
try {
|
|
29893
|
-
e.setActionHandler(t, n),
|
|
30068
|
+
e.setActionHandler(t, n), i.push(t);
|
|
29894
30069
|
} catch (e) {
|
|
29895
|
-
|
|
30070
|
+
yI.info(`mediaSession.${t} not supported`, e);
|
|
29896
30071
|
}
|
|
29897
30072
|
};
|
|
29898
30073
|
t("enterpictureinpicture", () => {
|
|
@@ -29900,13 +30075,13 @@ function yI(e) {
|
|
|
29900
30075
|
}), t("play", () => {}), t("pause", () => {});
|
|
29901
30076
|
}
|
|
29902
30077
|
return () => {
|
|
29903
|
-
if (document.removeEventListener("visibilitychange", e), typeof navigator < "u" && "mediaSession" in navigator) {
|
|
30078
|
+
if (document.removeEventListener("visibilitychange", e), globalThis.window.removeEventListener("focus", r), typeof navigator < "u" && "mediaSession" in navigator) {
|
|
29904
30079
|
let e = navigator.mediaSession;
|
|
29905
|
-
for (let t of
|
|
30080
|
+
for (let t of i) try {
|
|
29906
30081
|
e.setActionHandler(t, null);
|
|
29907
30082
|
} catch {}
|
|
29908
|
-
if (
|
|
29909
|
-
e.metadata =
|
|
30083
|
+
if (u) try {
|
|
30084
|
+
e.metadata = o, e.playbackState = l;
|
|
29910
30085
|
} catch {}
|
|
29911
30086
|
}
|
|
29912
30087
|
};
|
|
@@ -29946,11 +30121,11 @@ function yI(e) {
|
|
|
29946
30121
|
}
|
|
29947
30122
|
//#endregion
|
|
29948
30123
|
//#region ../core/src/utils/device-preferences.ts
|
|
29949
|
-
var
|
|
30124
|
+
var wI = Et(null), TI = {
|
|
29950
30125
|
active: !1,
|
|
29951
30126
|
video_shift_x: 0,
|
|
29952
30127
|
backdrop: { type: "snapshot_mirror" }
|
|
29953
|
-
},
|
|
30128
|
+
}, EI = tp(({ id: e, showAudioWave: t = !0 }) => {
|
|
29954
30129
|
let n = qf(e).isOff;
|
|
29955
30130
|
return /* @__PURE__ */ R("div", {
|
|
29956
30131
|
class: `relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n ? "hidden" : ""}`,
|
|
@@ -29965,20 +30140,20 @@ var bI = Et(null), xI = {
|
|
|
29965
30140
|
children: /* @__PURE__ */ R(my, { id: e })
|
|
29966
30141
|
})]
|
|
29967
30142
|
});
|
|
29968
|
-
}),
|
|
30143
|
+
}), DI = tp(() => {
|
|
29969
30144
|
let e = Vf(), { isScreenSharing: t } = Dv(), n = xy()[0];
|
|
29970
|
-
return /* @__PURE__ */ R(E, { children: [t && n && /* @__PURE__ */ R(
|
|
30145
|
+
return /* @__PURE__ */ R(E, { children: [t && n && /* @__PURE__ */ R(EI, { id: n }), e && /* @__PURE__ */ R(EI, {
|
|
29971
30146
|
id: e,
|
|
29972
30147
|
showAudioWave: !1
|
|
29973
30148
|
})] });
|
|
29974
|
-
}),
|
|
30149
|
+
}), OI = tp(() => /* @__PURE__ */ R("div", {
|
|
29975
30150
|
class: "cvi-strip-lift absolute bottom-4 @max-mobile:bottom-[calc(5rem_+_var(--cvi-status-strip,0px))] left-4 flex flex-col items-end gap-2 z-20",
|
|
29976
|
-
children: /* @__PURE__ */ R(
|
|
29977
|
-
})),
|
|
30151
|
+
children: /* @__PURE__ */ R(DI, {})
|
|
30152
|
+
})), kI = tp(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, effect: i, animate: a }) => /* @__PURE__ */ R(E, { children: [
|
|
29978
30153
|
/* @__PURE__ */ R("div", { class: "absolute inset-0 bg-base-200" }),
|
|
29979
30154
|
i.content && /* @__PURE__ */ R("div", {
|
|
29980
30155
|
class: "absolute overflow-hidden rounded-box bg-black",
|
|
29981
|
-
style:
|
|
30156
|
+
style: rF(i.content, a),
|
|
29982
30157
|
children: /* @__PURE__ */ R(Cv, {
|
|
29983
30158
|
sessionId: n ? t ?? "" : e,
|
|
29984
30159
|
type: "screenVideo",
|
|
@@ -29987,8 +30162,8 @@ var bI = Et(null), xI = {
|
|
|
29987
30162
|
})
|
|
29988
30163
|
}),
|
|
29989
30164
|
i.replica && /* @__PURE__ */ R("div", {
|
|
29990
|
-
class:
|
|
29991
|
-
style:
|
|
30165
|
+
class: WP("absolute overflow-hidden", i.replicaCollapsed && "rounded-box"),
|
|
30166
|
+
style: rF(i.replica, a),
|
|
29992
30167
|
children: /* @__PURE__ */ R(Ey, {
|
|
29993
30168
|
personaSessionId: e,
|
|
29994
30169
|
localSessionId: t,
|
|
@@ -29996,11 +30171,11 @@ var bI = Et(null), xI = {
|
|
|
29996
30171
|
avatarOff: r
|
|
29997
30172
|
})
|
|
29998
30173
|
})
|
|
29999
|
-
] })),
|
|
30000
|
-
let { effect: e, animate: t } =
|
|
30174
|
+
] })), AI = tp(() => {
|
|
30175
|
+
let { effect: e, animate: t } = YP.value, n = Vf();
|
|
30001
30176
|
return n === null || e.selfView === null ? null : /* @__PURE__ */ R("div", {
|
|
30002
30177
|
class: "absolute z-20 overflow-hidden rounded-box bg-black/30",
|
|
30003
|
-
style:
|
|
30178
|
+
style: rF(e.selfView, t),
|
|
30004
30179
|
children: /* @__PURE__ */ R(Cv, {
|
|
30005
30180
|
automirror: !0,
|
|
30006
30181
|
sessionId: n,
|
|
@@ -30009,23 +30184,23 @@ var bI = Et(null), xI = {
|
|
|
30009
30184
|
className: "h-full w-full object-cover"
|
|
30010
30185
|
})
|
|
30011
30186
|
});
|
|
30012
|
-
}),
|
|
30013
|
-
let t =
|
|
30014
|
-
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ R(
|
|
30015
|
-
onError:
|
|
30016
|
-
children: /* @__PURE__ */ R(
|
|
30017
|
-
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ R(
|
|
30018
|
-
}),
|
|
30187
|
+
}), jI = tp(({ canvasRenderedSlot: e }) => {
|
|
30188
|
+
let t = lN(YP.value.effect);
|
|
30189
|
+
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ R(lI, {
|
|
30190
|
+
onError: tN,
|
|
30191
|
+
children: /* @__PURE__ */ R(AI, {})
|
|
30192
|
+
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ R(OI, {});
|
|
30193
|
+
}), MI = tp(() => {
|
|
30019
30194
|
let e = xy()[0];
|
|
30020
30195
|
return e ? /* @__PURE__ */ R(wv, { sessionId: e }) : null;
|
|
30021
|
-
}),
|
|
30022
|
-
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c =
|
|
30196
|
+
}), NI = tp((e) => /* @__PURE__ */ R(E, { children: [/* @__PURE__ */ R(MI, {}), /* @__PURE__ */ R(PI, { ...e })] })), PI = tp(({ isAudioOnly: e, presence: t, canvasLayoutEffect: n, canvasRenderedSlot: r }) => {
|
|
30197
|
+
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c = YP.value, l = n.active && !o && (!e || s);
|
|
30023
30198
|
return i.phase === "left" ? /* @__PURE__ */ R(fy, {}) : i.phase === "connecting" ? /* @__PURE__ */ R(dy, {}) : e && !s ? /* @__PURE__ */ R("div", {
|
|
30024
30199
|
class: "absolute inset-0 flex items-center justify-center",
|
|
30025
30200
|
children: /* @__PURE__ */ R(vy, { sessionId: i.replicaId })
|
|
30026
|
-
}) : c.effect.driving ? /* @__PURE__ */ R(
|
|
30027
|
-
onError:
|
|
30028
|
-
children: /* @__PURE__ */ R(
|
|
30201
|
+
}) : c.effect.driving ? /* @__PURE__ */ R(lI, {
|
|
30202
|
+
onError: tN,
|
|
30203
|
+
children: /* @__PURE__ */ R(kI, {
|
|
30029
30204
|
personaSessionId: i.replicaId,
|
|
30030
30205
|
localId: a,
|
|
30031
30206
|
isScreenSharing: o,
|
|
@@ -30039,7 +30214,7 @@ var bI = Et(null), xI = {
|
|
|
30039
30214
|
avatarOff: i.videoState.isOff,
|
|
30040
30215
|
canvasLayoutEffect: n,
|
|
30041
30216
|
smartSidecarActive: l
|
|
30042
|
-
}) : /* @__PURE__ */ R(
|
|
30217
|
+
}) : /* @__PURE__ */ R(FI, {
|
|
30043
30218
|
personaSessionId: i.replicaId,
|
|
30044
30219
|
localId: a,
|
|
30045
30220
|
isScreenSharing: o,
|
|
@@ -30048,11 +30223,11 @@ var bI = Et(null), xI = {
|
|
|
30048
30223
|
canvasLayoutEffect: n,
|
|
30049
30224
|
canvasRenderedSlot: r
|
|
30050
30225
|
});
|
|
30051
|
-
}),
|
|
30226
|
+
}), FI = tp(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, smartSidecarActive: i, canvasLayoutEffect: a, canvasRenderedSlot: o }) => /* @__PURE__ */ R(Sx, {
|
|
30052
30227
|
canvasLayoutEffect: a,
|
|
30053
30228
|
smartSidecarActive: i,
|
|
30054
30229
|
isScreenSharing: n,
|
|
30055
|
-
captureSnapshot:
|
|
30230
|
+
captureSnapshot: zI,
|
|
30056
30231
|
personaMode: "auto",
|
|
30057
30232
|
renderedSlot: o,
|
|
30058
30233
|
fill: (i) => /* @__PURE__ */ R(Ey, {
|
|
@@ -30062,7 +30237,7 @@ var bI = Et(null), xI = {
|
|
|
30062
30237
|
avatarOff: r,
|
|
30063
30238
|
videoRef: i
|
|
30064
30239
|
})
|
|
30065
|
-
})),
|
|
30240
|
+
})), II = tp(({ items: e }) => {
|
|
30066
30241
|
let [t, n] = M(!1), r = P(null);
|
|
30067
30242
|
return N(() => {
|
|
30068
30243
|
if (!t) return;
|
|
@@ -30092,8 +30267,8 @@ var bI = Et(null), xI = {
|
|
|
30092
30267
|
children: e
|
|
30093
30268
|
})]
|
|
30094
30269
|
});
|
|
30095
|
-
}),
|
|
30096
|
-
let t = Bf(), { config: n } = _h(), { session: r, state: i, end: a, endSession: o } = Qv(), s = Vf(), c = P(null), l = L(og)?.frameRef ?? c, [u, d] = M(!1), f = ev() === "full-screen", [p, m] = M(!1), [h, g] = M(
|
|
30270
|
+
}), LI = tp(({ items: e }) => e.length <= 1 ? /* @__PURE__ */ R(E, { children: e }) : /* @__PURE__ */ R(II, { items: e })), RI = tp(({ onLeave: e }) => {
|
|
30271
|
+
let t = Bf(), { config: n } = _h(), { session: r, state: i, end: a, endSession: o } = Qv(), s = Vf(), c = P(null), l = L(og)?.frameRef ?? c, [u, d] = M(!1), f = ev() === "full-screen", [p, m] = M(!1), [h, g] = M(TI), [_, v] = M(null), [y, b] = M(null), x = n.value.customization.conversation, S = dI(x.show_fullscreen_hint && _ !== null && !u && !f), C = P(null), w = P(null), T = r.value?.conversationUrl, E = r.value?.magicGrid === !0, D = pI(C, YM(x.magic_grid, E), T), ee = mI(C, w, 72, !0, T), O = x.modality === "audio", te = fI(O), k = x.modality === "chat", A = x.modality === "video", ne = x.enable_chat, re = x.enable_closed_captions, ie = x.enable_picture_in_picture, { pipWindow: j } = CI({
|
|
30097
30272
|
enabled: ie && !k,
|
|
30098
30273
|
active: t === "joined-meeting"
|
|
30099
30274
|
}), ae = P(null), oe = i.value === "connected" ? r.value?.conversationId : void 0;
|
|
@@ -30109,13 +30284,13 @@ var bI = Et(null), xI = {
|
|
|
30109
30284
|
}, [se]);
|
|
30110
30285
|
let { camera: ce, requestCamera: le } = jh(), { isCamMuted: ue } = Tv(), de = ce.isGranted && !ue;
|
|
30111
30286
|
N(() => {
|
|
30112
|
-
A && t === "joined-meeting" && (
|
|
30287
|
+
A && t === "joined-meeting" && (wI.value = de);
|
|
30113
30288
|
}, [
|
|
30114
30289
|
A,
|
|
30115
30290
|
t,
|
|
30116
30291
|
de
|
|
30117
30292
|
]);
|
|
30118
|
-
let fe = P(A && !s &&
|
|
30293
|
+
let fe = P(A && !s && wI.value === !0);
|
|
30119
30294
|
N(() => {
|
|
30120
30295
|
t === "joined-meeting" && fe.current && (fe.current = !1, le());
|
|
30121
30296
|
}, [t, le]), N(() => {
|
|
@@ -30139,10 +30314,10 @@ var bI = Et(null), xI = {
|
|
|
30139
30314
|
let me = I(() => {
|
|
30140
30315
|
se();
|
|
30141
30316
|
}, [se]);
|
|
30142
|
-
if (
|
|
30317
|
+
if (gI({
|
|
30143
30318
|
active: !k && t === "joined-meeting",
|
|
30144
30319
|
onTimeout: me
|
|
30145
|
-
}),
|
|
30320
|
+
}), vI({ onShutdown: me }), !T) return null;
|
|
30146
30321
|
if (k) return /* @__PURE__ */ R(ay, {
|
|
30147
30322
|
defaultOpen: !0,
|
|
30148
30323
|
children: /* @__PURE__ */ R("div", {
|
|
@@ -30174,14 +30349,14 @@ var bI = Et(null), xI = {
|
|
|
30174
30349
|
/* @__PURE__ */ R("div", {
|
|
30175
30350
|
class: "relative w-full h-full z-[5]",
|
|
30176
30351
|
children: [
|
|
30177
|
-
/* @__PURE__ */ R(
|
|
30352
|
+
/* @__PURE__ */ R(NI, {
|
|
30178
30353
|
isAudioOnly: O,
|
|
30179
30354
|
presence: te,
|
|
30180
30355
|
canvasLayoutEffect: h,
|
|
30181
30356
|
canvasRenderedSlot: _
|
|
30182
30357
|
}),
|
|
30183
|
-
!O && /* @__PURE__ */ R(
|
|
30184
|
-
/* @__PURE__ */ R(
|
|
30358
|
+
!O && /* @__PURE__ */ R(jI, { canvasRenderedSlot: _ }),
|
|
30359
|
+
/* @__PURE__ */ R(UF, {
|
|
30185
30360
|
debugEnabled: p,
|
|
30186
30361
|
callPresence: te,
|
|
30187
30362
|
callControlsVisible: D,
|
|
@@ -30219,7 +30394,7 @@ var bI = Et(null), xI = {
|
|
|
30219
30394
|
/* @__PURE__ */ R(Kv, { level: !0 }),
|
|
30220
30395
|
!O && /* @__PURE__ */ R(Jv, {}),
|
|
30221
30396
|
re && /* @__PURE__ */ R(ny, {}),
|
|
30222
|
-
/* @__PURE__ */ R(
|
|
30397
|
+
/* @__PURE__ */ R(LI, { items: he }),
|
|
30223
30398
|
/* @__PURE__ */ R("button", {
|
|
30224
30399
|
type: "button",
|
|
30225
30400
|
class: "btn btn-control btn-error",
|
|
@@ -30236,7 +30411,7 @@ var bI = Et(null), xI = {
|
|
|
30236
30411
|
]
|
|
30237
30412
|
}), j && hp(/* @__PURE__ */ R(wy, { onLeave: me }), j.document.body)] }) }) });
|
|
30238
30413
|
});
|
|
30239
|
-
function
|
|
30414
|
+
function zI(e) {
|
|
30240
30415
|
if (!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight) return null;
|
|
30241
30416
|
let t = document.createElement("canvas"), n = Math.round(640 * (e.videoHeight / e.videoWidth));
|
|
30242
30417
|
t.width = 640, t.height = n;
|
|
@@ -30251,7 +30426,7 @@ function FI(e) {
|
|
|
30251
30426
|
}
|
|
30252
30427
|
//#endregion
|
|
30253
30428
|
//#region ../core/src/components/hair-check/index.tsx
|
|
30254
|
-
function
|
|
30429
|
+
function BI(e, t, n) {
|
|
30255
30430
|
switch (t) {
|
|
30256
30431
|
case "granted": return n ? e?.cameraOptional ?? "Camera is optional — turn it on anytime." : e?.ready ?? "You're all set — join whenever you're ready.";
|
|
30257
30432
|
case "blocked": return e?.denied ?? "Microphone is blocked. Click the mic to see how to allow it.";
|
|
@@ -30262,7 +30437,7 @@ function II(e, t, n) {
|
|
|
30262
30437
|
default: return e?.loading ?? "Getting your microphone ready...";
|
|
30263
30438
|
}
|
|
30264
30439
|
}
|
|
30265
|
-
var
|
|
30440
|
+
var VI = tp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
30266
30441
|
let i = zf(), { config: a } = _h(), { cameraOnStart: o } = L(ot), { localSessionId: s, isCamMuted: c } = Tv(), { mic: l, camera: u, requestMic: d, requestCamera: f } = jh(), p = a.value.customization.conversation.modality === "video", m = O_(a.value), h = D_(a.value);
|
|
30267
30442
|
N(() => {
|
|
30268
30443
|
d();
|
|
@@ -30278,7 +30453,7 @@ var LI = tp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
30278
30453
|
u.isBlocked,
|
|
30279
30454
|
f
|
|
30280
30455
|
]);
|
|
30281
|
-
let v = p && g && !u.isGranted, y =
|
|
30456
|
+
let v = p && g && !u.isGranted, y = BI(e, l.status, v);
|
|
30282
30457
|
return /* @__PURE__ */ R(Pv, { children: /* @__PURE__ */ R("div", {
|
|
30283
30458
|
class: "absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]",
|
|
30284
30459
|
children: [u.isGranted && !c ? /* @__PURE__ */ R("div", {
|
|
@@ -30329,8 +30504,8 @@ var LI = tp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
30329
30504
|
})]
|
|
30330
30505
|
})]
|
|
30331
30506
|
}) });
|
|
30332
|
-
}),
|
|
30333
|
-
function
|
|
30507
|
+
}), HI = "Password required", UI = "Enter the password to start this conversation.", WI = "Password", GI = "Continue";
|
|
30508
|
+
function KI({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
30334
30509
|
let [i, a] = M(""), o = Xe();
|
|
30335
30510
|
return /* @__PURE__ */ R("div", {
|
|
30336
30511
|
class: "absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
|
|
@@ -30350,18 +30525,18 @@ function HI({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30350
30525
|
/* @__PURE__ */ R("h3", {
|
|
30351
30526
|
id: `${o}-title`,
|
|
30352
30527
|
class: "card-title text-base-content",
|
|
30353
|
-
children: t?.title ??
|
|
30528
|
+
children: t?.title ?? HI
|
|
30354
30529
|
}),
|
|
30355
30530
|
/* @__PURE__ */ R("p", {
|
|
30356
30531
|
class: "text-sm text-base-content/70",
|
|
30357
|
-
children: t?.description ??
|
|
30532
|
+
children: t?.description ?? UI
|
|
30358
30533
|
}),
|
|
30359
30534
|
/* @__PURE__ */ R("input", {
|
|
30360
30535
|
id: o,
|
|
30361
30536
|
type: "password",
|
|
30362
30537
|
autocomplete: "current-password",
|
|
30363
30538
|
class: "input input-bordered w-full",
|
|
30364
|
-
placeholder: t?.placeholder ??
|
|
30539
|
+
placeholder: t?.placeholder ?? WI,
|
|
30365
30540
|
value: i,
|
|
30366
30541
|
disabled: n,
|
|
30367
30542
|
onInput: (e) => a(e.target.value),
|
|
@@ -30377,7 +30552,7 @@ function HI({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30377
30552
|
type: "submit",
|
|
30378
30553
|
disabled: !i.trim(),
|
|
30379
30554
|
loading: n,
|
|
30380
|
-
children: t?.submit ??
|
|
30555
|
+
children: t?.submit ?? GI
|
|
30381
30556
|
})
|
|
30382
30557
|
]
|
|
30383
30558
|
})
|
|
@@ -30386,7 +30561,7 @@ function HI({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30386
30561
|
}
|
|
30387
30562
|
//#endregion
|
|
30388
30563
|
//#region ../core/src/components/welcome/index.tsx
|
|
30389
|
-
function
|
|
30564
|
+
function qI({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
30390
30565
|
let { config: i, deploymentId: a } = _h(), o = ev() === "full-screen", s = L(qm), c = O_(i.value), l = c.btn_title ?? e?.fallback_button ?? "Start the conversation", u = i.value.customization.terms_content?.trim() ?? "", d = i.value.customization.terms_enabled === !0, f = u.length > 0, p = f && d, m = F(() => p && ym(a, u), [
|
|
30391
30566
|
p,
|
|
30392
30567
|
a,
|
|
@@ -30395,7 +30570,7 @@ function UI({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
30395
30570
|
return /* @__PURE__ */ R(pv, {
|
|
30396
30571
|
title: c.title,
|
|
30397
30572
|
description: c.description,
|
|
30398
|
-
overlay: v && s ? /* @__PURE__ */ R(
|
|
30573
|
+
overlay: v && s ? /* @__PURE__ */ R(KI, { onSubmit: s.setPassword }) : null,
|
|
30399
30574
|
children: [/* @__PURE__ */ R("div", {
|
|
30400
30575
|
class: "relative",
|
|
30401
30576
|
children: [r && /* @__PURE__ */ R(nv, {
|
|
@@ -30433,28 +30608,28 @@ function UI({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
30433
30608
|
}
|
|
30434
30609
|
//#endregion
|
|
30435
30610
|
//#region ../core/src/hooks/use-haircheck-text.ts
|
|
30436
|
-
function
|
|
30611
|
+
function JI(...e) {
|
|
30437
30612
|
for (let t of e) {
|
|
30438
30613
|
let e = t?.trim();
|
|
30439
30614
|
if (e) return e;
|
|
30440
30615
|
}
|
|
30441
30616
|
}
|
|
30442
|
-
function
|
|
30617
|
+
function YI() {
|
|
30443
30618
|
let { config: e } = _h(), { haircheck: t } = e.value.customization;
|
|
30444
30619
|
return F(() => ({
|
|
30445
|
-
prompt:
|
|
30446
|
-
ready:
|
|
30447
|
-
denied:
|
|
30448
|
-
join:
|
|
30449
|
-
cancel:
|
|
30620
|
+
prompt: JI(t.permission_request_description, t.permission_request_title),
|
|
30621
|
+
ready: JI(t.permission_granted_description, t.permission_granted_title),
|
|
30622
|
+
denied: JI(t.permission_denied_description, t.permission_denied_title),
|
|
30623
|
+
join: JI(t.join_button),
|
|
30624
|
+
cancel: JI(t.cancel_btn)
|
|
30450
30625
|
}), [t]);
|
|
30451
30626
|
}
|
|
30452
30627
|
//#endregion
|
|
30453
30628
|
//#region ../core/src/shells/flow-state-body.tsx
|
|
30454
|
-
function
|
|
30455
|
-
let r =
|
|
30629
|
+
function XI({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
30630
|
+
let r = YI();
|
|
30456
30631
|
switch (e.state) {
|
|
30457
|
-
case "idle": return /* @__PURE__ */ R(
|
|
30632
|
+
case "idle": return /* @__PURE__ */ R(qI, {
|
|
30458
30633
|
text: t,
|
|
30459
30634
|
onStart: () => {
|
|
30460
30635
|
e.start();
|
|
@@ -30462,7 +30637,7 @@ function KI({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30462
30637
|
isStarting: e.isStarting,
|
|
30463
30638
|
permissionRequest: e.permissionRequest
|
|
30464
30639
|
});
|
|
30465
|
-
case "haircheck": return /* @__PURE__ */ R(
|
|
30640
|
+
case "haircheck": return /* @__PURE__ */ R(VI, {
|
|
30466
30641
|
text: r,
|
|
30467
30642
|
onJoin: () => {
|
|
30468
30643
|
e.join();
|
|
@@ -30470,7 +30645,7 @@ function KI({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30470
30645
|
onCancel: () => e.cancel(),
|
|
30471
30646
|
isJoining: e.isStarting
|
|
30472
30647
|
});
|
|
30473
|
-
case "call": return /* @__PURE__ */ R(
|
|
30648
|
+
case "call": return /* @__PURE__ */ R(RI, { onLeave: () => e.leave() });
|
|
30474
30649
|
case "ended": return /* @__PURE__ */ R(xv, {
|
|
30475
30650
|
isStarting: e.isStarting,
|
|
30476
30651
|
permissionRequest: e.permissionRequest,
|
|
@@ -30495,11 +30670,11 @@ function KI({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30495
30670
|
}
|
|
30496
30671
|
//#endregion
|
|
30497
30672
|
//#region ../core/src/providers/widget-ui-provider.tsx
|
|
30498
|
-
function
|
|
30673
|
+
function ZI(e, t, n) {
|
|
30499
30674
|
let r = e.state === "call", i = r || e.state === "haircheck" || e.isStarting;
|
|
30500
30675
|
e.cancel(), r && e.leave(), i && t(), n();
|
|
30501
30676
|
}
|
|
30502
|
-
function
|
|
30677
|
+
function QI({ children: e }) {
|
|
30503
30678
|
let { config: t } = L(Cr), n = t.peek().customization?.widget, r = n?.expandable ?? "default", i = Kt(r === "start-expanded" || r === "always"), a = Kt(n?.variant ?? "full"), o = Kt(n?.position ?? "bottom-right"), s = Kt(r), c = Kt(n?.avatar?.type ?? "orb"), l = P(r);
|
|
30504
30679
|
$t(() => {
|
|
30505
30680
|
let e = t.value.customization?.widget, n = e?.expandable ?? "default";
|
|
@@ -30534,7 +30709,7 @@ function JI({ children: e }) {
|
|
|
30534
30709
|
f();
|
|
30535
30710
|
return;
|
|
30536
30711
|
}
|
|
30537
|
-
|
|
30712
|
+
ZI({
|
|
30538
30713
|
state: e.flowSignal.peek(),
|
|
30539
30714
|
isStarting: e.isStarting,
|
|
30540
30715
|
cancel: e.cancel,
|
|
@@ -30566,14 +30741,14 @@ function JI({ children: e }) {
|
|
|
30566
30741
|
}
|
|
30567
30742
|
//#endregion
|
|
30568
30743
|
//#region ../core/src/components/powered-by/index.tsx
|
|
30569
|
-
function
|
|
30744
|
+
function $I() {
|
|
30570
30745
|
let { config: e } = _h(), t = e.value.customization.branding;
|
|
30571
|
-
return e.value.show_tavus_branding !== !1 && !t?.hide_tavus_badge ? /* @__PURE__ */ R(
|
|
30746
|
+
return e.value.show_tavus_branding !== !1 && !t?.hide_tavus_badge ? /* @__PURE__ */ R(eL, {}) : t?.logo || t?.text ? /* @__PURE__ */ R(tL, {
|
|
30572
30747
|
logo: t.logo,
|
|
30573
30748
|
text: t.text
|
|
30574
30749
|
}) : null;
|
|
30575
30750
|
}
|
|
30576
|
-
function
|
|
30751
|
+
function eL() {
|
|
30577
30752
|
let { isDark: e } = Bj(), t = e.value ? "white" : "#140206";
|
|
30578
30753
|
return /* @__PURE__ */ R("a", {
|
|
30579
30754
|
href: "https://tavus.io",
|
|
@@ -30600,7 +30775,7 @@ function XI() {
|
|
|
30600
30775
|
})] })]
|
|
30601
30776
|
});
|
|
30602
30777
|
}
|
|
30603
|
-
function
|
|
30778
|
+
function tL({ logo: e, text: t }) {
|
|
30604
30779
|
return /* @__PURE__ */ R("div", {
|
|
30605
30780
|
class: "inline-flex items-center gap-1 text-xs text-base-content/50",
|
|
30606
30781
|
children: [e ? /* @__PURE__ */ R("img", {
|
|
@@ -30612,63 +30787,63 @@ function ZI({ logo: e, text: t }) {
|
|
|
30612
30787
|
}
|
|
30613
30788
|
//#endregion
|
|
30614
30789
|
//#region ../core/src/hooks/use-widget-text.ts
|
|
30615
|
-
var
|
|
30790
|
+
var nL = {
|
|
30616
30791
|
title: "Hi! Want to chat?",
|
|
30617
30792
|
btn_title: "Start conversation"
|
|
30618
30793
|
};
|
|
30619
|
-
function
|
|
30794
|
+
function rL() {
|
|
30620
30795
|
let { config: e } = _h(), t = e.value.customization.widget?.text;
|
|
30621
30796
|
return F(() => ({
|
|
30622
|
-
title: t?.title ||
|
|
30623
|
-
btn_title: t?.btn_title ||
|
|
30797
|
+
title: t?.title || nL.title,
|
|
30798
|
+
btn_title: t?.btn_title || nL.btn_title
|
|
30624
30799
|
}), [t]);
|
|
30625
30800
|
}
|
|
30626
30801
|
//#endregion
|
|
30627
30802
|
//#region ../core/src/hooks/use-widget-ui.ts
|
|
30628
|
-
function
|
|
30803
|
+
function iL() {
|
|
30629
30804
|
let e = L(Vh);
|
|
30630
30805
|
if (!e) throw Error("useWidgetUI must be used within WidgetUIProvider");
|
|
30631
30806
|
return e;
|
|
30632
30807
|
}
|
|
30633
30808
|
//#endregion
|
|
30634
30809
|
//#region ../core/src/components/widget-launcher/widget-avatar.tsx
|
|
30635
|
-
var
|
|
30810
|
+
var aL = {
|
|
30636
30811
|
xs: "w-6 h-6",
|
|
30637
30812
|
sm: "w-8 h-8",
|
|
30638
30813
|
md: "w-10 h-10",
|
|
30639
30814
|
lg: "w-16 h-16"
|
|
30640
|
-
},
|
|
30815
|
+
}, oL = {
|
|
30641
30816
|
xs: "w-3 h-3",
|
|
30642
30817
|
sm: "w-4 h-4",
|
|
30643
30818
|
md: "w-5 h-5",
|
|
30644
30819
|
lg: "w-8 h-8"
|
|
30645
30820
|
};
|
|
30646
|
-
function
|
|
30647
|
-
let { avatarType: n } =
|
|
30821
|
+
function sL({ size: e = "md", className: t = "" }) {
|
|
30822
|
+
let { avatarType: n } = iL(), { config: r } = _h(), i = D_(r.value);
|
|
30648
30823
|
return (O_(r.value).background.type === "replica" || n.value === "image") && i ? /* @__PURE__ */ R("div", {
|
|
30649
|
-
class: `relative ${
|
|
30824
|
+
class: `relative ${aL[e]} rounded-box overflow-hidden bg-base-300 ${t}`,
|
|
30650
30825
|
children: /* @__PURE__ */ R(I_, { replica: i })
|
|
30651
30826
|
}) : /* @__PURE__ */ R("div", {
|
|
30652
|
-
class: `relative ${
|
|
30653
|
-
children: /* @__PURE__ */ R("span", { class: `${
|
|
30827
|
+
class: `relative ${aL[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,
|
|
30828
|
+
children: /* @__PURE__ */ R("span", { class: `${oL[e]} rounded-full bg-primary animate-pulse` })
|
|
30654
30829
|
});
|
|
30655
30830
|
}
|
|
30656
30831
|
//#endregion
|
|
30657
30832
|
//#region ../core/src/components/widget-launcher/widget-launcher.tsx
|
|
30658
|
-
function
|
|
30659
|
-
let { toggle: t } =
|
|
30833
|
+
function cL({ variant: e }) {
|
|
30834
|
+
let { toggle: t } = iL(), n = rL();
|
|
30660
30835
|
return e === "tiny" ? /* @__PURE__ */ R("button", {
|
|
30661
30836
|
type: "button",
|
|
30662
30837
|
onClick: t,
|
|
30663
30838
|
"aria-label": n.btn_title,
|
|
30664
30839
|
class: "rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer",
|
|
30665
|
-
children: /* @__PURE__ */ R(
|
|
30840
|
+
children: /* @__PURE__ */ R(sL, { size: "lg" })
|
|
30666
30841
|
}) : e === "compact" ? /* @__PURE__ */ R("button", {
|
|
30667
30842
|
type: "button",
|
|
30668
30843
|
onClick: t,
|
|
30669
30844
|
"aria-label": n.btn_title,
|
|
30670
30845
|
class: "group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left",
|
|
30671
|
-
children: [/* @__PURE__ */ R(
|
|
30846
|
+
children: [/* @__PURE__ */ R(sL, { size: "md" }), /* @__PURE__ */ R("span", {
|
|
30672
30847
|
class: "flex flex-col gap-0.5",
|
|
30673
30848
|
children: [/* @__PURE__ */ R("span", {
|
|
30674
30849
|
class: "text-base font-medium leading-tight",
|
|
@@ -30685,7 +30860,7 @@ function iL({ variant: e }) {
|
|
|
30685
30860
|
class: "flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left",
|
|
30686
30861
|
children: [/* @__PURE__ */ R("div", {
|
|
30687
30862
|
class: "flex items-center gap-2.5",
|
|
30688
|
-
children: [/* @__PURE__ */ R(
|
|
30863
|
+
children: [/* @__PURE__ */ R(sL, { size: "md" }), /* @__PURE__ */ R("span", {
|
|
30689
30864
|
class: "text-sm font-medium leading-snug",
|
|
30690
30865
|
children: n.title
|
|
30691
30866
|
})]
|
|
@@ -30703,13 +30878,13 @@ function iL({ variant: e }) {
|
|
|
30703
30878
|
}
|
|
30704
30879
|
//#endregion
|
|
30705
30880
|
//#region ../core/src/components/widget-launcher/widget-greeting-bubble.tsx
|
|
30706
|
-
var
|
|
30707
|
-
function
|
|
30708
|
-
let t =
|
|
30881
|
+
var lL = "tavus:widget:greeting-dismissed";
|
|
30882
|
+
function uL({ anchor: e }) {
|
|
30883
|
+
let t = rL(), { variant: n, expand: r } = iL(), [i, a] = M(!1);
|
|
30709
30884
|
N(() => {
|
|
30710
30885
|
if (n.value === "tiny") {
|
|
30711
30886
|
try {
|
|
30712
|
-
if (sessionStorage.getItem(
|
|
30887
|
+
if (sessionStorage.getItem(lL) === "1") return;
|
|
30713
30888
|
} catch {}
|
|
30714
30889
|
a(!0);
|
|
30715
30890
|
}
|
|
@@ -30717,7 +30892,7 @@ function oL({ anchor: e }) {
|
|
|
30717
30892
|
let o = I((e) => {
|
|
30718
30893
|
e.stopPropagation();
|
|
30719
30894
|
try {
|
|
30720
|
-
sessionStorage.setItem(
|
|
30895
|
+
sessionStorage.setItem(lL, "1");
|
|
30721
30896
|
} catch {}
|
|
30722
30897
|
a(!1);
|
|
30723
30898
|
}, []);
|
|
@@ -30749,18 +30924,18 @@ function oL({ anchor: e }) {
|
|
|
30749
30924
|
}
|
|
30750
30925
|
//#endregion
|
|
30751
30926
|
//#region ../core/src/hooks/use-host-bridge.ts
|
|
30752
|
-
function
|
|
30927
|
+
function dL() {
|
|
30753
30928
|
let e = L(Uh);
|
|
30754
30929
|
if (!e) throw Error("useHostBridge must be used within HostBridgeProvider");
|
|
30755
30930
|
return e;
|
|
30756
30931
|
}
|
|
30757
30932
|
//#endregion
|
|
30758
30933
|
//#region ../core/src/shells/widget/widget-popup.tsx
|
|
30759
|
-
var
|
|
30760
|
-
function
|
|
30761
|
-
let { expandable: i } =
|
|
30934
|
+
var fL = "bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]", pL = "bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]", mL = "p-1 flex-1 min-h-0", hL = "p-1 flex-1 min-h-0";
|
|
30935
|
+
function gL({ variant: e, children: t, onClose: n, fullscreen: r }) {
|
|
30936
|
+
let { expandable: i } = iL(), a = i.value !== "always";
|
|
30762
30937
|
return r ? /* @__PURE__ */ R("div", {
|
|
30763
|
-
class:
|
|
30938
|
+
class: pL,
|
|
30764
30939
|
children: [
|
|
30765
30940
|
/* @__PURE__ */ R("div", {
|
|
30766
30941
|
class: "flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300",
|
|
@@ -30776,18 +30951,18 @@ function fL({ variant: e, children: t, onClose: n, fullscreen: r }) {
|
|
|
30776
30951
|
})
|
|
30777
30952
|
}),
|
|
30778
30953
|
/* @__PURE__ */ R("div", {
|
|
30779
|
-
class:
|
|
30954
|
+
class: hL,
|
|
30780
30955
|
children: t
|
|
30781
30956
|
}),
|
|
30782
30957
|
/* @__PURE__ */ R("div", {
|
|
30783
30958
|
class: "flex justify-end px-2.5",
|
|
30784
|
-
children: /* @__PURE__ */ R(
|
|
30959
|
+
children: /* @__PURE__ */ R($I, {})
|
|
30785
30960
|
})
|
|
30786
30961
|
]
|
|
30787
30962
|
}) : /* @__PURE__ */ R("div", {
|
|
30788
30963
|
class: "flex flex-col h-[min(34rem,calc(100dvh-3rem))]",
|
|
30789
30964
|
children: [/* @__PURE__ */ R("div", {
|
|
30790
|
-
class: `${
|
|
30965
|
+
class: `${fL} flex-1 overflow-hidden`,
|
|
30791
30966
|
children: [/* @__PURE__ */ R("div", {
|
|
30792
30967
|
class: "flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0",
|
|
30793
30968
|
children: a && /* @__PURE__ */ R("button", {
|
|
@@ -30801,68 +30976,68 @@ function fL({ variant: e, children: t, onClose: n, fullscreen: r }) {
|
|
|
30801
30976
|
})
|
|
30802
30977
|
})
|
|
30803
30978
|
}), /* @__PURE__ */ R("div", {
|
|
30804
|
-
class:
|
|
30979
|
+
class: mL,
|
|
30805
30980
|
children: t
|
|
30806
30981
|
})]
|
|
30807
30982
|
}), /* @__PURE__ */ R("div", {
|
|
30808
30983
|
class: "flex justify-end pr-2 pt-1.5 shrink-0",
|
|
30809
|
-
children: /* @__PURE__ */ R(
|
|
30984
|
+
children: /* @__PURE__ */ R($I, {})
|
|
30810
30985
|
})]
|
|
30811
30986
|
});
|
|
30812
30987
|
}
|
|
30813
30988
|
//#endregion
|
|
30814
30989
|
//#region ../core/src/shells/widget/widget-shell.tsx
|
|
30815
|
-
var
|
|
30816
|
-
function
|
|
30817
|
-
return typeof window > "u" ? !1 : window.innerWidth <=
|
|
30990
|
+
var _L = en("Widget"), vL = "1rem", yL = 480;
|
|
30991
|
+
function bL() {
|
|
30992
|
+
return typeof window > "u" ? !1 : window.innerWidth <= yL;
|
|
30818
30993
|
}
|
|
30819
|
-
function
|
|
30994
|
+
function xL(e) {
|
|
30820
30995
|
switch (e) {
|
|
30821
30996
|
case "bottom-right": return {
|
|
30822
|
-
bottom:
|
|
30823
|
-
right:
|
|
30997
|
+
bottom: vL,
|
|
30998
|
+
right: vL
|
|
30824
30999
|
};
|
|
30825
31000
|
case "bottom-left": return {
|
|
30826
|
-
bottom:
|
|
30827
|
-
left:
|
|
31001
|
+
bottom: vL,
|
|
31002
|
+
left: vL
|
|
30828
31003
|
};
|
|
30829
31004
|
case "top-right": return {
|
|
30830
|
-
top:
|
|
30831
|
-
right:
|
|
31005
|
+
top: vL,
|
|
31006
|
+
right: vL
|
|
30832
31007
|
};
|
|
30833
31008
|
case "top-left": return {
|
|
30834
|
-
top:
|
|
30835
|
-
left:
|
|
31009
|
+
top: vL,
|
|
31010
|
+
left: vL
|
|
30836
31011
|
};
|
|
30837
31012
|
case "top": return {
|
|
30838
|
-
top:
|
|
31013
|
+
top: vL,
|
|
30839
31014
|
left: "50%",
|
|
30840
31015
|
transform: "translateX(-50%)"
|
|
30841
31016
|
};
|
|
30842
31017
|
case "bottom": return {
|
|
30843
|
-
bottom:
|
|
31018
|
+
bottom: vL,
|
|
30844
31019
|
left: "50%",
|
|
30845
31020
|
transform: "translateX(-50%)"
|
|
30846
31021
|
};
|
|
30847
31022
|
}
|
|
30848
31023
|
}
|
|
30849
|
-
var
|
|
31024
|
+
var SL = [
|
|
30850
31025
|
"top",
|
|
30851
31026
|
"bottom",
|
|
30852
31027
|
"left",
|
|
30853
31028
|
"right",
|
|
30854
31029
|
"transform"
|
|
30855
31030
|
];
|
|
30856
|
-
function
|
|
31031
|
+
function CL(e) {
|
|
30857
31032
|
return e === "bottom-left" || e === "top-left" ? "left" : "right";
|
|
30858
31033
|
}
|
|
30859
|
-
function
|
|
30860
|
-
let { config: e, initError: t } = _h(), n =
|
|
31034
|
+
function wL() {
|
|
31035
|
+
let { config: e, initError: t } = _h(), n = rL(), { expanded: r, position: i, variant: a, close: o } = iL(), { shadowHost: s } = dL(), c = $_(), l = Kt(bL());
|
|
30861
31036
|
N(() => {
|
|
30862
31037
|
if (typeof window > "u") return;
|
|
30863
|
-
l.value =
|
|
31038
|
+
l.value = bL();
|
|
30864
31039
|
let e = () => {
|
|
30865
|
-
l.value =
|
|
31040
|
+
l.value = bL();
|
|
30866
31041
|
};
|
|
30867
31042
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
30868
31043
|
}, [l]);
|
|
@@ -30872,27 +31047,27 @@ function bL() {
|
|
|
30872
31047
|
if (e) {
|
|
30873
31048
|
if (a) e.style.top = "0", e.style.right = "0", e.style.bottom = "0", e.style.left = "0", e.style.transform = "";
|
|
30874
31049
|
else {
|
|
30875
|
-
let n =
|
|
30876
|
-
for (let t of
|
|
31050
|
+
let n = xL(t);
|
|
31051
|
+
for (let t of SL) e.style[t] = n[t] ?? "";
|
|
30877
31052
|
}
|
|
30878
31053
|
e.dataset.tavusWidgetPosition = t, e.dataset.tavusWidgetExpanded = n ? "true" : "false", e.dataset.tavusWidgetFullscreen = a ? "true" : "false", e.dataset.tavusWidgetSmall = l.value ? "true" : "false";
|
|
30879
31054
|
}
|
|
30880
|
-
}), t.value) return
|
|
30881
|
-
if (e.value.is_available === !1 && e.value.unavailable_reason === "total_limit") return
|
|
31055
|
+
}), t.value) return _L.error("Widget cannot initialize (init request failed):", t.value), null;
|
|
31056
|
+
if (e.value.is_available === !1 && e.value.unavailable_reason === "total_limit") return _L.error("Widget is unavailable (total_limit reached) — not rendering"), null;
|
|
30882
31057
|
if (!r.value) {
|
|
30883
|
-
let e =
|
|
31058
|
+
let e = CL(i.value), t = e === "right" ? "flex items-end gap-2 justify-end" : "flex items-end gap-2 flex-row-reverse justify-end", n = e === "right" ? "justify-end pr-2" : "justify-start pl-2";
|
|
30884
31059
|
return /* @__PURE__ */ R("div", {
|
|
30885
31060
|
class: "flex flex-col",
|
|
30886
31061
|
children: [/* @__PURE__ */ R("div", {
|
|
30887
31062
|
class: t,
|
|
30888
|
-
children: [/* @__PURE__ */ R(
|
|
31063
|
+
children: [/* @__PURE__ */ R(uL, { anchor: e }), /* @__PURE__ */ R(cL, { variant: a.value })]
|
|
30889
31064
|
}), /* @__PURE__ */ R("div", {
|
|
30890
31065
|
class: `flex ${n} pt-1.5`,
|
|
30891
|
-
children: /* @__PURE__ */ R(
|
|
31066
|
+
children: /* @__PURE__ */ R($I, {})
|
|
30892
31067
|
})]
|
|
30893
31068
|
});
|
|
30894
31069
|
}
|
|
30895
|
-
return e.value.is_available === !1 ? /* @__PURE__ */ R(
|
|
31070
|
+
return e.value.is_available === !1 ? /* @__PURE__ */ R(gL, {
|
|
30896
31071
|
variant: a.value,
|
|
30897
31072
|
fullscreen: l.value,
|
|
30898
31073
|
onClose: o,
|
|
@@ -30901,11 +31076,11 @@ function bL() {
|
|
|
30901
31076
|
canRetry: !1,
|
|
30902
31077
|
onRetry: () => {}
|
|
30903
31078
|
}) })
|
|
30904
|
-
}) : /* @__PURE__ */ R(
|
|
31079
|
+
}) : /* @__PURE__ */ R(gL, {
|
|
30905
31080
|
variant: a.value,
|
|
30906
31081
|
fullscreen: l.value,
|
|
30907
31082
|
onClose: o,
|
|
30908
|
-
children: /* @__PURE__ */ R(sg, { children: /* @__PURE__ */ R(
|
|
31083
|
+
children: /* @__PURE__ */ R(sg, { children: /* @__PURE__ */ R(XI, {
|
|
30909
31084
|
flow: c,
|
|
30910
31085
|
welcomeText: u,
|
|
30911
31086
|
onUnavailableCancel: () => c.restart()
|
|
@@ -30914,11 +31089,11 @@ function bL() {
|
|
|
30914
31089
|
}
|
|
30915
31090
|
//#endregion
|
|
30916
31091
|
//#region ../core/src/widget/tavus-widget.tsx
|
|
30917
|
-
var
|
|
30918
|
-
function
|
|
31092
|
+
var TL = ":host {\n display: block;\n position: fixed;\n z-index: 50;\n background: transparent;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n}";
|
|
31093
|
+
function EL(e) {
|
|
30919
31094
|
return /* @__PURE__ */ R(E, { children: [
|
|
30920
31095
|
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html: Ne } }),
|
|
30921
|
-
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html:
|
|
31096
|
+
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html: TL } }),
|
|
30922
31097
|
/* @__PURE__ */ R(ct, {
|
|
30923
31098
|
surface: "widget",
|
|
30924
31099
|
"camera-on-start": e["camera-on-start"],
|
|
@@ -30929,13 +31104,13 @@ function SL(e) {
|
|
|
30929
31104
|
"memory-stores": e["memory-stores"],
|
|
30930
31105
|
"base-url": e["base-url"],
|
|
30931
31106
|
token: e.token,
|
|
30932
|
-
children: /* @__PURE__ */ R(wr, { children: /* @__PURE__ */ R(Er, { children: /* @__PURE__ */ R(Jm, { children: /* @__PURE__ */ R(gh, { children: /* @__PURE__ */ R(Bh, { children: /* @__PURE__ */ R(
|
|
31107
|
+
children: /* @__PURE__ */ R(wr, { children: /* @__PURE__ */ R(Er, { children: /* @__PURE__ */ R(Jm, { children: /* @__PURE__ */ R(gh, { children: /* @__PURE__ */ R(Bh, { children: /* @__PURE__ */ R(QI, { children: /* @__PURE__ */ R(Gh, { children: /* @__PURE__ */ R(qh, { children: /* @__PURE__ */ R(wL, {}) }) }) }) }) }) }) }) })
|
|
30933
31108
|
})
|
|
30934
31109
|
] });
|
|
30935
31110
|
}
|
|
30936
|
-
var
|
|
30937
|
-
function
|
|
30938
|
-
|
|
31111
|
+
var DL;
|
|
31112
|
+
function OL() {
|
|
31113
|
+
DL ||= Te(EL, "tavus-widget", [
|
|
30939
31114
|
"camera-on-start",
|
|
30940
31115
|
"deployment-id",
|
|
30941
31116
|
"override-config",
|
|
@@ -30951,7 +31126,7 @@ function wL() {
|
|
|
30951
31126
|
}
|
|
30952
31127
|
//#endregion
|
|
30953
31128
|
//#region src/integration.ts
|
|
30954
|
-
var
|
|
31129
|
+
var kL = [
|
|
30955
31130
|
"tavus:chat-message",
|
|
30956
31131
|
"tavus:conversation-created",
|
|
30957
31132
|
"tavus:conversation-ended",
|
|
@@ -30963,7 +31138,7 @@ var TL = [
|
|
|
30963
31138
|
"tavus:ready",
|
|
30964
31139
|
"tavus:state-change",
|
|
30965
31140
|
"tavus:tool-call"
|
|
30966
|
-
],
|
|
31141
|
+
], AL = class {
|
|
30967
31142
|
element = null;
|
|
30968
31143
|
tagName;
|
|
30969
31144
|
constructor(e = "tavus-widget") {
|
|
@@ -31014,6 +31189,6 @@ var TL = [
|
|
|
31014
31189
|
};
|
|
31015
31190
|
//#endregion
|
|
31016
31191
|
//#region src/index.ts
|
|
31017
|
-
typeof window < "u" &&
|
|
31192
|
+
typeof window < "u" && OL();
|
|
31018
31193
|
//#endregion
|
|
31019
|
-
export {
|
|
31194
|
+
export { kL as TAVUS_EVENT_NAMES, AL as TavusIntegration };
|