@tavus/embed 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() {
|
|
@@ -1083,7 +1083,7 @@ tn("unmount", function(e, t) {
|
|
|
1083
1083
|
e(t);
|
|
1084
1084
|
}), tn("__h", function(e, t, n, r) {
|
|
1085
1085
|
r < 3 && (t.__$f |= 2), e(t, n, r);
|
|
1086
|
-
}),
|
|
1086
|
+
}), E.prototype.shouldComponentUpdate = function(e, t) {
|
|
1087
1087
|
if (this.__R) return !0;
|
|
1088
1088
|
var n = this.__$u, r = n && n.s !== void 0;
|
|
1089
1089
|
for (var i in t) return !0;
|
|
@@ -10178,7 +10178,7 @@ var td = function() {
|
|
|
10178
10178
|
},
|
|
10179
10179
|
{
|
|
10180
10180
|
key: "getMeetingSession",
|
|
10181
|
-
value: (
|
|
10181
|
+
value: (ae = L(function* () {
|
|
10182
10182
|
var e = this;
|
|
10183
10183
|
return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"), id(this._callState, "getMeetingSession()"), new Promise(function(t) {
|
|
10184
10184
|
e.sendMessageToCallMachine({ action: "get-meeting-session" }, function(e) {
|
|
@@ -10186,7 +10186,7 @@ var td = function() {
|
|
|
10186
10186
|
});
|
|
10187
10187
|
});
|
|
10188
10188
|
}), function() {
|
|
10189
|
-
return
|
|
10189
|
+
return ae.apply(this, arguments);
|
|
10190
10190
|
})
|
|
10191
10191
|
},
|
|
10192
10192
|
{
|
|
@@ -10238,7 +10238,7 @@ var td = function() {
|
|
|
10238
10238
|
},
|
|
10239
10239
|
{
|
|
10240
10240
|
key: "setUserData",
|
|
10241
|
-
value: (
|
|
10241
|
+
value: (ie = L(function* (e) {
|
|
10242
10242
|
var t = this;
|
|
10243
10243
|
try {
|
|
10244
10244
|
pd(e);
|
|
@@ -10258,7 +10258,7 @@ var td = function() {
|
|
|
10258
10258
|
}
|
|
10259
10259
|
});
|
|
10260
10260
|
}), function(e) {
|
|
10261
|
-
return
|
|
10261
|
+
return ie.apply(this, arguments);
|
|
10262
10262
|
})
|
|
10263
10263
|
},
|
|
10264
10264
|
{
|
|
@@ -10330,7 +10330,7 @@ var td = function() {
|
|
|
10330
10330
|
},
|
|
10331
10331
|
{
|
|
10332
10332
|
key: "startCamera",
|
|
10333
|
-
value: (
|
|
10333
|
+
value: (re = L(function* () {
|
|
10334
10334
|
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
10335
10335
|
if (ld(this._callObjectMode, "startCamera()"), od(this._callState, this._isPreparingToJoin, "startCamera()", "Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"), this.needsLoad()) try {
|
|
10336
10336
|
yield this.load(t);
|
|
@@ -10358,7 +10358,7 @@ var td = function() {
|
|
|
10358
10358
|
});
|
|
10359
10359
|
});
|
|
10360
10360
|
}), function() {
|
|
10361
|
-
return
|
|
10361
|
+
return re.apply(this, arguments);
|
|
10362
10362
|
})
|
|
10363
10363
|
},
|
|
10364
10364
|
{
|
|
@@ -10431,10 +10431,10 @@ var td = function() {
|
|
|
10431
10431
|
},
|
|
10432
10432
|
{
|
|
10433
10433
|
key: "setAudioDevice",
|
|
10434
|
-
value: (
|
|
10434
|
+
value: (ne = L(function* (e) {
|
|
10435
10435
|
return fd(), this.nativeUtils().setAudioDevice(e), { deviceId: yield this.nativeUtils().getAudioDevice() };
|
|
10436
10436
|
}), function(e) {
|
|
10437
|
-
return
|
|
10437
|
+
return ne.apply(this, arguments);
|
|
10438
10438
|
})
|
|
10439
10439
|
},
|
|
10440
10440
|
{
|
|
@@ -10475,7 +10475,7 @@ var td = function() {
|
|
|
10475
10475
|
},
|
|
10476
10476
|
{
|
|
10477
10477
|
key: "setInputDevicesAsync",
|
|
10478
|
-
value: (
|
|
10478
|
+
value: (te = L(function* (e) {
|
|
10479
10479
|
var t = this, n = e.audioDeviceId, r = e.videoDeviceId, i = e.audioSource, a = e.videoSource;
|
|
10480
10480
|
if (dd(), 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();
|
|
10481
10481
|
var o = {};
|
|
@@ -10490,12 +10490,12 @@ var td = function() {
|
|
|
10490
10490
|
});
|
|
10491
10491
|
});
|
|
10492
10492
|
}), function(e) {
|
|
10493
|
-
return
|
|
10493
|
+
return te.apply(this, arguments);
|
|
10494
10494
|
})
|
|
10495
10495
|
},
|
|
10496
10496
|
{
|
|
10497
10497
|
key: "setOutputDeviceAsync",
|
|
10498
|
-
value: (
|
|
10498
|
+
value: (ee = L(function* (e) {
|
|
10499
10499
|
var t = this, n = e.outputDeviceId;
|
|
10500
10500
|
if (dd(), !n || typeof n != "string") throw Error("outputDeviceId must be provided and must be a valid device id");
|
|
10501
10501
|
return this._preloadCache.outputDeviceId = n, this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(e, r) {
|
|
@@ -10512,12 +10512,12 @@ var td = function() {
|
|
|
10512
10512
|
});
|
|
10513
10513
|
});
|
|
10514
10514
|
}), function(e) {
|
|
10515
|
-
return
|
|
10515
|
+
return ee.apply(this, arguments);
|
|
10516
10516
|
})
|
|
10517
10517
|
},
|
|
10518
10518
|
{
|
|
10519
10519
|
key: "getInputDevices",
|
|
10520
|
-
value: (
|
|
10520
|
+
value: (E = L(function* () {
|
|
10521
10521
|
var e = this;
|
|
10522
10522
|
return this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(t) {
|
|
10523
10523
|
e.sendMessageToCallMachine({ action: "get-input-devices" }, function(n) {
|
|
@@ -10529,7 +10529,7 @@ var td = function() {
|
|
|
10529
10529
|
});
|
|
10530
10530
|
});
|
|
10531
10531
|
}), function() {
|
|
10532
|
-
return
|
|
10532
|
+
return E.apply(this, arguments);
|
|
10533
10533
|
})
|
|
10534
10534
|
},
|
|
10535
10535
|
{
|
|
@@ -12441,7 +12441,7 @@ var td = function() {
|
|
|
12441
12441
|
}
|
|
12442
12442
|
}
|
|
12443
12443
|
]);
|
|
12444
|
-
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,
|
|
12444
|
+
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;
|
|
12445
12445
|
}();
|
|
12446
12446
|
function nd(e) {
|
|
12447
12447
|
if (e.extension) {
|
|
@@ -13143,7 +13143,7 @@ function U(e, t) {
|
|
|
13143
13143
|
}
|
|
13144
13144
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r;
|
|
13145
13145
|
}
|
|
13146
|
-
(nf.prototype = new
|
|
13146
|
+
(nf.prototype = new E()).isPureReactComponent = !0, nf.prototype.shouldComponentUpdate = function(e, t) {
|
|
13147
13147
|
return tf(this.props, e) || tf(this.state, t);
|
|
13148
13148
|
};
|
|
13149
13149
|
var rf = n.__b;
|
|
@@ -13191,7 +13191,7 @@ function pf() {
|
|
|
13191
13191
|
n.unmount = function(e) {
|
|
13192
13192
|
var t = e.__c;
|
|
13193
13193
|
t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), cf && cf(e);
|
|
13194
|
-
}, (df.prototype = new
|
|
13194
|
+
}, (df.prototype = new E()).__c = function(e, t) {
|
|
13195
13195
|
var n = t.__c, r = this;
|
|
13196
13196
|
r.o ??= [], r.o.push(n);
|
|
13197
13197
|
var i = ff(r.__v), a = !1, o = function() {
|
|
@@ -13268,7 +13268,7 @@ function _f(e, t) {
|
|
|
13268
13268
|
});
|
|
13269
13269
|
return n.containerInfo = t, n;
|
|
13270
13270
|
}
|
|
13271
|
-
(pf.prototype = new
|
|
13271
|
+
(pf.prototype = new E()).__a = function(e) {
|
|
13272
13272
|
var t = this, n = ff(t.__v), r = t.l.get(e);
|
|
13273
13273
|
return r[0]++, function(i) {
|
|
13274
13274
|
var a = function() {
|
|
@@ -13295,12 +13295,12 @@ function _f(e, t) {
|
|
|
13295
13295
|
var vf = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, yf = /^(?: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]/, bf = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, xf = /[A-Z0-9]/g, Sf = typeof document < "u", Cf = function(e) {
|
|
13296
13296
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
13297
13297
|
};
|
|
13298
|
-
|
|
13298
|
+
E.prototype.isReactComponent = !0, [
|
|
13299
13299
|
"componentWillMount",
|
|
13300
13300
|
"componentWillReceiveProps",
|
|
13301
13301
|
"componentWillUpdate"
|
|
13302
13302
|
].forEach(function(e) {
|
|
13303
|
-
Object.defineProperty(
|
|
13303
|
+
Object.defineProperty(E.prototype, e, {
|
|
13304
13304
|
configurable: !0,
|
|
13305
13305
|
get: function() {
|
|
13306
13306
|
return this["UNSAFE_" + e];
|
|
@@ -13898,35 +13898,41 @@ function Fp(e, t) {
|
|
|
13898
13898
|
return t ? e instanceof _n && e.status === 401 : !1;
|
|
13899
13899
|
}
|
|
13900
13900
|
function Ip({ children: e }) {
|
|
13901
|
-
let { deploymentId: t, client: n, config: r } = N(Mn), { memoryStores: i, conversationalContext: a, customGreeting: o } = N(yt), s = Vd(), c = Hd(), l = N(Gf), u = j(() => zt("idle"), []), d = j(() => zt(null), []), f = j(() => zt([]), []), p = j(() => zt(""), []), m = j(() => zt(null), []), h = j(() => zt(null), []), g = j(() => zt(null), []), _ = j(() => zt(null), []), v = A(null), y = A(null), b = j(() =>
|
|
13901
|
+
let { deploymentId: t, client: n, config: r } = N(Mn), { memoryStores: i, conversationalContext: a, customGreeting: o } = N(yt), s = Vd(), c = Hd(), l = N(Gf), u = j(() => zt("idle"), []), d = j(() => zt(null), []), f = j(() => zt([]), []), p = j(() => zt(""), []), m = j(() => zt(null), []), h = j(() => zt(null), []), g = j(() => zt(null), []), _ = j(() => zt(null), []), v = A(null), y = A(null), b = j(() => zt(null), []), x = A(null), S = j(() => xp(), []), C = j(() => /* @__PURE__ */ new Set(), []), w = j(() => zt("idle"), []), T = l?.flowSignal ?? w, E = M((e) => {
|
|
13902
13902
|
g.value = e;
|
|
13903
|
-
}, [g]),
|
|
13903
|
+
}, [g]), ee = M((e) => {
|
|
13904
13904
|
_.value = e;
|
|
13905
|
-
}, [_]),
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
}, [
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13905
|
+
}, [_]), te = M(() => {
|
|
13906
|
+
let e = b.peek();
|
|
13907
|
+
return e !== null && (b.value = null, d.peek()?.conversationId === e);
|
|
13908
|
+
}, [b, d]);
|
|
13909
|
+
Gd("joined-meeting", () => {
|
|
13910
|
+
let e = b.peek();
|
|
13911
|
+
e !== null && e === d.peek()?.conversationId && u.peek() === "connecting" && (u.value = "connected", Sp.info("Connected to meeting"));
|
|
13912
|
+
}), Gd("left-meeting", () => {
|
|
13913
|
+
te() && (u.value = "ended", ip(), Sp.info("Left meeting"));
|
|
13914
|
+
}), Gd("error", () => {
|
|
13915
|
+
te() && (h.value = "Meeting error", u.value = "error");
|
|
13916
|
+
});
|
|
13917
|
+
let ne = M(() => b.peek() === null ? c === "joining-meeting" || c === "joined-meeting" : !1, [b, c]), re = M(() => x.current, []);
|
|
13918
|
+
pn(() => {
|
|
13913
13919
|
let e = u.value;
|
|
13914
|
-
if (e === "connected") for (let e of
|
|
13915
|
-
else if (e === "ended" || e === "disconnecting") for (let e of
|
|
13920
|
+
if (e === "connected") for (let e of C) e.onConnect?.();
|
|
13921
|
+
else if (e === "ended" || e === "disconnecting") for (let e of C) e.onDisconnect?.();
|
|
13916
13922
|
else if (e === "error") {
|
|
13917
13923
|
let e = h.peek() ?? "Unknown error";
|
|
13918
|
-
for (let t of
|
|
13924
|
+
for (let t of C) t.onError?.({
|
|
13919
13925
|
code: "CONVERSATION_ERROR",
|
|
13920
13926
|
message: e
|
|
13921
13927
|
});
|
|
13922
13928
|
}
|
|
13923
13929
|
}), pn(() => {
|
|
13924
|
-
let e =
|
|
13925
|
-
for (let t of
|
|
13930
|
+
let e = T.value;
|
|
13931
|
+
for (let t of C) t.onModeChange?.(e);
|
|
13926
13932
|
}), Kd({ onAppMessage: M((e) => {
|
|
13927
13933
|
bp(e?.data, {
|
|
13928
13934
|
appendChatMessage(e, t) {
|
|
13929
|
-
e === "user" &&
|
|
13935
|
+
e === "user" && S.consumeMatch(t) || (f.value = [...f.peek(), {
|
|
13930
13936
|
id: crypto.randomUUID(),
|
|
13931
13937
|
sender: e,
|
|
13932
13938
|
text: t,
|
|
@@ -13940,17 +13946,17 @@ function Ip({ children: e }) {
|
|
|
13940
13946
|
}
|
|
13941
13947
|
});
|
|
13942
13948
|
let t = vp(e?.data);
|
|
13943
|
-
t && Mp(t,
|
|
13949
|
+
t && Mp(t, C, S);
|
|
13944
13950
|
}, [
|
|
13945
13951
|
f,
|
|
13946
13952
|
p,
|
|
13947
13953
|
m,
|
|
13948
|
-
|
|
13949
|
-
|
|
13954
|
+
S,
|
|
13955
|
+
C
|
|
13950
13956
|
]) }), k(() => () => {
|
|
13951
13957
|
v.current !== null && (clearTimeout(v.current), v.current = null);
|
|
13952
13958
|
}, []);
|
|
13953
|
-
let
|
|
13959
|
+
let ie = M(() => {
|
|
13954
13960
|
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");
|
|
13955
13961
|
}, [
|
|
13956
13962
|
d,
|
|
@@ -13958,7 +13964,7 @@ function Ip({ children: e }) {
|
|
|
13958
13964
|
f,
|
|
13959
13965
|
p,
|
|
13960
13966
|
m
|
|
13961
|
-
]),
|
|
13967
|
+
]), ae = M(() => {
|
|
13962
13968
|
let e = d.peek()?.conversationId ?? null, r = y.current;
|
|
13963
13969
|
if (r?.conversationId === e) return r.promise;
|
|
13964
13970
|
u.value = "disconnecting";
|
|
@@ -13972,23 +13978,28 @@ function Ip({ children: e }) {
|
|
|
13972
13978
|
}
|
|
13973
13979
|
let c = Promise.resolve(o).catch((e) => {
|
|
13974
13980
|
i = !0, Sp.error("Daily leave failed", e);
|
|
13975
|
-
}), l =
|
|
13976
|
-
|
|
13981
|
+
}), l = c.then(() => {
|
|
13982
|
+
x.current === l && (x.current = null);
|
|
13983
|
+
});
|
|
13984
|
+
x.current = l;
|
|
13985
|
+
let f = Promise.all([a, c]).then(() => {
|
|
13986
|
+
y.current?.promise === f && (b.peek() === e && (b.value = null), u.value = "ended", i && (y.current = null));
|
|
13977
13987
|
});
|
|
13978
13988
|
return y.current = {
|
|
13979
13989
|
conversationId: e,
|
|
13980
|
-
promise:
|
|
13981
|
-
},
|
|
13990
|
+
promise: f
|
|
13991
|
+
}, f;
|
|
13982
13992
|
}, [
|
|
13983
13993
|
n,
|
|
13984
13994
|
t,
|
|
13985
13995
|
s,
|
|
13986
13996
|
d,
|
|
13987
|
-
u
|
|
13988
|
-
|
|
13997
|
+
u,
|
|
13998
|
+
b
|
|
13999
|
+
]), oe = M(async (e, c) => {
|
|
13989
14000
|
let l = null;
|
|
13990
14001
|
try {
|
|
13991
|
-
|
|
14002
|
+
ie(), u.value = "connecting", h.value = null;
|
|
13992
14003
|
let f = e, p = g.peek();
|
|
13993
14004
|
p && f?.password == null && (f = {
|
|
13994
14005
|
...f,
|
|
@@ -14017,16 +14028,16 @@ function Ip({ children: e }) {
|
|
|
14017
14028
|
createdAt: y.created_at,
|
|
14018
14029
|
magicGrid: y.magic_grid === !0
|
|
14019
14030
|
}, console.info("[Tavus:Conversation] Conversation created:", y.conversation_id), c?.signal?.aborted) throw c.signal.reason ?? new DOMException("The operation was aborted", "AbortError");
|
|
14020
|
-
let
|
|
14021
|
-
if (await wp(Promise.resolve(s?.join({
|
|
14031
|
+
let S = r.value.customization.conversation.modality === "chat", C = x.current;
|
|
14032
|
+
if (C && await wp(C, c?.signal), b.value = y.conversation_id, await wp(Promise.resolve(s?.join({
|
|
14022
14033
|
url: y.conversation_url,
|
|
14023
|
-
...
|
|
14034
|
+
...S ? {
|
|
14024
14035
|
startAudioOff: !0,
|
|
14025
14036
|
startVideoOff: !0
|
|
14026
14037
|
} : {}
|
|
14027
|
-
})), c?.signal), !
|
|
14038
|
+
})), c?.signal), !S && s && Pp(s)) throw new Mf();
|
|
14028
14039
|
} catch (e) {
|
|
14029
|
-
throw await
|
|
14040
|
+
throw await ae(), l && (d.value = null), Fp(e, r.value.has_password === !0) && (g.value = null), Sp.error("Start failed", e), h.value = String(e), u.value = "error", e;
|
|
14030
14041
|
}
|
|
14031
14042
|
}, [
|
|
14032
14043
|
n,
|
|
@@ -14041,16 +14052,17 @@ function Ip({ children: e }) {
|
|
|
14041
14052
|
i,
|
|
14042
14053
|
a,
|
|
14043
14054
|
o,
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14055
|
+
ie,
|
|
14056
|
+
ae,
|
|
14057
|
+
b
|
|
14058
|
+
]), se = M((e) => {
|
|
14047
14059
|
if (!s) return;
|
|
14048
14060
|
let t = d.peek();
|
|
14049
14061
|
if (!t) {
|
|
14050
14062
|
Sp.warn("sendChat called before session was established; dropping message");
|
|
14051
14063
|
return;
|
|
14052
14064
|
}
|
|
14053
|
-
|
|
14065
|
+
S.markSent(e), s.sendAppMessage(cp(t.conversationId, e), "*"), f.value = [...f.peek(), {
|
|
14054
14066
|
id: crypto.randomUUID(),
|
|
14055
14067
|
sender: "user",
|
|
14056
14068
|
text: e,
|
|
@@ -14060,8 +14072,8 @@ function Ip({ children: e }) {
|
|
|
14060
14072
|
s,
|
|
14061
14073
|
f,
|
|
14062
14074
|
d,
|
|
14063
|
-
|
|
14064
|
-
]),
|
|
14075
|
+
S
|
|
14076
|
+
]), ce = M((e) => {
|
|
14065
14077
|
if (!s) {
|
|
14066
14078
|
Sp.warn("sendMessage called before Daily was ready; dropping message");
|
|
14067
14079
|
return;
|
|
@@ -14071,16 +14083,16 @@ function Ip({ children: e }) {
|
|
|
14071
14083
|
Sp.warn("sendMessage called before session was established; dropping message");
|
|
14072
14084
|
return;
|
|
14073
14085
|
}
|
|
14074
|
-
e.event_type === "conversation.respond" &&
|
|
14086
|
+
e.event_type === "conversation.respond" && S.markSent(e.properties.text), s.sendAppMessage(yp(t.conversationId, e), "*");
|
|
14075
14087
|
}, [
|
|
14076
14088
|
s,
|
|
14077
14089
|
d,
|
|
14078
|
-
|
|
14079
|
-
]),
|
|
14080
|
-
|
|
14081
|
-
}, [
|
|
14082
|
-
|
|
14083
|
-
}, [
|
|
14090
|
+
S
|
|
14091
|
+
]), D = M((e) => {
|
|
14092
|
+
C.add(e);
|
|
14093
|
+
}, [C]), le = M((e) => {
|
|
14094
|
+
C.delete(e);
|
|
14095
|
+
}, [C]), ue = j(() => ({
|
|
14084
14096
|
state: u,
|
|
14085
14097
|
session: d,
|
|
14086
14098
|
chatMessages: f,
|
|
@@ -14088,22 +14100,24 @@ function Ip({ children: e }) {
|
|
|
14088
14100
|
captionRole: m,
|
|
14089
14101
|
error: h,
|
|
14090
14102
|
password: g,
|
|
14091
|
-
setPassword:
|
|
14103
|
+
setPassword: E,
|
|
14092
14104
|
captchaToken: _,
|
|
14093
|
-
setCaptchaToken:
|
|
14094
|
-
mode:
|
|
14095
|
-
start:
|
|
14096
|
-
end:
|
|
14097
|
-
sendChat:
|
|
14098
|
-
sendMessage:
|
|
14105
|
+
setCaptchaToken: ee,
|
|
14106
|
+
mode: T,
|
|
14107
|
+
start: oe,
|
|
14108
|
+
end: ae,
|
|
14109
|
+
sendChat: se,
|
|
14110
|
+
sendMessage: ce,
|
|
14099
14111
|
conversation: {
|
|
14100
|
-
start:
|
|
14101
|
-
end:
|
|
14102
|
-
sendMessage:
|
|
14103
|
-
},
|
|
14104
|
-
__registerSubscriber:
|
|
14105
|
-
__unregisterSubscriber:
|
|
14106
|
-
__beginAttempt:
|
|
14112
|
+
start: oe,
|
|
14113
|
+
end: ae,
|
|
14114
|
+
sendMessage: ce
|
|
14115
|
+
},
|
|
14116
|
+
__registerSubscriber: D,
|
|
14117
|
+
__unregisterSubscriber: le,
|
|
14118
|
+
__beginAttempt: ie,
|
|
14119
|
+
isSharedCallBusy: ne,
|
|
14120
|
+
pendingLeave: re
|
|
14107
14121
|
}), [
|
|
14108
14122
|
u,
|
|
14109
14123
|
d,
|
|
@@ -14112,20 +14126,22 @@ function Ip({ children: e }) {
|
|
|
14112
14126
|
m,
|
|
14113
14127
|
h,
|
|
14114
14128
|
g,
|
|
14115
|
-
|
|
14129
|
+
E,
|
|
14116
14130
|
_,
|
|
14131
|
+
ee,
|
|
14117
14132
|
T,
|
|
14118
|
-
C,
|
|
14119
|
-
re,
|
|
14120
|
-
ne,
|
|
14121
|
-
ie,
|
|
14122
|
-
ae,
|
|
14123
|
-
E,
|
|
14124
14133
|
oe,
|
|
14125
|
-
|
|
14134
|
+
ae,
|
|
14135
|
+
se,
|
|
14136
|
+
ce,
|
|
14137
|
+
D,
|
|
14138
|
+
le,
|
|
14139
|
+
ie,
|
|
14140
|
+
ne,
|
|
14141
|
+
re
|
|
14126
14142
|
]);
|
|
14127
14143
|
return /* @__PURE__ */ P(Tp.Provider, {
|
|
14128
|
-
value:
|
|
14144
|
+
value: ue,
|
|
14129
14145
|
children: e
|
|
14130
14146
|
});
|
|
14131
14147
|
}
|
|
@@ -14425,210 +14441,217 @@ var um = mn("Flow"), dm = [
|
|
|
14425
14441
|
"ended"
|
|
14426
14442
|
];
|
|
14427
14443
|
function fm({ children: e }) {
|
|
14428
|
-
let { config: t, retryInit: n } = Yp(), { cameraOnStart: r } = N(yt), { start: i, end: a, session: o, state: s, __beginAttempt: c } = N(Tp),
|
|
14444
|
+
let { config: t, retryInit: n } = Yp(), { cameraOnStart: r } = N(yt), { start: i, end: a, session: o, state: s, __beginAttempt: c, isSharedCallBusy: l, pendingLeave: u } = N(Tp), d = t.value.deployment_id ?? "", f = rm(d), p = M(() => {
|
|
14429
14445
|
let e = t.value, n = e.limits?.daily_call_limit_per_user;
|
|
14430
14446
|
return n == null || e.channel !== "widget" && e.channel !== "embed" ? null : n;
|
|
14431
|
-
}, [t]),
|
|
14447
|
+
}, [t]), m = N(qp), [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 } = lm(), ne = j(() => zt("idle"), []);
|
|
14432
14448
|
k(() => {
|
|
14433
|
-
|
|
14434
|
-
}, [
|
|
14449
|
+
ne.value = h;
|
|
14450
|
+
}, [h, ne]), pn(() => {
|
|
14435
14451
|
let e = t.value, n = e.limits?.daily_call_limit_per_user;
|
|
14436
|
-
n != null && (e.channel === "widget" || e.channel === "embed") &&
|
|
14452
|
+
n != null && (e.channel === "widget" || e.channel === "embed") && ne.value === "idle" && f.value >= n && (S("daily_limit"), w(!1), g("unavailable"));
|
|
14437
14453
|
});
|
|
14438
|
-
let
|
|
14439
|
-
let e =
|
|
14440
|
-
|
|
14441
|
-
}, []),
|
|
14442
|
-
|
|
14454
|
+
let re = A(!1), ie = A(!1), ae = A(async () => {}), oe = A(!1), se = A(null), ce = A(null), D = M(() => {
|
|
14455
|
+
let e = se.current;
|
|
14456
|
+
se.current = null, e?.resolve();
|
|
14457
|
+
}, []), le = M(async (e = new AbortController()) => {
|
|
14458
|
+
ce.current = e;
|
|
14443
14459
|
let { signal: r } = e;
|
|
14444
|
-
|
|
14460
|
+
v(!0);
|
|
14445
14461
|
try {
|
|
14446
|
-
let e = await
|
|
14462
|
+
let e = await m?.ensureToken(r) ?? { kind: "not-required" };
|
|
14447
14463
|
if (r.aborted) return;
|
|
14448
14464
|
if (e.kind === "unavailable") {
|
|
14449
|
-
|
|
14465
|
+
S(e.reason === "unsupported" ? "captcha_unsupported" : "error"), w(e.reason === "timeout" || e.reason === "exhausted"), g("unavailable");
|
|
14450
14466
|
return;
|
|
14451
14467
|
}
|
|
14452
14468
|
if (await i(void 0, { signal: r }), r.aborted) return;
|
|
14453
|
-
|
|
14469
|
+
re.current = !1, ie.current = !1, p() != null && im(d), g("call");
|
|
14454
14470
|
} catch (i) {
|
|
14455
14471
|
if (r.aborted) return;
|
|
14456
14472
|
let a = Lf(i);
|
|
14457
14473
|
if (Nf(i)) {
|
|
14458
|
-
|
|
14474
|
+
D(), b({
|
|
14459
14475
|
kind: "microphone",
|
|
14460
14476
|
status: "blocked"
|
|
14461
|
-
}),
|
|
14477
|
+
}), g("idle");
|
|
14462
14478
|
return;
|
|
14463
14479
|
}
|
|
14464
|
-
if (Bf(i) && (t.peek().captcha ?? null) === null && !
|
|
14465
|
-
if (Vf(i) && !
|
|
14466
|
-
|
|
14480
|
+
if (Bf(i) && (t.peek().captcha ?? null) === null && !ie.current) return ie.current = !0, um.info("/start demands a captcha the loaded config lacks; refreshing config"), await n(), r.aborted ? void 0 : await ae.current(e);
|
|
14481
|
+
if (Vf(i) && !re.current) {
|
|
14482
|
+
re.current = !0, v(!1), g("idle");
|
|
14467
14483
|
return;
|
|
14468
14484
|
}
|
|
14469
|
-
if (
|
|
14470
|
-
um.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),
|
|
14485
|
+
if (re.current = !1, Uf(i)) {
|
|
14486
|
+
um.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");
|
|
14471
14487
|
return;
|
|
14472
14488
|
}
|
|
14473
14489
|
if (a.status === 401 && t.value.has_password === !0) {
|
|
14474
|
-
|
|
14490
|
+
g("idle");
|
|
14475
14491
|
return;
|
|
14476
14492
|
}
|
|
14477
14493
|
let o = Wf(a.kind) ?? "busy";
|
|
14478
|
-
|
|
14494
|
+
S(o), w(a.retryable), g("unavailable");
|
|
14479
14495
|
} finally {
|
|
14480
|
-
|
|
14496
|
+
ce.current === e && (ce.current = null), v(!1);
|
|
14481
14497
|
}
|
|
14482
14498
|
}, [
|
|
14483
14499
|
i,
|
|
14484
14500
|
t,
|
|
14501
|
+
p,
|
|
14485
14502
|
d,
|
|
14486
|
-
|
|
14487
|
-
f,
|
|
14503
|
+
m,
|
|
14488
14504
|
n,
|
|
14489
|
-
|
|
14505
|
+
D
|
|
14490
14506
|
]);
|
|
14491
|
-
|
|
14492
|
-
let
|
|
14493
|
-
let e =
|
|
14507
|
+
ae.current = le;
|
|
14508
|
+
let ue = M(async () => {
|
|
14509
|
+
let e = se.current;
|
|
14494
14510
|
if (e) {
|
|
14495
|
-
|
|
14511
|
+
b(null);
|
|
14496
14512
|
try {
|
|
14497
|
-
await
|
|
14513
|
+
await le(e.controller);
|
|
14498
14514
|
} finally {
|
|
14499
|
-
|
|
14515
|
+
se.current === e && (se.current = null), e.resolve();
|
|
14500
14516
|
}
|
|
14501
14517
|
}
|
|
14502
|
-
}, [
|
|
14503
|
-
let e =
|
|
14518
|
+
}, [le]), de = M(() => {
|
|
14519
|
+
let e = se.current;
|
|
14504
14520
|
if (e && !e.proceeding) {
|
|
14505
|
-
if (e.proceeding = !0, t.peek().customization.conversation.modality === "video" && r === "on" && !
|
|
14506
|
-
|
|
14521
|
+
if (e.proceeding = !0, t.peek().customization.conversation.modality === "video" && r === "on" && !E.isGranted && !E.isBlocked) {
|
|
14522
|
+
b({
|
|
14507
14523
|
kind: "camera",
|
|
14508
|
-
status:
|
|
14509
|
-
}),
|
|
14510
|
-
|
|
14524
|
+
status: E.status
|
|
14525
|
+
}), te().finally(() => {
|
|
14526
|
+
ue();
|
|
14511
14527
|
});
|
|
14512
14528
|
return;
|
|
14513
14529
|
}
|
|
14514
|
-
|
|
14530
|
+
ue();
|
|
14515
14531
|
}
|
|
14516
14532
|
}, [
|
|
14517
14533
|
t,
|
|
14518
14534
|
r,
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14535
|
+
E,
|
|
14536
|
+
te,
|
|
14537
|
+
ue
|
|
14522
14538
|
]);
|
|
14523
14539
|
k(() => {
|
|
14524
|
-
if (
|
|
14525
|
-
if (
|
|
14540
|
+
if (se.current && y?.kind === "microphone") {
|
|
14541
|
+
if (y.status !== T.status && b({
|
|
14526
14542
|
kind: "microphone",
|
|
14527
|
-
status:
|
|
14528
|
-
}),
|
|
14529
|
-
|
|
14543
|
+
status: T.status
|
|
14544
|
+
}), T.isGranted) {
|
|
14545
|
+
de();
|
|
14530
14546
|
return;
|
|
14531
14547
|
}
|
|
14532
|
-
if (
|
|
14533
|
-
let e =
|
|
14534
|
-
|
|
14548
|
+
if (T.isBlocked) {
|
|
14549
|
+
let e = se.current;
|
|
14550
|
+
se.current = null, v(!1), e.resolve();
|
|
14535
14551
|
}
|
|
14536
14552
|
}
|
|
14537
14553
|
}, [
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14554
|
+
y,
|
|
14555
|
+
T,
|
|
14556
|
+
de
|
|
14541
14557
|
]);
|
|
14542
|
-
let
|
|
14543
|
-
if (
|
|
14558
|
+
let fe = M(() => {
|
|
14559
|
+
if (se.current) return se.current.promise;
|
|
14544
14560
|
let e, t = new Promise((t) => {
|
|
14545
14561
|
e = t;
|
|
14546
14562
|
});
|
|
14547
|
-
return
|
|
14563
|
+
return se.current = {
|
|
14548
14564
|
promise: t,
|
|
14549
14565
|
resolve: e,
|
|
14550
14566
|
proceeding: !1,
|
|
14551
14567
|
controller: new AbortController()
|
|
14552
|
-
},
|
|
14568
|
+
}, v(!0), T.isGranted ? de() : T.isBlocked ? (b({
|
|
14553
14569
|
kind: "microphone",
|
|
14554
|
-
status:
|
|
14555
|
-
}),
|
|
14570
|
+
status: T.status
|
|
14571
|
+
}), se.current = null, v(!1), e()) : (b({
|
|
14556
14572
|
kind: "microphone",
|
|
14557
|
-
status:
|
|
14558
|
-
}),
|
|
14573
|
+
status: T.status
|
|
14574
|
+
}), ee()), t;
|
|
14559
14575
|
}, [
|
|
14560
|
-
C,
|
|
14561
14576
|
T,
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14577
|
+
ee,
|
|
14578
|
+
de
|
|
14579
|
+
]), pe = M(async () => {
|
|
14580
|
+
if (!dm.includes(h)) return;
|
|
14581
|
+
let e = t.peek().customization, n = e.show_haircheck, r = e.conversation.modality, i = n && r !== "chat", a = !n && r !== "chat", o = p();
|
|
14582
|
+
if (o != null && f.value >= o) {
|
|
14583
|
+
S("daily_limit"), w(!1), g("unavailable");
|
|
14568
14584
|
return;
|
|
14569
14585
|
}
|
|
14570
|
-
if (
|
|
14571
|
-
|
|
14586
|
+
if (l()) {
|
|
14587
|
+
S("busy"), w(!0), g("unavailable");
|
|
14572
14588
|
return;
|
|
14573
14589
|
}
|
|
14574
|
-
|
|
14590
|
+
let s = u();
|
|
14591
|
+
if (s && await s, c(), i && !oe.current) {
|
|
14592
|
+
g("haircheck");
|
|
14593
|
+
return;
|
|
14594
|
+
}
|
|
14595
|
+
return a ? fe() : le();
|
|
14575
14596
|
}, [
|
|
14576
|
-
|
|
14597
|
+
h,
|
|
14577
14598
|
t,
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
c
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
}, [
|
|
14599
|
+
fe,
|
|
14600
|
+
le,
|
|
14601
|
+
p,
|
|
14602
|
+
f,
|
|
14603
|
+
c,
|
|
14604
|
+
l,
|
|
14605
|
+
u
|
|
14606
|
+
]), me = M(async () => {
|
|
14607
|
+
h === "haircheck" && (oe.current = !0, await le());
|
|
14608
|
+
}, [h, le]), he = M(() => {
|
|
14609
|
+
let e = se.current, t = e?.controller ?? ce.current;
|
|
14610
|
+
e && (se.current = null, e.resolve(), b(null)), t?.abort(), t && v(!1), h === "haircheck" && g("idle");
|
|
14611
|
+
}, [h]), ge = M(() => {
|
|
14612
|
+
h === "call" && g("ended");
|
|
14613
|
+
}, [h]);
|
|
14591
14614
|
k(() => {
|
|
14592
14615
|
let e = () => {
|
|
14593
|
-
let e =
|
|
14594
|
-
(e || t || n) && (
|
|
14616
|
+
let e = se.current !== null || ce.current !== null, t = h === "haircheck" || h === "call", n = o.peek() !== null, r = n && s.peek() !== "ended";
|
|
14617
|
+
(e || t || n) && (he(), (h === "call" || r) && g("ended"), a());
|
|
14595
14618
|
};
|
|
14596
14619
|
return window.addEventListener("pagehide", e), () => window.removeEventListener("pagehide", e);
|
|
14597
14620
|
}, [
|
|
14598
|
-
|
|
14621
|
+
h,
|
|
14599
14622
|
o,
|
|
14600
14623
|
s,
|
|
14601
|
-
|
|
14624
|
+
he,
|
|
14602
14625
|
a
|
|
14603
14626
|
]);
|
|
14604
|
-
let
|
|
14605
|
-
|
|
14606
|
-
}, []),
|
|
14607
|
-
flowSignal:
|
|
14608
|
-
setFlowState:
|
|
14609
|
-
isStarting:
|
|
14610
|
-
permissionRequest:
|
|
14611
|
-
unavailableCause:
|
|
14612
|
-
canRetry:
|
|
14613
|
-
start:
|
|
14614
|
-
join:
|
|
14615
|
-
cancel:
|
|
14616
|
-
leave:
|
|
14617
|
-
restart:
|
|
14627
|
+
let _e = M(() => {
|
|
14628
|
+
S(null), w(!1), g("idle");
|
|
14629
|
+
}, []), ve = j(() => ({
|
|
14630
|
+
flowSignal: ne,
|
|
14631
|
+
setFlowState: g,
|
|
14632
|
+
isStarting: _,
|
|
14633
|
+
permissionRequest: y,
|
|
14634
|
+
unavailableCause: x,
|
|
14635
|
+
canRetry: C,
|
|
14636
|
+
start: pe,
|
|
14637
|
+
join: me,
|
|
14638
|
+
cancel: he,
|
|
14639
|
+
leave: ge,
|
|
14640
|
+
restart: _e
|
|
14618
14641
|
}), [
|
|
14619
|
-
|
|
14620
|
-
h,
|
|
14642
|
+
ne,
|
|
14621
14643
|
_,
|
|
14622
14644
|
y,
|
|
14623
14645
|
x,
|
|
14624
|
-
|
|
14625
|
-
fe,
|
|
14646
|
+
C,
|
|
14626
14647
|
pe,
|
|
14627
14648
|
me,
|
|
14628
|
-
he
|
|
14649
|
+
he,
|
|
14650
|
+
ge,
|
|
14651
|
+
_e
|
|
14629
14652
|
]);
|
|
14630
14653
|
return /* @__PURE__ */ P(Gf.Provider, {
|
|
14631
|
-
value:
|
|
14654
|
+
value: ve,
|
|
14632
14655
|
children: e
|
|
14633
14656
|
});
|
|
14634
14657
|
}
|
|
@@ -14716,15 +14739,19 @@ function _m({ children: e }) {
|
|
|
14716
14739
|
n,
|
|
14717
14740
|
l
|
|
14718
14741
|
]);
|
|
14719
|
-
let d = A(null);
|
|
14742
|
+
let d = A(null), f = A(/* @__PURE__ */ new Set());
|
|
14720
14743
|
k(() => t.state.subscribe((e) => {
|
|
14721
14744
|
if (e !== d.current) switch (d.current = e, e) {
|
|
14722
|
-
case "connected":
|
|
14723
|
-
|
|
14745
|
+
case "connected": {
|
|
14746
|
+
let n = t.session.peek()?.conversationId ?? "";
|
|
14747
|
+
f.current.add(n), l("tavus:conversation-started", { conversationId: n }), l("tavus:state-change", { state: e });
|
|
14724
14748
|
break;
|
|
14725
|
-
|
|
14726
|
-
|
|
14749
|
+
}
|
|
14750
|
+
case "ended": {
|
|
14751
|
+
let n = t.session.peek()?.conversationId ?? "";
|
|
14752
|
+
f.current.delete(n), l("tavus:conversation-ended", { conversationId: n }), l("tavus:state-change", { state: e });
|
|
14727
14753
|
break;
|
|
14754
|
+
}
|
|
14728
14755
|
case "error":
|
|
14729
14756
|
l("tavus:error", {
|
|
14730
14757
|
code: "CONVERSATION_ERROR",
|
|
@@ -14774,12 +14801,12 @@ function _m({ children: e }) {
|
|
|
14774
14801
|
};
|
|
14775
14802
|
return t.__registerSubscriber(e), () => t.__unregisterSubscriber(e);
|
|
14776
14803
|
}, [t, l]);
|
|
14777
|
-
let
|
|
14804
|
+
let p = j(() => ({
|
|
14778
14805
|
shadowHost: o,
|
|
14779
14806
|
dispatchEvent: l
|
|
14780
14807
|
}), [o, l]);
|
|
14781
14808
|
return /* @__PURE__ */ P(hm.Provider, {
|
|
14782
|
-
value:
|
|
14809
|
+
value: p,
|
|
14783
14810
|
children: [/* @__PURE__ */ P("div", {
|
|
14784
14811
|
ref: c,
|
|
14785
14812
|
style: "display:contents"
|
|
@@ -17645,10 +17672,10 @@ function Ay(e) {
|
|
|
17645
17672
|
};
|
|
17646
17673
|
}
|
|
17647
17674
|
function jy(e) {
|
|
17648
|
-
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 = {},
|
|
17649
|
-
t && (
|
|
17650
|
-
},
|
|
17651
|
-
return
|
|
17675
|
+
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) => {
|
|
17676
|
+
t && (s[e] = t);
|
|
17677
|
+
}, l = (e, t, n) => e && n ? `color-mix(in oklch, ${e} ${t}%, ${n})` : void 0;
|
|
17678
|
+
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;
|
|
17652
17679
|
}
|
|
17653
17680
|
//#endregion
|
|
17654
17681
|
//#region ../core/src/magic-canvas/persona-presentation.tsx
|
|
@@ -18030,13 +18057,13 @@ function ab({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
18030
18057
|
f,
|
|
18031
18058
|
o
|
|
18032
18059
|
]);
|
|
18033
|
-
let S = v && y != null && b != null, C = s !== "shift", w = Wy(g, C), T = f !== null && !C,
|
|
18034
|
-
let n =
|
|
18060
|
+
let S = v && y != null && b != null, C = s !== "shift", w = Wy(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) => {
|
|
18061
|
+
let n = ee.current;
|
|
18035
18062
|
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})`);
|
|
18036
|
-
let r =
|
|
18037
|
-
r && (r.style.transform = `translate3d(${e.shift}px, 0, 0)`),
|
|
18063
|
+
let r = te.current;
|
|
18064
|
+
r && (r.style.transform = `translate3d(${e.shift}px, 0, 0)`), ie.current !== t && (ie.current = t, re(t));
|
|
18038
18065
|
}, []);
|
|
18039
|
-
return Xy(C ? Yy(b, S, w, h, e) : null, o,
|
|
18066
|
+
return Xy(C ? Yy(b, S, w, h, e) : null, o, ae), /* @__PURE__ */ P("div", {
|
|
18040
18067
|
ref: g,
|
|
18041
18068
|
class: `relative w-full h-full overflow-hidden ${n ? "flex items-center justify-center" : ""}`,
|
|
18042
18069
|
children: [
|
|
@@ -18046,7 +18073,7 @@ function ab({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
18046
18073
|
transition: a,
|
|
18047
18074
|
transformOrigin: x.transformOrigin
|
|
18048
18075
|
}),
|
|
18049
|
-
|
|
18076
|
+
E && /* @__PURE__ */ P(rb, {
|
|
18050
18077
|
ambient: l,
|
|
18051
18078
|
usePip: v,
|
|
18052
18079
|
transition: a
|
|
@@ -18060,15 +18087,15 @@ function ab({ canvasLayoutEffect: e, smartSidecarActive: t, isScreenSharing: n,
|
|
|
18060
18087
|
mirrorSide: x.side,
|
|
18061
18088
|
videoShiftX: h,
|
|
18062
18089
|
transition: a,
|
|
18063
|
-
sceneRef:
|
|
18064
|
-
videoWrapRef:
|
|
18090
|
+
sceneRef: ee,
|
|
18091
|
+
videoWrapRef: te,
|
|
18065
18092
|
fill: r,
|
|
18066
18093
|
videoRef: d
|
|
18067
18094
|
})
|
|
18068
18095
|
}),
|
|
18069
18096
|
C && b && /* @__PURE__ */ P(Qy, {
|
|
18070
18097
|
geom: b,
|
|
18071
|
-
visible: S &&
|
|
18098
|
+
visible: S && ne
|
|
18072
18099
|
}),
|
|
18073
18100
|
u
|
|
18074
18101
|
]
|
|
@@ -24539,8 +24566,8 @@ function uj(e, t, n, r, i, a) {
|
|
|
24539
24566
|
fit: { kind: "natural" },
|
|
24540
24567
|
region: f.region.name
|
|
24541
24568
|
});
|
|
24542
|
-
let T = cj(b, s.extraEvictions, a.eviction.policy),
|
|
24543
|
-
if (y.evictedCardIds = v.filter((e) => !
|
|
24569
|
+
let T = cj(b, s.extraEvictions, a.eviction.policy), E = new Set(T.map((e) => e.id));
|
|
24570
|
+
if (y.evictedCardIds = v.filter((e) => !E.has(e.id)).map((e) => e.id), p && T.length > 0) {
|
|
24544
24571
|
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 } = JA(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;
|
|
24545
24572
|
if (u <= l) d = s.map((e) => e.clampedHeightPx);
|
|
24546
24573
|
else {
|
|
@@ -24578,7 +24605,7 @@ function uj(e, t, n, r, i, a) {
|
|
|
24578
24605
|
}), m = r + i + g;
|
|
24579
24606
|
});
|
|
24580
24607
|
}
|
|
24581
|
-
let
|
|
24608
|
+
let ee = null;
|
|
24582
24609
|
if (p === void 0 && h !== void 0 && T.length > 0) {
|
|
24583
24610
|
let e = {
|
|
24584
24611
|
width: Math.max(0, i.width - 2 * c),
|
|
@@ -24593,7 +24620,7 @@ function uj(e, t, n, r, i, a) {
|
|
|
24593
24620
|
let e = d.x + Math.round((d.width - f) / 2), t = Math.max(0, Math.min(m.clampedHeightPx, d.height)), n = BA(m.clampedHeightPx, t, a);
|
|
24594
24621
|
o && m.constraints.naturalHeightPx > t && (n = { kind: "scroll" });
|
|
24595
24622
|
let r = m.constraints.hardMinHeightPx;
|
|
24596
|
-
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }),
|
|
24623
|
+
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }), ee = {
|
|
24597
24624
|
id: m.card.id,
|
|
24598
24625
|
kind: "card",
|
|
24599
24626
|
component: m.card.component,
|
|
@@ -24610,7 +24637,7 @@ function uj(e, t, n, r, i, a) {
|
|
|
24610
24637
|
region: h.name,
|
|
24611
24638
|
sheet: !0,
|
|
24612
24639
|
...o && { sheetAnchor: "bottom" }
|
|
24613
|
-
}, x.push(
|
|
24640
|
+
}, x.push(ee);
|
|
24614
24641
|
}
|
|
24615
24642
|
}
|
|
24616
24643
|
if (!C) {
|
|
@@ -24623,7 +24650,7 @@ function uj(e, t, n, r, i, a) {
|
|
|
24623
24650
|
height: l
|
|
24624
24651
|
} : null), s = [
|
|
24625
24652
|
...o === null ? [] : [o],
|
|
24626
|
-
...
|
|
24653
|
+
...ee === null ? [] : [ee.rect],
|
|
24627
24654
|
...n.chromeObstacles ?? []
|
|
24628
24655
|
];
|
|
24629
24656
|
if (S) {
|
|
@@ -25372,13 +25399,13 @@ var qj = (e, t) => {
|
|
|
25372
25399
|
"full",
|
|
25373
25400
|
"auto",
|
|
25374
25401
|
...w()
|
|
25375
|
-
],
|
|
25402
|
+
], E = () => [
|
|
25376
25403
|
IM,
|
|
25377
25404
|
"none",
|
|
25378
25405
|
"subgrid",
|
|
25379
25406
|
$,
|
|
25380
25407
|
Q
|
|
25381
|
-
],
|
|
25408
|
+
], ee = () => [
|
|
25382
25409
|
"auto",
|
|
25383
25410
|
{ span: [
|
|
25384
25411
|
"full",
|
|
@@ -25389,19 +25416,19 @@ var qj = (e, t) => {
|
|
|
25389
25416
|
IM,
|
|
25390
25417
|
$,
|
|
25391
25418
|
Q
|
|
25392
|
-
],
|
|
25419
|
+
], te = () => [
|
|
25393
25420
|
IM,
|
|
25394
25421
|
"auto",
|
|
25395
25422
|
$,
|
|
25396
25423
|
Q
|
|
25397
|
-
],
|
|
25424
|
+
], ne = () => [
|
|
25398
25425
|
"auto",
|
|
25399
25426
|
"min",
|
|
25400
25427
|
"max",
|
|
25401
25428
|
"fr",
|
|
25402
25429
|
$,
|
|
25403
25430
|
Q
|
|
25404
|
-
],
|
|
25431
|
+
], re = () => [
|
|
25405
25432
|
"start",
|
|
25406
25433
|
"end",
|
|
25407
25434
|
"center",
|
|
@@ -25412,14 +25439,14 @@ var qj = (e, t) => {
|
|
|
25412
25439
|
"baseline",
|
|
25413
25440
|
"center-safe",
|
|
25414
25441
|
"end-safe"
|
|
25415
|
-
],
|
|
25442
|
+
], ie = () => [
|
|
25416
25443
|
"start",
|
|
25417
25444
|
"end",
|
|
25418
25445
|
"center",
|
|
25419
25446
|
"stretch",
|
|
25420
25447
|
"center-safe",
|
|
25421
25448
|
"end-safe"
|
|
25422
|
-
],
|
|
25449
|
+
], ae = () => ["auto", ...w()], oe = () => [
|
|
25423
25450
|
FM,
|
|
25424
25451
|
"auto",
|
|
25425
25452
|
"full",
|
|
@@ -25778,14 +25805,14 @@ var qj = (e, t) => {
|
|
|
25778
25805
|
$,
|
|
25779
25806
|
Q
|
|
25780
25807
|
] }],
|
|
25781
|
-
"grid-cols": [{ "grid-cols":
|
|
25782
|
-
"col-start-end": [{ col:
|
|
25783
|
-
"col-start": [{ "col-start":
|
|
25784
|
-
"col-end": [{ "col-end":
|
|
25785
|
-
"grid-rows": [{ "grid-rows":
|
|
25786
|
-
"row-start-end": [{ row:
|
|
25787
|
-
"row-start": [{ "row-start":
|
|
25788
|
-
"row-end": [{ "row-end":
|
|
25808
|
+
"grid-cols": [{ "grid-cols": E() }],
|
|
25809
|
+
"col-start-end": [{ col: ee() }],
|
|
25810
|
+
"col-start": [{ "col-start": te() }],
|
|
25811
|
+
"col-end": [{ "col-end": te() }],
|
|
25812
|
+
"grid-rows": [{ "grid-rows": E() }],
|
|
25813
|
+
"row-start-end": [{ row: ee() }],
|
|
25814
|
+
"row-start": [{ "row-start": te() }],
|
|
25815
|
+
"row-end": [{ "row-end": te() }],
|
|
25789
25816
|
"grid-flow": [{ "grid-flow": [
|
|
25790
25817
|
"row",
|
|
25791
25818
|
"col",
|
|
@@ -25793,24 +25820,24 @@ var qj = (e, t) => {
|
|
|
25793
25820
|
"row-dense",
|
|
25794
25821
|
"col-dense"
|
|
25795
25822
|
] }],
|
|
25796
|
-
"auto-cols": [{ "auto-cols":
|
|
25797
|
-
"auto-rows": [{ "auto-rows":
|
|
25823
|
+
"auto-cols": [{ "auto-cols": ne() }],
|
|
25824
|
+
"auto-rows": [{ "auto-rows": ne() }],
|
|
25798
25825
|
gap: [{ gap: w() }],
|
|
25799
25826
|
"gap-x": [{ "gap-x": w() }],
|
|
25800
25827
|
"gap-y": [{ "gap-y": w() }],
|
|
25801
|
-
"justify-content": [{ justify: [...
|
|
25802
|
-
"justify-items": [{ "justify-items": [...
|
|
25803
|
-
"justify-self": [{ "justify-self": ["auto", ...
|
|
25804
|
-
"align-content": [{ content: ["normal", ...
|
|
25805
|
-
"align-items": [{ items: [...
|
|
25828
|
+
"justify-content": [{ justify: [...re(), "normal"] }],
|
|
25829
|
+
"justify-items": [{ "justify-items": [...ie(), "normal"] }],
|
|
25830
|
+
"justify-self": [{ "justify-self": ["auto", ...ie()] }],
|
|
25831
|
+
"align-content": [{ content: ["normal", ...re()] }],
|
|
25832
|
+
"align-items": [{ items: [...ie(), { baseline: ["", "last"] }] }],
|
|
25806
25833
|
"align-self": [{ self: [
|
|
25807
25834
|
"auto",
|
|
25808
|
-
...
|
|
25835
|
+
...ie(),
|
|
25809
25836
|
{ baseline: ["", "last"] }
|
|
25810
25837
|
] }],
|
|
25811
|
-
"place-content": [{ "place-content":
|
|
25812
|
-
"place-items": [{ "place-items": [...
|
|
25813
|
-
"place-self": [{ "place-self": ["auto", ...
|
|
25838
|
+
"place-content": [{ "place-content": re() }],
|
|
25839
|
+
"place-items": [{ "place-items": [...ie(), "baseline"] }],
|
|
25840
|
+
"place-self": [{ "place-self": ["auto", ...ie()] }],
|
|
25814
25841
|
p: [{ p: w() }],
|
|
25815
25842
|
px: [{ px: w() }],
|
|
25816
25843
|
py: [{ py: w() }],
|
|
@@ -25822,17 +25849,17 @@ var qj = (e, t) => {
|
|
|
25822
25849
|
pr: [{ pr: w() }],
|
|
25823
25850
|
pb: [{ pb: w() }],
|
|
25824
25851
|
pl: [{ pl: w() }],
|
|
25825
|
-
m: [{ m:
|
|
25826
|
-
mx: [{ mx:
|
|
25827
|
-
my: [{ my:
|
|
25828
|
-
ms: [{ ms:
|
|
25829
|
-
me: [{ me:
|
|
25830
|
-
mbs: [{ mbs:
|
|
25831
|
-
mbe: [{ mbe:
|
|
25832
|
-
mt: [{ mt:
|
|
25833
|
-
mr: [{ mr:
|
|
25834
|
-
mb: [{ mb:
|
|
25835
|
-
ml: [{ ml:
|
|
25852
|
+
m: [{ m: ae() }],
|
|
25853
|
+
mx: [{ mx: ae() }],
|
|
25854
|
+
my: [{ my: ae() }],
|
|
25855
|
+
ms: [{ ms: ae() }],
|
|
25856
|
+
me: [{ me: ae() }],
|
|
25857
|
+
mbs: [{ mbs: ae() }],
|
|
25858
|
+
mbe: [{ mbe: ae() }],
|
|
25859
|
+
mt: [{ mt: ae() }],
|
|
25860
|
+
mr: [{ mr: ae() }],
|
|
25861
|
+
mb: [{ mb: ae() }],
|
|
25862
|
+
ml: [{ ml: ae() }],
|
|
25836
25863
|
"space-x": [{ "space-x": w() }],
|
|
25837
25864
|
"space-x-reverse": ["space-x-reverse"],
|
|
25838
25865
|
"space-y": [{ "space-y": w() }],
|
|
@@ -27356,18 +27383,18 @@ function ZN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27356
27383
|
w.safe_area?.width,
|
|
27357
27384
|
w.safe_area?.height
|
|
27358
27385
|
]);
|
|
27359
|
-
let
|
|
27386
|
+
let E = XN(C.map(({ layout: e }) => e));
|
|
27360
27387
|
k(() => {
|
|
27361
|
-
t?.(
|
|
27362
|
-
}, [t,
|
|
27363
|
-
let
|
|
27388
|
+
t?.(E);
|
|
27389
|
+
}, [t, E]);
|
|
27390
|
+
let ee = p.length > 0 || _.enabled;
|
|
27364
27391
|
return /* @__PURE__ */ P("div", {
|
|
27365
27392
|
ref: h,
|
|
27366
27393
|
"data-magic-canvas-root": !0,
|
|
27367
27394
|
class: "pointer-events-none absolute inset-0 z-30",
|
|
27368
27395
|
children: [
|
|
27369
|
-
|
|
27370
|
-
|
|
27396
|
+
ee && T && /* @__PURE__ */ P("div", { class: "absolute inset-0 bg-black/45" }),
|
|
27397
|
+
ee && !T && y.sheetBottomPx !== null && /* @__PURE__ */ P("div", {
|
|
27371
27398
|
"data-grid-sheet-scrim": !0,
|
|
27372
27399
|
class: "absolute inset-x-0 top-0",
|
|
27373
27400
|
style: {
|
|
@@ -27375,7 +27402,7 @@ function ZN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27375
27402
|
backgroundImage: "linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))"
|
|
27376
27403
|
}
|
|
27377
27404
|
}),
|
|
27378
|
-
|
|
27405
|
+
ee && C.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ P(QN, {
|
|
27379
27406
|
slot: lP(t),
|
|
27380
27407
|
safeAreaTop: w.safe_area?.y,
|
|
27381
27408
|
frameWidth: g.width,
|
|
@@ -27409,7 +27436,7 @@ function ZN({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
27409
27436
|
sendAppMessage: x
|
|
27410
27437
|
})
|
|
27411
27438
|
}, e.id)),
|
|
27412
|
-
|
|
27439
|
+
ee && /* @__PURE__ */ P("div", {
|
|
27413
27440
|
class: "absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20",
|
|
27414
27441
|
children: /* @__PURE__ */ P(jN, { state: _ })
|
|
27415
27442
|
}),
|
|
@@ -27458,12 +27485,12 @@ function QN({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
27458
27485
|
});
|
|
27459
27486
|
}
|
|
27460
27487
|
function $N({ 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 }) {
|
|
27461
|
-
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), [
|
|
27488
|
+
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);
|
|
27462
27489
|
k(() => {
|
|
27463
27490
|
y.current = a;
|
|
27464
27491
|
}, [a]), k(() => {
|
|
27465
|
-
_.current =
|
|
27466
|
-
}, [
|
|
27492
|
+
_.current = E, m.current?.setHostContext(rP(y.current, v.current, b.current, h.current, E, g.current));
|
|
27493
|
+
}, [E]), k(() => {
|
|
27467
27494
|
h.current = e, g.current = r;
|
|
27468
27495
|
let t = nP(i, p.current);
|
|
27469
27496
|
v.current = t, m.current?.setHostContext(rP(y.current, t, b.current, e, _.current, r));
|
|
@@ -27526,7 +27553,7 @@ function $N({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27526
27553
|
}, f.onsizechange = ({ height: e }) => {
|
|
27527
27554
|
if (!n && typeof e == "number" && Number.isFinite(e)) {
|
|
27528
27555
|
let t = Math.min(Math.max(e, GN), 720);
|
|
27529
|
-
|
|
27556
|
+
ee(t), w.current(y.current.id, t);
|
|
27530
27557
|
}
|
|
27531
27558
|
}, f.onmessage = async (e) => {
|
|
27532
27559
|
let r = Kv(e);
|
|
@@ -27613,11 +27640,11 @@ function $N({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27613
27640
|
iframeLifecycleState: "mounting",
|
|
27614
27641
|
lastInteractionPostResult: void 0
|
|
27615
27642
|
}), a.canvas_config.sandbox_url, e.src = a.canvas_config.sandbox_url;
|
|
27616
|
-
let
|
|
27643
|
+
let E = () => {
|
|
27617
27644
|
f();
|
|
27618
27645
|
};
|
|
27619
|
-
return e.addEventListener("load",
|
|
27620
|
-
o &&= (clearTimeout(o), null), s &&= (clearTimeout(s), null), d(), n = !0, e.removeEventListener("load",
|
|
27646
|
+
return e.addEventListener("load", E), f(), () => {
|
|
27647
|
+
o &&= (clearTimeout(o), null), s &&= (clearTimeout(s), null), d(), n = !0, e.removeEventListener("load", E), m.current = null, c({ iframeLifecycleState: "closed" }), r && kv(r);
|
|
27621
27648
|
};
|
|
27622
27649
|
}, [
|
|
27623
27650
|
t,
|
|
@@ -27636,26 +27663,26 @@ function $N({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
27636
27663
|
a.revision,
|
|
27637
27664
|
c
|
|
27638
27665
|
]);
|
|
27639
|
-
let
|
|
27666
|
+
let te = o.viable_slot === "full" || o.display_mode === "fullscreen", ne = te ? null : iP(E, e, r), re = ne?.placeholderStyle, ie = ne?.cardStyle, ae = te ? { height: "100%" } : ne?.iframeStyle ?? { height: `${E}px` }, oe = [
|
|
27640
27667
|
"pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]",
|
|
27641
27668
|
r ? "" : "shadow-xl",
|
|
27642
|
-
|
|
27669
|
+
te ? "fixed inset-4 z-10 max-w-none" : n ? "max-w-none" : "max-w-md",
|
|
27643
27670
|
s ? "scale-[0.98] opacity-40" : ""
|
|
27644
27671
|
].filter(Boolean).join(" "), se = qN[a.canvas_config.component] ?? KN, ce = /* @__PURE__ */ P("div", {
|
|
27645
27672
|
class: oe,
|
|
27646
|
-
style:
|
|
27673
|
+
style: ie,
|
|
27647
27674
|
"data-canvas-card": o.viable_slot,
|
|
27648
27675
|
children: /* @__PURE__ */ P("iframe", {
|
|
27649
27676
|
ref: p,
|
|
27650
27677
|
title: `${a.canvas_config.component} ${a.canvas_config.component_version}`,
|
|
27651
|
-
class:
|
|
27678
|
+
class: te ? "block h-full w-full border-0 bg-transparent" : "block border-0 bg-transparent",
|
|
27652
27679
|
sandbox: se,
|
|
27653
|
-
style:
|
|
27680
|
+
style: ae
|
|
27654
27681
|
})
|
|
27655
27682
|
});
|
|
27656
|
-
return
|
|
27683
|
+
return te ? ce : /* @__PURE__ */ P("div", {
|
|
27657
27684
|
class: "block w-full",
|
|
27658
|
-
style:
|
|
27685
|
+
style: re,
|
|
27659
27686
|
children: ce
|
|
27660
27687
|
});
|
|
27661
27688
|
}
|
|
@@ -27810,7 +27837,7 @@ function pP(e) {
|
|
|
27810
27837
|
}
|
|
27811
27838
|
//#endregion
|
|
27812
27839
|
//#region ../core/src/magic-canvas/grid-error-boundary.tsx
|
|
27813
|
-
var mP = class extends
|
|
27840
|
+
var mP = class extends E {
|
|
27814
27841
|
state = { errored: !1 };
|
|
27815
27842
|
componentDidCatch(e) {
|
|
27816
27843
|
this.props.onError(e), this.setState({ errored: !0 });
|
|
@@ -28205,8 +28232,8 @@ var kP = zt(null), AP = {
|
|
|
28205
28232
|
})]
|
|
28206
28233
|
});
|
|
28207
28234
|
}), HP = U(({ items: e }) => e.length <= 1 ? /* @__PURE__ */ P(T, { children: e }) : /* @__PURE__ */ P(VP, { items: e })), UP = U(({ onLeave: e }) => {
|
|
28208
|
-
let t = Hd(), { config: n } = Yp(), { session: r, end: i } = R_(), a = Ud(), o = A(null), s = N(sh)?.frameRef ?? o, [c, l] = O(!1), u = Ug() === "full-screen", [d, f] = O(!1), [p, m] = O(AP), [h, g] = O(null), _ = n.value.customization.conversation, v = gP(_.show_fullscreen_hint && h !== null && !c && !u), y = A(null), b = A(null), x = r.value?.conversationUrl, S = r.value?.magicGrid === !0, C = Cj(_.magic_grid, S), w = vP(y, C, x), T = yP(y, b, 72, C, x),
|
|
28209
|
-
enabled:
|
|
28235
|
+
let t = Hd(), { config: n } = Yp(), { session: r, end: i } = R_(), a = Ud(), o = A(null), s = N(sh)?.frameRef ?? o, [c, l] = O(!1), u = Ug() === "full-screen", [d, f] = O(!1), [p, m] = O(AP), [h, g] = O(null), _ = n.value.customization.conversation, v = gP(_.show_fullscreen_hint && h !== null && !c && !u), y = A(null), b = A(null), x = r.value?.conversationUrl, S = r.value?.magicGrid === !0, C = Cj(_.magic_grid, S), w = vP(y, C, x), T = yP(y, b, 72, C, x), E = _.modality === "audio", ee = _P(E), te = _.modality === "chat", ne = _.modality === "video", re = _.enable_chat, ie = _.enable_closed_captions, ae = _.enable_picture_in_picture, { pipWindow: oe } = OP({
|
|
28236
|
+
enabled: ae && !te,
|
|
28210
28237
|
active: t === "joined-meeting"
|
|
28211
28238
|
});
|
|
28212
28239
|
k(() => () => {
|
|
@@ -28214,13 +28241,13 @@ var kP = zt(null), AP = {
|
|
|
28214
28241
|
}, [i]);
|
|
28215
28242
|
let { camera: se, requestCamera: ce } = lm(), { isCamMuted: D } = d_(), le = se.isGranted && !D;
|
|
28216
28243
|
k(() => {
|
|
28217
|
-
|
|
28244
|
+
ne && t === "joined-meeting" && (kP.value = le);
|
|
28218
28245
|
}, [
|
|
28219
|
-
|
|
28246
|
+
ne,
|
|
28220
28247
|
t,
|
|
28221
28248
|
le
|
|
28222
28249
|
]);
|
|
28223
|
-
let ue = A(
|
|
28250
|
+
let ue = A(ne && !a && kP.value === !0);
|
|
28224
28251
|
k(() => {
|
|
28225
28252
|
t === "joined-meeting" && ue.current && (ue.current = !1, ce());
|
|
28226
28253
|
}, [t, ce]), k(() => {
|
|
@@ -28245,10 +28272,10 @@ var kP = zt(null), AP = {
|
|
|
28245
28272
|
i();
|
|
28246
28273
|
}, [i]);
|
|
28247
28274
|
if (xP({
|
|
28248
|
-
active: !
|
|
28275
|
+
active: !te && t === "joined-meeting",
|
|
28249
28276
|
onTimeout: fe
|
|
28250
28277
|
}), CP({ onShutdown: fe }), !x) return null;
|
|
28251
|
-
if (
|
|
28278
|
+
if (te) return /* @__PURE__ */ P(G_, {
|
|
28252
28279
|
defaultOpen: !0,
|
|
28253
28280
|
children: /* @__PURE__ */ P("div", {
|
|
28254
28281
|
class: "cvi-call-surface absolute inset-0",
|
|
@@ -28269,25 +28296,25 @@ var kP = zt(null), AP = {
|
|
|
28269
28296
|
})
|
|
28270
28297
|
});
|
|
28271
28298
|
let pe = [/* @__PURE__ */ P(L_, { compact: !0 }, "screen-share")];
|
|
28272
|
-
|
|
28299
|
+
re && pe.push(/* @__PURE__ */ P(q_, { compact: !0 }, "chat"));
|
|
28273
28300
|
let me = t === "left-meeting";
|
|
28274
28301
|
return /* @__PURE__ */ P(B_, { children: /* @__PURE__ */ P(G_, { children: /* @__PURE__ */ P(b_, { children: [/* @__PURE__ */ P("div", {
|
|
28275
|
-
class: `cvi-call-surface absolute inset-0${
|
|
28302
|
+
class: `cvi-call-surface absolute inset-0${E ? "" : " cvi-video-surface"}`,
|
|
28276
28303
|
ref: y,
|
|
28277
28304
|
children: [
|
|
28278
28305
|
/* @__PURE__ */ P("div", {
|
|
28279
28306
|
class: "relative w-full h-full z-[5]",
|
|
28280
28307
|
children: [
|
|
28281
28308
|
/* @__PURE__ */ P(RP, {
|
|
28282
|
-
isAudioOnly:
|
|
28283
|
-
presence:
|
|
28309
|
+
isAudioOnly: E,
|
|
28310
|
+
presence: ee,
|
|
28284
28311
|
canvasLayoutEffect: p,
|
|
28285
28312
|
canvasRenderedSlot: h
|
|
28286
28313
|
}),
|
|
28287
|
-
!
|
|
28314
|
+
!E && /* @__PURE__ */ P(IP, { canvasRenderedSlot: h }),
|
|
28288
28315
|
/* @__PURE__ */ P(ZN, {
|
|
28289
28316
|
debugEnabled: d,
|
|
28290
|
-
callPresence:
|
|
28317
|
+
callPresence: ee,
|
|
28291
28318
|
callControlsVisible: w,
|
|
28292
28319
|
callControlsRect: T,
|
|
28293
28320
|
gridConfigEnabled: _.magic_grid,
|
|
@@ -28320,8 +28347,8 @@ var kP = zt(null), AP = {
|
|
|
28320
28347
|
ref: b,
|
|
28321
28348
|
children: [
|
|
28322
28349
|
/* @__PURE__ */ P(M_, { level: !0 }),
|
|
28323
|
-
!
|
|
28324
|
-
|
|
28350
|
+
!E && /* @__PURE__ */ P(P_, {}),
|
|
28351
|
+
ie && /* @__PURE__ */ P(H_, {}),
|
|
28325
28352
|
/* @__PURE__ */ P(HP, { items: pe }),
|
|
28326
28353
|
/* @__PURE__ */ P("button", {
|
|
28327
28354
|
type: "button",
|