@tavus/widget 0.9.2 → 0.9.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 +16 -16
- package/dist/index.mjs +362 -335
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -37,36 +37,36 @@ function w(e, t, i, a, o) {
|
|
|
37
37
|
function T(e) {
|
|
38
38
|
return e.children;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function E(e, t) {
|
|
41
41
|
this.props = e, this.context = t;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
if (t == null) return e.__ ?
|
|
43
|
+
function ee(e, t) {
|
|
44
|
+
if (t == null) return e.__ ? ee(e.__, e.__i + 1) : null;
|
|
45
45
|
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
46
|
-
return typeof e.type == "function" ?
|
|
46
|
+
return typeof e.type == "function" ? ee(e) : null;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function te(e) {
|
|
49
49
|
if (e.__P && e.__d) {
|
|
50
50
|
var t = e.__v, r = t.__e, i = [], a = [], o = x({}, t);
|
|
51
|
-
o.__v = t.__v + 1, n.vnode && n.vnode(o), fe(e.__P, o, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, i, r ??
|
|
51
|
+
o.__v = t.__v + 1, n.vnode && n.vnode(o), fe(e.__P, o, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, i, r ?? ee(t), !!(32 & t.__u), a), o.__v = t.__v, o.__.__k[o.__i] = o, me(i, o, a), t.__e = t.__ = null, o.__e != r && ne(o);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ne(e) {
|
|
55
55
|
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
|
|
56
56
|
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
|
|
57
|
-
}),
|
|
57
|
+
}), ne(e);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
(!e.__d && (e.__d = !0) && a.push(e) && !
|
|
59
|
+
function re(e) {
|
|
60
|
+
(!e.__d && (e.__d = !0) && a.push(e) && !ie.__r++ || o != n.debounceRendering) && ((o = n.debounceRendering) || s)(ie);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function ie() {
|
|
63
63
|
try {
|
|
64
|
-
for (var e, t = 1; a.length;) a.length > t && a.sort(c), e = a.shift(), t = a.length,
|
|
64
|
+
for (var e, t = 1; a.length;) a.length > t && a.sort(c), e = a.shift(), t = a.length, te(e);
|
|
65
65
|
} finally {
|
|
66
|
-
a.length =
|
|
66
|
+
a.length = ie.__r = 0;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ae(e, t, n, r, i, a, o, s, c, l, u) {
|
|
70
70
|
var d, f, p, m, h, g, y = r && r.__k || v, b = t.length;
|
|
71
71
|
for (c = oe(n, t, y, c, b), d = 0; d < b; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && y[p.__i] || _, p.__i = d, g = fe(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && _e(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = se(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
|
|
72
72
|
return n.__e = h, c;
|
|
@@ -74,7 +74,7 @@ function E(e, t, n, r, i, a, o, s, c, l, u) {
|
|
|
74
74
|
function oe(e, t, n, r, i) {
|
|
75
75
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
76
76
|
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = w(null, o, null, null, null) : b(o) ? o = e.__k[a] = w(T, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = w(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = D(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
77
|
-
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r =
|
|
77
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = ee(s)), ve(s, s));
|
|
78
78
|
return r;
|
|
79
79
|
}
|
|
80
80
|
function se(e, t, n) {
|
|
@@ -83,7 +83,7 @@ function se(e, t, n) {
|
|
|
83
83
|
for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = se(r[i], t, n));
|
|
84
84
|
return t;
|
|
85
85
|
}
|
|
86
|
-
e.__e != t && (t && e.type && !t.parentNode && (t =
|
|
86
|
+
e.__e != t && (t && e.type && !t.parentNode && (t = ee(e)), t = n.insertBefore(e.__e, t || null));
|
|
87
87
|
do
|
|
88
88
|
t &&= t.nextSibling;
|
|
89
89
|
while (t != null && t.nodeType == 8);
|
|
@@ -134,29 +134,29 @@ function de(e) {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
function fe(e, t, r, i, a, o, s, c, l, u) {
|
|
137
|
-
var d, f, p, m, h, g, _, y, C, w, ne, re, ie,
|
|
137
|
+
var d, f, p, m, h, g, _, y, C, w, te, ne, re, ie, oe, se, ce = t.type;
|
|
138
138
|
if (t.constructor !== void 0) return null;
|
|
139
139
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = t.__e = r.__e]), (d = n.__b) && d(t);
|
|
140
140
|
n: if (typeof ce == "function") {
|
|
141
141
|
f = s.length;
|
|
142
142
|
try {
|
|
143
|
-
if (C = t.props, w = ce.prototype && ce.prototype.render,
|
|
143
|
+
if (C = t.props, w = ce.prototype && ce.prototype.render, te = (d = ce.contextType) && i[d.__c], ne = d ? te ? te.props.value : d.__ : i, r.__c ? y = (p = t.__c = r.__c).__ = p.__E : (w ? t.__c = p = new ce(C, ne) : (t.__c = p = new E(C, ne), p.constructor = ce, p.render = ye), te && te.sub(p), p.state || (p.state = {}), p.__n = i, m = p.__d = !0, p.__h = [], p._sb = []), w && p.__s == null && (p.__s = p.state), w && ce.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = x({}, p.__s)), x(p.__s, ce.getDerivedStateFromProps(C, p.__s))), h = p.props, g = p.state, p.__v = t, m) w && ce.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), w && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
144
144
|
else {
|
|
145
|
-
if (w && ce.getDerivedStateFromProps == null && C !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(C,
|
|
145
|
+
if (w && ce.getDerivedStateFromProps == null && C !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(C, ne), t.__v == r.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(C, p.__s, ne)) {
|
|
146
146
|
t.__v != r.__v && (p.props = C, p.state = p.__s, p.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(e) {
|
|
147
147
|
e && (e.__ = t);
|
|
148
|
-
}), v.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && s.push(p), c =
|
|
148
|
+
}), v.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && s.push(p), c = ee(r);
|
|
149
149
|
break n;
|
|
150
150
|
}
|
|
151
|
-
p.componentWillUpdate != null && p.componentWillUpdate(C, p.__s,
|
|
151
|
+
p.componentWillUpdate != null && p.componentWillUpdate(C, p.__s, ne), w && p.componentDidUpdate != null && p.__h.push(function() {
|
|
152
152
|
p.componentDidUpdate(h, g, _);
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
if (p.context =
|
|
155
|
+
if (p.context = ne, p.props = C, p.__P = e, p.__e = !1, re = n.__r, ie = 0, w) p.state = p.__s, p.__d = !1, re && re(t), d = p.render(p.props, p.state, p.context), v.push.apply(p.__h, p._sb), p._sb = [];
|
|
156
156
|
else do
|
|
157
|
-
p.__d = !1,
|
|
158
|
-
while (p.__d && ++
|
|
159
|
-
p.state = p.__s, p.getChildContext != null && (i = x(x({}, i), p.getChildContext())), w && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), oe = d != null && d.type === T && d.key == null ? he(d.props.children) : d, c =
|
|
157
|
+
p.__d = !1, re && re(t), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
158
|
+
while (p.__d && ++ie < 25);
|
|
159
|
+
p.state = p.__s, p.getChildContext != null && (i = x(x({}, i), p.getChildContext())), w && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), oe = d != null && d.type === T && d.key == null ? he(d.props.children) : d, c = ae(e, b(oe) ? oe : [oe], t, r, i, a, o, s, c, l, u), p.base = t.__e, t.__u &= -161, p.__h.length && s.push(p), y && (p.__E = p.__ = null);
|
|
160
160
|
} catch (e) {
|
|
161
161
|
if (s.length = f, t.__v = null, l || o != null) {
|
|
162
162
|
if (e.then) {
|
|
@@ -205,7 +205,7 @@ function ge(e, r, i, a, o, s, c, l, u) {
|
|
|
205
205
|
for (d in y) h = y[d], d == "dangerouslySetInnerHTML" ? p = h : d == "children" || d in x || d == "value" && "defaultValue" in x || d == "checked" && "defaultChecked" in x || ue(e, d, null, h, o);
|
|
206
206
|
for (d in x) h = x[d], d == "children" ? m = h : d == "dangerouslySetInnerHTML" ? f = h : d == "value" ? g = h : d == "checked" ? v = h : l && typeof h != "function" || y[d] === h || ue(e, d, h, y[d], o);
|
|
207
207
|
if (f) l || p && (f.__html == p.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), r.__k = [];
|
|
208
|
-
else if (p && (e.innerHTML = ""),
|
|
208
|
+
else if (p && (e.innerHTML = ""), ae(r.type == "template" ? e.content : e, b(m) ? m : [m], r, i, a, C == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : i.__k && ee(i, 0), l, u), s != null) for (d = s.length; d--;) S(s[d]);
|
|
209
209
|
l && C != "textarea" || (d = "value", C == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[d] || C == "progress" && !g || C == "option" && g != y[d]) && ue(e, d, g, y[d], o), d = "checked", v != null && v != e[d] && ue(e, d, v, y[d], o));
|
|
210
210
|
}
|
|
211
211
|
return e;
|
|
@@ -257,7 +257,7 @@ function Ce(e) {
|
|
|
257
257
|
n = null;
|
|
258
258
|
}, this.shouldComponentUpdate = function(e) {
|
|
259
259
|
this.props.value != e.value && n.forEach(function(e) {
|
|
260
|
-
e.__e = !0,
|
|
260
|
+
e.__e = !0, re(e);
|
|
261
261
|
});
|
|
262
262
|
}, this.sub = function(e) {
|
|
263
263
|
n.add(e);
|
|
@@ -280,14 +280,14 @@ t = v.slice, n = { __e: function(e, t, n, r) {
|
|
|
280
280
|
throw e;
|
|
281
281
|
} }, r = 0, i = function(e) {
|
|
282
282
|
return e != null && e.constructor === void 0;
|
|
283
|
-
},
|
|
283
|
+
}, E.prototype.setState = function(e, t) {
|
|
284
284
|
var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = x({}, this.state);
|
|
285
|
-
typeof e == "function" && (e = e(x({}, n), this.props)), e && x(n, e), e != null && this.__v && (t && this._sb.push(t),
|
|
286
|
-
},
|
|
287
|
-
this.__v && (this.__e = !0, e && this.__h.push(e),
|
|
288
|
-
},
|
|
285
|
+
typeof e == "function" && (e = e(x({}, n), this.props)), e && x(n, e), e != null && this.__v && (t && this._sb.push(t), re(this));
|
|
286
|
+
}, E.prototype.forceUpdate = function(e) {
|
|
287
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), re(this));
|
|
288
|
+
}, E.prototype.render = T, a = [], s = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, c = function(e, t) {
|
|
289
289
|
return e.__v.__b - t.__v.__b;
|
|
290
|
-
},
|
|
290
|
+
}, ie.__r = 0, l = Math.random().toString(8), u = "__d" + l, d = "__a" + l, f = /(PointerCapture)$|Capture$/i, p = 0, m = de(!1), h = de(!0), g = 0;
|
|
291
291
|
//#endregion
|
|
292
292
|
//#region ../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js
|
|
293
293
|
function we() {
|
|
@@ -1030,7 +1030,7 @@ Gt("unmount", function(e, t) {
|
|
|
1030
1030
|
e(t);
|
|
1031
1031
|
}), Gt("__h", function(e, t, n, r) {
|
|
1032
1032
|
r < 3 && (t.__$f |= 2), e(t, n, r);
|
|
1033
|
-
}),
|
|
1033
|
+
}), E.prototype.shouldComponentUpdate = function(e, t) {
|
|
1034
1034
|
if (this.__R) return !0;
|
|
1035
1035
|
var n = this.__$u, r = n && n.s !== void 0;
|
|
1036
1036
|
for (var i in t) return !0;
|
|
@@ -10125,7 +10125,7 @@ var Gu = function() {
|
|
|
10125
10125
|
},
|
|
10126
10126
|
{
|
|
10127
10127
|
key: "getMeetingSession",
|
|
10128
|
-
value: (
|
|
10128
|
+
value: (ae = L(function* () {
|
|
10129
10129
|
var e = this;
|
|
10130
10130
|
return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"), Ju(this._callState, "getMeetingSession()"), new Promise(function(t) {
|
|
10131
10131
|
e.sendMessageToCallMachine({ action: "get-meeting-session" }, function(e) {
|
|
@@ -10133,7 +10133,7 @@ var Gu = function() {
|
|
|
10133
10133
|
});
|
|
10134
10134
|
});
|
|
10135
10135
|
}), function() {
|
|
10136
|
-
return
|
|
10136
|
+
return ae.apply(this, arguments);
|
|
10137
10137
|
})
|
|
10138
10138
|
},
|
|
10139
10139
|
{
|
|
@@ -10185,7 +10185,7 @@ var Gu = function() {
|
|
|
10185
10185
|
},
|
|
10186
10186
|
{
|
|
10187
10187
|
key: "setUserData",
|
|
10188
|
-
value: (
|
|
10188
|
+
value: (ie = L(function* (e) {
|
|
10189
10189
|
var t = this;
|
|
10190
10190
|
try {
|
|
10191
10191
|
rd(e);
|
|
@@ -10205,7 +10205,7 @@ var Gu = function() {
|
|
|
10205
10205
|
}
|
|
10206
10206
|
});
|
|
10207
10207
|
}), function(e) {
|
|
10208
|
-
return
|
|
10208
|
+
return ie.apply(this, arguments);
|
|
10209
10209
|
})
|
|
10210
10210
|
},
|
|
10211
10211
|
{
|
|
@@ -10277,7 +10277,7 @@ var Gu = function() {
|
|
|
10277
10277
|
},
|
|
10278
10278
|
{
|
|
10279
10279
|
key: "startCamera",
|
|
10280
|
-
value: (
|
|
10280
|
+
value: (re = L(function* () {
|
|
10281
10281
|
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
10282
10282
|
if ($u(this._callObjectMode, "startCamera()"), Xu(this._callState, this._isPreparingToJoin, "startCamera()", "Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"), this.needsLoad()) try {
|
|
10283
10283
|
yield this.load(t);
|
|
@@ -10305,7 +10305,7 @@ var Gu = function() {
|
|
|
10305
10305
|
});
|
|
10306
10306
|
});
|
|
10307
10307
|
}), function() {
|
|
10308
|
-
return
|
|
10308
|
+
return re.apply(this, arguments);
|
|
10309
10309
|
})
|
|
10310
10310
|
},
|
|
10311
10311
|
{
|
|
@@ -10378,10 +10378,10 @@ var Gu = function() {
|
|
|
10378
10378
|
},
|
|
10379
10379
|
{
|
|
10380
10380
|
key: "setAudioDevice",
|
|
10381
|
-
value: (
|
|
10381
|
+
value: (ne = L(function* (e) {
|
|
10382
10382
|
return nd(), this.nativeUtils().setAudioDevice(e), { deviceId: yield this.nativeUtils().getAudioDevice() };
|
|
10383
10383
|
}), function(e) {
|
|
10384
|
-
return
|
|
10384
|
+
return ne.apply(this, arguments);
|
|
10385
10385
|
})
|
|
10386
10386
|
},
|
|
10387
10387
|
{
|
|
@@ -10422,7 +10422,7 @@ var Gu = function() {
|
|
|
10422
10422
|
},
|
|
10423
10423
|
{
|
|
10424
10424
|
key: "setInputDevicesAsync",
|
|
10425
|
-
value: (
|
|
10425
|
+
value: (te = L(function* (e) {
|
|
10426
10426
|
var t = this, n = e.audioDeviceId, r = e.videoDeviceId, i = e.audioSource, a = e.videoSource;
|
|
10427
10427
|
if (td(), i !== void 0 && (n = i), a !== void 0 && (r = a), typeof n == "boolean" && (this._setAllowLocalAudio(n), n = void 0), typeof r == "boolean" && (this._setAllowLocalVideo(r), r = void 0), !n && !r) return yield this.getInputDevices();
|
|
10428
10428
|
var o = {};
|
|
@@ -10437,12 +10437,12 @@ var Gu = function() {
|
|
|
10437
10437
|
});
|
|
10438
10438
|
});
|
|
10439
10439
|
}), function(e) {
|
|
10440
|
-
return
|
|
10440
|
+
return te.apply(this, arguments);
|
|
10441
10441
|
})
|
|
10442
10442
|
},
|
|
10443
10443
|
{
|
|
10444
10444
|
key: "setOutputDeviceAsync",
|
|
10445
|
-
value: (
|
|
10445
|
+
value: (ee = L(function* (e) {
|
|
10446
10446
|
var t = this, n = e.outputDeviceId;
|
|
10447
10447
|
if (td(), !n || typeof n != "string") throw Error("outputDeviceId must be provided and must be a valid device id");
|
|
10448
10448
|
return this._preloadCache.outputDeviceId = n, this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(e, r) {
|
|
@@ -10459,12 +10459,12 @@ var Gu = function() {
|
|
|
10459
10459
|
});
|
|
10460
10460
|
});
|
|
10461
10461
|
}), function(e) {
|
|
10462
|
-
return
|
|
10462
|
+
return ee.apply(this, arguments);
|
|
10463
10463
|
})
|
|
10464
10464
|
},
|
|
10465
10465
|
{
|
|
10466
10466
|
key: "getInputDevices",
|
|
10467
|
-
value: (
|
|
10467
|
+
value: (E = L(function* () {
|
|
10468
10468
|
var e = this;
|
|
10469
10469
|
return this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(t) {
|
|
10470
10470
|
e.sendMessageToCallMachine({ action: "get-input-devices" }, function(n) {
|
|
@@ -10476,7 +10476,7 @@ var Gu = function() {
|
|
|
10476
10476
|
});
|
|
10477
10477
|
});
|
|
10478
10478
|
}), function() {
|
|
10479
|
-
return
|
|
10479
|
+
return E.apply(this, arguments);
|
|
10480
10480
|
})
|
|
10481
10481
|
},
|
|
10482
10482
|
{
|
|
@@ -12388,7 +12388,7 @@ var Gu = function() {
|
|
|
12388
12388
|
}
|
|
12389
12389
|
}
|
|
12390
12390
|
]);
|
|
12391
|
-
var t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, ee, te, ne, re, ie, ae,
|
|
12391
|
+
var t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, ee, te, ne, re, ie, ae, oe, se, ce, D, le, ue, de;
|
|
12392
12392
|
}();
|
|
12393
12393
|
function Ku(e) {
|
|
12394
12394
|
if (e.extension) {
|
|
@@ -13090,7 +13090,7 @@ function U(e, t) {
|
|
|
13090
13090
|
}
|
|
13091
13091
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r;
|
|
13092
13092
|
}
|
|
13093
|
-
(Kd.prototype = new
|
|
13093
|
+
(Kd.prototype = new E()).isPureReactComponent = !0, Kd.prototype.shouldComponentUpdate = function(e, t) {
|
|
13094
13094
|
return Gd(this.props, e) || Gd(this.state, t);
|
|
13095
13095
|
};
|
|
13096
13096
|
var qd = n.__b;
|
|
@@ -13138,7 +13138,7 @@ function nf() {
|
|
|
13138
13138
|
n.unmount = function(e) {
|
|
13139
13139
|
var t = e.__c;
|
|
13140
13140
|
t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Zd && Zd(e);
|
|
13141
|
-
}, (ef.prototype = new
|
|
13141
|
+
}, (ef.prototype = new E()).__c = function(e, t) {
|
|
13142
13142
|
var n = t.__c, r = this;
|
|
13143
13143
|
r.o ??= [], r.o.push(n);
|
|
13144
13144
|
var i = tf(r.__v), a = !1, o = function() {
|
|
@@ -13215,7 +13215,7 @@ function sf(e, t) {
|
|
|
13215
13215
|
});
|
|
13216
13216
|
return n.containerInfo = t, n;
|
|
13217
13217
|
}
|
|
13218
|
-
(nf.prototype = new
|
|
13218
|
+
(nf.prototype = new E()).__a = function(e) {
|
|
13219
13219
|
var t = this, n = tf(t.__v), r = t.l.get(e);
|
|
13220
13220
|
return r[0]++, function(i) {
|
|
13221
13221
|
var a = function() {
|
|
@@ -13242,12 +13242,12 @@ function sf(e, t) {
|
|
|
13242
13242
|
var cf = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, lf = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, uf = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, df = /[A-Z0-9]/g, ff = typeof document < "u", pf = function(e) {
|
|
13243
13243
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
13244
13244
|
};
|
|
13245
|
-
|
|
13245
|
+
E.prototype.isReactComponent = !0, [
|
|
13246
13246
|
"componentWillMount",
|
|
13247
13247
|
"componentWillReceiveProps",
|
|
13248
13248
|
"componentWillUpdate"
|
|
13249
13249
|
].forEach(function(e) {
|
|
13250
|
-
Object.defineProperty(
|
|
13250
|
+
Object.defineProperty(E.prototype, e, {
|
|
13251
13251
|
configurable: !0,
|
|
13252
13252
|
get: function() {
|
|
13253
13253
|
return this["UNSAFE_" + e];
|
|
@@ -13845,35 +13845,41 @@ function Tp(e, t) {
|
|
|
13845
13845
|
return t ? e instanceof sn && e.status === 401 : !1;
|
|
13846
13846
|
}
|
|
13847
13847
|
function Ep({ children: e }) {
|
|
13848
|
-
let { deploymentId: t, client: n, config: r } = N(Sn), { memoryStores: i, conversationalContext: a, customGreeting: o } = N(lt), s = jd(), c = Md(), l = N(Ff), u = j(() => kt("idle"), []), d = j(() => kt(null), []), f = j(() => kt([]), []), p = j(() => kt(""), []), m = j(() => kt(null), []), h = j(() => kt(null), []), g = j(() => kt(null), []), _ = j(() => kt(null), []), v = A(null), y = A(null), b = j(() =>
|
|
13848
|
+
let { deploymentId: t, client: n, config: r } = N(Sn), { memoryStores: i, conversationalContext: a, customGreeting: o } = N(lt), s = jd(), c = Md(), l = N(Ff), u = j(() => kt("idle"), []), d = j(() => kt(null), []), f = j(() => kt([]), []), p = j(() => kt(""), []), m = j(() => kt(null), []), h = j(() => kt(null), []), g = j(() => kt(null), []), _ = j(() => kt(null), []), v = A(null), y = A(null), b = j(() => kt(null), []), x = A(null), S = j(() => dp(), []), C = j(() => /* @__PURE__ */ new Set(), []), w = j(() => kt("idle"), []), T = l?.flowSignal ?? w, E = M((e) => {
|
|
13849
13849
|
g.value = e;
|
|
13850
|
-
}, [g]),
|
|
13850
|
+
}, [g]), ee = M((e) => {
|
|
13851
13851
|
_.value = e;
|
|
13852
|
-
}, [_]),
|
|
13853
|
-
|
|
13854
|
-
|
|
13855
|
-
}, [
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13852
|
+
}, [_]), te = M(() => {
|
|
13853
|
+
let e = b.peek();
|
|
13854
|
+
return e !== null && (b.value = null, d.peek()?.conversationId === e);
|
|
13855
|
+
}, [b, d]);
|
|
13856
|
+
Fd("joined-meeting", () => {
|
|
13857
|
+
let e = b.peek();
|
|
13858
|
+
e !== null && e === d.peek()?.conversationId && u.peek() === "connecting" && (u.value = "connected", fp.info("Connected to meeting"));
|
|
13859
|
+
}), Fd("left-meeting", () => {
|
|
13860
|
+
te() && (u.value = "ended", Jf(), fp.info("Left meeting"));
|
|
13861
|
+
}), Fd("error", () => {
|
|
13862
|
+
te() && (h.value = "Meeting error", u.value = "error");
|
|
13863
|
+
});
|
|
13864
|
+
let ne = M(() => b.peek() === null ? c === "joining-meeting" || c === "joined-meeting" : !1, [b, c]), re = M(() => x.current, []);
|
|
13865
|
+
nn(() => {
|
|
13860
13866
|
let e = u.value;
|
|
13861
|
-
if (e === "connected") for (let e of
|
|
13862
|
-
else if (e === "ended" || e === "disconnecting") for (let e of
|
|
13867
|
+
if (e === "connected") for (let e of C) e.onConnect?.();
|
|
13868
|
+
else if (e === "ended" || e === "disconnecting") for (let e of C) e.onDisconnect?.();
|
|
13863
13869
|
else if (e === "error") {
|
|
13864
13870
|
let e = h.peek() ?? "Unknown error";
|
|
13865
|
-
for (let t of
|
|
13871
|
+
for (let t of C) t.onError?.({
|
|
13866
13872
|
code: "CONVERSATION_ERROR",
|
|
13867
13873
|
message: e
|
|
13868
13874
|
});
|
|
13869
13875
|
}
|
|
13870
13876
|
}), nn(() => {
|
|
13871
|
-
let e =
|
|
13872
|
-
for (let t of
|
|
13877
|
+
let e = T.value;
|
|
13878
|
+
for (let t of C) t.onModeChange?.(e);
|
|
13873
13879
|
}), Id({ onAppMessage: M((e) => {
|
|
13874
13880
|
up(e?.data, {
|
|
13875
13881
|
appendChatMessage(e, t) {
|
|
13876
|
-
e === "user" &&
|
|
13882
|
+
e === "user" && S.consumeMatch(t) || (f.value = [...f.peek(), {
|
|
13877
13883
|
id: crypto.randomUUID(),
|
|
13878
13884
|
sender: e,
|
|
13879
13885
|
text: t,
|
|
@@ -13887,17 +13893,17 @@ function Ep({ children: e }) {
|
|
|
13887
13893
|
}
|
|
13888
13894
|
});
|
|
13889
13895
|
let t = cp(e?.data);
|
|
13890
|
-
t && Sp(t,
|
|
13896
|
+
t && Sp(t, C, S);
|
|
13891
13897
|
}, [
|
|
13892
13898
|
f,
|
|
13893
13899
|
p,
|
|
13894
13900
|
m,
|
|
13895
|
-
|
|
13896
|
-
|
|
13901
|
+
S,
|
|
13902
|
+
C
|
|
13897
13903
|
]) }), k(() => () => {
|
|
13898
13904
|
v.current !== null && (clearTimeout(v.current), v.current = null);
|
|
13899
13905
|
}, []);
|
|
13900
|
-
let
|
|
13906
|
+
let ie = M(() => {
|
|
13901
13907
|
y.current = null, d.value = null, f.value = [], p.value = "", m.value = null, v.current !== null && (clearTimeout(v.current), v.current = null), (u.peek() === "ended" || u.peek() === "error") && (u.value = "idle");
|
|
13902
13908
|
}, [
|
|
13903
13909
|
d,
|
|
@@ -13905,7 +13911,7 @@ function Ep({ children: e }) {
|
|
|
13905
13911
|
f,
|
|
13906
13912
|
p,
|
|
13907
13913
|
m
|
|
13908
|
-
]),
|
|
13914
|
+
]), ae = M(() => {
|
|
13909
13915
|
let e = d.peek()?.conversationId ?? null, r = y.current;
|
|
13910
13916
|
if (r?.conversationId === e) return r.promise;
|
|
13911
13917
|
u.value = "disconnecting";
|
|
@@ -13919,23 +13925,28 @@ function Ep({ children: e }) {
|
|
|
13919
13925
|
}
|
|
13920
13926
|
let c = Promise.resolve(o).catch((e) => {
|
|
13921
13927
|
i = !0, fp.error("Daily leave failed", e);
|
|
13922
|
-
}), l =
|
|
13923
|
-
|
|
13928
|
+
}), l = c.then(() => {
|
|
13929
|
+
x.current === l && (x.current = null);
|
|
13930
|
+
});
|
|
13931
|
+
x.current = l;
|
|
13932
|
+
let f = Promise.all([a, c]).then(() => {
|
|
13933
|
+
y.current?.promise === f && (b.peek() === e && (b.value = null), u.value = "ended", i && (y.current = null));
|
|
13924
13934
|
});
|
|
13925
13935
|
return y.current = {
|
|
13926
13936
|
conversationId: e,
|
|
13927
|
-
promise:
|
|
13928
|
-
},
|
|
13937
|
+
promise: f
|
|
13938
|
+
}, f;
|
|
13929
13939
|
}, [
|
|
13930
13940
|
n,
|
|
13931
13941
|
t,
|
|
13932
13942
|
s,
|
|
13933
13943
|
d,
|
|
13934
|
-
u
|
|
13935
|
-
|
|
13944
|
+
u,
|
|
13945
|
+
b
|
|
13946
|
+
]), oe = M(async (e, c) => {
|
|
13936
13947
|
let l = null;
|
|
13937
13948
|
try {
|
|
13938
|
-
|
|
13949
|
+
ie(), u.value = "connecting", h.value = null;
|
|
13939
13950
|
let f = e, p = g.peek();
|
|
13940
13951
|
p && f?.password == null && (f = {
|
|
13941
13952
|
...f,
|
|
@@ -13964,16 +13975,16 @@ function Ep({ children: e }) {
|
|
|
13964
13975
|
createdAt: y.created_at,
|
|
13965
13976
|
magicGrid: y.magic_grid === !0
|
|
13966
13977
|
}, console.info("[Tavus:Conversation] Conversation created:", y.conversation_id), c?.signal?.aborted) throw c.signal.reason ?? new DOMException("The operation was aborted", "AbortError");
|
|
13967
|
-
let
|
|
13968
|
-
if (await mp(Promise.resolve(s?.join({
|
|
13978
|
+
let S = r.value.customization.conversation.modality === "chat", C = x.current;
|
|
13979
|
+
if (C && await mp(C, c?.signal), b.value = y.conversation_id, await mp(Promise.resolve(s?.join({
|
|
13969
13980
|
url: y.conversation_url,
|
|
13970
|
-
...
|
|
13981
|
+
...S ? {
|
|
13971
13982
|
startAudioOff: !0,
|
|
13972
13983
|
startVideoOff: !0
|
|
13973
13984
|
} : {}
|
|
13974
|
-
})), c?.signal), !
|
|
13985
|
+
})), c?.signal), !S && s && wp(s)) throw new Sf();
|
|
13975
13986
|
} catch (e) {
|
|
13976
|
-
throw await
|
|
13987
|
+
throw await ae(), l && (d.value = null), Tp(e, r.value.has_password === !0) && (g.value = null), fp.error("Start failed", e), h.value = String(e), u.value = "error", e;
|
|
13977
13988
|
}
|
|
13978
13989
|
}, [
|
|
13979
13990
|
n,
|
|
@@ -13988,16 +13999,17 @@ function Ep({ children: e }) {
|
|
|
13988
13999
|
i,
|
|
13989
14000
|
a,
|
|
13990
14001
|
o,
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
14002
|
+
ie,
|
|
14003
|
+
ae,
|
|
14004
|
+
b
|
|
14005
|
+
]), se = M((e) => {
|
|
13994
14006
|
if (!s) return;
|
|
13995
14007
|
let t = d.peek();
|
|
13996
14008
|
if (!t) {
|
|
13997
14009
|
fp.warn("sendChat called before session was established; dropping message");
|
|
13998
14010
|
return;
|
|
13999
14011
|
}
|
|
14000
|
-
|
|
14012
|
+
S.markSent(e), s.sendAppMessage(Qf(t.conversationId, e), "*"), f.value = [...f.peek(), {
|
|
14001
14013
|
id: crypto.randomUUID(),
|
|
14002
14014
|
sender: "user",
|
|
14003
14015
|
text: e,
|
|
@@ -14007,8 +14019,8 @@ function Ep({ children: e }) {
|
|
|
14007
14019
|
s,
|
|
14008
14020
|
f,
|
|
14009
14021
|
d,
|
|
14010
|
-
|
|
14011
|
-
]),
|
|
14022
|
+
S
|
|
14023
|
+
]), ce = M((e) => {
|
|
14012
14024
|
if (!s) {
|
|
14013
14025
|
fp.warn("sendMessage called before Daily was ready; dropping message");
|
|
14014
14026
|
return;
|
|
@@ -14018,16 +14030,16 @@ function Ep({ children: e }) {
|
|
|
14018
14030
|
fp.warn("sendMessage called before session was established; dropping message");
|
|
14019
14031
|
return;
|
|
14020
14032
|
}
|
|
14021
|
-
e.event_type === "conversation.respond" &&
|
|
14033
|
+
e.event_type === "conversation.respond" && S.markSent(e.properties.text), s.sendAppMessage(lp(t.conversationId, e), "*");
|
|
14022
14034
|
}, [
|
|
14023
14035
|
s,
|
|
14024
14036
|
d,
|
|
14025
|
-
|
|
14026
|
-
]),
|
|
14027
|
-
|
|
14028
|
-
}, [
|
|
14029
|
-
|
|
14030
|
-
}, [
|
|
14037
|
+
S
|
|
14038
|
+
]), D = M((e) => {
|
|
14039
|
+
C.add(e);
|
|
14040
|
+
}, [C]), le = M((e) => {
|
|
14041
|
+
C.delete(e);
|
|
14042
|
+
}, [C]), ue = j(() => ({
|
|
14031
14043
|
state: u,
|
|
14032
14044
|
session: d,
|
|
14033
14045
|
chatMessages: f,
|
|
@@ -14035,22 +14047,24 @@ function Ep({ children: e }) {
|
|
|
14035
14047
|
captionRole: m,
|
|
14036
14048
|
error: h,
|
|
14037
14049
|
password: g,
|
|
14038
|
-
setPassword:
|
|
14050
|
+
setPassword: E,
|
|
14039
14051
|
captchaToken: _,
|
|
14040
|
-
setCaptchaToken:
|
|
14041
|
-
mode:
|
|
14042
|
-
start:
|
|
14043
|
-
end:
|
|
14044
|
-
sendChat:
|
|
14045
|
-
sendMessage:
|
|
14052
|
+
setCaptchaToken: ee,
|
|
14053
|
+
mode: T,
|
|
14054
|
+
start: oe,
|
|
14055
|
+
end: ae,
|
|
14056
|
+
sendChat: se,
|
|
14057
|
+
sendMessage: ce,
|
|
14046
14058
|
conversation: {
|
|
14047
|
-
start:
|
|
14048
|
-
end:
|
|
14049
|
-
sendMessage:
|
|
14050
|
-
},
|
|
14051
|
-
__registerSubscriber:
|
|
14052
|
-
__unregisterSubscriber:
|
|
14053
|
-
__beginAttempt:
|
|
14059
|
+
start: oe,
|
|
14060
|
+
end: ae,
|
|
14061
|
+
sendMessage: ce
|
|
14062
|
+
},
|
|
14063
|
+
__registerSubscriber: D,
|
|
14064
|
+
__unregisterSubscriber: le,
|
|
14065
|
+
__beginAttempt: ie,
|
|
14066
|
+
isSharedCallBusy: ne,
|
|
14067
|
+
pendingLeave: re
|
|
14054
14068
|
}), [
|
|
14055
14069
|
u,
|
|
14056
14070
|
d,
|
|
@@ -14059,20 +14073,22 @@ function Ep({ children: e }) {
|
|
|
14059
14073
|
m,
|
|
14060
14074
|
h,
|
|
14061
14075
|
g,
|
|
14062
|
-
|
|
14076
|
+
E,
|
|
14063
14077
|
_,
|
|
14078
|
+
ee,
|
|
14064
14079
|
T,
|
|
14065
|
-
C,
|
|
14066
|
-
re,
|
|
14067
|
-
ne,
|
|
14068
|
-
ie,
|
|
14069
|
-
ae,
|
|
14070
|
-
E,
|
|
14071
14080
|
oe,
|
|
14072
|
-
|
|
14081
|
+
ae,
|
|
14082
|
+
se,
|
|
14083
|
+
ce,
|
|
14084
|
+
D,
|
|
14085
|
+
le,
|
|
14086
|
+
ie,
|
|
14087
|
+
ne,
|
|
14088
|
+
re
|
|
14073
14089
|
]);
|
|
14074
14090
|
return /* @__PURE__ */ P(hp.Provider, {
|
|
14075
|
-
value:
|
|
14091
|
+
value: ue,
|
|
14076
14092
|
children: e
|
|
14077
14093
|
});
|
|
14078
14094
|
}
|
|
@@ -14372,210 +14388,217 @@ var em = rn("Flow"), tm = [
|
|
|
14372
14388
|
"ended"
|
|
14373
14389
|
];
|
|
14374
14390
|
function nm({ children: e }) {
|
|
14375
|
-
let { config: t, retryInit: n } = zp(), { cameraOnStart: r } = N(lt), { start: i, end: a, session: o, state: s, __beginAttempt: c } = N(hp),
|
|
14391
|
+
let { config: t, retryInit: n } = zp(), { cameraOnStart: r } = N(lt), { start: i, end: a, session: o, state: s, __beginAttempt: c, isSharedCallBusy: l, pendingLeave: u } = N(hp), d = t.value.deployment_id ?? "", f = qp(d), p = M(() => {
|
|
14376
14392
|
let e = t.value, n = e.limits?.daily_call_limit_per_user;
|
|
14377
14393
|
return n == null || e.channel !== "widget" && e.channel !== "embed" ? null : n;
|
|
14378
|
-
}, [t]),
|
|
14394
|
+
}, [t]), m = N(Lp), [h, g] = O("idle"), [_, v] = O(!1), [y, b] = O(null), [x, S] = O(null), [C, w] = O(!1), { mic: T, camera: E, requestMic: ee, requestCamera: te } = $p(), ne = j(() => kt("idle"), []);
|
|
14379
14395
|
k(() => {
|
|
14380
|
-
|
|
14381
|
-
}, [
|
|
14396
|
+
ne.value = h;
|
|
14397
|
+
}, [h, ne]), nn(() => {
|
|
14382
14398
|
let e = t.value, n = e.limits?.daily_call_limit_per_user;
|
|
14383
|
-
n != null && (e.channel === "widget" || e.channel === "embed") &&
|
|
14399
|
+
n != null && (e.channel === "widget" || e.channel === "embed") && ne.value === "idle" && f.value >= n && (S("daily_limit"), w(!1), g("unavailable"));
|
|
14384
14400
|
});
|
|
14385
|
-
let
|
|
14386
|
-
let e =
|
|
14387
|
-
|
|
14388
|
-
}, []),
|
|
14389
|
-
|
|
14401
|
+
let re = A(!1), ie = A(!1), ae = A(async () => {}), oe = A(!1), se = A(null), ce = A(null), D = M(() => {
|
|
14402
|
+
let e = se.current;
|
|
14403
|
+
se.current = null, e?.resolve();
|
|
14404
|
+
}, []), le = M(async (e = new AbortController()) => {
|
|
14405
|
+
ce.current = e;
|
|
14390
14406
|
let { signal: r } = e;
|
|
14391
|
-
|
|
14407
|
+
v(!0);
|
|
14392
14408
|
try {
|
|
14393
|
-
let e = await
|
|
14409
|
+
let e = await m?.ensureToken(r) ?? { kind: "not-required" };
|
|
14394
14410
|
if (r.aborted) return;
|
|
14395
14411
|
if (e.kind === "unavailable") {
|
|
14396
|
-
|
|
14412
|
+
S(e.reason === "unsupported" ? "captcha_unsupported" : "error"), w(e.reason === "timeout" || e.reason === "exhausted"), g("unavailable");
|
|
14397
14413
|
return;
|
|
14398
14414
|
}
|
|
14399
14415
|
if (await i(void 0, { signal: r }), r.aborted) return;
|
|
14400
|
-
|
|
14416
|
+
re.current = !1, ie.current = !1, p() != null && Jp(d), g("call");
|
|
14401
14417
|
} catch (i) {
|
|
14402
14418
|
if (r.aborted) return;
|
|
14403
14419
|
let a = Df(i);
|
|
14404
14420
|
if (Cf(i)) {
|
|
14405
|
-
|
|
14421
|
+
D(), b({
|
|
14406
14422
|
kind: "microphone",
|
|
14407
14423
|
status: "blocked"
|
|
14408
|
-
}),
|
|
14424
|
+
}), g("idle");
|
|
14409
14425
|
return;
|
|
14410
14426
|
}
|
|
14411
|
-
if (Af(i) && (t.peek().captcha ?? null) === null && !
|
|
14412
|
-
if (jf(i) && !
|
|
14413
|
-
|
|
14427
|
+
if (Af(i) && (t.peek().captcha ?? null) === null && !ie.current) return ie.current = !0, em.info("/start demands a captcha the loaded config lacks; refreshing config"), await n(), r.aborted ? void 0 : await ae.current(e);
|
|
14428
|
+
if (jf(i) && !re.current) {
|
|
14429
|
+
re.current = !0, v(!1), g("idle");
|
|
14414
14430
|
return;
|
|
14415
14431
|
}
|
|
14416
|
-
if (
|
|
14417
|
-
em.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),
|
|
14432
|
+
if (re.current = !1, Nf(i)) {
|
|
14433
|
+
em.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`), S("error"), w(!1), g("unavailable");
|
|
14418
14434
|
return;
|
|
14419
14435
|
}
|
|
14420
14436
|
if (a.status === 401 && t.value.has_password === !0) {
|
|
14421
|
-
|
|
14437
|
+
g("idle");
|
|
14422
14438
|
return;
|
|
14423
14439
|
}
|
|
14424
14440
|
let o = Pf(a.kind) ?? "busy";
|
|
14425
|
-
|
|
14441
|
+
S(o), w(a.retryable), g("unavailable");
|
|
14426
14442
|
} finally {
|
|
14427
|
-
|
|
14443
|
+
ce.current === e && (ce.current = null), v(!1);
|
|
14428
14444
|
}
|
|
14429
14445
|
}, [
|
|
14430
14446
|
i,
|
|
14431
14447
|
t,
|
|
14448
|
+
p,
|
|
14432
14449
|
d,
|
|
14433
|
-
|
|
14434
|
-
f,
|
|
14450
|
+
m,
|
|
14435
14451
|
n,
|
|
14436
|
-
|
|
14452
|
+
D
|
|
14437
14453
|
]);
|
|
14438
|
-
|
|
14439
|
-
let
|
|
14440
|
-
let e =
|
|
14454
|
+
ae.current = le;
|
|
14455
|
+
let ue = M(async () => {
|
|
14456
|
+
let e = se.current;
|
|
14441
14457
|
if (e) {
|
|
14442
|
-
|
|
14458
|
+
b(null);
|
|
14443
14459
|
try {
|
|
14444
|
-
await
|
|
14460
|
+
await le(e.controller);
|
|
14445
14461
|
} finally {
|
|
14446
|
-
|
|
14462
|
+
se.current === e && (se.current = null), e.resolve();
|
|
14447
14463
|
}
|
|
14448
14464
|
}
|
|
14449
|
-
}, [
|
|
14450
|
-
let e =
|
|
14465
|
+
}, [le]), de = M(() => {
|
|
14466
|
+
let e = se.current;
|
|
14451
14467
|
if (e && !e.proceeding) {
|
|
14452
|
-
if (e.proceeding = !0, t.peek().customization.conversation.modality === "video" && r === "on" && !
|
|
14453
|
-
|
|
14468
|
+
if (e.proceeding = !0, t.peek().customization.conversation.modality === "video" && r === "on" && !E.isGranted && !E.isBlocked) {
|
|
14469
|
+
b({
|
|
14454
14470
|
kind: "camera",
|
|
14455
|
-
status:
|
|
14456
|
-
}),
|
|
14457
|
-
|
|
14471
|
+
status: E.status
|
|
14472
|
+
}), te().finally(() => {
|
|
14473
|
+
ue();
|
|
14458
14474
|
});
|
|
14459
14475
|
return;
|
|
14460
14476
|
}
|
|
14461
|
-
|
|
14477
|
+
ue();
|
|
14462
14478
|
}
|
|
14463
14479
|
}, [
|
|
14464
14480
|
t,
|
|
14465
14481
|
r,
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14482
|
+
E,
|
|
14483
|
+
te,
|
|
14484
|
+
ue
|
|
14469
14485
|
]);
|
|
14470
14486
|
k(() => {
|
|
14471
|
-
if (
|
|
14472
|
-
if (
|
|
14487
|
+
if (se.current && y?.kind === "microphone") {
|
|
14488
|
+
if (y.status !== T.status && b({
|
|
14473
14489
|
kind: "microphone",
|
|
14474
|
-
status:
|
|
14475
|
-
}),
|
|
14476
|
-
|
|
14490
|
+
status: T.status
|
|
14491
|
+
}), T.isGranted) {
|
|
14492
|
+
de();
|
|
14477
14493
|
return;
|
|
14478
14494
|
}
|
|
14479
|
-
if (
|
|
14480
|
-
let e =
|
|
14481
|
-
|
|
14495
|
+
if (T.isBlocked) {
|
|
14496
|
+
let e = se.current;
|
|
14497
|
+
se.current = null, v(!1), e.resolve();
|
|
14482
14498
|
}
|
|
14483
14499
|
}
|
|
14484
14500
|
}, [
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14501
|
+
y,
|
|
14502
|
+
T,
|
|
14503
|
+
de
|
|
14488
14504
|
]);
|
|
14489
|
-
let
|
|
14490
|
-
if (
|
|
14505
|
+
let fe = M(() => {
|
|
14506
|
+
if (se.current) return se.current.promise;
|
|
14491
14507
|
let e, t = new Promise((t) => {
|
|
14492
14508
|
e = t;
|
|
14493
14509
|
});
|
|
14494
|
-
return
|
|
14510
|
+
return se.current = {
|
|
14495
14511
|
promise: t,
|
|
14496
14512
|
resolve: e,
|
|
14497
14513
|
proceeding: !1,
|
|
14498
14514
|
controller: new AbortController()
|
|
14499
|
-
},
|
|
14515
|
+
}, v(!0), T.isGranted ? de() : T.isBlocked ? (b({
|
|
14500
14516
|
kind: "microphone",
|
|
14501
|
-
status:
|
|
14502
|
-
}),
|
|
14517
|
+
status: T.status
|
|
14518
|
+
}), se.current = null, v(!1), e()) : (b({
|
|
14503
14519
|
kind: "microphone",
|
|
14504
|
-
status:
|
|
14505
|
-
}),
|
|
14520
|
+
status: T.status
|
|
14521
|
+
}), ee()), t;
|
|
14506
14522
|
}, [
|
|
14507
|
-
C,
|
|
14508
14523
|
T,
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14524
|
+
ee,
|
|
14525
|
+
de
|
|
14526
|
+
]), pe = M(async () => {
|
|
14527
|
+
if (!tm.includes(h)) return;
|
|
14528
|
+
let e = t.peek().customization, n = e.show_haircheck, r = e.conversation.modality, i = n && r !== "chat", a = !n && r !== "chat", o = p();
|
|
14529
|
+
if (o != null && f.value >= o) {
|
|
14530
|
+
S("daily_limit"), w(!1), g("unavailable");
|
|
14515
14531
|
return;
|
|
14516
14532
|
}
|
|
14517
|
-
if (
|
|
14518
|
-
|
|
14533
|
+
if (l()) {
|
|
14534
|
+
S("busy"), w(!0), g("unavailable");
|
|
14519
14535
|
return;
|
|
14520
14536
|
}
|
|
14521
|
-
|
|
14537
|
+
let s = u();
|
|
14538
|
+
if (s && await s, c(), i && !oe.current) {
|
|
14539
|
+
g("haircheck");
|
|
14540
|
+
return;
|
|
14541
|
+
}
|
|
14542
|
+
return a ? fe() : le();
|
|
14522
14543
|
}, [
|
|
14523
|
-
|
|
14544
|
+
h,
|
|
14524
14545
|
t,
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
c
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
}, [
|
|
14546
|
+
fe,
|
|
14547
|
+
le,
|
|
14548
|
+
p,
|
|
14549
|
+
f,
|
|
14550
|
+
c,
|
|
14551
|
+
l,
|
|
14552
|
+
u
|
|
14553
|
+
]), me = M(async () => {
|
|
14554
|
+
h === "haircheck" && (oe.current = !0, await le());
|
|
14555
|
+
}, [h, le]), he = M(() => {
|
|
14556
|
+
let e = se.current, t = e?.controller ?? ce.current;
|
|
14557
|
+
e && (se.current = null, e.resolve(), b(null)), t?.abort(), t && v(!1), h === "haircheck" && g("idle");
|
|
14558
|
+
}, [h]), ge = M(() => {
|
|
14559
|
+
h === "call" && g("ended");
|
|
14560
|
+
}, [h]);
|
|
14538
14561
|
k(() => {
|
|
14539
14562
|
let e = () => {
|
|
14540
|
-
let e =
|
|
14541
|
-
(e || t || n) && (
|
|
14563
|
+
let e = se.current !== null || ce.current !== null, t = h === "haircheck" || h === "call", n = o.peek() !== null, r = n && s.peek() !== "ended";
|
|
14564
|
+
(e || t || n) && (he(), (h === "call" || r) && g("ended"), a());
|
|
14542
14565
|
};
|
|
14543
14566
|
return window.addEventListener("pagehide", e), () => window.removeEventListener("pagehide", e);
|
|
14544
14567
|
}, [
|
|
14545
|
-
|
|
14568
|
+
h,
|
|
14546
14569
|
o,
|
|
14547
14570
|
s,
|
|
14548
|
-
|
|
14571
|
+
he,
|
|
14549
14572
|
a
|
|
14550
14573
|
]);
|
|
14551
|
-
let
|
|
14552
|
-
|
|
14553
|
-
}, []),
|
|
14554
|
-
flowSignal:
|
|
14555
|
-
setFlowState:
|
|
14556
|
-
isStarting:
|
|
14557
|
-
permissionRequest:
|
|
14558
|
-
unavailableCause:
|
|
14559
|
-
canRetry:
|
|
14560
|
-
start:
|
|
14561
|
-
join:
|
|
14562
|
-
cancel:
|
|
14563
|
-
leave:
|
|
14564
|
-
restart:
|
|
14574
|
+
let _e = M(() => {
|
|
14575
|
+
S(null), w(!1), g("idle");
|
|
14576
|
+
}, []), ve = j(() => ({
|
|
14577
|
+
flowSignal: ne,
|
|
14578
|
+
setFlowState: g,
|
|
14579
|
+
isStarting: _,
|
|
14580
|
+
permissionRequest: y,
|
|
14581
|
+
unavailableCause: x,
|
|
14582
|
+
canRetry: C,
|
|
14583
|
+
start: pe,
|
|
14584
|
+
join: me,
|
|
14585
|
+
cancel: he,
|
|
14586
|
+
leave: ge,
|
|
14587
|
+
restart: _e
|
|
14565
14588
|
}), [
|
|
14566
|
-
|
|
14567
|
-
h,
|
|
14589
|
+
ne,
|
|
14568
14590
|
_,
|
|
14569
14591
|
y,
|
|
14570
14592
|
x,
|
|
14571
|
-
|
|
14572
|
-
fe,
|
|
14593
|
+
C,
|
|
14573
14594
|
pe,
|
|
14574
14595
|
me,
|
|
14575
|
-
he
|
|
14596
|
+
he,
|
|
14597
|
+
ge,
|
|
14598
|
+
_e
|
|
14576
14599
|
]);
|
|
14577
14600
|
return /* @__PURE__ */ P(Ff.Provider, {
|
|
14578
|
-
value:
|
|
14601
|
+
value: ve,
|
|
14579
14602
|
children: e
|
|
14580
14603
|
});
|
|
14581
14604
|
}
|
|
@@ -14663,15 +14686,19 @@ function sm({ children: e }) {
|
|
|
14663
14686
|
n,
|
|
14664
14687
|
l
|
|
14665
14688
|
]);
|
|
14666
|
-
let d = A(null);
|
|
14689
|
+
let d = A(null), f = A(/* @__PURE__ */ new Set());
|
|
14667
14690
|
k(() => t.state.subscribe((e) => {
|
|
14668
14691
|
if (e !== d.current) switch (d.current = e, e) {
|
|
14669
|
-
case "connected":
|
|
14670
|
-
|
|
14692
|
+
case "connected": {
|
|
14693
|
+
let n = t.session.peek()?.conversationId ?? "";
|
|
14694
|
+
f.current.add(n), l("tavus:conversation-started", { conversationId: n }), l("tavus:state-change", { state: e });
|
|
14671
14695
|
break;
|
|
14672
|
-
|
|
14673
|
-
|
|
14696
|
+
}
|
|
14697
|
+
case "ended": {
|
|
14698
|
+
let n = t.session.peek()?.conversationId ?? "";
|
|
14699
|
+
f.current.delete(n), l("tavus:conversation-ended", { conversationId: n }), l("tavus:state-change", { state: e });
|
|
14674
14700
|
break;
|
|
14701
|
+
}
|
|
14675
14702
|
case "error":
|
|
14676
14703
|
l("tavus:error", {
|
|
14677
14704
|
code: "CONVERSATION_ERROR",
|
|
@@ -14721,12 +14748,12 @@ function sm({ children: e }) {
|
|
|
14721
14748
|
};
|
|
14722
14749
|
return t.__registerSubscriber(e), () => t.__unregisterSubscriber(e);
|
|
14723
14750
|
}, [t, l]);
|
|
14724
|
-
let
|
|
14751
|
+
let p = j(() => ({
|
|
14725
14752
|
shadowHost: o,
|
|
14726
14753
|
dispatchEvent: l
|
|
14727
14754
|
}), [o, l]);
|
|
14728
14755
|
return /* @__PURE__ */ P(am.Provider, {
|
|
14729
|
-
value:
|
|
14756
|
+
value: p,
|
|
14730
14757
|
children: [/* @__PURE__ */ P("div", {
|
|
14731
14758
|
ref: c,
|
|
14732
14759
|
style: "display:contents"
|
|
@@ -17339,10 +17366,10 @@ function Bv(e) {
|
|
|
17339
17366
|
};
|
|
17340
17367
|
}
|
|
17341
17368
|
function Vv(e) {
|
|
17342
|
-
let t = e["--color-base-content"], n = e["--color-base-100"], r = e["--color-base-200"], i = e["--color-base-300"], a = e["--color-error"], o = {},
|
|
17343
|
-
t && (
|
|
17344
|
-
},
|
|
17345
|
-
return
|
|
17369
|
+
let t = e["--color-base-content"], n = e["--color-base-100"], r = e["--color-base-200"], i = e["--color-base-300"], a = e["--color-error"], o = e["--color-primary"], s = {}, c = (e, t) => {
|
|
17370
|
+
t && (s[e] = t);
|
|
17371
|
+
}, l = (e, t, n) => e && n ? `color-mix(in oklch, ${e} ${t}%, ${n})` : void 0;
|
|
17372
|
+
return c("--color-background-primary", n), c("--color-background-secondary", r), c("--color-border-secondary", i), c("--color-border-primary", l(t, 28, n)), c("--color-text-primary", t), c("--color-text-secondary", l(t, 62, n)), c("--color-text-danger", a), c("--color-border-danger", a), c("--color-ring-primary", o), s;
|
|
17346
17373
|
}
|
|
17347
17374
|
//#endregion
|
|
17348
17375
|
//#region ../core/src/magic-canvas/persona-presentation.tsx
|
|
@@ -17724,13 +17751,13 @@ function hy({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
17724
17751
|
f,
|
|
17725
17752
|
o
|
|
17726
17753
|
]);
|
|
17727
|
-
let S = v && y != null && b != null, C = s !== "shift", w = ey(g, C), T = f !== null && !C,
|
|
17728
|
-
let n =
|
|
17754
|
+
let S = v && y != null && b != null, C = s !== "shift", w = ey(g, C), T = f !== null && !C, E = C && y != null, ee = A(null), te = A(null), [ne, re] = O(!0), ie = A(!0), ae = M((e, t) => {
|
|
17755
|
+
let n = ee.current;
|
|
17729
17756
|
n && (n.style.clipPath = `circle(${e.r}px at ${e.cx}px ${e.cy}px)`, n.style.transform = `translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);
|
|
17730
|
-
let r =
|
|
17731
|
-
r && (r.style.transform = `translate3d(${e.shift}px, 0, 0)`),
|
|
17757
|
+
let r = te.current;
|
|
17758
|
+
r && (r.style.transform = `translate3d(${e.shift}px, 0, 0)`), ie.current !== t && (ie.current = t, re(t));
|
|
17732
17759
|
}, []);
|
|
17733
|
-
return oy(C ? ay(b, S, w, h, e) : null, o,
|
|
17760
|
+
return oy(C ? ay(b, S, w, h, e) : null, o, ae), /* @__PURE__ */ P("div", {
|
|
17734
17761
|
ref: g,
|
|
17735
17762
|
class: `relative w-full h-full overflow-hidden ${n ? "flex items-center justify-center" : ""}`,
|
|
17736
17763
|
children: [
|
|
@@ -17740,7 +17767,7 @@ function hy({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
17740
17767
|
transition: a,
|
|
17741
17768
|
transformOrigin: x.transformOrigin
|
|
17742
17769
|
}),
|
|
17743
|
-
|
|
17770
|
+
E && /* @__PURE__ */ P(py, {
|
|
17744
17771
|
ambient: l,
|
|
17745
17772
|
usePip: v,
|
|
17746
17773
|
transition: a
|
|
@@ -17754,15 +17781,15 @@ function hy({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
17754
17781
|
mirrorSide: x.side,
|
|
17755
17782
|
videoShiftX: h,
|
|
17756
17783
|
transition: a,
|
|
17757
|
-
sceneRef:
|
|
17758
|
-
videoWrapRef:
|
|
17784
|
+
sceneRef: ee,
|
|
17785
|
+
videoWrapRef: te,
|
|
17759
17786
|
fill: r,
|
|
17760
17787
|
videoRef: d
|
|
17761
17788
|
})
|
|
17762
17789
|
}),
|
|
17763
17790
|
C && b && /* @__PURE__ */ P(cy, {
|
|
17764
17791
|
geom: b,
|
|
17765
|
-
visible: S &&
|
|
17792
|
+
visible: S && ne
|
|
17766
17793
|
}),
|
|
17767
17794
|
u
|
|
17768
17795
|
]
|
|
@@ -24233,8 +24260,8 @@ function bA(e, t, n, r, i, a) {
|
|
|
24233
24260
|
fit: { kind: "natural" },
|
|
24234
24261
|
region: f.region.name
|
|
24235
24262
|
});
|
|
24236
|
-
let T = vA(b, s.extraEvictions, a.eviction.policy),
|
|
24237
|
-
if (y.evictedCardIds = v.filter((e) => !
|
|
24263
|
+
let T = vA(b, s.extraEvictions, a.eviction.policy), E = new Set(T.map((e) => e.id));
|
|
24264
|
+
if (y.evictedCardIds = v.filter((e) => !E.has(e.id)).map((e) => e.id), p && T.length > 0) {
|
|
24238
24265
|
let e = p.rect, n = t.regions.filter((e) => e.zBase < 100), i = n.length > 1 && n.every((e) => "fraction" in e.width && e.width.fraction === 1), { innerW: o, entries: s } = iA(T, e.width, a, r.width, void 0, i ? a.card.stackMaxWidthPx : void 0), c = e.x + Math.round((e.width - o) / 2), l = e.height - g * (s.length - 1), u = s.reduce((e, t) => e + t.clampedHeightPx, 0), d;
|
|
24239
24266
|
if (u <= l) d = s.map((e) => e.clampedHeightPx);
|
|
24240
24267
|
else {
|
|
@@ -24272,7 +24299,7 @@ function bA(e, t, n, r, i, a) {
|
|
|
24272
24299
|
}), m = r + i + g;
|
|
24273
24300
|
});
|
|
24274
24301
|
}
|
|
24275
|
-
let
|
|
24302
|
+
let ee = null;
|
|
24276
24303
|
if (p === void 0 && h !== void 0 && T.length > 0) {
|
|
24277
24304
|
let e = {
|
|
24278
24305
|
width: Math.max(0, i.width - 2 * c),
|
|
@@ -24287,7 +24314,7 @@ function bA(e, t, n, r, i, a) {
|
|
|
24287
24314
|
let e = d.x + Math.round((d.width - f) / 2), t = Math.max(0, Math.min(m.clampedHeightPx, d.height)), n = Xk(m.clampedHeightPx, t, a);
|
|
24288
24315
|
o && m.constraints.naturalHeightPx > t && (n = { kind: "scroll" });
|
|
24289
24316
|
let r = m.constraints.hardMinHeightPx;
|
|
24290
|
-
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }),
|
|
24317
|
+
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }), ee = {
|
|
24291
24318
|
id: m.card.id,
|
|
24292
24319
|
kind: "card",
|
|
24293
24320
|
component: m.card.component,
|
|
@@ -24304,7 +24331,7 @@ function bA(e, t, n, r, i, a) {
|
|
|
24304
24331
|
region: h.name,
|
|
24305
24332
|
sheet: !0,
|
|
24306
24333
|
...o && { sheetAnchor: "bottom" }
|
|
24307
|
-
}, x.push(
|
|
24334
|
+
}, x.push(ee);
|
|
24308
24335
|
}
|
|
24309
24336
|
}
|
|
24310
24337
|
if (!C) {
|
|
@@ -24317,7 +24344,7 @@ function bA(e, t, n, r, i, a) {
|
|
|
24317
24344
|
height: l
|
|
24318
24345
|
} : null), s = [
|
|
24319
24346
|
...o === null ? [] : [o],
|
|
24320
|
-
...
|
|
24347
|
+
...ee === null ? [] : [ee.rect],
|
|
24321
24348
|
...n.chromeObstacles ?? []
|
|
24322
24349
|
];
|
|
24323
24350
|
if (S) {
|
|
@@ -25066,13 +25093,13 @@ var rj = (e, t) => {
|
|
|
25066
25093
|
"full",
|
|
25067
25094
|
"auto",
|
|
25068
25095
|
...w()
|
|
25069
|
-
],
|
|
25096
|
+
], E = () => [
|
|
25070
25097
|
Kj,
|
|
25071
25098
|
"none",
|
|
25072
25099
|
"subgrid",
|
|
25073
25100
|
$,
|
|
25074
25101
|
Q
|
|
25075
|
-
],
|
|
25102
|
+
], ee = () => [
|
|
25076
25103
|
"auto",
|
|
25077
25104
|
{ span: [
|
|
25078
25105
|
"full",
|
|
@@ -25083,19 +25110,19 @@ var rj = (e, t) => {
|
|
|
25083
25110
|
Kj,
|
|
25084
25111
|
$,
|
|
25085
25112
|
Q
|
|
25086
|
-
],
|
|
25113
|
+
], te = () => [
|
|
25087
25114
|
Kj,
|
|
25088
25115
|
"auto",
|
|
25089
25116
|
$,
|
|
25090
25117
|
Q
|
|
25091
|
-
],
|
|
25118
|
+
], ne = () => [
|
|
25092
25119
|
"auto",
|
|
25093
25120
|
"min",
|
|
25094
25121
|
"max",
|
|
25095
25122
|
"fr",
|
|
25096
25123
|
$,
|
|
25097
25124
|
Q
|
|
25098
|
-
],
|
|
25125
|
+
], re = () => [
|
|
25099
25126
|
"start",
|
|
25100
25127
|
"end",
|
|
25101
25128
|
"center",
|
|
@@ -25106,14 +25133,14 @@ var rj = (e, t) => {
|
|
|
25106
25133
|
"baseline",
|
|
25107
25134
|
"center-safe",
|
|
25108
25135
|
"end-safe"
|
|
25109
|
-
],
|
|
25136
|
+
], ie = () => [
|
|
25110
25137
|
"start",
|
|
25111
25138
|
"end",
|
|
25112
25139
|
"center",
|
|
25113
25140
|
"stretch",
|
|
25114
25141
|
"center-safe",
|
|
25115
25142
|
"end-safe"
|
|
25116
|
-
],
|
|
25143
|
+
], ae = () => ["auto", ...w()], oe = () => [
|
|
25117
25144
|
Gj,
|
|
25118
25145
|
"auto",
|
|
25119
25146
|
"full",
|
|
@@ -25472,14 +25499,14 @@ var rj = (e, t) => {
|
|
|
25472
25499
|
$,
|
|
25473
25500
|
Q
|
|
25474
25501
|
] }],
|
|
25475
|
-
"grid-cols": [{ "grid-cols":
|
|
25476
|
-
"col-start-end": [{ col:
|
|
25477
|
-
"col-start": [{ "col-start":
|
|
25478
|
-
"col-end": [{ "col-end":
|
|
25479
|
-
"grid-rows": [{ "grid-rows":
|
|
25480
|
-
"row-start-end": [{ row:
|
|
25481
|
-
"row-start": [{ "row-start":
|
|
25482
|
-
"row-end": [{ "row-end":
|
|
25502
|
+
"grid-cols": [{ "grid-cols": E() }],
|
|
25503
|
+
"col-start-end": [{ col: ee() }],
|
|
25504
|
+
"col-start": [{ "col-start": te() }],
|
|
25505
|
+
"col-end": [{ "col-end": te() }],
|
|
25506
|
+
"grid-rows": [{ "grid-rows": E() }],
|
|
25507
|
+
"row-start-end": [{ row: ee() }],
|
|
25508
|
+
"row-start": [{ "row-start": te() }],
|
|
25509
|
+
"row-end": [{ "row-end": te() }],
|
|
25483
25510
|
"grid-flow": [{ "grid-flow": [
|
|
25484
25511
|
"row",
|
|
25485
25512
|
"col",
|
|
@@ -25487,24 +25514,24 @@ var rj = (e, t) => {
|
|
|
25487
25514
|
"row-dense",
|
|
25488
25515
|
"col-dense"
|
|
25489
25516
|
] }],
|
|
25490
|
-
"auto-cols": [{ "auto-cols":
|
|
25491
|
-
"auto-rows": [{ "auto-rows":
|
|
25517
|
+
"auto-cols": [{ "auto-cols": ne() }],
|
|
25518
|
+
"auto-rows": [{ "auto-rows": ne() }],
|
|
25492
25519
|
gap: [{ gap: w() }],
|
|
25493
25520
|
"gap-x": [{ "gap-x": w() }],
|
|
25494
25521
|
"gap-y": [{ "gap-y": w() }],
|
|
25495
|
-
"justify-content": [{ justify: [...
|
|
25496
|
-
"justify-items": [{ "justify-items": [...
|
|
25497
|
-
"justify-self": [{ "justify-self": ["auto", ...
|
|
25498
|
-
"align-content": [{ content: ["normal", ...
|
|
25499
|
-
"align-items": [{ items: [...
|
|
25522
|
+
"justify-content": [{ justify: [...re(), "normal"] }],
|
|
25523
|
+
"justify-items": [{ "justify-items": [...ie(), "normal"] }],
|
|
25524
|
+
"justify-self": [{ "justify-self": ["auto", ...ie()] }],
|
|
25525
|
+
"align-content": [{ content: ["normal", ...re()] }],
|
|
25526
|
+
"align-items": [{ items: [...ie(), { baseline: ["", "last"] }] }],
|
|
25500
25527
|
"align-self": [{ self: [
|
|
25501
25528
|
"auto",
|
|
25502
|
-
...
|
|
25529
|
+
...ie(),
|
|
25503
25530
|
{ baseline: ["", "last"] }
|
|
25504
25531
|
] }],
|
|
25505
|
-
"place-content": [{ "place-content":
|
|
25506
|
-
"place-items": [{ "place-items": [...
|
|
25507
|
-
"place-self": [{ "place-self": ["auto", ...
|
|
25532
|
+
"place-content": [{ "place-content": re() }],
|
|
25533
|
+
"place-items": [{ "place-items": [...ie(), "baseline"] }],
|
|
25534
|
+
"place-self": [{ "place-self": ["auto", ...ie()] }],
|
|
25508
25535
|
p: [{ p: w() }],
|
|
25509
25536
|
px: [{ px: w() }],
|
|
25510
25537
|
py: [{ py: w() }],
|
|
@@ -25516,17 +25543,17 @@ var rj = (e, t) => {
|
|
|
25516
25543
|
pr: [{ pr: w() }],
|
|
25517
25544
|
pb: [{ pb: w() }],
|
|
25518
25545
|
pl: [{ pl: w() }],
|
|
25519
|
-
m: [{ m:
|
|
25520
|
-
mx: [{ mx:
|
|
25521
|
-
my: [{ my:
|
|
25522
|
-
ms: [{ ms:
|
|
25523
|
-
me: [{ me:
|
|
25524
|
-
mbs: [{ mbs:
|
|
25525
|
-
mbe: [{ mbe:
|
|
25526
|
-
mt: [{ mt:
|
|
25527
|
-
mr: [{ mr:
|
|
25528
|
-
mb: [{ mb:
|
|
25529
|
-
ml: [{ ml:
|
|
25546
|
+
m: [{ m: ae() }],
|
|
25547
|
+
mx: [{ mx: ae() }],
|
|
25548
|
+
my: [{ my: ae() }],
|
|
25549
|
+
ms: [{ ms: ae() }],
|
|
25550
|
+
me: [{ me: ae() }],
|
|
25551
|
+
mbs: [{ mbs: ae() }],
|
|
25552
|
+
mbe: [{ mbe: ae() }],
|
|
25553
|
+
mt: [{ mt: ae() }],
|
|
25554
|
+
mr: [{ mr: ae() }],
|
|
25555
|
+
mb: [{ mb: ae() }],
|
|
25556
|
+
ml: [{ ml: ae() }],
|
|
25530
25557
|
"space-x": [{ "space-x": w() }],
|
|
25531
25558
|
"space-x-reverse": ["space-x-reverse"],
|
|
25532
25559
|
"space-y": [{ "space-y": w() }],
|
|
@@ -27050,18 +27077,18 @@ function sN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27050
27077
|
w.safe_area?.width,
|
|
27051
27078
|
w.safe_area?.height
|
|
27052
27079
|
]);
|
|
27053
|
-
let
|
|
27080
|
+
let E = oN(C.map(({ layout: e }) => e));
|
|
27054
27081
|
k(() => {
|
|
27055
|
-
t?.(
|
|
27056
|
-
}, [t,
|
|
27057
|
-
let
|
|
27082
|
+
t?.(E);
|
|
27083
|
+
}, [t, E]);
|
|
27084
|
+
let ee = p.length > 0 || _.enabled;
|
|
27058
27085
|
return /* @__PURE__ */ P("div", {
|
|
27059
27086
|
ref: h,
|
|
27060
27087
|
"data-magic-canvas-root": !0,
|
|
27061
27088
|
class: "pointer-events-none absolute inset-0 z-30",
|
|
27062
27089
|
children: [
|
|
27063
|
-
|
|
27064
|
-
|
|
27090
|
+
ee && T && /* @__PURE__ */ P("div", { class: "absolute inset-0 bg-black/45" }),
|
|
27091
|
+
ee && !T && y.sheetBottomPx !== null && /* @__PURE__ */ P("div", {
|
|
27065
27092
|
"data-grid-sheet-scrim": !0,
|
|
27066
27093
|
class: "absolute inset-x-0 top-0",
|
|
27067
27094
|
style: {
|
|
@@ -27069,7 +27096,7 @@ function sN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27069
27096
|
backgroundImage: "linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))"
|
|
27070
27097
|
}
|
|
27071
27098
|
}),
|
|
27072
|
-
|
|
27099
|
+
ee && C.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ P(cN, {
|
|
27073
27100
|
slot: yN(t),
|
|
27074
27101
|
safeAreaTop: w.safe_area?.y,
|
|
27075
27102
|
frameWidth: g.width,
|
|
@@ -27103,7 +27130,7 @@ function sN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27103
27130
|
sendAppMessage: x
|
|
27104
27131
|
})
|
|
27105
27132
|
}, e.id)),
|
|
27106
|
-
|
|
27133
|
+
ee && /* @__PURE__ */ P("div", {
|
|
27107
27134
|
class: "absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20",
|
|
27108
27135
|
children: /* @__PURE__ */ P(VM, { state: _ })
|
|
27109
27136
|
}),
|
|
@@ -27152,12 +27179,12 @@ function cN({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
27152
27179
|
});
|
|
27153
27180
|
}
|
|
27154
27181
|
function lN({ 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 }) {
|
|
27155
|
-
let p = A(null), m = A(null), h = A(e), g = A(r), _ = A(320), v = A(i), y = A(a), b = A(o), x = A(-1), S = A(l), C = A(u), w = A(d), T = A(f), [
|
|
27182
|
+
let p = A(null), m = A(null), h = A(e), g = A(r), _ = A(320), v = A(i), y = A(a), b = A(o), x = A(-1), S = A(l), C = A(u), w = A(d), T = A(f), [E, ee] = O(720);
|
|
27156
27183
|
k(() => {
|
|
27157
27184
|
y.current = a;
|
|
27158
27185
|
}, [a]), k(() => {
|
|
27159
|
-
_.current =
|
|
27160
|
-
}, [
|
|
27186
|
+
_.current = E, m.current?.setHostContext(pN(y.current, v.current, b.current, h.current, E, g.current));
|
|
27187
|
+
}, [E]), k(() => {
|
|
27161
27188
|
h.current = e, g.current = r;
|
|
27162
27189
|
let t = fN(i, p.current);
|
|
27163
27190
|
v.current = t, m.current?.setHostContext(pN(y.current, t, b.current, e, _.current, r));
|
|
@@ -27220,7 +27247,7 @@ function lN({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27220
27247
|
}, f.onsizechange = ({ height: e }) => {
|
|
27221
27248
|
if (!n && typeof e == "number" && Number.isFinite(e)) {
|
|
27222
27249
|
let t = Math.min(Math.max(e, tN), 720);
|
|
27223
|
-
|
|
27250
|
+
ee(t), w.current(y.current.id, t);
|
|
27224
27251
|
}
|
|
27225
27252
|
}, f.onmessage = async (e) => {
|
|
27226
27253
|
let r = nv(e);
|
|
@@ -27307,11 +27334,11 @@ function lN({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27307
27334
|
iframeLifecycleState: "mounting",
|
|
27308
27335
|
lastInteractionPostResult: void 0
|
|
27309
27336
|
}), a.canvas_config.sandbox_url, e.src = a.canvas_config.sandbox_url;
|
|
27310
|
-
let
|
|
27337
|
+
let E = () => {
|
|
27311
27338
|
f();
|
|
27312
27339
|
};
|
|
27313
|
-
return e.addEventListener("load",
|
|
27314
|
-
o &&= (clearTimeout(o), null), s &&= (clearTimeout(s), null), d(), n = !0, e.removeEventListener("load",
|
|
27340
|
+
return e.addEventListener("load", E), f(), () => {
|
|
27341
|
+
o &&= (clearTimeout(o), null), s &&= (clearTimeout(s), null), d(), n = !0, e.removeEventListener("load", E), m.current = null, c({ iframeLifecycleState: "closed" }), r && z_(r);
|
|
27315
27342
|
};
|
|
27316
27343
|
}, [
|
|
27317
27344
|
t,
|
|
@@ -27330,26 +27357,26 @@ function lN({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27330
27357
|
a.revision,
|
|
27331
27358
|
c
|
|
27332
27359
|
]);
|
|
27333
|
-
let
|
|
27360
|
+
let te = o.viable_slot === "full" || o.display_mode === "fullscreen", ne = te ? null : mN(E, e, r), re = ne?.placeholderStyle, ie = ne?.cardStyle, ae = te ? { height: "100%" } : ne?.iframeStyle ?? { height: `${E}px` }, oe = [
|
|
27334
27361
|
"pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]",
|
|
27335
27362
|
r ? "" : "shadow-xl",
|
|
27336
|
-
|
|
27363
|
+
te ? "fixed inset-4 z-10 max-w-none" : n ? "max-w-none" : "max-w-md",
|
|
27337
27364
|
s ? "scale-[0.98] opacity-40" : ""
|
|
27338
27365
|
].filter(Boolean).join(" "), se = rN[a.canvas_config.component] ?? nN, ce = /* @__PURE__ */ P("div", {
|
|
27339
27366
|
class: oe,
|
|
27340
|
-
style:
|
|
27367
|
+
style: ie,
|
|
27341
27368
|
"data-canvas-card": o.viable_slot,
|
|
27342
27369
|
children: /* @__PURE__ */ P("iframe", {
|
|
27343
27370
|
ref: p,
|
|
27344
27371
|
title: `${a.canvas_config.component} ${a.canvas_config.component_version}`,
|
|
27345
|
-
class:
|
|
27372
|
+
class: te ? "block h-full w-full border-0 bg-transparent" : "block border-0 bg-transparent",
|
|
27346
27373
|
sandbox: se,
|
|
27347
|
-
style:
|
|
27374
|
+
style: ae
|
|
27348
27375
|
})
|
|
27349
27376
|
});
|
|
27350
|
-
return
|
|
27377
|
+
return te ? ce : /* @__PURE__ */ P("div", {
|
|
27351
27378
|
class: "block w-full",
|
|
27352
|
-
style:
|
|
27379
|
+
style: re,
|
|
27353
27380
|
children: ce
|
|
27354
27381
|
});
|
|
27355
27382
|
}
|
|
@@ -27504,7 +27531,7 @@ function CN(e) {
|
|
|
27504
27531
|
}
|
|
27505
27532
|
//#endregion
|
|
27506
27533
|
//#region ../core/src/magic-canvas/grid-error-boundary.tsx
|
|
27507
|
-
var wN = class extends
|
|
27534
|
+
var wN = class extends E {
|
|
27508
27535
|
state = { errored: !1 };
|
|
27509
27536
|
componentDidCatch(e) {
|
|
27510
27537
|
this.props.onError(e), this.setState({ errored: !0 });
|
|
@@ -27899,8 +27926,8 @@ var zN = kt(null), BN = {
|
|
|
27899
27926
|
})]
|
|
27900
27927
|
});
|
|
27901
27928
|
}), QN = U(({ items: e }) => e.length <= 1 ? /* @__PURE__ */ P(T, { children: e }) : /* @__PURE__ */ P(ZN, { items: e })), $N = U(({ onLeave: e }) => {
|
|
27902
|
-
let t = Md(), { config: n } = zp(), { session: r, end: i } = Jg(), a = Nd(), o = A(null), s = N(ym)?.frameRef ?? o, [c, l] = O(!1), u = $h() === "full-screen", [d, f] = O(!1), [p, m] = O(BN), [h, g] = O(null), _ = n.value.customization.conversation, v = EN(_.show_fullscreen_hint && h !== null && !c && !u), y = A(null), b = A(null), x = r.value?.conversationUrl, S = r.value?.magicGrid === !0, C = NA(_.magic_grid, S), w = ON(y, C, x), T = kN(y, b, 72, C, x),
|
|
27903
|
-
enabled:
|
|
27929
|
+
let t = Md(), { config: n } = zp(), { session: r, end: i } = Jg(), a = Nd(), o = A(null), s = N(ym)?.frameRef ?? o, [c, l] = O(!1), u = $h() === "full-screen", [d, f] = O(!1), [p, m] = O(BN), [h, g] = O(null), _ = n.value.customization.conversation, v = EN(_.show_fullscreen_hint && h !== null && !c && !u), y = A(null), b = A(null), x = r.value?.conversationUrl, S = r.value?.magicGrid === !0, C = NA(_.magic_grid, S), w = ON(y, C, x), T = kN(y, b, 72, C, x), E = _.modality === "audio", ee = DN(E), te = _.modality === "chat", ne = _.modality === "video", re = _.enable_chat, ie = _.enable_closed_captions, ae = _.enable_picture_in_picture, { pipWindow: oe } = RN({
|
|
27930
|
+
enabled: ae && !te,
|
|
27904
27931
|
active: t === "joined-meeting"
|
|
27905
27932
|
});
|
|
27906
27933
|
k(() => () => {
|
|
@@ -27908,13 +27935,13 @@ var zN = kt(null), BN = {
|
|
|
27908
27935
|
}, [i]);
|
|
27909
27936
|
let { camera: se, requestCamera: ce } = $p(), { isCamMuted: D } = xg(), le = se.isGranted && !D;
|
|
27910
27937
|
k(() => {
|
|
27911
|
-
|
|
27938
|
+
ne && t === "joined-meeting" && (zN.value = le);
|
|
27912
27939
|
}, [
|
|
27913
|
-
|
|
27940
|
+
ne,
|
|
27914
27941
|
t,
|
|
27915
27942
|
le
|
|
27916
27943
|
]);
|
|
27917
|
-
let ue = A(
|
|
27944
|
+
let ue = A(ne && !a && zN.value === !0);
|
|
27918
27945
|
k(() => {
|
|
27919
27946
|
t === "joined-meeting" && ue.current && (ue.current = !1, ce());
|
|
27920
27947
|
}, [t, ce]), k(() => {
|
|
@@ -27939,10 +27966,10 @@ var zN = kt(null), BN = {
|
|
|
27939
27966
|
i();
|
|
27940
27967
|
}, [i]);
|
|
27941
27968
|
if (jN({
|
|
27942
|
-
active: !
|
|
27969
|
+
active: !te && t === "joined-meeting",
|
|
27943
27970
|
onTimeout: fe
|
|
27944
27971
|
}), NN({ onShutdown: fe }), !x) return null;
|
|
27945
|
-
if (
|
|
27972
|
+
if (te) return /* @__PURE__ */ P(t_, {
|
|
27946
27973
|
defaultOpen: !0,
|
|
27947
27974
|
children: /* @__PURE__ */ P("div", {
|
|
27948
27975
|
class: "cvi-call-surface absolute inset-0",
|
|
@@ -27963,25 +27990,25 @@ var zN = kt(null), BN = {
|
|
|
27963
27990
|
})
|
|
27964
27991
|
});
|
|
27965
27992
|
let pe = [/* @__PURE__ */ P(qg, { compact: !0 }, "screen-share")];
|
|
27966
|
-
|
|
27993
|
+
re && pe.push(/* @__PURE__ */ P(r_, { compact: !0 }, "chat"));
|
|
27967
27994
|
let me = t === "left-meeting";
|
|
27968
27995
|
return /* @__PURE__ */ P(Xg, { children: /* @__PURE__ */ P(t_, { children: /* @__PURE__ */ P(Ag, { children: [/* @__PURE__ */ P("div", {
|
|
27969
|
-
class: `cvi-call-surface absolute inset-0${
|
|
27996
|
+
class: `cvi-call-surface absolute inset-0${E ? "" : " cvi-video-surface"}`,
|
|
27970
27997
|
ref: y,
|
|
27971
27998
|
children: [
|
|
27972
27999
|
/* @__PURE__ */ P("div", {
|
|
27973
28000
|
class: "relative w-full h-full z-[5]",
|
|
27974
28001
|
children: [
|
|
27975
28002
|
/* @__PURE__ */ P(JN, {
|
|
27976
|
-
isAudioOnly:
|
|
27977
|
-
presence:
|
|
28003
|
+
isAudioOnly: E,
|
|
28004
|
+
presence: ee,
|
|
27978
28005
|
canvasLayoutEffect: p,
|
|
27979
28006
|
canvasRenderedSlot: h
|
|
27980
28007
|
}),
|
|
27981
|
-
!
|
|
28008
|
+
!E && /* @__PURE__ */ P(KN, { canvasRenderedSlot: h }),
|
|
27982
28009
|
/* @__PURE__ */ P(sN, {
|
|
27983
28010
|
debugEnabled: d,
|
|
27984
|
-
callPresence:
|
|
28011
|
+
callPresence: ee,
|
|
27985
28012
|
callControlsVisible: w,
|
|
27986
28013
|
callControlsRect: T,
|
|
27987
28014
|
gridConfigEnabled: _.magic_grid,
|
|
@@ -28014,8 +28041,8 @@ var zN = kt(null), BN = {
|
|
|
28014
28041
|
ref: b,
|
|
28015
28042
|
children: [
|
|
28016
28043
|
/* @__PURE__ */ P(Hg, { level: !0 }),
|
|
28017
|
-
!
|
|
28018
|
-
|
|
28044
|
+
!E && /* @__PURE__ */ P(Wg, {}),
|
|
28045
|
+
ie && /* @__PURE__ */ P(Qg, {}),
|
|
28019
28046
|
/* @__PURE__ */ P(QN, { items: pe }),
|
|
28020
28047
|
/* @__PURE__ */ P("button", {
|
|
28021
28048
|
type: "button",
|