@8wave/ai-elements 0.102.0 → 0.103.0-beta.2

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.
Files changed (71) hide show
  1. package/dist/_chunks/{Agent-Cq-9OZHI.js → Agent-hWgZhu7L.js} +99 -100
  2. package/dist/_chunks/{Agent-Cq-9OZHI.js.map → Agent-hWgZhu7L.js.map} +1 -1
  3. package/dist/_chunks/{PkToolRequestGeolocation-hAaQJW-t.js → PkToolRequestGeolocation-T16QI-Uv.js} +2 -2
  4. package/dist/_chunks/{PkToolRequestGeolocation-hAaQJW-t.js.map → PkToolRequestGeolocation-T16QI-Uv.js.map} +1 -1
  5. package/dist/_chunks/PkToolRequestOAuthConnection-C8e5np2q.js +116 -0
  6. package/dist/_chunks/PkToolRequestOAuthConnection-C8e5np2q.js.map +1 -0
  7. package/dist/_chunks/{PkToolShowForm-CdUUAjPc.js → PkToolShowForm-ztQFyFd9.js} +2 -2
  8. package/dist/_chunks/{PkToolShowForm-CdUUAjPc.js.map → PkToolShowForm-ztQFyFd9.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowSuggestedReply-BvHgjMQ4.js → PkToolShowSuggestedReply-Dqe4gtEY.js} +2 -2
  10. package/dist/_chunks/{PkToolShowSuggestedReply-BvHgjMQ4.js.map → PkToolShowSuggestedReply-Dqe4gtEY.js.map} +1 -1
  11. package/dist/ai-elements.es.js +5987 -5995
  12. package/dist/ai-elements.es.js.map +1 -1
  13. package/dist-vue/PkChatbot.js +1 -1
  14. package/dist-vue/PkChatbotMessages.js +1 -1
  15. package/dist-vue/PkChatbotViewChat.js +1 -1
  16. package/dist-vue/PkChatbotViewConversations.js +1 -1
  17. package/dist-vue/PkChatbotViewFiles.js +1 -1
  18. package/dist-vue/PkChatbotViewProfile.js +1 -1
  19. package/dist-vue/_chunks/{Agent-Cy-XE9N1.js → Agent-CGp48ayw.js} +62 -63
  20. package/dist-vue/_chunks/{Agent-Cy-XE9N1.js.map → Agent-CGp48ayw.js.map} +1 -1
  21. package/dist-vue/_chunks/{Document-B6xVkCfQ.js → Document-CjfNDh6w.js} +15 -15
  22. package/dist-vue/_chunks/{Document-B6xVkCfQ.js.map → Document-CjfNDh6w.js.map} +1 -1
  23. package/dist-vue/_chunks/{PkChatbot-CHe6t-LR.js → PkChatbot-C4SPneVX.js} +6 -6
  24. package/dist-vue/_chunks/{PkChatbot-CHe6t-LR.js.map → PkChatbot-C4SPneVX.js.map} +1 -1
  25. package/dist-vue/_chunks/PkChatbotMessages-BgsyN-mB.js +771 -0
  26. package/dist-vue/_chunks/PkChatbotMessages-BgsyN-mB.js.map +1 -0
  27. package/dist-vue/_chunks/{PkChatbotViewChat-DeeGCFJf.js → PkChatbotViewChat-BMr1DpNY.js} +912 -898
  28. package/dist-vue/_chunks/PkChatbotViewChat-BMr1DpNY.js.map +1 -0
  29. package/dist-vue/_chunks/{PkChatbotViewConversations-DXwqumyn.js → PkChatbotViewConversations-p72SEhU-.js} +2 -2
  30. package/dist-vue/_chunks/{PkChatbotViewConversations-DXwqumyn.js.map → PkChatbotViewConversations-p72SEhU-.js.map} +1 -1
  31. package/dist-vue/_chunks/{PkChatbotViewFiles-B4u87oH6.js → PkChatbotViewFiles-C2PUVFV2.js} +3 -3
  32. package/dist-vue/_chunks/{PkChatbotViewFiles-B4u87oH6.js.map → PkChatbotViewFiles-C2PUVFV2.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkChatbotViewProfile-C_A0AP8x.js → PkChatbotViewProfile-BqWLlla-.js} +2 -2
  34. package/dist-vue/_chunks/{PkChatbotViewProfile-C_A0AP8x.js.map → PkChatbotViewProfile-BqWLlla-.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkToolRequestGeolocation-CaHo_418.js → PkToolRequestGeolocation-CsQghLEb.js} +2 -2
  36. package/dist-vue/_chunks/{PkToolRequestGeolocation-CaHo_418.js.map → PkToolRequestGeolocation-CsQghLEb.js.map} +1 -1
  37. package/dist-vue/_chunks/PkToolRequestOAuthConnection-D5Jq6UZh.js +116 -0
  38. package/dist-vue/_chunks/PkToolRequestOAuthConnection-D5Jq6UZh.js.map +1 -0
  39. package/dist-vue/_chunks/{PkToolShowDiagram-CuQyY0uv.js → PkToolShowDiagram-DoklcF3f.js} +2 -2
  40. package/dist-vue/_chunks/{PkToolShowDiagram-CuQyY0uv.js.map → PkToolShowDiagram-DoklcF3f.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkToolShowForm-vXgu3bZO.js → PkToolShowForm-CpY1KKUt.js} +2 -2
  42. package/dist-vue/_chunks/{PkToolShowForm-vXgu3bZO.js.map → PkToolShowForm-CpY1KKUt.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkToolShowSources-Die_j1bn.js → PkToolShowSources-CLsbqcDd.js} +2 -2
  44. package/dist-vue/_chunks/{PkToolShowSources-Die_j1bn.js.map → PkToolShowSources-CLsbqcDd.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkToolShowSuggestedReply-CryAdy6t.js → PkToolShowSuggestedReply-B-QwwART.js} +2 -2
  46. package/dist-vue/_chunks/{PkToolShowSuggestedReply-CryAdy6t.js.map → PkToolShowSuggestedReply-B-QwwART.js.map} +1 -1
  47. package/dist-vue/_chunks/{createChatbotApiClient-CoTSUkuj.js → createChatbotApiClient-nOLu9GAQ.js} +32 -28
  48. package/dist-vue/_chunks/{createChatbotApiClient-CoTSUkuj.js.map → createChatbotApiClient-nOLu9GAQ.js.map} +1 -1
  49. package/dist-vue/_chunks/{useChatbotStore-BcLvyaIV.js → useChatbotStore-DhWHlZwO.js} +756 -783
  50. package/dist-vue/_chunks/{useChatbotStore-BcLvyaIV.js.map → useChatbotStore-DhWHlZwO.js.map} +1 -1
  51. package/dist-vue/api.js +1 -1
  52. package/dist-vue/composables.js +2 -2
  53. package/dist-vue/index.js +304 -304
  54. package/dist-vue/index.js.map +1 -1
  55. package/dist-vue/locales.js +6 -2
  56. package/dist-vue/packages/components/src/chat/PkToolRequestOAuthConnection.d.ts +4 -0
  57. package/dist-vue/packages/components/src/chat/useVoiceSession.d.ts +0 -7
  58. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +4 -0
  59. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +6 -14
  60. package/dist-vue/packages/models/src/schema/Agent.d.ts +12 -5
  61. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -2
  62. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -2
  63. package/dist-vue/style.css +1 -1
  64. package/package.json +1 -1
  65. package/dist/_chunks/PkToolRequestOAuthConnection-Bf_zoT2r.js +0 -73
  66. package/dist/_chunks/PkToolRequestOAuthConnection-Bf_zoT2r.js.map +0 -1
  67. package/dist-vue/_chunks/PkChatbotMessages-CWPSx2ce.js +0 -770
  68. package/dist-vue/_chunks/PkChatbotMessages-CWPSx2ce.js.map +0 -1
  69. package/dist-vue/_chunks/PkChatbotViewChat-DeeGCFJf.js.map +0 -1
  70. package/dist-vue/_chunks/PkToolRequestOAuthConnection-URjYDFhm.js +0 -73
  71. package/dist-vue/_chunks/PkToolRequestOAuthConnection-URjYDFhm.js.map +0 -1
@@ -1,44 +1,44 @@
1
- import { n as e, o as t, r as n, t as r } from "./useChatbotStore-BcLvyaIV.js";
2
- import { t as i } from "./src-BbpxM17m.js";
3
- import { t as a } from "./PkChatbotMessages-CWPSx2ce.js";
4
- import { t as o } from "./useLocalizedString-PfaKjIQY.js";
5
- import { t as s } from "./PkAvatar-paEJByEA.js";
6
- import { r as c } from "./utils-CgxndZld.js";
7
- import { n as l, t as u } from "./PkChatbotInput-CpSSAW2z.js";
8
- import { t as d } from "./PkChatbotEmptyState-Brs9qhwj.js";
9
- import { VvIcon as f } from "@volverjs/ui-vue/components";
10
- import { Fragment as p, Transition as ee, computed as m, createBlock as h, createCommentVNode as te, createElementBlock as g, createElementVNode as ne, createSlots as re, createTextVNode as ie, createVNode as _, defineAsyncComponent as ae, defineComponent as oe, isRef as se, nextTick as ce, normalizeClass as le, onBeforeUnmount as ue, onMounted as de, onScopeDispose as fe, onUnmounted as pe, openBlock as v, ref as me, renderList as he, shallowRef as ge, toDisplayString as _e, toValue as ve, unref as y, useTemplateRef as ye, watch as be, withCtx as xe } from "vue";
11
- import { useI18n as Se } from "vue-i18n";
12
- import { useDropZone as Ce } from "@vueuse/core";
13
- import { storeToRefs as we } from "pinia";
1
+ import { a as e, n as t, t as n } from "./useChatbotStore-DhWHlZwO.js";
2
+ import { t as r } from "./src-BbpxM17m.js";
3
+ import { t as i } from "./PkChatbotMessages-BgsyN-mB.js";
4
+ import { t as a } from "./useLocalizedString-PfaKjIQY.js";
5
+ import { t as o } from "./PkAvatar-paEJByEA.js";
6
+ import { r as s } from "./utils-CgxndZld.js";
7
+ import { n as c, t as l } from "./PkChatbotInput-CpSSAW2z.js";
8
+ import { t as u } from "./PkChatbotEmptyState-Brs9qhwj.js";
9
+ import { VvIcon as d } from "@volverjs/ui-vue/components";
10
+ import { Fragment as f, Transition as p, computed as m, createBlock as ee, createCommentVNode as h, createElementBlock as g, createElementVNode as te, createSlots as ne, createTextVNode as re, createVNode as _, defineAsyncComponent as ie, defineComponent as ae, isRef as oe, nextTick as se, normalizeClass as ce, onBeforeUnmount as le, onMounted as ue, onScopeDispose as de, onUnmounted as fe, openBlock as v, ref as pe, renderList as me, shallowRef as he, toDisplayString as ge, toValue as _e, unref as y, useTemplateRef as ve, watch as ye, withCtx as be } from "vue";
11
+ import { useI18n as xe } from "vue-i18n";
12
+ import { useDropZone as Se } from "@vueuse/core";
13
+ import { storeToRefs as Ce } from "pinia";
14
14
  //#region ../../packages/composable/src/chatbot/useGreeting.ts
15
- function Te(e, t) {
16
- let { locale: n, t: r, te: i } = Se({ useScope: "global" });
15
+ function we(e, t) {
16
+ let { locale: n, t: r, te: i } = xe({ useScope: "global" });
17
17
  return m(() => {
18
- let a = ve(e);
19
- return Ee(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), ve(t));
18
+ let a = _e(e);
19
+ return Te(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), _e(t));
20
20
  });
21
21
  }
22
- function Ee(e, t) {
22
+ function Te(e, t) {
23
23
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
24
24
  }
25
25
  //#endregion
26
26
  //#region ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
27
- var De = {
27
+ var Ee = {
28
28
  class: "pk-aurora",
29
29
  "aria-hidden": "true"
30
- }, Oe = {
30
+ }, De = {
31
31
  key: 1,
32
32
  class: "pk-aurora__fallback"
33
- }, ke = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Ae = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", je = /* @__PURE__ */ oe({
33
+ }, Oe = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", ke = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", Ae = /* @__PURE__ */ ae({
34
34
  __name: "PkAuroraCanvas",
35
35
  props: { sourceSelector: {} },
36
36
  setup(e) {
37
- let t = e, n = ye("canvasEl"), r = me(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
37
+ let t = e, n = ve("canvasEl"), r = pe(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
38
38
  if (!i) return null;
39
39
  let n = i.createShader(e);
40
40
  return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
41
- }, ee = () => {
41
+ }, m = () => {
42
42
  if (!n.value) return null;
43
43
  let e = getComputedStyle(n.value).color.match(/rgba?\(([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/);
44
44
  return e ? [
@@ -46,7 +46,7 @@ var De = {
46
46
  Number(e[2]) / 255,
47
47
  Number(e[3]) / 255
48
48
  ] : null;
49
- }, m = () => {
49
+ }, ee = () => {
50
50
  if (!i || !n.value) return;
51
51
  let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: r, clientHeight: a } = n.value;
52
52
  n.value.width = Math.max(1, Math.round(r * e)), n.value.height = Math.max(1, Math.round(a * e)), i.viewport(0, 0, n.value.width, n.value.height);
@@ -63,15 +63,15 @@ var De = {
63
63
  }, ne = () => {
64
64
  te(), a = requestAnimationFrame(ne);
65
65
  };
66
- return de(() => {
66
+ return ue(() => {
67
67
  let e = n.value;
68
68
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
69
- let t = ee();
69
+ let t = m();
70
70
  if (!e || !i || !t) {
71
71
  r.value = !0;
72
72
  return;
73
73
  }
74
- let a = p(i.VERTEX_SHADER, ke), f = p(i.FRAGMENT_SHADER, Ae), g = i.createProgram();
74
+ let a = p(i.VERTEX_SHADER, Oe), f = p(i.FRAGMENT_SHADER, ke), g = i.createProgram();
75
75
  if (!a || !f || !g) {
76
76
  r.value = !0;
77
77
  return;
@@ -92,27 +92,27 @@ var De = {
92
92
  1,
93
93
  1
94
94
  ]), i.STATIC_DRAW);
95
- let ie = i.getAttribLocation(g, "a_position");
96
- if (i.enableVertexAttribArray(ie), i.vertexAttribPointer(ie, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(g, "u_time"), c = i.getUniformLocation(g, "u_resolution"), l = i.getUniformLocation(g, "u_center"), u = i.getUniformLocation(g, "u_half"), d = i.getUniformLocation(g, "u_spread"), i.uniform3f(i.getUniformLocation(g, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ce(m), h()) {
95
+ let _ = i.getAttribLocation(g, "a_position");
96
+ if (i.enableVertexAttribArray(_), i.vertexAttribPointer(_, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(g, "u_time"), c = i.getUniformLocation(g, "u_resolution"), l = i.getUniformLocation(g, "u_center"), u = i.getUniformLocation(g, "u_half"), d = i.getUniformLocation(g, "u_spread"), i.uniform3f(i.getUniformLocation(g, "u_color"), ...t), o = new ResizeObserver(ee), o.observe(e), ee(), se(ee), h()) {
97
97
  te(10);
98
98
  return;
99
99
  }
100
100
  ne();
101
- }), ue(() => {
101
+ }), le(() => {
102
102
  cancelAnimationFrame(a), o?.disconnect();
103
- }), pe(() => {
103
+ }), fe(() => {
104
104
  let e = i;
105
105
  i = null, setTimeout(() => {
106
106
  e?.getExtension("WEBGL_lose_context")?.loseContext();
107
107
  }, 150);
108
- }), (e, t) => (v(), g("div", De, [r.value ? (v(), g("div", Oe)) : (v(), g("canvas", {
108
+ }), (e, t) => (v(), g("div", Ee, [r.value ? (v(), g("div", De)) : (v(), g("canvas", {
109
109
  key: 0,
110
110
  ref_key: "canvasEl",
111
111
  ref: n,
112
112
  class: "pk-aurora__canvas"
113
113
  }, null, 512))]));
114
114
  }
115
- }), Me = .18, Ne = .35, Pe = /* @__PURE__ */ oe({
115
+ }), je = .18, Me = .35, Ne = /* @__PURE__ */ ae({
116
116
  __name: "PkVoiceOrb",
117
117
  props: {
118
118
  sample: {},
@@ -124,20 +124,20 @@ var De = {
124
124
  bars: { default: 5 }
125
125
  },
126
126
  setup(e) {
127
- let t = e, n = ye("barsEl"), r = Array.from({ length: t.bars }, () => Me), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
127
+ let t = e, n = ve("barsEl"), r = Array.from({ length: t.bars }, () => je), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
128
128
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
129
129
  if (!n?.length) {
130
130
  let t = Date.now() / 260;
131
131
  return Array.from({ length: i }, (n, r) => {
132
132
  let i = .65 + .35 * Math.sin(t + r * .9);
133
- return Me + e * 2.4 * i;
133
+ return je + e * 2.4 * i;
134
134
  });
135
135
  }
136
136
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
137
137
  return Array.from({ length: i }, (e, t) => {
138
138
  let r = 0;
139
139
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
140
- return Me + r / o / 255 * 2.2;
140
+ return je + r / o / 255 * 2.2;
141
141
  });
142
142
  }, s = () => {
143
143
  let e = n.value?.children;
@@ -146,36 +146,40 @@ var De = {
146
146
  });
147
147
  }, c = () => {
148
148
  let e = o();
149
- r = r.map((t, n) => t + (Math.min(1, Math.max(Me, e[n] ?? Me)) - t) * Ne), s(), i = requestAnimationFrame(c);
149
+ r = r.map((t, n) => t + (Math.min(1, Math.max(je, e[n] ?? je)) - t) * Me), s(), i = requestAnimationFrame(c);
150
150
  }, l = () => {
151
151
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
152
152
  };
153
- return be(() => t.state, async (e) => {
153
+ return ye(() => t.state, async (e) => {
154
154
  if (e !== "listening" && e !== "speaking" || a()) {
155
- l(), r = r.map(() => Me * 1.6), await ce(), s();
155
+ l(), r = r.map(() => je * 1.6), await se(), s();
156
156
  return;
157
157
  }
158
158
  i === void 0 && (i = requestAnimationFrame(c));
159
- }, { immediate: !0 }), ue(l), (t, r) => (v(), g("div", {
160
- class: le(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
159
+ }, { immediate: !0 }), le(l), (t, r) => (v(), g("div", {
160
+ class: ce(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
161
161
  "aria-hidden": "true"
162
- }, [ne("div", {
162
+ }, [te("div", {
163
163
  ref_key: "barsEl",
164
164
  ref: n,
165
165
  class: "pk-voice-orb__bars"
166
- }, [(v(!0), g(p, null, he(e.bars, (e) => (v(), g("span", {
166
+ }, [(v(!0), g(f, null, me(e.bars, (e) => (v(), g("span", {
167
167
  key: e,
168
168
  class: "pk-voice-orb__bar"
169
169
  }))), 128))], 512)], 2));
170
170
  }
171
- }), Fe = {
171
+ }), Pe = {
172
+ key: 0,
173
+ class: "pk-voice-session__badge",
174
+ "aria-hidden": "true"
175
+ }, Fe = {
172
176
  class: "pk-voice-session__status",
173
177
  role: "status"
174
178
  }, Ie = {
175
179
  key: 0,
176
180
  class: "pk-voice-session__live-dot",
177
181
  "aria-hidden": "true"
178
- }, Le = ["title"], Re = ["title"], ze = { class: "pk-voice-session__actions" }, Be = /* @__PURE__ */ oe({
182
+ }, Le = ["title"], Re = ["title"], ze = { class: "pk-voice-session__actions" }, Be = /* @__PURE__ */ ae({
179
183
  __name: "PkVoiceSession",
180
184
  props: {
181
185
  state: {},
@@ -194,69 +198,73 @@ var De = {
194
198
  "dismiss"
195
199
  ],
196
200
  setup(e, { emit: t }) {
197
- let n = e, r = t, { t: i } = Se({ useScope: "global" }), a = m(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = m(() => {
201
+ let n = e, r = t, { t: i } = xe({ useScope: "global" }), a = m(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = m(() => {
198
202
  if (n.remainingSeconds === void 0) return;
199
203
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
200
204
  return `${e}:${String(t).padStart(2, "0")}`;
201
- }), s = m(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = m(() => !n.error && (n.state === "listening" || n.state === "speaking")), u = m(() => {
202
- if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
203
- });
204
- return (t, n) => (v(), g("div", { class: le(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
205
- _(Pe, {
206
- state: e.error ? "error" : e.state,
207
- sample: e.sample,
208
- spectrum: e.spectrum
209
- }, null, 8, [
210
- "state",
211
- "sample",
212
- "spectrum"
213
- ]),
214
- ne("div", Fe, [ne("span", { class: le(["pk-voice-session__state", u.value && `pk-voice-session__state--${u.value}`]) }, [c.value ? (v(), g("span", Ie)) : te("", !0), ie(" " + _e(a.value), 1)], 2), e.error ? (v(), g("p", {
215
- key: 0,
216
- class: "pk-voice-session__detail",
217
- title: e.rawError ?? e.error
218
- }, _e(e.error), 9, Le)) : te("", !0)]),
219
- o.value ? (v(), g("span", {
220
- key: 0,
221
- class: le(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
222
- title: y(i)("hint.voiceRemaining"),
223
- "aria-hidden": "true"
224
- }, _e(o.value), 11, Re)) : te("", !0),
225
- ne("div", ze, [e.error ? (v(), g(p, { key: 0 }, [_(l, {
226
- icon: "ri:refresh-line",
227
- label: y(i)("action.retry"),
228
- onClick: n[0] ||= (e) => r("retry")
229
- }, null, 8, ["label"]), e.live ? (v(), h(l, {
230
- key: 0,
231
- icon: "ri:stop-circle-line",
232
- modifiers: "danger",
233
- title: y(i)("action.hangUp"),
234
- "aria-label": y(i)("action.hangUp"),
235
- onClick: n[1] ||= (e) => r("hang-up")
236
- }, null, 8, ["title", "aria-label"])) : (v(), h(l, {
237
- key: 1,
238
- icon: "ri:close-line",
239
- label: y(i)("action.close"),
240
- onClick: n[2] ||= (e) => r("dismiss")
241
- }, null, 8, ["label"]))], 64)) : (v(), g(p, { key: 1 }, [_(l, {
242
- icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
243
- title: e.muted ? y(i)("action.unmute") : y(i)("action.mute"),
244
- "aria-label": e.muted ? y(i)("action.unmute") : y(i)("action.mute"),
245
- "aria-pressed": e.muted,
246
- onClick: n[3] ||= (e) => r("toggle-mute")
247
- }, null, 8, [
248
- "icon",
249
- "title",
250
- "aria-label",
251
- "aria-pressed"
252
- ]), _(l, {
253
- icon: "ri:stop-circle-line",
254
- modifiers: "danger",
255
- title: y(i)("action.hangUp"),
256
- "aria-label": y(i)("action.hangUp"),
257
- onClick: n[4] ||= (e) => r("hang-up")
258
- }, null, 8, ["title", "aria-label"])], 64))])
259
- ], 2));
205
+ }), s = m(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), l = m(() => !n.error && (n.state === "listening" || n.state === "speaking")), u = m(() => {
206
+ if (l.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
207
+ });
208
+ return (t, n) => {
209
+ let p = d;
210
+ return v(), g("div", { class: ce(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
211
+ e.error ? (v(), g("span", Pe, [_(p, { name: "ri:error-warning-line" })])) : (v(), ee(Ne, {
212
+ key: 1,
213
+ state: e.state,
214
+ sample: e.sample,
215
+ spectrum: e.spectrum
216
+ }, null, 8, [
217
+ "state",
218
+ "sample",
219
+ "spectrum"
220
+ ])),
221
+ te("div", Fe, [te("span", { class: ce(["pk-voice-session__state", u.value && `pk-voice-session__state--${u.value}`]) }, [l.value ? (v(), g("span", Ie)) : h("", !0), re(" " + ge(a.value), 1)], 2), e.error ? (v(), g("p", {
222
+ key: 0,
223
+ class: "pk-voice-session__detail",
224
+ title: e.rawError ?? e.error
225
+ }, ge(e.error), 9, Le)) : h("", !0)]),
226
+ o.value ? (v(), g("span", {
227
+ key: 2,
228
+ class: ce(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
229
+ title: y(i)("hint.voiceRemaining"),
230
+ "aria-hidden": "true"
231
+ }, ge(o.value), 11, Re)) : h("", !0),
232
+ te("div", ze, [e.error ? (v(), g(f, { key: 0 }, [_(c, {
233
+ icon: "ri:refresh-line",
234
+ label: y(i)("action.retry"),
235
+ onClick: n[0] ||= (e) => r("retry")
236
+ }, null, 8, ["label"]), e.live ? (v(), ee(c, {
237
+ key: 0,
238
+ icon: "ri:stop-circle-line",
239
+ modifiers: "danger",
240
+ title: y(i)("action.hangUp"),
241
+ "aria-label": y(i)("action.hangUp"),
242
+ onClick: n[1] ||= (e) => r("hang-up")
243
+ }, null, 8, ["title", "aria-label"])) : (v(), ee(c, {
244
+ key: 1,
245
+ icon: "ri:close-line",
246
+ label: y(i)("action.close"),
247
+ onClick: n[2] ||= (e) => r("dismiss")
248
+ }, null, 8, ["label"]))], 64)) : (v(), g(f, { key: 1 }, [_(c, {
249
+ icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
250
+ title: e.muted ? y(i)("action.unmute") : y(i)("action.mute"),
251
+ "aria-label": e.muted ? y(i)("action.unmute") : y(i)("action.mute"),
252
+ "aria-pressed": e.muted,
253
+ onClick: n[3] ||= (e) => r("toggle-mute")
254
+ }, null, 8, [
255
+ "icon",
256
+ "title",
257
+ "aria-label",
258
+ "aria-pressed"
259
+ ]), _(c, {
260
+ icon: "ri:stop-circle-line",
261
+ modifiers: "danger",
262
+ title: y(i)("action.hangUp"),
263
+ "aria-label": y(i)("action.hangUp"),
264
+ onClick: n[4] ||= (e) => r("hang-up")
265
+ }, null, 8, ["title", "aria-label"])], 64))])
266
+ ], 2);
267
+ };
260
268
  }
261
269
  }), Ve = class {
262
270
  queue = [];
@@ -709,23 +717,23 @@ function jt(e, t) {
709
717
  default: return t == 0;
710
718
  }
711
719
  }
712
- function Mt(e, t) {
720
+ function w(e, t) {
713
721
  (t == null || t > e.length) && (t = e.length);
714
722
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
715
723
  return r;
716
724
  }
717
- function Nt(e) {
725
+ function Mt(e) {
718
726
  if (Array.isArray(e)) return e;
719
727
  }
720
- function w(e, t, n) {
721
- return (t = Lt(t)) in e ? Object.defineProperty(e, t, {
728
+ function T(e, t, n) {
729
+ return (t = It(t)) in e ? Object.defineProperty(e, t, {
722
730
  value: n,
723
731
  enumerable: !0,
724
732
  configurable: !0,
725
733
  writable: !0
726
734
  }) : e[t] = n, e;
727
735
  }
728
- function Pt(e, t) {
736
+ function Nt(e, t) {
729
737
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
730
738
  if (n != null) {
731
739
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -746,13 +754,13 @@ function Pt(e, t) {
746
754
  return s;
747
755
  }
748
756
  }
749
- function Ft() {
757
+ function Pt() {
750
758
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
751
759
  }
752
- function T(e, t) {
753
- return Nt(e) || Pt(e, t) || Rt(e, t) || Ft();
760
+ function E(e, t) {
761
+ return Mt(e) || Nt(e, t) || Lt(e, t) || Pt();
754
762
  }
755
- function It(e, t) {
763
+ function Ft(e, t) {
756
764
  if (typeof e != "object" || !e) return e;
757
765
  var n = e[Symbol.toPrimitive];
758
766
  if (n !== void 0) {
@@ -762,22 +770,22 @@ function It(e, t) {
762
770
  }
763
771
  return (t === "string" ? String : Number)(e);
764
772
  }
765
- function Lt(e) {
766
- var t = It(e, "string");
773
+ function It(e) {
774
+ var t = Ft(e, "string");
767
775
  return typeof t == "symbol" ? t : t + "";
768
776
  }
769
- function Rt(e, t) {
777
+ function Lt(e, t) {
770
778
  if (e) {
771
- if (typeof e == "string") return Mt(e, t);
779
+ if (typeof e == "string") return w(e, t);
772
780
  var n = {}.toString.call(e).slice(8, -1);
773
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Mt(e, t) : void 0;
781
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? w(e, t) : void 0;
774
782
  }
775
783
  }
776
- var E;
784
+ var D;
777
785
  (function(e) {
778
786
  e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
779
- })(E ||= {});
780
- var zt = class {
787
+ })(D ||= {});
788
+ var Rt = class {
781
789
  constructor(e) {
782
790
  this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
783
791
  }
@@ -865,7 +873,7 @@ var zt = class {
865
873
  let t = S.uEnc(e);
866
874
  return gt(t.lo, t.hi, this.buf), this;
867
875
  }
868
- }, Bt = class {
876
+ }, zt = class {
869
877
  constructor(e, t) {
870
878
  this.varint64 = ht, this.uint32 = Et, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder();
871
879
  }
@@ -877,21 +885,21 @@ var zt = class {
877
885
  skip(e, t) {
878
886
  let n = this.pos;
879
887
  switch (e) {
880
- case E.Varint:
888
+ case D.Varint:
881
889
  for (; this.buf[this.pos++] & 128;);
882
890
  break;
883
- case E.Bit64: this.pos += 4;
884
- case E.Bit32:
891
+ case D.Bit64: this.pos += 4;
892
+ case D.Bit32:
885
893
  this.pos += 4;
886
894
  break;
887
- case E.LengthDelimited:
895
+ case D.LengthDelimited:
888
896
  let n = this.uint32();
889
897
  this.pos += n;
890
898
  break;
891
- case E.StartGroup:
899
+ case D.StartGroup:
892
900
  for (;;) {
893
- let e = T(this.tag(), 2), n = e[0], r = e[1];
894
- if (r === E.EndGroup) {
901
+ let e = E(this.tag(), 2), n = e[0], r = e[1];
902
+ if (r === D.EndGroup) {
895
903
  if (t !== void 0 && n !== t) throw Error("invalid end group tag");
896
904
  break;
897
905
  }
@@ -919,11 +927,11 @@ var zt = class {
919
927
  return S.uDec(...this.varint64());
920
928
  }
921
929
  sint64() {
922
- let e = T(this.varint64(), 2), t = e[0], n = e[1], r = -(t & 1);
930
+ let e = E(this.varint64(), 2), t = e[0], n = e[1], r = -(t & 1);
923
931
  return t = (t >>> 1 | (n & 1) << 31) ^ r, n = n >>> 1 ^ r, S.dec(t, n);
924
932
  }
925
933
  bool() {
926
- let e = T(this.varint64(), 2), t = e[0], n = e[1];
934
+ let e = E(this.varint64(), 2), t = e[0], n = e[1];
927
935
  return t !== 0 || n !== 0;
928
936
  }
929
937
  fixed32() {
@@ -952,7 +960,7 @@ var zt = class {
952
960
  return this.textDecoder.decode(this.bytes());
953
961
  }
954
962
  };
955
- function Vt(e, t, n, r) {
963
+ function Bt(e, t, n, r) {
956
964
  let i;
957
965
  return {
958
966
  typeName: t,
@@ -967,11 +975,11 @@ function Vt(e, t, n, r) {
967
975
  runtime: e
968
976
  };
969
977
  }
970
- function Ht(e) {
978
+ function Vt(e) {
971
979
  let t = e.field.localName, n = Object.create(null);
972
- return n[t] = Ut(e), [n, () => n[t]];
980
+ return n[t] = Ht(e), [n, () => n[t]];
973
981
  }
974
- function Ut(e) {
982
+ function Ht(e) {
975
983
  let t = e.field;
976
984
  if (t.repeated) return [];
977
985
  if (t.default !== void 0) return t.default;
@@ -984,23 +992,23 @@ function Ut(e) {
984
992
  case "map": throw "map fields are not allowed to be extensions";
985
993
  }
986
994
  }
987
- function Wt(e, t) {
995
+ function Ut(e, t) {
988
996
  if (!t.repeated && (t.kind == "enum" || t.kind == "scalar")) {
989
997
  for (let n = e.length - 1; n >= 0; --n) if (e[n].no == t.no) return [e[n]];
990
998
  return [];
991
999
  }
992
1000
  return e.filter((e) => e.no === t.no);
993
1001
  }
994
- var Gt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Kt = [];
995
- for (let e = 0; e < Gt.length; e++) Kt[Gt[e].charCodeAt(0)] = e;
996
- Kt[45] = Gt.indexOf("+"), Kt[95] = Gt.indexOf("/");
997
- var qt = {
1002
+ var Wt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Gt = [];
1003
+ for (let e = 0; e < Wt.length; e++) Gt[Wt[e].charCodeAt(0)] = e;
1004
+ Gt[45] = Wt.indexOf("+"), Gt[95] = Wt.indexOf("/");
1005
+ var Kt = {
998
1006
  dec(e) {
999
1007
  let t = e.length * 3 / 4;
1000
1008
  e[e.length - 2] == "=" ? t -= 2 : e[e.length - 1] == "=" && --t;
1001
1009
  let n = new Uint8Array(t), r = 0, i = 0, a, o = 0;
1002
1010
  for (let t = 0; t < e.length; t++) {
1003
- if (a = Kt[e.charCodeAt(t)], a === void 0) switch (e[t]) {
1011
+ if (a = Gt[e.charCodeAt(t)], a === void 0) switch (e[t]) {
1004
1012
  case "=": i = 0;
1005
1013
  case "\n":
1006
1014
  case "\r":
@@ -1028,26 +1036,26 @@ var qt = {
1028
1036
  let t = "", n = 0, r, i = 0;
1029
1037
  for (let a = 0; a < e.length; a++) switch (r = e[a], n) {
1030
1038
  case 0:
1031
- t += Gt[r >> 2], i = (r & 3) << 4, n = 1;
1039
+ t += Wt[r >> 2], i = (r & 3) << 4, n = 1;
1032
1040
  break;
1033
1041
  case 1:
1034
- t += Gt[i | r >> 4], i = (r & 15) << 2, n = 2;
1042
+ t += Wt[i | r >> 4], i = (r & 15) << 2, n = 2;
1035
1043
  break;
1036
- case 2: t += Gt[i | r >> 6], t += Gt[r & 63], n = 0;
1044
+ case 2: t += Wt[i | r >> 6], t += Wt[r & 63], n = 0;
1037
1045
  }
1038
- return n && (t += Gt[i], t += "=", n == 1 && (t += "=")), t;
1046
+ return n && (t += Wt[i], t += "=", n == 1 && (t += "=")), t;
1039
1047
  }
1040
1048
  };
1041
- function Jt(e, t, n) {
1042
- Zt(t, e);
1043
- let r = t.runtime.bin.makeReadOptions(n), i = Wt(e.getType().runtime.bin.listUnknownFields(e), t.field), a = T(Ht(t), 2), o = a[0], s = a[1];
1049
+ function qt(e, t, n) {
1050
+ Xt(t, e);
1051
+ let r = t.runtime.bin.makeReadOptions(n), i = Ut(e.getType().runtime.bin.listUnknownFields(e), t.field), a = E(Vt(t), 2), o = a[0], s = a[1];
1044
1052
  for (let e of i) t.runtime.bin.readField(o, r.readerFactory(e.data), t.field, e.wireType, r);
1045
1053
  return s();
1046
1054
  }
1047
- function Yt(e, t, n, r) {
1048
- Zt(t, e);
1055
+ function Jt(e, t, n, r) {
1056
+ Xt(t, e);
1049
1057
  let i = t.runtime.bin.makeReadOptions(r), a = t.runtime.bin.makeWriteOptions(r);
1050
- if (Xt(e, t)) {
1058
+ if (Yt(e, t)) {
1051
1059
  let n = e.getType().runtime.bin.listUnknownFields(e).filter((e) => e.no != t.field.no);
1052
1060
  e.getType().runtime.bin.discardUnknownFields(e);
1053
1061
  for (let t of n) e.getType().runtime.bin.onUnknownField(e, t.no, t.wireType, t.data);
@@ -1056,18 +1064,18 @@ function Yt(e, t, n, r) {
1056
1064
  !s.opt && !s.repeated && (s.kind == "enum" || s.kind == "scalar") && (s = Object.assign(Object.assign({}, t.field), { opt: !0 })), t.runtime.bin.writeField(s, n, o, a);
1057
1065
  let c = i.readerFactory(o.finish());
1058
1066
  for (; c.pos < c.len;) {
1059
- let t = T(c.tag(), 2), n = t[0], r = t[1], i = c.skip(r, n);
1067
+ let t = E(c.tag(), 2), n = t[0], r = t[1], i = c.skip(r, n);
1060
1068
  e.getType().runtime.bin.onUnknownField(e, n, r, i);
1061
1069
  }
1062
1070
  }
1063
- function Xt(e, t) {
1071
+ function Yt(e, t) {
1064
1072
  let n = e.getType();
1065
1073
  return t.extendee.typeName === n.typeName && !!n.runtime.bin.listUnknownFields(e).find((e) => e.no == t.field.no);
1066
1074
  }
1067
- function Zt(e, t) {
1075
+ function Xt(e, t) {
1068
1076
  x(e.extendee.typeName == t.getType().typeName, `extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`);
1069
1077
  }
1070
- function Qt(e, t) {
1078
+ function Zt(e, t) {
1071
1079
  let n = e.localName;
1072
1080
  if (e.repeated) return t[n].length > 0;
1073
1081
  if (e.oneof) return t[e.oneof.localName].case === n;
@@ -1078,7 +1086,7 @@ function Qt(e, t) {
1078
1086
  case "map": return Object.keys(t[n]).length > 0;
1079
1087
  }
1080
1088
  }
1081
- function $t(e, t) {
1089
+ function Qt(e, t) {
1082
1090
  let n = e.localName, r = !e.opt && !e.req;
1083
1091
  if (e.repeated) t[n] = [];
1084
1092
  else if (e.oneof) t[e.oneof.localName] = { case: void 0 };
@@ -1095,38 +1103,38 @@ function $t(e, t) {
1095
1103
  case "message": t[n] = void 0;
1096
1104
  }
1097
1105
  }
1098
- function en(e, t) {
1106
+ function $t(e, t) {
1099
1107
  if (typeof e != "object" || !e || !Object.getOwnPropertyNames(pt.prototype).every((t) => t in e && typeof e[t] == "function")) return !1;
1100
1108
  let n = e.getType();
1101
1109
  return n === null || typeof n != "function" || !("typeName" in n) || typeof n.typeName != "string" ? !1 : t === void 0 || n.typeName == t.typeName;
1102
1110
  }
1103
- function tn(e, t) {
1104
- return en(t) || !e.fieldWrapper ? t : e.fieldWrapper.wrapField(t);
1111
+ function en(e, t) {
1112
+ return $t(t) || !e.fieldWrapper ? t : e.fieldWrapper.wrapField(t);
1105
1113
  }
1106
1114
  C.DOUBLE, C.FLOAT, C.INT64, C.UINT64, C.INT32, C.UINT32, C.BOOL, C.STRING, C.BYTES;
1107
- var nn = { ignoreUnknownFields: !1 }, rn = {
1115
+ var tn = { ignoreUnknownFields: !1 }, nn = {
1108
1116
  emitDefaultValues: !1,
1109
1117
  enumAsInteger: !1,
1110
1118
  useProtoFieldName: !1,
1111
1119
  prettySpaces: 0
1112
1120
  };
1121
+ function rn(e) {
1122
+ return e ? Object.assign(Object.assign({}, tn), e) : tn;
1123
+ }
1113
1124
  function an(e) {
1114
1125
  return e ? Object.assign(Object.assign({}, nn), e) : nn;
1115
1126
  }
1116
- function on(e) {
1117
- return e ? Object.assign(Object.assign({}, rn), e) : rn;
1118
- }
1119
- var sn = Symbol(), cn = Symbol();
1120
- function ln() {
1127
+ var on = Symbol(), sn = Symbol();
1128
+ function cn() {
1121
1129
  return {
1122
- makeReadOptions: an,
1123
- makeWriteOptions: on,
1130
+ makeReadOptions: rn,
1131
+ makeWriteOptions: an,
1124
1132
  readMessage(e, t, n, r) {
1125
- if (t == null || Array.isArray(t) || typeof t != "object") throw Error(`cannot decode message ${e.typeName} from JSON: ${un(t)}`);
1133
+ if (t == null || Array.isArray(t) || typeof t != "object") throw Error(`cannot decode message ${e.typeName} from JSON: ${ln(t)}`);
1126
1134
  r ??= new e();
1127
1135
  let i = /* @__PURE__ */ new Map(), a = n.typeRegistry;
1128
1136
  for (let s of Object.entries(t)) {
1129
- var o = T(s, 2);
1137
+ var o = E(s, 2);
1130
1138
  let t = o[0], c = o[1], l = e.fields.findJsonName(t);
1131
1139
  if (l) {
1132
1140
  if (l.oneof) {
@@ -1135,15 +1143,15 @@ function ln() {
1135
1143
  if (n !== void 0) throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${n}", "${t}"`);
1136
1144
  i.set(l.oneof, t);
1137
1145
  }
1138
- dn(r, c, l, n, e);
1146
+ un(r, c, l, n, e);
1139
1147
  } else {
1140
1148
  let i = !1;
1141
1149
  if (a?.findExtension && t.startsWith("[") && t.endsWith("]")) {
1142
1150
  let o = a.findExtension(t.substring(1, t.length - 1));
1143
1151
  if (o && o.extendee.typeName == e.typeName) {
1144
1152
  i = !0;
1145
- let e = T(Ht(o), 2), t = e[0], a = e[1];
1146
- dn(t, c, o.field, n, o), Yt(r, o, a(), n);
1153
+ let e = E(Vt(o), 2), t = e[0], a = e[1];
1154
+ un(t, c, o.field, n, o), Jt(r, o, a(), n);
1147
1155
  }
1148
1156
  }
1149
1157
  if (!i && !n.ignoreUnknownFields) throw Error(`cannot decode message ${e.typeName} from JSON: key "${t}" is unknown`);
@@ -1155,18 +1163,18 @@ function ln() {
1155
1163
  let n = e.getType(), r = {}, i;
1156
1164
  try {
1157
1165
  for (i of n.fields.byNumber()) {
1158
- if (!Qt(i, e)) {
1166
+ if (!Zt(i, e)) {
1159
1167
  if (i.req) throw "required field not set";
1160
- if (!t.emitDefaultValues || !hn(i)) continue;
1168
+ if (!t.emitDefaultValues || !mn(i)) continue;
1161
1169
  }
1162
- let n = i.oneof ? e[i.oneof.localName].value : e[i.localName], a = gn(i, n, t);
1170
+ let n = i.oneof ? e[i.oneof.localName].value : e[i.localName], a = hn(i, n, t);
1163
1171
  a !== void 0 && (r[t.useProtoFieldName ? i.name : i.jsonName] = a);
1164
1172
  }
1165
1173
  let a = t.typeRegistry;
1166
1174
  if (a?.findExtensionFor) for (let i of n.runtime.bin.listUnknownFields(e)) {
1167
1175
  let o = a.findExtensionFor(n.typeName, i.no);
1168
- if (o && Xt(e, o)) {
1169
- let n = Jt(e, o, t), i = gn(o.field, n, t);
1176
+ if (o && Yt(e, o)) {
1177
+ let n = qt(e, o, t), i = hn(o.field, n, t);
1170
1178
  i !== void 0 && (r[o.field.jsonName] = i);
1171
1179
  }
1172
1180
  }
@@ -1177,15 +1185,15 @@ function ln() {
1177
1185
  return r;
1178
1186
  },
1179
1187
  readScalar(e, t, n) {
1180
- return pn(e, t, n ?? Ot.BIGINT, !0);
1188
+ return fn(e, t, n ?? Ot.BIGINT, !0);
1181
1189
  },
1182
1190
  writeScalar(e, t, n) {
1183
- if (t !== void 0 && (n || jt(e, t))) return vn(e, t);
1191
+ if (t !== void 0 && (n || jt(e, t))) return _n(e, t);
1184
1192
  },
1185
- debug: un
1193
+ debug: ln
1186
1194
  };
1187
1195
  }
1188
- function un(e) {
1196
+ function ln(e) {
1189
1197
  if (e === null) return "null";
1190
1198
  switch (typeof e) {
1191
1199
  case "object": return Array.isArray(e) ? "array" : "object";
@@ -1193,43 +1201,43 @@ function un(e) {
1193
1201
  default: return String(e);
1194
1202
  }
1195
1203
  }
1196
- function dn(e, t, n, r, i) {
1204
+ function un(e, t, n, r, i) {
1197
1205
  let a = n.localName;
1198
1206
  if (n.repeated) {
1199
1207
  if (x(n.kind != "map"), t === null) return;
1200
- if (!Array.isArray(t)) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${un(t)}`);
1208
+ if (!Array.isArray(t)) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ln(t)}`);
1201
1209
  let o = e[a];
1202
1210
  for (let e of t) {
1203
- if (e === null) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${un(e)}`);
1211
+ if (e === null) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ln(e)}`);
1204
1212
  switch (n.kind) {
1205
1213
  case "message":
1206
1214
  o.push(n.T.fromJson(e, r));
1207
1215
  break;
1208
1216
  case "enum":
1209
- let t = mn(n.T, e, r.ignoreUnknownFields, !0);
1210
- t !== cn && o.push(t);
1217
+ let t = pn(n.T, e, r.ignoreUnknownFields, !0);
1218
+ t !== sn && o.push(t);
1211
1219
  break;
1212
1220
  case "scalar": try {
1213
- o.push(pn(n.T, e, n.L, !0));
1221
+ o.push(fn(n.T, e, n.L, !0));
1214
1222
  } catch (t) {
1215
- let r = `cannot decode field ${i.typeName}.${n.name} from JSON: ${un(e)}`;
1223
+ let r = `cannot decode field ${i.typeName}.${n.name} from JSON: ${ln(e)}`;
1216
1224
  throw t instanceof Error && t.message.length > 0 && (r += `: ${t.message}`), Error(r);
1217
1225
  }
1218
1226
  }
1219
1227
  }
1220
1228
  } else if (n.kind == "map") {
1221
1229
  if (t === null) return;
1222
- if (typeof t != "object" || Array.isArray(t)) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${un(t)}`);
1230
+ if (typeof t != "object" || Array.isArray(t)) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ln(t)}`);
1223
1231
  let s = e[a];
1224
1232
  for (let e of Object.entries(t)) {
1225
- var o = T(e, 2);
1233
+ var o = E(e, 2);
1226
1234
  let a = o[0], c = o[1];
1227
1235
  if (c === null) throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);
1228
1236
  let l;
1229
1237
  try {
1230
- l = fn(n.K, a);
1238
+ l = dn(n.K, a);
1231
1239
  } catch (e) {
1232
- let r = `cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${un(t)}`;
1240
+ let r = `cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${ln(t)}`;
1233
1241
  throw e instanceof Error && e.message.length > 0 && (r += `: ${e.message}`), Error(r);
1234
1242
  }
1235
1243
  switch (n.V.kind) {
@@ -1237,13 +1245,13 @@ function dn(e, t, n, r, i) {
1237
1245
  s[l] = n.V.T.fromJson(c, r);
1238
1246
  break;
1239
1247
  case "enum":
1240
- let e = mn(n.V.T, c, r.ignoreUnknownFields, !0);
1241
- e !== cn && (s[l] = e);
1248
+ let e = pn(n.V.T, c, r.ignoreUnknownFields, !0);
1249
+ e !== sn && (s[l] = e);
1242
1250
  break;
1243
1251
  case "scalar": try {
1244
- s[l] = pn(n.V.T, c, Ot.BIGINT, !0);
1252
+ s[l] = fn(n.V.T, c, Ot.BIGINT, !0);
1245
1253
  } catch (e) {
1246
- let r = `cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${un(t)}`;
1254
+ let r = `cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${ln(t)}`;
1247
1255
  throw e instanceof Error && e.message.length > 0 && (r += `: ${e.message}`), Error(r);
1248
1256
  }
1249
1257
  }
@@ -1253,43 +1261,43 @@ function dn(e, t, n, r, i) {
1253
1261
  let o = n.T;
1254
1262
  if (t === null && o.typeName != "google.protobuf.Value") return;
1255
1263
  let s = e[a];
1256
- en(s) ? s.fromJson(t, r) : (e[a] = s = o.fromJson(t, r), o.fieldWrapper && !n.oneof && (e[a] = o.fieldWrapper.unwrapField(s)));
1264
+ $t(s) ? s.fromJson(t, r) : (e[a] = s = o.fromJson(t, r), o.fieldWrapper && !n.oneof && (e[a] = o.fieldWrapper.unwrapField(s)));
1257
1265
  break;
1258
1266
  case "enum":
1259
- let c = mn(n.T, t, r.ignoreUnknownFields, !1);
1267
+ let c = pn(n.T, t, r.ignoreUnknownFields, !1);
1260
1268
  switch (c) {
1261
- case sn:
1262
- $t(n, e);
1269
+ case on:
1270
+ Qt(n, e);
1263
1271
  break;
1264
- case cn: break;
1272
+ case sn: break;
1265
1273
  default: e[a] = c;
1266
1274
  }
1267
1275
  break;
1268
1276
  case "scalar": try {
1269
- let r = pn(n.T, t, n.L, !1);
1277
+ let r = fn(n.T, t, n.L, !1);
1270
1278
  switch (r) {
1271
- case sn:
1272
- $t(n, e);
1279
+ case on:
1280
+ Qt(n, e);
1273
1281
  break;
1274
1282
  default: e[a] = r;
1275
1283
  }
1276
1284
  } catch (e) {
1277
- let r = `cannot decode field ${i.typeName}.${n.name} from JSON: ${un(t)}`;
1285
+ let r = `cannot decode field ${i.typeName}.${n.name} from JSON: ${ln(t)}`;
1278
1286
  throw e instanceof Error && e.message.length > 0 && (r += `: ${e.message}`), Error(r);
1279
1287
  }
1280
1288
  }
1281
1289
  }
1282
- function fn(e, t) {
1290
+ function dn(e, t) {
1283
1291
  if (e === C.BOOL) switch (t) {
1284
1292
  case "true":
1285
1293
  t = !0;
1286
1294
  break;
1287
1295
  case "false": t = !1;
1288
1296
  }
1289
- return pn(e, t, Ot.BIGINT, !0).toString();
1297
+ return fn(e, t, Ot.BIGINT, !0).toString();
1290
1298
  }
1291
- function pn(e, t, n, r) {
1292
- if (t === null) return r ? At(e, n) : sn;
1299
+ function fn(e, t, n, r) {
1300
+ if (t === null) return r ? At(e, n) : on;
1293
1301
  switch (e) {
1294
1302
  case C.DOUBLE:
1295
1303
  case C.FLOAT:
@@ -1328,12 +1336,12 @@ function pn(e, t, n, r) {
1328
1336
  case C.BYTES:
1329
1337
  if (t === "") return /* @__PURE__ */ new Uint8Array();
1330
1338
  if (typeof t != "string") break;
1331
- return qt.dec(t);
1339
+ return Kt.dec(t);
1332
1340
  }
1333
1341
  throw Error();
1334
1342
  }
1335
- function mn(e, t, n, r) {
1336
- if (t === null) return e.typeName == "google.protobuf.NullValue" ? 0 : r ? e.values[0].no : sn;
1343
+ function pn(e, t, n, r) {
1344
+ if (t === null) return e.typeName == "google.protobuf.NullValue" ? 0 : r ? e.values[0].no : on;
1337
1345
  switch (typeof t) {
1338
1346
  case "number":
1339
1347
  if (Number.isInteger(t)) return t;
@@ -1341,28 +1349,28 @@ function mn(e, t, n, r) {
1341
1349
  case "string":
1342
1350
  let r = e.findName(t);
1343
1351
  if (r !== void 0) return r.no;
1344
- if (n) return cn;
1352
+ if (n) return sn;
1345
1353
  }
1346
- throw Error(`cannot decode enum ${e.typeName} from JSON: ${un(t)}`);
1354
+ throw Error(`cannot decode enum ${e.typeName} from JSON: ${ln(t)}`);
1347
1355
  }
1348
- function hn(e) {
1356
+ function mn(e) {
1349
1357
  return e.repeated || e.kind == "map" ? !0 : !(e.oneof || e.kind == "message" || e.opt || e.req);
1350
1358
  }
1351
- function gn(e, t, n) {
1359
+ function hn(e, t, n) {
1352
1360
  if (e.kind == "map") {
1353
1361
  x(typeof t == "object" && !!t);
1354
1362
  let o = {}, s = Object.entries(t);
1355
1363
  switch (e.V.kind) {
1356
1364
  case "scalar":
1357
1365
  for (let t of s) {
1358
- var r = T(t, 2);
1366
+ var r = E(t, 2);
1359
1367
  let n = r[0], i = r[1];
1360
- o[n.toString()] = vn(e.V.T, i);
1368
+ o[n.toString()] = _n(e.V.T, i);
1361
1369
  }
1362
1370
  break;
1363
1371
  case "message":
1364
1372
  for (let e of s) {
1365
- var i = T(e, 2);
1373
+ var i = E(e, 2);
1366
1374
  let t = i[0], r = i[1];
1367
1375
  o[t.toString()] = r.toJson(n);
1368
1376
  }
@@ -1370,9 +1378,9 @@ function gn(e, t, n) {
1370
1378
  case "enum":
1371
1379
  let t = e.V.T;
1372
1380
  for (let e of s) {
1373
- var a = T(e, 2);
1381
+ var a = E(e, 2);
1374
1382
  let r = a[0], i = a[1];
1375
- o[r.toString()] = _n(t, i, n.enumAsInteger);
1383
+ o[r.toString()] = gn(t, i, n.enumAsInteger);
1376
1384
  }
1377
1385
  }
1378
1386
  return n.emitDefaultValues || s.length > 0 ? o : void 0;
@@ -1382,25 +1390,25 @@ function gn(e, t, n) {
1382
1390
  let r = [];
1383
1391
  switch (e.kind) {
1384
1392
  case "scalar":
1385
- for (let n = 0; n < t.length; n++) r.push(vn(e.T, t[n]));
1393
+ for (let n = 0; n < t.length; n++) r.push(_n(e.T, t[n]));
1386
1394
  break;
1387
1395
  case "enum":
1388
- for (let i = 0; i < t.length; i++) r.push(_n(e.T, t[i], n.enumAsInteger));
1396
+ for (let i = 0; i < t.length; i++) r.push(gn(e.T, t[i], n.enumAsInteger));
1389
1397
  break;
1390
1398
  case "message": for (let e = 0; e < t.length; e++) r.push(t[e].toJson(n));
1391
1399
  }
1392
1400
  return n.emitDefaultValues || r.length > 0 ? r : void 0;
1393
1401
  }
1394
1402
  switch (e.kind) {
1395
- case "scalar": return vn(e.T, t);
1396
- case "enum": return _n(e.T, t, n.enumAsInteger);
1397
- case "message": return tn(e.T, t).toJson(n);
1403
+ case "scalar": return _n(e.T, t);
1404
+ case "enum": return gn(e.T, t, n.enumAsInteger);
1405
+ case "message": return en(e.T, t).toJson(n);
1398
1406
  }
1399
1407
  }
1400
- function _n(e, t, n) {
1408
+ function gn(e, t, n) {
1401
1409
  return x(typeof t == "number"), e.typeName == "google.protobuf.NullValue" ? null : n ? t : e.findNumber(t)?.name ?? t;
1402
1410
  }
1403
- function vn(e, t) {
1411
+ function _n(e, t) {
1404
1412
  switch (e) {
1405
1413
  case C.INT32:
1406
1414
  case C.SFIXED32:
@@ -1416,39 +1424,39 @@ function vn(e, t) {
1416
1424
  case C.INT64:
1417
1425
  case C.SFIXED64:
1418
1426
  case C.SINT64: return x(typeof t == "bigint" || typeof t == "string" || typeof t == "number"), t.toString();
1419
- case C.BYTES: return x(t instanceof Uint8Array), qt.enc(t);
1427
+ case C.BYTES: return x(t instanceof Uint8Array), Kt.enc(t);
1420
1428
  }
1421
1429
  }
1422
- var yn = Symbol("@bufbuild/protobuf/unknown-fields"), bn = {
1430
+ var vn = Symbol("@bufbuild/protobuf/unknown-fields"), yn = {
1423
1431
  readUnknownFields: !0,
1424
- readerFactory: (e) => new Bt(e)
1425
- }, xn = {
1432
+ readerFactory: (e) => new zt(e)
1433
+ }, bn = {
1426
1434
  writeUnknownFields: !0,
1427
- writerFactory: () => new zt()
1435
+ writerFactory: () => new Rt()
1428
1436
  };
1437
+ function xn(e) {
1438
+ return e ? Object.assign(Object.assign({}, yn), e) : yn;
1439
+ }
1429
1440
  function Sn(e) {
1430
1441
  return e ? Object.assign(Object.assign({}, bn), e) : bn;
1431
1442
  }
1432
- function Cn(e) {
1433
- return e ? Object.assign(Object.assign({}, xn), e) : xn;
1434
- }
1435
- function wn() {
1443
+ function Cn() {
1436
1444
  return {
1437
- makeReadOptions: Sn,
1438
- makeWriteOptions: Cn,
1445
+ makeReadOptions: xn,
1446
+ makeWriteOptions: Sn,
1439
1447
  listUnknownFields(e) {
1440
- return e[yn] ?? [];
1448
+ return e[vn] ?? [];
1441
1449
  },
1442
1450
  discardUnknownFields(e) {
1443
- delete e[yn];
1451
+ delete e[vn];
1444
1452
  },
1445
1453
  writeUnknownFields(e, t) {
1446
- let n = e[yn];
1454
+ let n = e[vn];
1447
1455
  if (n) for (let e of n) t.tag(e.no, e.wireType).raw(e.data);
1448
1456
  },
1449
1457
  onUnknownField(e, t, n, r) {
1450
1458
  let i = e;
1451
- Array.isArray(i[yn]) || (i[yn] = []), i[yn].push({
1459
+ Array.isArray(i[vn]) || (i[vn] = []), i[vn].push({
1452
1460
  no: t,
1453
1461
  wireType: n,
1454
1462
  data: r
@@ -1457,44 +1465,44 @@ function wn() {
1457
1465
  readMessage(e, t, n, r, i) {
1458
1466
  let a = e.getType(), o = i ? t.len : t.pos + n, s, c;
1459
1467
  for (; t.pos < o;) {
1460
- var l = T(t.tag(), 2);
1461
- if (s = l[0], c = l[1], i === !0 && c == E.EndGroup) break;
1468
+ var l = E(t.tag(), 2);
1469
+ if (s = l[0], c = l[1], i === !0 && c == D.EndGroup) break;
1462
1470
  let n = a.fields.find(s);
1463
1471
  if (!n) {
1464
1472
  let n = t.skip(c, s);
1465
1473
  r.readUnknownFields && this.onUnknownField(e, s, c, n);
1466
1474
  continue;
1467
1475
  }
1468
- Tn(e, t, n, c, r);
1476
+ wn(e, t, n, c, r);
1469
1477
  }
1470
- if (i && (c != E.EndGroup || s !== n)) throw Error("invalid end group tag");
1478
+ if (i && (c != D.EndGroup || s !== n)) throw Error("invalid end group tag");
1471
1479
  },
1472
- readField: Tn,
1480
+ readField: wn,
1473
1481
  writeMessage(e, t, n) {
1474
1482
  let r = e.getType();
1475
1483
  for (let i of r.fields.byNumber()) {
1476
- if (!Qt(i, e)) {
1484
+ if (!Zt(i, e)) {
1477
1485
  if (i.req) throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);
1478
1486
  continue;
1479
1487
  }
1480
- An(i, i.oneof ? e[i.oneof.localName].value : e[i.localName], t, n);
1488
+ kn(i, i.oneof ? e[i.oneof.localName].value : e[i.localName], t, n);
1481
1489
  }
1482
1490
  return n.writeUnknownFields && this.writeUnknownFields(e, t), t;
1483
1491
  },
1484
1492
  writeField(e, t, n, r) {
1485
- t !== void 0 && An(e, t, n, r);
1493
+ t !== void 0 && kn(e, t, n, r);
1486
1494
  }
1487
1495
  };
1488
1496
  }
1489
- function Tn(e, t, n, r, i) {
1497
+ function wn(e, t, n, r, i) {
1490
1498
  let a = n.repeated, o = n.localName;
1491
1499
  switch (n.oneof && (e = e[n.oneof.localName], e.case != o && delete e.value, e.case = o, o = "value"), n.kind) {
1492
1500
  case "scalar":
1493
1501
  case "enum":
1494
- let s = n.kind == "enum" ? C.INT32 : n.T, c = kn;
1495
- if (n.kind == "scalar" && n.L > 0 && (c = On), a) {
1502
+ let s = n.kind == "enum" ? C.INT32 : n.T, c = On;
1503
+ if (n.kind == "scalar" && n.L > 0 && (c = Dn), a) {
1496
1504
  let n = e[o];
1497
- if (r == E.LengthDelimited && s != C.STRING && s != C.BYTES) {
1505
+ if (r == D.LengthDelimited && s != C.STRING && s != C.BYTES) {
1498
1506
  let e = t.uint32() + t.pos;
1499
1507
  for (; t.pos < e;) n.push(c(t, s));
1500
1508
  } else n.push(c(t, s));
@@ -1502,31 +1510,31 @@ function Tn(e, t, n, r, i) {
1502
1510
  break;
1503
1511
  case "message":
1504
1512
  let l = n.T;
1505
- a ? e[o].push(En(t, new l(), i, n)) : en(e[o]) ? En(t, e[o], i, n) : (e[o] = En(t, new l(), i, n), l.fieldWrapper && !n.oneof && !n.repeated && (e[o] = l.fieldWrapper.unwrapField(e[o])));
1513
+ a ? e[o].push(Tn(t, new l(), i, n)) : $t(e[o]) ? Tn(t, e[o], i, n) : (e[o] = Tn(t, new l(), i, n), l.fieldWrapper && !n.oneof && !n.repeated && (e[o] = l.fieldWrapper.unwrapField(e[o])));
1506
1514
  break;
1507
1515
  case "map":
1508
- let u = T(Dn(n, t, i), 2), d = u[0], f = u[1];
1516
+ let u = E(En(n, t, i), 2), d = u[0], f = u[1];
1509
1517
  e[o][d] = f;
1510
1518
  }
1511
1519
  }
1512
- function En(e, t, n, r) {
1520
+ function Tn(e, t, n, r) {
1513
1521
  let i = t.getType().runtime.bin, a = r?.delimited;
1514
1522
  return i.readMessage(t, e, a ? r.no : e.uint32(), n, a), t;
1515
1523
  }
1516
- function Dn(e, t, n) {
1524
+ function En(e, t, n) {
1517
1525
  let r = t.uint32(), i = t.pos + r, a, o;
1518
- for (; t.pos < i;) switch (T(t.tag(), 1)[0]) {
1526
+ for (; t.pos < i;) switch (E(t.tag(), 1)[0]) {
1519
1527
  case 1:
1520
- a = kn(t, e.K);
1528
+ a = On(t, e.K);
1521
1529
  break;
1522
1530
  case 2: switch (e.V.kind) {
1523
1531
  case "scalar":
1524
- o = kn(t, e.V.T);
1532
+ o = On(t, e.V.T);
1525
1533
  break;
1526
1534
  case "enum":
1527
1535
  o = t.int32();
1528
1536
  break;
1529
- case "message": o = En(t, new e.V.T(), n, void 0);
1537
+ case "message": o = Tn(t, new e.V.T(), n, void 0);
1530
1538
  }
1531
1539
  }
1532
1540
  if (a === void 0 && (a = At(e.K, Ot.BIGINT)), typeof a != "string" && typeof a != "number" && (a = a.toString()), o === void 0) switch (e.V.kind) {
@@ -1540,11 +1548,11 @@ function Dn(e, t, n) {
1540
1548
  }
1541
1549
  return [a, o];
1542
1550
  }
1543
- function On(e, t) {
1544
- let n = kn(e, t);
1551
+ function Dn(e, t) {
1552
+ let n = On(e, t);
1545
1553
  return typeof n == "bigint" ? n.toString() : n;
1546
1554
  }
1547
- function kn(e, t) {
1555
+ function On(e, t) {
1548
1556
  switch (t) {
1549
1557
  case C.STRING: return e.string();
1550
1558
  case C.BOOL: return e.bool();
@@ -1563,7 +1571,7 @@ function kn(e, t) {
1563
1571
  case C.SINT32: return e.sint32();
1564
1572
  }
1565
1573
  }
1566
- function An(e, t, n, r) {
1574
+ function kn(e, t, n, r) {
1567
1575
  x(t !== void 0);
1568
1576
  let i = e.repeated;
1569
1577
  switch (e.kind) {
@@ -1571,27 +1579,27 @@ function An(e, t, n, r) {
1571
1579
  case "enum":
1572
1580
  let o = e.kind == "enum" ? C.INT32 : e.T;
1573
1581
  if (i) {
1574
- if (x(Array.isArray(t)), e.packed) Pn(n, o, e.no, t);
1575
- else for (let r of t) Nn(n, o, e.no, r);
1576
- } else Nn(n, o, e.no, t);
1582
+ if (x(Array.isArray(t)), e.packed) Nn(n, o, e.no, t);
1583
+ else for (let r of t) Mn(n, o, e.no, r);
1584
+ } else Mn(n, o, e.no, t);
1577
1585
  break;
1578
1586
  case "message":
1579
1587
  if (i) {
1580
1588
  x(Array.isArray(t));
1581
- for (let i of t) Mn(n, r, e, i);
1582
- } else Mn(n, r, e, t);
1589
+ for (let i of t) jn(n, r, e, i);
1590
+ } else jn(n, r, e, t);
1583
1591
  break;
1584
1592
  case "map":
1585
1593
  x(typeof t == "object" && !!t);
1586
1594
  for (let i of Object.entries(t)) {
1587
- var a = T(i, 2);
1595
+ var a = E(i, 2);
1588
1596
  let t = a[0], o = a[1];
1589
- jn(n, r, e, t, o);
1597
+ An(n, r, e, t, o);
1590
1598
  }
1591
1599
  }
1592
1600
  }
1593
- function jn(e, t, n, r, i) {
1594
- e.tag(n.no, E.LengthDelimited), e.fork();
1601
+ function An(e, t, n, r, i) {
1602
+ e.tag(n.no, D.LengthDelimited), e.fork();
1595
1603
  let a = r;
1596
1604
  switch (n.K) {
1597
1605
  case C.INT32:
@@ -1603,53 +1611,53 @@ function jn(e, t, n, r, i) {
1603
1611
  break;
1604
1612
  case C.BOOL: x(r == "true" || r == "false"), a = r == "true";
1605
1613
  }
1606
- switch (Nn(e, n.K, 1, a), n.V.kind) {
1614
+ switch (Mn(e, n.K, 1, a), n.V.kind) {
1607
1615
  case "scalar":
1608
- Nn(e, n.V.T, 2, i);
1616
+ Mn(e, n.V.T, 2, i);
1609
1617
  break;
1610
1618
  case "enum":
1611
- Nn(e, C.INT32, 2, i);
1619
+ Mn(e, C.INT32, 2, i);
1612
1620
  break;
1613
- case "message": x(i !== void 0), e.tag(2, E.LengthDelimited).bytes(i.toBinary(t));
1621
+ case "message": x(i !== void 0), e.tag(2, D.LengthDelimited).bytes(i.toBinary(t));
1614
1622
  }
1615
1623
  e.join();
1616
1624
  }
1617
- function Mn(e, t, n, r) {
1618
- let i = tn(n.T, r);
1619
- n.delimited ? e.tag(n.no, E.StartGroup).raw(i.toBinary(t)).tag(n.no, E.EndGroup) : e.tag(n.no, E.LengthDelimited).bytes(i.toBinary(t));
1625
+ function jn(e, t, n, r) {
1626
+ let i = en(n.T, r);
1627
+ n.delimited ? e.tag(n.no, D.StartGroup).raw(i.toBinary(t)).tag(n.no, D.EndGroup) : e.tag(n.no, D.LengthDelimited).bytes(i.toBinary(t));
1620
1628
  }
1621
- function Nn(e, t, n, r) {
1629
+ function Mn(e, t, n, r) {
1622
1630
  x(r !== void 0);
1623
- let i = T(Fn(t), 2), a = i[0], o = i[1];
1631
+ let i = E(Pn(t), 2), a = i[0], o = i[1];
1624
1632
  e.tag(n, a)[o](r);
1625
1633
  }
1626
- function Pn(e, t, n, r) {
1634
+ function Nn(e, t, n, r) {
1627
1635
  if (!r.length) return;
1628
- e.tag(n, E.LengthDelimited).fork();
1629
- let i = T(Fn(t), 2)[1];
1636
+ e.tag(n, D.LengthDelimited).fork();
1637
+ let i = E(Pn(t), 2)[1];
1630
1638
  for (let t = 0; t < r.length; t++) e[i](r[t]);
1631
1639
  e.join();
1632
1640
  }
1633
- function Fn(e) {
1634
- let t = E.Varint;
1641
+ function Pn(e) {
1642
+ let t = D.Varint;
1635
1643
  switch (e) {
1636
1644
  case C.BYTES:
1637
1645
  case C.STRING:
1638
- t = E.LengthDelimited;
1646
+ t = D.LengthDelimited;
1639
1647
  break;
1640
1648
  case C.DOUBLE:
1641
1649
  case C.FIXED64:
1642
1650
  case C.SFIXED64:
1643
- t = E.Bit64;
1651
+ t = D.Bit64;
1644
1652
  break;
1645
1653
  case C.FIXED32:
1646
1654
  case C.SFIXED32:
1647
- case C.FLOAT: t = E.Bit32;
1655
+ case C.FLOAT: t = D.Bit32;
1648
1656
  }
1649
1657
  let n = C[e].toLowerCase();
1650
1658
  return [t, n];
1651
1659
  }
1652
- function In() {
1660
+ function Fn() {
1653
1661
  return {
1654
1662
  setEnumType: lt,
1655
1663
  initPartial(e, t) {
@@ -1662,7 +1670,7 @@ function In() {
1662
1670
  let e = o[n].case;
1663
1671
  if (e === void 0) continue;
1664
1672
  let t = i.findField(e), s = o[n].value;
1665
- t && t.kind == "message" && !en(s, t.T) ? s = new t.T(s) : t && t.kind === "scalar" && t.T === C.BYTES && (s = Rn(s)), a[n] = {
1673
+ t && t.kind == "message" && !$t(s, t.T) ? s = new t.T(s) : t && t.kind === "scalar" && t.T === C.BYTES && (s = Ln(s)), a[n] = {
1666
1674
  case: e,
1667
1675
  value: s
1668
1676
  };
@@ -1670,16 +1678,16 @@ function In() {
1670
1678
  case "scalar":
1671
1679
  case "enum":
1672
1680
  let c = o[n];
1673
- i.T === C.BYTES && (c = i.repeated ? c.map(Rn) : Rn(c)), a[n] = c;
1681
+ i.T === C.BYTES && (c = i.repeated ? c.map(Ln) : Ln(c)), a[n] = c;
1674
1682
  break;
1675
1683
  case "map":
1676
1684
  switch (i.V.kind) {
1677
1685
  case "scalar":
1678
1686
  case "enum":
1679
1687
  if (i.V.T === C.BYTES) for (let e of Object.entries(o[n])) {
1680
- var r = T(e, 2);
1688
+ var r = E(e, 2);
1681
1689
  let t = r[0], i = r[1];
1682
- a[n][t] = Rn(i);
1690
+ a[n][t] = Ln(i);
1683
1691
  }
1684
1692
  else Object.assign(a[n], o[n]);
1685
1693
  break;
@@ -1693,10 +1701,10 @@ function In() {
1693
1701
  break;
1694
1702
  case "message":
1695
1703
  let l = i.T;
1696
- if (i.repeated) a[n] = o[n].map((e) => en(e, l) ? e : new l(e));
1704
+ if (i.repeated) a[n] = o[n].map((e) => $t(e, l) ? e : new l(e));
1697
1705
  else {
1698
1706
  let e = o[n];
1699
- a[n] = l.fieldWrapper ? l.typeName === "google.protobuf.BytesValue" ? Rn(e) : e : en(e, l) ? e : new l(e);
1707
+ a[n] = l.fieldWrapper ? l.typeName === "google.protobuf.BytesValue" ? Ln(e) : e : $t(e, l) ? e : new l(e);
1700
1708
  }
1701
1709
  }
1702
1710
  }
@@ -1716,7 +1724,7 @@ function In() {
1716
1724
  switch (e.kind) {
1717
1725
  case "message":
1718
1726
  let t = r, n = i;
1719
- return e.T.fieldWrapper && (t !== void 0 && !en(t) && (t = e.T.fieldWrapper.wrapField(t)), n !== void 0 && !en(n) && (n = e.T.fieldWrapper.wrapField(n))), e.T.equals(t, n);
1727
+ return e.T.fieldWrapper && (t !== void 0 && !$t(t) && (t = e.T.fieldWrapper.wrapField(t)), n !== void 0 && !$t(n) && (n = e.T.fieldWrapper.wrapField(n))), e.T.equals(t, n);
1720
1728
  case "enum": return kt(C.INT32, r, i);
1721
1729
  case "scalar": return kt(e.T, r, i);
1722
1730
  case "oneof":
@@ -1747,18 +1755,18 @@ function In() {
1747
1755
  let t = e.getType(), n = new t(), r = n;
1748
1756
  for (let n of t.fields.byMember()) {
1749
1757
  let t = e[n.localName], a;
1750
- if (n.repeated) a = t.map(Ln);
1758
+ if (n.repeated) a = t.map(In);
1751
1759
  else if (n.kind == "map") {
1752
1760
  a = r[n.localName];
1753
1761
  for (let e of Object.entries(t)) {
1754
- var i = T(e, 2);
1762
+ var i = E(e, 2);
1755
1763
  let t = i[0], n = i[1];
1756
- a[t] = Ln(n);
1764
+ a[t] = In(n);
1757
1765
  }
1758
1766
  } else a = n.kind == "oneof" ? n.findField(t.case) ? {
1759
1767
  case: t.case,
1760
- value: Ln(t.value)
1761
- } : { case: void 0 } : Ln(t);
1768
+ value: In(t.value)
1769
+ } : { case: void 0 } : In(t);
1762
1770
  r[n.localName] = a;
1763
1771
  }
1764
1772
  for (let n of t.runtime.bin.listUnknownFields(e)) t.runtime.bin.onUnknownField(r, n.no, n.wireType, n.data);
@@ -1766,24 +1774,24 @@ function In() {
1766
1774
  }
1767
1775
  };
1768
1776
  }
1769
- function Ln(e) {
1777
+ function In(e) {
1770
1778
  if (e === void 0) return e;
1771
- if (en(e)) return e.clone();
1779
+ if ($t(e)) return e.clone();
1772
1780
  if (e instanceof Uint8Array) {
1773
1781
  let t = new Uint8Array(e.byteLength);
1774
1782
  return t.set(e), t;
1775
1783
  }
1776
1784
  return e;
1777
1785
  }
1778
- function Rn(e) {
1786
+ function Ln(e) {
1779
1787
  return e instanceof Uint8Array ? e : new Uint8Array(e);
1780
1788
  }
1781
- function zn(e, t, n) {
1789
+ function Rn(e, t, n) {
1782
1790
  return {
1783
1791
  syntax: e,
1784
- json: ln(),
1785
- bin: wn(),
1786
- util: Object.assign(Object.assign({}, In()), {
1792
+ json: cn(),
1793
+ bin: Cn(),
1794
+ util: Object.assign(Object.assign({}, Fn()), {
1787
1795
  newFieldList: t,
1788
1796
  initFields: n
1789
1797
  }),
@@ -1794,11 +1802,11 @@ function zn(e, t, n) {
1794
1802
  makeEnumType: ut,
1795
1803
  getEnumType: ct,
1796
1804
  makeExtension(e, t, n) {
1797
- return Vt(this, e, t, n);
1805
+ return Bt(this, e, t, n);
1798
1806
  }
1799
1807
  };
1800
1808
  }
1801
- var Bn = class {
1809
+ var zn = class {
1802
1810
  constructor(e, t) {
1803
1811
  this._fields = e, this._normalizer = t;
1804
1812
  }
@@ -1833,15 +1841,15 @@ var Bn = class {
1833
1841
  return this.members;
1834
1842
  }
1835
1843
  };
1836
- function Vn(e, t) {
1837
- let n = Wn(e);
1838
- return t ? n : Yn(Jn(n));
1844
+ function Bn(e, t) {
1845
+ let n = Un(e);
1846
+ return t ? n : Jn(qn(n));
1839
1847
  }
1840
- function Hn(e) {
1841
- return Vn(e, !1);
1848
+ function Vn(e) {
1849
+ return Bn(e, !1);
1842
1850
  }
1843
- var Un = Wn;
1844
- function Wn(e) {
1851
+ var Hn = Un;
1852
+ function Un(e) {
1845
1853
  let t = !1, n = [];
1846
1854
  for (let r = 0; r < e.length; r++) {
1847
1855
  let i = e.charAt(r);
@@ -1866,12 +1874,12 @@ function Wn(e) {
1866
1874
  }
1867
1875
  return n.join("");
1868
1876
  }
1869
- var Gn = /* @__PURE__ */ new Set([
1877
+ var Wn = /* @__PURE__ */ new Set([
1870
1878
  "constructor",
1871
1879
  "toString",
1872
1880
  "toJSON",
1873
1881
  "valueOf"
1874
- ]), Kn = /* @__PURE__ */ new Set([
1882
+ ]), Gn = /* @__PURE__ */ new Set([
1875
1883
  "getType",
1876
1884
  "clone",
1877
1885
  "equals",
@@ -1882,9 +1890,9 @@ var Gn = /* @__PURE__ */ new Set([
1882
1890
  "toJson",
1883
1891
  "toJsonString",
1884
1892
  "toObject"
1885
- ]), qn = (e) => `${e}\$`, Jn = (e) => Kn.has(e) ? qn(e) : e, Yn = (e) => Gn.has(e) ? qn(e) : e, Xn = class {
1893
+ ]), Kn = (e) => `${e}\$`, qn = (e) => Gn.has(e) ? Kn(e) : e, Jn = (e) => Wn.has(e) ? Kn(e) : e, Yn = class {
1886
1894
  constructor(e) {
1887
- this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.req = !1, this.default = void 0, this.fields = [], this.name = e, this.localName = Hn(e);
1895
+ this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.req = !1, this.default = void 0, this.fields = [], this.name = e, this.localName = Vn(e);
1888
1896
  }
1889
1897
  addField(e) {
1890
1898
  x(e.oneof === this, `field ${e.name} not one of ${this.name}`), this.fields.push(e);
@@ -1897,19 +1905,19 @@ var Gn = /* @__PURE__ */ new Set([
1897
1905
  return this._lookup[e];
1898
1906
  }
1899
1907
  };
1900
- function Zn(e, t) {
1908
+ function Xn(e, t) {
1901
1909
  let n = [], r;
1902
1910
  for (let t of typeof e == "function" ? e() : e) {
1903
1911
  let e = t;
1904
- if (e.localName = Vn(t.name, t.oneof !== void 0), e.jsonName = t.jsonName ?? Un(t.name), e.repeated = t.repeated ?? !1, t.kind == "scalar" && (e.L = t.L ?? Ot.BIGINT), e.delimited = t.delimited ?? !1, e.req = t.req ?? !1, e.opt = t.opt ?? !1, t.packed === void 0 && (e.packed = t.kind == "enum" || t.kind == "scalar" && t.T != C.BYTES && t.T != C.STRING), t.oneof !== void 0) {
1912
+ if (e.localName = Bn(t.name, t.oneof !== void 0), e.jsonName = t.jsonName ?? Hn(t.name), e.repeated = t.repeated ?? !1, t.kind == "scalar" && (e.L = t.L ?? Ot.BIGINT), e.delimited = t.delimited ?? !1, e.req = t.req ?? !1, e.opt = t.opt ?? !1, t.packed === void 0 && (e.packed = t.kind == "enum" || t.kind == "scalar" && t.T != C.BYTES && t.T != C.STRING), t.oneof !== void 0) {
1905
1913
  let n = typeof t.oneof == "string" ? t.oneof : t.oneof.name;
1906
- (!r || r.name != n) && (r = new Xn(n)), e.oneof = r, r.addField(e);
1914
+ (!r || r.name != n) && (r = new Yn(n)), e.oneof = r, r.addField(e);
1907
1915
  }
1908
1916
  n.push(e);
1909
1917
  }
1910
1918
  return n;
1911
1919
  }
1912
- var D = zn("proto3", (e) => new Bn(e, (e) => Zn(e)), (e) => {
1920
+ var O = Rn("proto3", (e) => new zn(e, (e) => Xn(e)), (e) => {
1913
1921
  for (let t of e.getType().fields.byMember()) {
1914
1922
  if (t.opt) continue;
1915
1923
  let n = t.localName, r = e;
@@ -1930,12 +1938,12 @@ var D = zn("proto3", (e) => new Bn(e, (e) => Zn(e)), (e) => {
1930
1938
  case "scalar": r[n] = At(t.T, t.L);
1931
1939
  }
1932
1940
  }
1933
- }), Qn = class e extends pt {
1941
+ }), Zn = class e extends pt {
1934
1942
  constructor(e) {
1935
- super(), this.seconds = S.zero, this.nanos = 0, D.util.initPartial(e, this);
1943
+ super(), this.seconds = S.zero, this.nanos = 0, O.util.initPartial(e, this);
1936
1944
  }
1937
1945
  fromJson(e, t) {
1938
- if (typeof e != "string") throw Error(`cannot decode google.protobuf.Timestamp from JSON: ${D.json.debug(e)}`);
1946
+ if (typeof e != "string") throw Error(`cannot decode google.protobuf.Timestamp from JSON: ${O.json.debug(e)}`);
1939
1947
  let n = e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
1940
1948
  if (!n) throw Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");
1941
1949
  let r = Date.parse(n[1] + "-" + n[2] + "-" + n[3] + "T" + n[4] + ":" + n[5] + ":" + n[6] + (n[8] ? n[8] : "Z"));
@@ -1977,10 +1985,10 @@ var D = zn("proto3", (e) => new Bn(e, (e) => Zn(e)), (e) => {
1977
1985
  return new e().fromJsonString(t, n);
1978
1986
  }
1979
1987
  static equals(t, n) {
1980
- return D.util.equals(e, t, n);
1988
+ return O.util.equals(e, t, n);
1981
1989
  }
1982
1990
  };
1983
- Qn.runtime = D, Qn.typeName = "google.protobuf.Timestamp", Qn.fields = D.util.newFieldList(() => [{
1991
+ Zn.runtime = O, Zn.typeName = "google.protobuf.Timestamp", Zn.fields = O.util.newFieldList(() => [{
1984
1992
  no: 1,
1985
1993
  name: "seconds",
1986
1994
  kind: "scalar",
@@ -1991,7 +1999,7 @@ Qn.runtime = D, Qn.typeName = "google.protobuf.Timestamp", Qn.fields = D.util.ne
1991
1999
  kind: "scalar",
1992
2000
  T: 5
1993
2001
  }]);
1994
- var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2002
+ var Qn = /* @__PURE__ */ O.makeMessageType("livekit.MetricsBatch", () => [
1995
2003
  {
1996
2004
  no: 1,
1997
2005
  name: "timestamp_ms",
@@ -2002,7 +2010,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2002
2010
  no: 2,
2003
2011
  name: "normalized_timestamp",
2004
2012
  kind: "message",
2005
- T: Qn
2013
+ T: Zn
2006
2014
  },
2007
2015
  {
2008
2016
  no: 3,
@@ -2015,17 +2023,17 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2015
2023
  no: 4,
2016
2024
  name: "time_series",
2017
2025
  kind: "message",
2018
- T: er,
2026
+ T: $n,
2019
2027
  repeated: !0
2020
2028
  },
2021
2029
  {
2022
2030
  no: 5,
2023
2031
  name: "events",
2024
2032
  kind: "message",
2025
- T: nr,
2033
+ T: tr,
2026
2034
  repeated: !0
2027
2035
  }
2028
- ]), er = /* @__PURE__ */ D.makeMessageType("livekit.TimeSeriesMetric", () => [
2036
+ ]), $n = /* @__PURE__ */ O.makeMessageType("livekit.TimeSeriesMetric", () => [
2029
2037
  {
2030
2038
  no: 1,
2031
2039
  name: "label",
@@ -2048,7 +2056,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2048
2056
  no: 4,
2049
2057
  name: "samples",
2050
2058
  kind: "message",
2051
- T: tr,
2059
+ T: er,
2052
2060
  repeated: !0
2053
2061
  },
2054
2062
  {
@@ -2057,7 +2065,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2057
2065
  kind: "scalar",
2058
2066
  T: 13
2059
2067
  }
2060
- ]), tr = /* @__PURE__ */ D.makeMessageType("livekit.MetricSample", () => [
2068
+ ]), er = /* @__PURE__ */ O.makeMessageType("livekit.MetricSample", () => [
2061
2069
  {
2062
2070
  no: 1,
2063
2071
  name: "timestamp_ms",
@@ -2068,7 +2076,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2068
2076
  no: 2,
2069
2077
  name: "normalized_timestamp",
2070
2078
  kind: "message",
2071
- T: Qn
2079
+ T: Zn
2072
2080
  },
2073
2081
  {
2074
2082
  no: 3,
@@ -2076,7 +2084,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2076
2084
  kind: "scalar",
2077
2085
  T: 2
2078
2086
  }
2079
- ]), nr = /* @__PURE__ */ D.makeMessageType("livekit.EventMetric", () => [
2087
+ ]), tr = /* @__PURE__ */ O.makeMessageType("livekit.EventMetric", () => [
2080
2088
  {
2081
2089
  no: 1,
2082
2090
  name: "label",
@@ -2112,13 +2120,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2112
2120
  no: 6,
2113
2121
  name: "normalized_start_timestamp",
2114
2122
  kind: "message",
2115
- T: Qn
2123
+ T: Zn
2116
2124
  },
2117
2125
  {
2118
2126
  no: 7,
2119
2127
  name: "normalized_end_timestamp",
2120
2128
  kind: "message",
2121
- T: Qn,
2129
+ T: Zn,
2122
2130
  opt: !0
2123
2131
  },
2124
2132
  {
@@ -2133,7 +2141,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2133
2141
  kind: "scalar",
2134
2142
  T: 13
2135
2143
  }
2136
- ]), rr = /* @__PURE__ */ D.makeEnum("livekit.BackupCodecPolicy", [
2144
+ ]), nr = /* @__PURE__ */ O.makeEnum("livekit.BackupCodecPolicy", [
2137
2145
  {
2138
2146
  no: 0,
2139
2147
  name: "PREFER_REGRESSION"
@@ -2146,7 +2154,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2146
2154
  no: 2,
2147
2155
  name: "REGRESSION"
2148
2156
  }
2149
- ]), ir = /* @__PURE__ */ D.makeEnum("livekit.TrackType", [
2157
+ ]), rr = /* @__PURE__ */ O.makeEnum("livekit.TrackType", [
2150
2158
  {
2151
2159
  no: 0,
2152
2160
  name: "AUDIO"
@@ -2159,7 +2167,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2159
2167
  no: 2,
2160
2168
  name: "DATA"
2161
2169
  }
2162
- ]), O = /* @__PURE__ */ D.makeEnum("livekit.TrackSource", [
2170
+ ]), k = /* @__PURE__ */ O.makeEnum("livekit.TrackSource", [
2163
2171
  {
2164
2172
  no: 0,
2165
2173
  name: "UNKNOWN"
@@ -2180,7 +2188,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2180
2188
  no: 4,
2181
2189
  name: "SCREEN_SHARE_AUDIO"
2182
2190
  }
2183
- ]), ar = /* @__PURE__ */ D.makeEnum("livekit.VideoQuality", [
2191
+ ]), ir = /* @__PURE__ */ O.makeEnum("livekit.VideoQuality", [
2184
2192
  {
2185
2193
  no: 0,
2186
2194
  name: "LOW"
@@ -2197,7 +2205,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2197
2205
  no: 3,
2198
2206
  name: "OFF"
2199
2207
  }
2200
- ]), or = /* @__PURE__ */ D.makeEnum("livekit.ConnectionQuality", [
2208
+ ]), ar = /* @__PURE__ */ O.makeEnum("livekit.ConnectionQuality", [
2201
2209
  {
2202
2210
  no: 0,
2203
2211
  name: "POOR"
@@ -2214,7 +2222,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2214
2222
  no: 3,
2215
2223
  name: "LOST"
2216
2224
  }
2217
- ]), sr = /* @__PURE__ */ D.makeEnum("livekit.ClientConfigSetting", [
2225
+ ]), or = /* @__PURE__ */ O.makeEnum("livekit.ClientConfigSetting", [
2218
2226
  {
2219
2227
  no: 0,
2220
2228
  name: "UNSET"
@@ -2227,7 +2235,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2227
2235
  no: 2,
2228
2236
  name: "ENABLED"
2229
2237
  }
2230
- ]), cr = /* @__PURE__ */ D.makeEnum("livekit.DisconnectReason", [
2238
+ ]), sr = /* @__PURE__ */ O.makeEnum("livekit.DisconnectReason", [
2231
2239
  {
2232
2240
  no: 0,
2233
2241
  name: "UNKNOWN_REASON"
@@ -2296,7 +2304,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2296
2304
  no: 16,
2297
2305
  name: "AGENT_ERROR"
2298
2306
  }
2299
- ]), lr = /* @__PURE__ */ D.makeEnum("livekit.ReconnectReason", [
2307
+ ]), cr = /* @__PURE__ */ O.makeEnum("livekit.ReconnectReason", [
2300
2308
  {
2301
2309
  no: 0,
2302
2310
  name: "RR_UNKNOWN"
@@ -2317,7 +2325,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2317
2325
  no: 4,
2318
2326
  name: "RR_SWITCH_CANDIDATE"
2319
2327
  }
2320
- ]), ur = /* @__PURE__ */ D.makeEnum("livekit.SubscriptionError", [
2328
+ ]), lr = /* @__PURE__ */ O.makeEnum("livekit.SubscriptionError", [
2321
2329
  {
2322
2330
  no: 0,
2323
2331
  name: "SE_UNKNOWN"
@@ -2330,7 +2338,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2330
2338
  no: 2,
2331
2339
  name: "SE_TRACK_NOTFOUND"
2332
2340
  }
2333
- ]), k = /* @__PURE__ */ D.makeEnum("livekit.AudioTrackFeature", [
2341
+ ]), ur = /* @__PURE__ */ O.makeEnum("livekit.AudioTrackFeature", [
2334
2342
  {
2335
2343
  no: 0,
2336
2344
  name: "TF_STEREO"
@@ -2359,7 +2367,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2359
2367
  no: 6,
2360
2368
  name: "TF_PRECONNECT_BUFFER"
2361
2369
  }
2362
- ]), dr = /* @__PURE__ */ D.makeEnum("livekit.PacketTrailerFeature", [
2370
+ ]), dr = /* @__PURE__ */ O.makeEnum("livekit.PacketTrailerFeature", [
2363
2371
  {
2364
2372
  no: 0,
2365
2373
  name: "PTF_USER_TIMESTAMP"
@@ -2372,7 +2380,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2372
2380
  no: 2,
2373
2381
  name: "PTF_USER_DATA"
2374
2382
  }
2375
- ]), fr = /* @__PURE__ */ D.makeMessageType("livekit.Room", () => [
2383
+ ]), fr = /* @__PURE__ */ O.makeMessageType("livekit.Room", () => [
2376
2384
  {
2377
2385
  no: 1,
2378
2386
  name: "sid",
@@ -2458,7 +2466,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2458
2466
  kind: "message",
2459
2467
  T: ni
2460
2468
  }
2461
- ]), pr = /* @__PURE__ */ D.makeMessageType("livekit.Codec", () => [{
2469
+ ]), pr = /* @__PURE__ */ O.makeMessageType("livekit.Codec", () => [{
2462
2470
  no: 1,
2463
2471
  name: "mime",
2464
2472
  kind: "scalar",
@@ -2468,7 +2476,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2468
2476
  name: "fmtp_line",
2469
2477
  kind: "scalar",
2470
2478
  T: 9
2471
- }]), mr = /* @__PURE__ */ D.makeMessageType("livekit.ParticipantPermission", () => [
2479
+ }]), mr = /* @__PURE__ */ O.makeMessageType("livekit.ParticipantPermission", () => [
2472
2480
  {
2473
2481
  no: 1,
2474
2482
  name: "can_subscribe",
@@ -2491,7 +2499,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2491
2499
  no: 9,
2492
2500
  name: "can_publish_sources",
2493
2501
  kind: "enum",
2494
- T: D.getEnumType(O),
2502
+ T: O.getEnumType(k),
2495
2503
  repeated: !0
2496
2504
  },
2497
2505
  {
@@ -2530,7 +2538,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2530
2538
  kind: "scalar",
2531
2539
  T: 8
2532
2540
  }
2533
- ]), hr = /* @__PURE__ */ D.makeMessageType("livekit.ParticipantInfo", () => [
2541
+ ]), hr = /* @__PURE__ */ O.makeMessageType("livekit.ParticipantInfo", () => [
2534
2542
  {
2535
2543
  no: 1,
2536
2544
  name: "sid",
@@ -2547,7 +2555,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2547
2555
  no: 3,
2548
2556
  name: "state",
2549
2557
  kind: "enum",
2550
- T: D.getEnumType(gr)
2558
+ T: O.getEnumType(gr)
2551
2559
  },
2552
2560
  {
2553
2561
  no: 4,
@@ -2608,7 +2616,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2608
2616
  no: 14,
2609
2617
  name: "kind",
2610
2618
  kind: "enum",
2611
- T: D.getEnumType(_r)
2619
+ T: O.getEnumType(_r)
2612
2620
  },
2613
2621
  {
2614
2622
  no: 15,
@@ -2624,13 +2632,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2624
2632
  no: 16,
2625
2633
  name: "disconnect_reason",
2626
2634
  kind: "enum",
2627
- T: D.getEnumType(cr)
2635
+ T: O.getEnumType(sr)
2628
2636
  },
2629
2637
  {
2630
2638
  no: 18,
2631
2639
  name: "kind_details",
2632
2640
  kind: "enum",
2633
- T: D.getEnumType(vr),
2641
+ T: O.getEnumType(vr),
2634
2642
  repeated: !0
2635
2643
  },
2636
2644
  {
@@ -2650,10 +2658,10 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2650
2658
  no: 21,
2651
2659
  name: "capabilities",
2652
2660
  kind: "enum",
2653
- T: D.getEnumType(Qr),
2661
+ T: O.getEnumType(Qr),
2654
2662
  repeated: !0
2655
2663
  }
2656
- ]), gr = /* @__PURE__ */ D.makeEnum("livekit.ParticipantInfo.State", [
2664
+ ]), gr = /* @__PURE__ */ O.makeEnum("livekit.ParticipantInfo.State", [
2657
2665
  {
2658
2666
  no: 0,
2659
2667
  name: "JOINING"
@@ -2670,7 +2678,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2670
2678
  no: 3,
2671
2679
  name: "DISCONNECTED"
2672
2680
  }
2673
- ]), _r = /* @__PURE__ */ D.makeEnum("livekit.ParticipantInfo.Kind", [
2681
+ ]), _r = /* @__PURE__ */ O.makeEnum("livekit.ParticipantInfo.Kind", [
2674
2682
  {
2675
2683
  no: 0,
2676
2684
  name: "STANDARD"
@@ -2699,7 +2707,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2699
2707
  no: 8,
2700
2708
  name: "BRIDGE"
2701
2709
  }
2702
- ]), vr = /* @__PURE__ */ D.makeEnum("livekit.ParticipantInfo.KindDetail", [
2710
+ ]), vr = /* @__PURE__ */ O.makeEnum("livekit.ParticipantInfo.KindDetail", [
2703
2711
  {
2704
2712
  no: 0,
2705
2713
  name: "CLOUD_AGENT"
@@ -2724,7 +2732,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2724
2732
  no: 5,
2725
2733
  name: "SIMULATION"
2726
2734
  }
2727
- ]), A = /* @__PURE__ */ D.makeEnum("livekit.Encryption.Type", [
2735
+ ]), A = /* @__PURE__ */ O.makeEnum("livekit.Encryption.Type", [
2728
2736
  {
2729
2737
  no: 0,
2730
2738
  name: "NONE"
@@ -2737,7 +2745,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2737
2745
  no: 2,
2738
2746
  name: "CUSTOM"
2739
2747
  }
2740
- ]), yr = /* @__PURE__ */ D.makeMessageType("livekit.SimulcastCodecInfo", () => [
2748
+ ]), yr = /* @__PURE__ */ O.makeMessageType("livekit.SimulcastCodecInfo", () => [
2741
2749
  {
2742
2750
  no: 1,
2743
2751
  name: "mime_type",
@@ -2767,7 +2775,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2767
2775
  no: 5,
2768
2776
  name: "video_layer_mode",
2769
2777
  kind: "enum",
2770
- T: D.getEnumType(jr)
2778
+ T: O.getEnumType(jr)
2771
2779
  },
2772
2780
  {
2773
2781
  no: 6,
@@ -2775,7 +2783,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2775
2783
  kind: "scalar",
2776
2784
  T: 9
2777
2785
  }
2778
- ]), br = /* @__PURE__ */ D.makeMessageType("livekit.TrackInfo", () => [
2786
+ ]), br = /* @__PURE__ */ O.makeMessageType("livekit.TrackInfo", () => [
2779
2787
  {
2780
2788
  no: 1,
2781
2789
  name: "sid",
@@ -2786,7 +2794,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2786
2794
  no: 2,
2787
2795
  name: "type",
2788
2796
  kind: "enum",
2789
- T: D.getEnumType(ir)
2797
+ T: O.getEnumType(rr)
2790
2798
  },
2791
2799
  {
2792
2800
  no: 3,
@@ -2828,7 +2836,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2828
2836
  no: 9,
2829
2837
  name: "source",
2830
2838
  kind: "enum",
2831
- T: D.getEnumType(O)
2839
+ T: O.getEnumType(k)
2832
2840
  },
2833
2841
  {
2834
2842
  no: 10,
@@ -2872,7 +2880,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2872
2880
  no: 16,
2873
2881
  name: "encryption",
2874
2882
  kind: "enum",
2875
- T: D.getEnumType(A)
2883
+ T: O.getEnumType(A)
2876
2884
  },
2877
2885
  {
2878
2886
  no: 17,
@@ -2890,23 +2898,23 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2890
2898
  no: 19,
2891
2899
  name: "audio_features",
2892
2900
  kind: "enum",
2893
- T: D.getEnumType(k),
2901
+ T: O.getEnumType(ur),
2894
2902
  repeated: !0
2895
2903
  },
2896
2904
  {
2897
2905
  no: 20,
2898
2906
  name: "backup_codec_policy",
2899
2907
  kind: "enum",
2900
- T: D.getEnumType(rr)
2908
+ T: O.getEnumType(nr)
2901
2909
  },
2902
2910
  {
2903
2911
  no: 21,
2904
2912
  name: "packet_trailer_features",
2905
2913
  kind: "enum",
2906
- T: D.getEnumType(dr),
2914
+ T: O.getEnumType(dr),
2907
2915
  repeated: !0
2908
2916
  }
2909
- ]), xr = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackInfo", () => [
2917
+ ]), xr = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackInfo", () => [
2910
2918
  {
2911
2919
  no: 1,
2912
2920
  name: "pub_handle",
@@ -2929,7 +2937,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2929
2937
  no: 4,
2930
2938
  name: "encryption",
2931
2939
  kind: "enum",
2932
- T: D.getEnumType(A)
2940
+ T: O.getEnumType(A)
2933
2941
  },
2934
2942
  {
2935
2943
  no: 5,
@@ -2945,11 +2953,11 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2945
2953
  T: Er,
2946
2954
  opt: !0
2947
2955
  }
2948
- ]), Sr = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackFrameEncoding", () => [{
2956
+ ]), Sr = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackFrameEncoding", () => [{
2949
2957
  no: 1,
2950
2958
  name: "well_known",
2951
2959
  kind: "enum",
2952
- T: D.getEnumType(Cr),
2960
+ T: O.getEnumType(Cr),
2953
2961
  oneof: "value"
2954
2962
  }, {
2955
2963
  no: 2,
@@ -2957,7 +2965,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2957
2965
  kind: "scalar",
2958
2966
  T: 9,
2959
2967
  oneof: "value"
2960
- }]), Cr = /* @__PURE__ */ D.makeEnum("livekit.DataTrackFrameEncoding.WellKnownFrameEncoding", [
2968
+ }]), Cr = /* @__PURE__ */ O.makeEnum("livekit.DataTrackFrameEncoding.WellKnownFrameEncoding", [
2961
2969
  {
2962
2970
  no: 0,
2963
2971
  name: "WELL_KNOWN_FRAME_ENCODING_UNSPECIFIED",
@@ -2998,11 +3006,11 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
2998
3006
  name: "WELL_KNOWN_FRAME_ENCODING_JSON",
2999
3007
  localName: "JSON"
3000
3008
  }
3001
- ]), wr = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackSchemaEncoding", () => [{
3009
+ ]), wr = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackSchemaEncoding", () => [{
3002
3010
  no: 1,
3003
3011
  name: "well_known",
3004
3012
  kind: "enum",
3005
- T: D.getEnumType(Tr),
3013
+ T: O.getEnumType(Tr),
3006
3014
  oneof: "value"
3007
3015
  }, {
3008
3016
  no: 2,
@@ -3010,7 +3018,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3010
3018
  kind: "scalar",
3011
3019
  T: 9,
3012
3020
  oneof: "value"
3013
- }]), Tr = /* @__PURE__ */ D.makeEnum("livekit.DataTrackSchemaEncoding.WellKnownSchemaEncoding", [
3021
+ }]), Tr = /* @__PURE__ */ O.makeEnum("livekit.DataTrackSchemaEncoding.WellKnownSchemaEncoding", [
3014
3022
  {
3015
3023
  no: 0,
3016
3024
  name: "WELL_KNOWN_SCHEMA_ENCODING_UNSPECIFIED",
@@ -3051,7 +3059,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3051
3059
  name: "WELL_KNOWN_SCHEMA_ENCODING_JSON_SCHEMA",
3052
3060
  localName: "JSON_SCHEMA"
3053
3061
  }
3054
- ]), Er = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackSchemaId", () => [{
3062
+ ]), Er = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackSchemaId", () => [{
3055
3063
  no: 1,
3056
3064
  name: "name",
3057
3065
  kind: "scalar",
@@ -3061,13 +3069,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3061
3069
  name: "encoding",
3062
3070
  kind: "message",
3063
3071
  T: wr
3064
- }]), Dr = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackSubscriptionOptions", () => [{
3072
+ }]), Dr = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackSubscriptionOptions", () => [{
3065
3073
  no: 1,
3066
3074
  name: "target_fps",
3067
3075
  kind: "scalar",
3068
3076
  T: 13,
3069
3077
  opt: !0
3070
- }]), Or = /* @__PURE__ */ D.makeMessageType("livekit.DataBlobKey", () => [{
3078
+ }]), Or = /* @__PURE__ */ O.makeMessageType("livekit.DataBlobKey", () => [{
3071
3079
  no: 1,
3072
3080
  name: "generic",
3073
3081
  kind: "scalar",
@@ -3079,7 +3087,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3079
3087
  kind: "message",
3080
3088
  T: Er,
3081
3089
  oneof: "key"
3082
- }]), kr = /* @__PURE__ */ D.makeMessageType("livekit.DataBlob", () => [{
3090
+ }]), kr = /* @__PURE__ */ O.makeMessageType("livekit.DataBlob", () => [{
3083
3091
  no: 1,
3084
3092
  name: "key",
3085
3093
  kind: "message",
@@ -3089,12 +3097,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3089
3097
  name: "contents",
3090
3098
  kind: "scalar",
3091
3099
  T: 12
3092
- }]), Ar = /* @__PURE__ */ D.makeMessageType("livekit.VideoLayer", () => [
3100
+ }]), Ar = /* @__PURE__ */ O.makeMessageType("livekit.VideoLayer", () => [
3093
3101
  {
3094
3102
  no: 1,
3095
3103
  name: "quality",
3096
3104
  kind: "enum",
3097
- T: D.getEnumType(ar)
3105
+ T: O.getEnumType(ir)
3098
3106
  },
3099
3107
  {
3100
3108
  no: 2,
@@ -3138,7 +3146,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3138
3146
  kind: "scalar",
3139
3147
  T: 13
3140
3148
  }
3141
- ]), jr = /* @__PURE__ */ D.makeEnum("livekit.VideoLayer.Mode", [
3149
+ ]), jr = /* @__PURE__ */ O.makeEnum("livekit.VideoLayer.Mode", [
3142
3150
  {
3143
3151
  no: 0,
3144
3152
  name: "MODE_UNUSED"
@@ -3155,12 +3163,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3155
3163
  no: 3,
3156
3164
  name: "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR"
3157
3165
  }
3158
- ]), Mr = /* @__PURE__ */ D.makeMessageType("livekit.DataPacket", () => [
3166
+ ]), Mr = /* @__PURE__ */ O.makeMessageType("livekit.DataPacket", () => [
3159
3167
  {
3160
3168
  no: 1,
3161
3169
  name: "kind",
3162
3170
  kind: "enum",
3163
- T: D.getEnumType(Nr)
3171
+ T: O.getEnumType(Nr)
3164
3172
  },
3165
3173
  {
3166
3174
  no: 4,
@@ -3207,7 +3215,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3207
3215
  no: 8,
3208
3216
  name: "metrics",
3209
3217
  kind: "message",
3210
- T: $n,
3218
+ T: Qn,
3211
3219
  oneof: "value"
3212
3220
  },
3213
3221
  {
@@ -3278,18 +3286,18 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3278
3286
  kind: "scalar",
3279
3287
  T: 9
3280
3288
  }
3281
- ]), Nr = /* @__PURE__ */ D.makeEnum("livekit.DataPacket.Kind", [{
3289
+ ]), Nr = /* @__PURE__ */ O.makeEnum("livekit.DataPacket.Kind", [{
3282
3290
  no: 0,
3283
3291
  name: "RELIABLE"
3284
3292
  }, {
3285
3293
  no: 1,
3286
3294
  name: "LOSSY"
3287
- }]), Pr = /* @__PURE__ */ D.makeMessageType("livekit.EncryptedPacket", () => [
3295
+ }]), Pr = /* @__PURE__ */ O.makeMessageType("livekit.EncryptedPacket", () => [
3288
3296
  {
3289
3297
  no: 1,
3290
3298
  name: "encryption_type",
3291
3299
  kind: "enum",
3292
- T: D.getEnumType(A)
3300
+ T: O.getEnumType(A)
3293
3301
  },
3294
3302
  {
3295
3303
  no: 2,
@@ -3309,7 +3317,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3309
3317
  kind: "scalar",
3310
3318
  T: 12
3311
3319
  }
3312
- ]), Fr = /* @__PURE__ */ D.makeMessageType("livekit.EncryptedPacketPayload", () => [
3320
+ ]), Fr = /* @__PURE__ */ O.makeMessageType("livekit.EncryptedPacketPayload", () => [
3313
3321
  {
3314
3322
  no: 1,
3315
3323
  name: "user",
@@ -3366,13 +3374,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3366
3374
  T: li,
3367
3375
  oneof: "value"
3368
3376
  }
3369
- ]), Ir = /* @__PURE__ */ D.makeMessageType("livekit.ActiveSpeakerUpdate", () => [{
3377
+ ]), Ir = /* @__PURE__ */ O.makeMessageType("livekit.ActiveSpeakerUpdate", () => [{
3370
3378
  no: 1,
3371
3379
  name: "speakers",
3372
3380
  kind: "message",
3373
3381
  T: Lr,
3374
3382
  repeated: !0
3375
- }]), Lr = /* @__PURE__ */ D.makeMessageType("livekit.SpeakerInfo", () => [
3383
+ }]), Lr = /* @__PURE__ */ O.makeMessageType("livekit.SpeakerInfo", () => [
3376
3384
  {
3377
3385
  no: 1,
3378
3386
  name: "sid",
@@ -3391,7 +3399,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3391
3399
  kind: "scalar",
3392
3400
  T: 8
3393
3401
  }
3394
- ]), Rr = /* @__PURE__ */ D.makeMessageType("livekit.UserPacket", () => [
3402
+ ]), Rr = /* @__PURE__ */ O.makeMessageType("livekit.UserPacket", () => [
3395
3403
  {
3396
3404
  no: 1,
3397
3405
  name: "participant_sid",
@@ -3458,7 +3466,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3458
3466
  kind: "scalar",
3459
3467
  T: 12
3460
3468
  }
3461
- ]), zr = /* @__PURE__ */ D.makeMessageType("livekit.SipDTMF", () => [{
3469
+ ]), zr = /* @__PURE__ */ O.makeMessageType("livekit.SipDTMF", () => [{
3462
3470
  no: 3,
3463
3471
  name: "code",
3464
3472
  kind: "scalar",
@@ -3468,7 +3476,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3468
3476
  name: "digit",
3469
3477
  kind: "scalar",
3470
3478
  T: 9
3471
- }]), Br = /* @__PURE__ */ D.makeMessageType("livekit.Transcription", () => [
3479
+ }]), Br = /* @__PURE__ */ O.makeMessageType("livekit.Transcription", () => [
3472
3480
  {
3473
3481
  no: 2,
3474
3482
  name: "transcribed_participant_identity",
@@ -3488,7 +3496,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3488
3496
  T: Vr,
3489
3497
  repeated: !0
3490
3498
  }
3491
- ]), Vr = /* @__PURE__ */ D.makeMessageType("livekit.TranscriptionSegment", () => [
3499
+ ]), Vr = /* @__PURE__ */ O.makeMessageType("livekit.TranscriptionSegment", () => [
3492
3500
  {
3493
3501
  no: 1,
3494
3502
  name: "id",
@@ -3525,7 +3533,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3525
3533
  kind: "scalar",
3526
3534
  T: 9
3527
3535
  }
3528
- ]), Hr = /* @__PURE__ */ D.makeMessageType("livekit.ChatMessage", () => [
3536
+ ]), Hr = /* @__PURE__ */ O.makeMessageType("livekit.ChatMessage", () => [
3529
3537
  {
3530
3538
  no: 1,
3531
3539
  name: "id",
@@ -3563,7 +3571,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3563
3571
  kind: "scalar",
3564
3572
  T: 8
3565
3573
  }
3566
- ]), Ur = /* @__PURE__ */ D.makeMessageType("livekit.RpcRequest", () => [
3574
+ ]), Ur = /* @__PURE__ */ O.makeMessageType("livekit.RpcRequest", () => [
3567
3575
  {
3568
3576
  no: 1,
3569
3577
  name: "id",
@@ -3600,12 +3608,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3600
3608
  kind: "scalar",
3601
3609
  T: 12
3602
3610
  }
3603
- ]), Wr = /* @__PURE__ */ D.makeMessageType("livekit.RpcAck", () => [{
3611
+ ]), Wr = /* @__PURE__ */ O.makeMessageType("livekit.RpcAck", () => [{
3604
3612
  no: 1,
3605
3613
  name: "request_id",
3606
3614
  kind: "scalar",
3607
3615
  T: 9
3608
- }]), Gr = /* @__PURE__ */ D.makeMessageType("livekit.RpcResponse", () => [
3616
+ }]), Gr = /* @__PURE__ */ O.makeMessageType("livekit.RpcResponse", () => [
3609
3617
  {
3610
3618
  no: 1,
3611
3619
  name: "request_id",
@@ -3633,7 +3641,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3633
3641
  T: 12,
3634
3642
  oneof: "value"
3635
3643
  }
3636
- ]), Kr = /* @__PURE__ */ D.makeMessageType("livekit.RpcError", () => [
3644
+ ]), Kr = /* @__PURE__ */ O.makeMessageType("livekit.RpcError", () => [
3637
3645
  {
3638
3646
  no: 1,
3639
3647
  name: "code",
@@ -3652,7 +3660,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3652
3660
  kind: "scalar",
3653
3661
  T: 9
3654
3662
  }
3655
- ]), qr = /* @__PURE__ */ D.makeMessageType("livekit.ParticipantTracks", () => [{
3663
+ ]), qr = /* @__PURE__ */ O.makeMessageType("livekit.ParticipantTracks", () => [{
3656
3664
  no: 1,
3657
3665
  name: "participant_sid",
3658
3666
  kind: "scalar",
@@ -3663,12 +3671,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3663
3671
  kind: "scalar",
3664
3672
  T: 9,
3665
3673
  repeated: !0
3666
- }]), Jr = /* @__PURE__ */ D.makeMessageType("livekit.ServerInfo", () => [
3674
+ }]), Jr = /* @__PURE__ */ O.makeMessageType("livekit.ServerInfo", () => [
3667
3675
  {
3668
3676
  no: 1,
3669
3677
  name: "edition",
3670
3678
  kind: "enum",
3671
- T: D.getEnumType(Yr)
3679
+ T: O.getEnumType(Yr)
3672
3680
  },
3673
3681
  {
3674
3682
  no: 2,
@@ -3706,18 +3714,18 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3706
3714
  kind: "scalar",
3707
3715
  T: 5
3708
3716
  }
3709
- ]), Yr = /* @__PURE__ */ D.makeEnum("livekit.ServerInfo.Edition", [{
3717
+ ]), Yr = /* @__PURE__ */ O.makeEnum("livekit.ServerInfo.Edition", [{
3710
3718
  no: 0,
3711
3719
  name: "Standard"
3712
3720
  }, {
3713
3721
  no: 1,
3714
3722
  name: "Cloud"
3715
- }]), Xr = /* @__PURE__ */ D.makeMessageType("livekit.ClientInfo", () => [
3723
+ }]), Xr = /* @__PURE__ */ O.makeMessageType("livekit.ClientInfo", () => [
3716
3724
  {
3717
3725
  no: 1,
3718
3726
  name: "sdk",
3719
3727
  kind: "enum",
3720
- T: D.getEnumType(Zr)
3728
+ T: O.getEnumType(Zr)
3721
3729
  },
3722
3730
  {
3723
3731
  no: 2,
@@ -3789,10 +3797,10 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3789
3797
  no: 13,
3790
3798
  name: "capabilities",
3791
3799
  kind: "enum",
3792
- T: D.getEnumType(Qr),
3800
+ T: O.getEnumType(Qr),
3793
3801
  repeated: !0
3794
3802
  }
3795
- ]), Zr = /* @__PURE__ */ D.makeEnum("livekit.ClientInfo.SDK", [
3803
+ ]), Zr = /* @__PURE__ */ O.makeEnum("livekit.ClientInfo.SDK", [
3796
3804
  {
3797
3805
  no: 0,
3798
3806
  name: "UNKNOWN"
@@ -3853,7 +3861,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3853
3861
  no: 14,
3854
3862
  name: "ESP32"
3855
3863
  }
3856
- ]), Qr = /* @__PURE__ */ D.makeEnum("livekit.ClientInfo.Capability", [
3864
+ ]), Qr = /* @__PURE__ */ O.makeEnum("livekit.ClientInfo.Capability", [
3857
3865
  {
3858
3866
  no: 0,
3859
3867
  name: "CAP_UNUSED"
@@ -3866,7 +3874,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3866
3874
  no: 2,
3867
3875
  name: "CAP_COMPRESSION_DEFLATE_RAW"
3868
3876
  }
3869
- ]), $r = /* @__PURE__ */ D.makeMessageType("livekit.ClientConfiguration", () => [
3877
+ ]), $r = /* @__PURE__ */ O.makeMessageType("livekit.ClientConfiguration", () => [
3870
3878
  {
3871
3879
  no: 1,
3872
3880
  name: "video",
@@ -3883,7 +3891,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3883
3891
  no: 3,
3884
3892
  name: "resume_connection",
3885
3893
  kind: "enum",
3886
- T: D.getEnumType(sr)
3894
+ T: O.getEnumType(or)
3887
3895
  },
3888
3896
  {
3889
3897
  no: 4,
@@ -3895,14 +3903,14 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3895
3903
  no: 5,
3896
3904
  name: "force_relay",
3897
3905
  kind: "enum",
3898
- T: D.getEnumType(sr)
3906
+ T: O.getEnumType(or)
3899
3907
  }
3900
- ]), ei = /* @__PURE__ */ D.makeMessageType("livekit.VideoConfiguration", () => [{
3908
+ ]), ei = /* @__PURE__ */ O.makeMessageType("livekit.VideoConfiguration", () => [{
3901
3909
  no: 1,
3902
3910
  name: "hardware_encoder",
3903
3911
  kind: "enum",
3904
- T: D.getEnumType(sr)
3905
- }]), ti = /* @__PURE__ */ D.makeMessageType("livekit.DisabledCodecs", () => [{
3912
+ T: O.getEnumType(or)
3913
+ }]), ti = /* @__PURE__ */ O.makeMessageType("livekit.DisabledCodecs", () => [{
3906
3914
  no: 1,
3907
3915
  name: "codecs",
3908
3916
  kind: "message",
@@ -3914,7 +3922,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3914
3922
  kind: "message",
3915
3923
  T: pr,
3916
3924
  repeated: !0
3917
- }]), ni = /* @__PURE__ */ D.makeMessageType("livekit.TimedVersion", () => [{
3925
+ }]), ni = /* @__PURE__ */ O.makeMessageType("livekit.TimedVersion", () => [{
3918
3926
  no: 1,
3919
3927
  name: "unix_micro",
3920
3928
  kind: "scalar",
@@ -3924,7 +3932,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3924
3932
  name: "ticks",
3925
3933
  kind: "scalar",
3926
3934
  T: 5
3927
- }]), ri = /* @__PURE__ */ D.makeEnum("livekit.DataStream.OperationType", [
3935
+ }]), ri = /* @__PURE__ */ O.makeEnum("livekit.DataStream.OperationType", [
3928
3936
  {
3929
3937
  no: 0,
3930
3938
  name: "CREATE"
@@ -3941,18 +3949,18 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3941
3949
  no: 3,
3942
3950
  name: "REACTION"
3943
3951
  }
3944
- ]), ii = /* @__PURE__ */ D.makeEnum("livekit.DataStream.CompressionType", [{
3952
+ ]), ii = /* @__PURE__ */ O.makeEnum("livekit.DataStream.CompressionType", [{
3945
3953
  no: 0,
3946
3954
  name: "NONE"
3947
3955
  }, {
3948
3956
  no: 1,
3949
3957
  name: "DEFLATE_RAW"
3950
- }]), ai = /* @__PURE__ */ D.makeMessageType("livekit.DataStream.TextHeader", () => [
3958
+ }]), ai = /* @__PURE__ */ O.makeMessageType("livekit.DataStream.TextHeader", () => [
3951
3959
  {
3952
3960
  no: 1,
3953
3961
  name: "operation_type",
3954
3962
  kind: "enum",
3955
- T: D.getEnumType(ri)
3963
+ T: O.getEnumType(ri)
3956
3964
  },
3957
3965
  {
3958
3966
  no: 2,
@@ -3979,12 +3987,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
3979
3987
  kind: "scalar",
3980
3988
  T: 8
3981
3989
  }
3982
- ], { localName: "DataStream_TextHeader" }), oi = /* @__PURE__ */ D.makeMessageType("livekit.DataStream.ByteHeader", () => [{
3990
+ ], { localName: "DataStream_TextHeader" }), oi = /* @__PURE__ */ O.makeMessageType("livekit.DataStream.ByteHeader", () => [{
3983
3991
  no: 1,
3984
3992
  name: "name",
3985
3993
  kind: "scalar",
3986
3994
  T: 9
3987
- }], { localName: "DataStream_ByteHeader" }), si = /* @__PURE__ */ D.makeMessageType("livekit.DataStream.Header", () => [
3995
+ }], { localName: "DataStream_ByteHeader" }), si = /* @__PURE__ */ O.makeMessageType("livekit.DataStream.Header", () => [
3988
3996
  {
3989
3997
  no: 1,
3990
3998
  name: "stream_id",
@@ -4020,7 +4028,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4020
4028
  no: 7,
4021
4029
  name: "encryption_type",
4022
4030
  kind: "enum",
4023
- T: D.getEnumType(A)
4031
+ T: O.getEnumType(A)
4024
4032
  },
4025
4033
  {
4026
4034
  no: 8,
@@ -4057,9 +4065,9 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4057
4065
  no: 12,
4058
4066
  name: "compression",
4059
4067
  kind: "enum",
4060
- T: D.getEnumType(ii)
4068
+ T: O.getEnumType(ii)
4061
4069
  }
4062
- ], { localName: "DataStream_Header" }), ci = /* @__PURE__ */ D.makeMessageType("livekit.DataStream.Chunk", () => [
4070
+ ], { localName: "DataStream_Header" }), ci = /* @__PURE__ */ O.makeMessageType("livekit.DataStream.Chunk", () => [
4063
4071
  {
4064
4072
  no: 1,
4065
4073
  name: "stream_id",
@@ -4091,7 +4099,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4091
4099
  T: 12,
4092
4100
  opt: !0
4093
4101
  }
4094
- ], { localName: "DataStream_Chunk" }), li = /* @__PURE__ */ D.makeMessageType("livekit.DataStream.Trailer", () => [
4102
+ ], { localName: "DataStream_Chunk" }), li = /* @__PURE__ */ O.makeMessageType("livekit.DataStream.Trailer", () => [
4095
4103
  {
4096
4104
  no: 1,
4097
4105
  name: "stream_id",
@@ -4114,7 +4122,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4114
4122
  T: 9
4115
4123
  }
4116
4124
  }
4117
- ], { localName: "DataStream_Trailer" }), ui = /* @__PURE__ */ D.makeMessageType("livekit.SubscribedAudioCodec", () => [{
4125
+ ], { localName: "DataStream_Trailer" }), ui = /* @__PURE__ */ O.makeMessageType("livekit.SubscribedAudioCodec", () => [{
4118
4126
  no: 1,
4119
4127
  name: "codec",
4120
4128
  kind: "scalar",
@@ -4124,19 +4132,19 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4124
4132
  name: "enabled",
4125
4133
  kind: "scalar",
4126
4134
  T: 8
4127
- }]), di = /* @__PURE__ */ D.makeEnum("livekit.SignalTarget", [{
4135
+ }]), di = /* @__PURE__ */ O.makeEnum("livekit.SignalTarget", [{
4128
4136
  no: 0,
4129
4137
  name: "PUBLISHER"
4130
4138
  }, {
4131
4139
  no: 1,
4132
4140
  name: "SUBSCRIBER"
4133
- }]), fi = /* @__PURE__ */ D.makeEnum("livekit.StreamState", [{
4141
+ }]), fi = /* @__PURE__ */ O.makeEnum("livekit.StreamState", [{
4134
4142
  no: 0,
4135
4143
  name: "ACTIVE"
4136
4144
  }, {
4137
4145
  no: 1,
4138
4146
  name: "PAUSED"
4139
- }]), pi = /* @__PURE__ */ D.makeEnum("livekit.CandidateProtocol", [
4147
+ }]), pi = /* @__PURE__ */ O.makeEnum("livekit.CandidateProtocol", [
4140
4148
  {
4141
4149
  no: 0,
4142
4150
  name: "UDP"
@@ -4149,7 +4157,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4149
4157
  no: 2,
4150
4158
  name: "TLS"
4151
4159
  }
4152
- ]), mi = /* @__PURE__ */ D.makeMessageType("livekit.SignalRequest", () => [
4160
+ ]), mi = /* @__PURE__ */ O.makeMessageType("livekit.SignalRequest", () => [
4153
4161
  {
4154
4162
  no: 1,
4155
4163
  name: "offer",
@@ -4304,7 +4312,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4304
4312
  T: Li,
4305
4313
  oneof: "message"
4306
4314
  }
4307
- ]), hi = /* @__PURE__ */ D.makeMessageType("livekit.SignalResponse", () => [
4315
+ ]), hi = /* @__PURE__ */ O.makeMessageType("livekit.SignalResponse", () => [
4308
4316
  {
4309
4317
  no: 1,
4310
4318
  name: "join",
@@ -4515,7 +4523,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4515
4523
  T: Ri,
4516
4524
  oneof: "message"
4517
4525
  }
4518
- ]), gi = /* @__PURE__ */ D.makeMessageType("livekit.SimulcastCodec", () => [
4526
+ ]), gi = /* @__PURE__ */ O.makeMessageType("livekit.SimulcastCodec", () => [
4519
4527
  {
4520
4528
  no: 1,
4521
4529
  name: "codec",
@@ -4539,9 +4547,9 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4539
4547
  no: 5,
4540
4548
  name: "video_layer_mode",
4541
4549
  kind: "enum",
4542
- T: D.getEnumType(jr)
4550
+ T: O.getEnumType(jr)
4543
4551
  }
4544
- ]), _i = /* @__PURE__ */ D.makeMessageType("livekit.AddTrackRequest", () => [
4552
+ ]), _i = /* @__PURE__ */ O.makeMessageType("livekit.AddTrackRequest", () => [
4545
4553
  {
4546
4554
  no: 1,
4547
4555
  name: "cid",
@@ -4558,7 +4566,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4558
4566
  no: 3,
4559
4567
  name: "type",
4560
4568
  kind: "enum",
4561
- T: D.getEnumType(ir)
4569
+ T: O.getEnumType(rr)
4562
4570
  },
4563
4571
  {
4564
4572
  no: 4,
@@ -4588,7 +4596,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4588
4596
  no: 8,
4589
4597
  name: "source",
4590
4598
  kind: "enum",
4591
- T: D.getEnumType(O)
4599
+ T: O.getEnumType(k)
4592
4600
  },
4593
4601
  {
4594
4602
  no: 9,
@@ -4626,7 +4634,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4626
4634
  no: 14,
4627
4635
  name: "encryption",
4628
4636
  kind: "enum",
4629
- T: D.getEnumType(A)
4637
+ T: O.getEnumType(A)
4630
4638
  },
4631
4639
  {
4632
4640
  no: 15,
@@ -4638,23 +4646,23 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4638
4646
  no: 16,
4639
4647
  name: "backup_codec_policy",
4640
4648
  kind: "enum",
4641
- T: D.getEnumType(rr)
4649
+ T: O.getEnumType(nr)
4642
4650
  },
4643
4651
  {
4644
4652
  no: 17,
4645
4653
  name: "audio_features",
4646
4654
  kind: "enum",
4647
- T: D.getEnumType(k),
4655
+ T: O.getEnumType(ur),
4648
4656
  repeated: !0
4649
4657
  },
4650
4658
  {
4651
4659
  no: 18,
4652
4660
  name: "packet_trailer_features",
4653
4661
  kind: "enum",
4654
- T: D.getEnumType(dr),
4662
+ T: O.getEnumType(dr),
4655
4663
  repeated: !0
4656
4664
  }
4657
- ]), vi = /* @__PURE__ */ D.makeMessageType("livekit.PublishDataTrackRequest", () => [
4665
+ ]), vi = /* @__PURE__ */ O.makeMessageType("livekit.PublishDataTrackRequest", () => [
4658
4666
  {
4659
4667
  no: 1,
4660
4668
  name: "pub_handle",
@@ -4671,7 +4679,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4671
4679
  no: 3,
4672
4680
  name: "encryption",
4673
4681
  kind: "enum",
4674
- T: D.getEnumType(A)
4682
+ T: O.getEnumType(A)
4675
4683
  },
4676
4684
  {
4677
4685
  no: 4,
@@ -4687,22 +4695,22 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4687
4695
  T: Er,
4688
4696
  opt: !0
4689
4697
  }
4690
- ]), yi = /* @__PURE__ */ D.makeMessageType("livekit.PublishDataTrackResponse", () => [{
4698
+ ]), yi = /* @__PURE__ */ O.makeMessageType("livekit.PublishDataTrackResponse", () => [{
4691
4699
  no: 1,
4692
4700
  name: "info",
4693
4701
  kind: "message",
4694
4702
  T: xr
4695
- }]), bi = /* @__PURE__ */ D.makeMessageType("livekit.UnpublishDataTrackRequest", () => [{
4703
+ }]), bi = /* @__PURE__ */ O.makeMessageType("livekit.UnpublishDataTrackRequest", () => [{
4696
4704
  no: 1,
4697
4705
  name: "pub_handle",
4698
4706
  kind: "scalar",
4699
4707
  T: 13
4700
- }]), xi = /* @__PURE__ */ D.makeMessageType("livekit.UnpublishDataTrackResponse", () => [{
4708
+ }]), xi = /* @__PURE__ */ O.makeMessageType("livekit.UnpublishDataTrackResponse", () => [{
4701
4709
  no: 1,
4702
4710
  name: "info",
4703
4711
  kind: "message",
4704
4712
  T: xr
4705
- }]), Si = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackSubscriberHandles", () => [{
4713
+ }]), Si = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackSubscriberHandles", () => [{
4706
4714
  no: 1,
4707
4715
  name: "sub_handles",
4708
4716
  kind: "map",
@@ -4711,7 +4719,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4711
4719
  kind: "message",
4712
4720
  T: Ci
4713
4721
  }
4714
- }]), Ci = /* @__PURE__ */ D.makeMessageType("livekit.DataTrackSubscriberHandles.PublishedDataTrack", () => [
4722
+ }]), Ci = /* @__PURE__ */ O.makeMessageType("livekit.DataTrackSubscriberHandles.PublishedDataTrack", () => [
4715
4723
  {
4716
4724
  no: 1,
4717
4725
  name: "publisher_identity",
@@ -4730,7 +4738,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4730
4738
  kind: "scalar",
4731
4739
  T: 9
4732
4740
  }
4733
- ], { localName: "DataTrackSubscriberHandles_PublishedDataTrack" }), wi = /* @__PURE__ */ D.makeMessageType("livekit.TrickleRequest", () => [
4741
+ ], { localName: "DataTrackSubscriberHandles_PublishedDataTrack" }), wi = /* @__PURE__ */ O.makeMessageType("livekit.TrickleRequest", () => [
4734
4742
  {
4735
4743
  no: 1,
4736
4744
  name: "candidateInit",
@@ -4741,7 +4749,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4741
4749
  no: 2,
4742
4750
  name: "target",
4743
4751
  kind: "enum",
4744
- T: D.getEnumType(di)
4752
+ T: O.getEnumType(di)
4745
4753
  },
4746
4754
  {
4747
4755
  no: 3,
@@ -4749,7 +4757,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4749
4757
  kind: "scalar",
4750
4758
  T: 8
4751
4759
  }
4752
- ]), Ti = /* @__PURE__ */ D.makeMessageType("livekit.MuteTrackRequest", () => [{
4760
+ ]), Ti = /* @__PURE__ */ O.makeMessageType("livekit.MuteTrackRequest", () => [{
4753
4761
  no: 1,
4754
4762
  name: "sid",
4755
4763
  kind: "scalar",
@@ -4759,7 +4767,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4759
4767
  name: "muted",
4760
4768
  kind: "scalar",
4761
4769
  T: 8
4762
- }]), Ei = /* @__PURE__ */ D.makeMessageType("livekit.JoinResponse", () => [
4770
+ }]), Ei = /* @__PURE__ */ O.makeMessageType("livekit.JoinResponse", () => [
4763
4771
  {
4764
4772
  no: 1,
4765
4773
  name: "room",
@@ -4853,7 +4861,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4853
4861
  kind: "scalar",
4854
4862
  T: 8
4855
4863
  }
4856
- ]), Di = /* @__PURE__ */ D.makeMessageType("livekit.ReconnectResponse", () => [
4864
+ ]), Di = /* @__PURE__ */ O.makeMessageType("livekit.ReconnectResponse", () => [
4857
4865
  {
4858
4866
  no: 1,
4859
4867
  name: "ice_servers",
@@ -4879,7 +4887,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4879
4887
  kind: "scalar",
4880
4888
  T: 13
4881
4889
  }
4882
- ]), Oi = /* @__PURE__ */ D.makeMessageType("livekit.TrackPublishedResponse", () => [{
4890
+ ]), Oi = /* @__PURE__ */ O.makeMessageType("livekit.TrackPublishedResponse", () => [{
4883
4891
  no: 1,
4884
4892
  name: "cid",
4885
4893
  kind: "scalar",
@@ -4889,12 +4897,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4889
4897
  name: "track",
4890
4898
  kind: "message",
4891
4899
  T: br
4892
- }]), ki = /* @__PURE__ */ D.makeMessageType("livekit.TrackUnpublishedResponse", () => [{
4900
+ }]), ki = /* @__PURE__ */ O.makeMessageType("livekit.TrackUnpublishedResponse", () => [{
4893
4901
  no: 1,
4894
4902
  name: "track_sid",
4895
4903
  kind: "scalar",
4896
4904
  T: 9
4897
- }]), Ai = /* @__PURE__ */ D.makeMessageType("livekit.SessionDescription", () => [
4905
+ }]), Ai = /* @__PURE__ */ O.makeMessageType("livekit.SessionDescription", () => [
4898
4906
  {
4899
4907
  no: 1,
4900
4908
  name: "type",
@@ -4923,13 +4931,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4923
4931
  T: 9
4924
4932
  }
4925
4933
  }
4926
- ]), ji = /* @__PURE__ */ D.makeMessageType("livekit.ParticipantUpdate", () => [{
4934
+ ]), ji = /* @__PURE__ */ O.makeMessageType("livekit.ParticipantUpdate", () => [{
4927
4935
  no: 1,
4928
4936
  name: "participants",
4929
4937
  kind: "message",
4930
4938
  T: hr,
4931
4939
  repeated: !0
4932
- }]), Mi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateSubscription", () => [
4940
+ }]), Mi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateSubscription", () => [
4933
4941
  {
4934
4942
  no: 1,
4935
4943
  name: "track_sids",
@@ -4950,13 +4958,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4950
4958
  T: qr,
4951
4959
  repeated: !0
4952
4960
  }
4953
- ]), Ni = /* @__PURE__ */ D.makeMessageType("livekit.UpdateDataSubscription", () => [{
4961
+ ]), Ni = /* @__PURE__ */ O.makeMessageType("livekit.UpdateDataSubscription", () => [{
4954
4962
  no: 1,
4955
4963
  name: "updates",
4956
4964
  kind: "message",
4957
4965
  T: Pi,
4958
4966
  repeated: !0
4959
- }]), Pi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateDataSubscription.Update", () => [
4967
+ }]), Pi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateDataSubscription.Update", () => [
4960
4968
  {
4961
4969
  no: 1,
4962
4970
  name: "track_sid",
@@ -4975,7 +4983,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4975
4983
  kind: "message",
4976
4984
  T: Dr
4977
4985
  }
4978
- ], { localName: "UpdateDataSubscription_Update" }), Fi = /* @__PURE__ */ D.makeMessageType("livekit.StoreDataBlobRequest", () => [{
4986
+ ], { localName: "UpdateDataSubscription_Update" }), Fi = /* @__PURE__ */ O.makeMessageType("livekit.StoreDataBlobRequest", () => [{
4979
4987
  no: 1,
4980
4988
  name: "request_id",
4981
4989
  kind: "scalar",
@@ -4985,7 +4993,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4985
4993
  name: "blob",
4986
4994
  kind: "message",
4987
4995
  T: kr
4988
- }]), Ii = /* @__PURE__ */ D.makeMessageType("livekit.StoreDataBlobResponse", () => [{
4996
+ }]), Ii = /* @__PURE__ */ O.makeMessageType("livekit.StoreDataBlobResponse", () => [{
4989
4997
  no: 1,
4990
4998
  name: "request_id",
4991
4999
  kind: "scalar",
@@ -4995,7 +5003,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
4995
5003
  name: "key",
4996
5004
  kind: "message",
4997
5005
  T: Or
4998
- }]), Li = /* @__PURE__ */ D.makeMessageType("livekit.GetDataBlobRequest", () => [
5006
+ }]), Li = /* @__PURE__ */ O.makeMessageType("livekit.GetDataBlobRequest", () => [
4999
5007
  {
5000
5008
  no: 1,
5001
5009
  name: "request_id",
@@ -5014,7 +5022,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5014
5022
  kind: "message",
5015
5023
  T: Or
5016
5024
  }
5017
- ]), Ri = /* @__PURE__ */ D.makeMessageType("livekit.GetDataBlobResponse", () => [{
5025
+ ]), Ri = /* @__PURE__ */ O.makeMessageType("livekit.GetDataBlobResponse", () => [{
5018
5026
  no: 1,
5019
5027
  name: "request_id",
5020
5028
  kind: "scalar",
@@ -5024,7 +5032,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5024
5032
  name: "blob",
5025
5033
  kind: "message",
5026
5034
  T: kr
5027
- }]), zi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateTrackSettings", () => [
5035
+ }]), zi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateTrackSettings", () => [
5028
5036
  {
5029
5037
  no: 1,
5030
5038
  name: "track_sids",
@@ -5042,7 +5050,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5042
5050
  no: 4,
5043
5051
  name: "quality",
5044
5052
  kind: "enum",
5045
- T: D.getEnumType(ar)
5053
+ T: O.getEnumType(ir)
5046
5054
  },
5047
5055
  {
5048
5056
  no: 5,
@@ -5068,7 +5076,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5068
5076
  kind: "scalar",
5069
5077
  T: 13
5070
5078
  }
5071
- ]), Bi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateLocalAudioTrack", () => [{
5079
+ ]), Bi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateLocalAudioTrack", () => [{
5072
5080
  no: 1,
5073
5081
  name: "track_sid",
5074
5082
  kind: "scalar",
@@ -5077,9 +5085,9 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5077
5085
  no: 2,
5078
5086
  name: "features",
5079
5087
  kind: "enum",
5080
- T: D.getEnumType(k),
5088
+ T: O.getEnumType(ur),
5081
5089
  repeated: !0
5082
- }]), Vi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateLocalVideoTrack", () => [
5090
+ }]), Vi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateLocalVideoTrack", () => [
5083
5091
  {
5084
5092
  no: 1,
5085
5093
  name: "track_sid",
@@ -5098,7 +5106,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5098
5106
  kind: "scalar",
5099
5107
  T: 13
5100
5108
  }
5101
- ]), Hi = /* @__PURE__ */ D.makeMessageType("livekit.LeaveRequest", () => [
5109
+ ]), Hi = /* @__PURE__ */ O.makeMessageType("livekit.LeaveRequest", () => [
5102
5110
  {
5103
5111
  no: 1,
5104
5112
  name: "can_reconnect",
@@ -5109,13 +5117,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5109
5117
  no: 2,
5110
5118
  name: "reason",
5111
5119
  kind: "enum",
5112
- T: D.getEnumType(cr)
5120
+ T: O.getEnumType(sr)
5113
5121
  },
5114
5122
  {
5115
5123
  no: 3,
5116
5124
  name: "action",
5117
5125
  kind: "enum",
5118
- T: D.getEnumType(Ui)
5126
+ T: O.getEnumType(Ui)
5119
5127
  },
5120
5128
  {
5121
5129
  no: 4,
@@ -5123,7 +5131,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5123
5131
  kind: "message",
5124
5132
  T: pa
5125
5133
  }
5126
- ]), Ui = /* @__PURE__ */ D.makeEnum("livekit.LeaveRequest.Action", [
5134
+ ]), Ui = /* @__PURE__ */ O.makeEnum("livekit.LeaveRequest.Action", [
5127
5135
  {
5128
5136
  no: 0,
5129
5137
  name: "DISCONNECT"
@@ -5136,7 +5144,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5136
5144
  no: 2,
5137
5145
  name: "RECONNECT"
5138
5146
  }
5139
- ]), Wi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateVideoLayers", () => [{
5147
+ ]), Wi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateVideoLayers", () => [{
5140
5148
  no: 1,
5141
5149
  name: "track_sid",
5142
5150
  kind: "scalar",
@@ -5147,7 +5155,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5147
5155
  kind: "message",
5148
5156
  T: Ar,
5149
5157
  repeated: !0
5150
- }]), Gi = /* @__PURE__ */ D.makeMessageType("livekit.UpdateParticipantMetadata", () => [
5158
+ }]), Gi = /* @__PURE__ */ O.makeMessageType("livekit.UpdateParticipantMetadata", () => [
5151
5159
  {
5152
5160
  no: 1,
5153
5161
  name: "metadata",
@@ -5176,7 +5184,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5176
5184
  kind: "scalar",
5177
5185
  T: 13
5178
5186
  }
5179
- ]), Ki = /* @__PURE__ */ D.makeMessageType("livekit.ICEServer", () => [
5187
+ ]), Ki = /* @__PURE__ */ O.makeMessageType("livekit.ICEServer", () => [
5180
5188
  {
5181
5189
  no: 1,
5182
5190
  name: "urls",
@@ -5196,18 +5204,18 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5196
5204
  kind: "scalar",
5197
5205
  T: 9
5198
5206
  }
5199
- ]), qi = /* @__PURE__ */ D.makeMessageType("livekit.SpeakersChanged", () => [{
5207
+ ]), qi = /* @__PURE__ */ O.makeMessageType("livekit.SpeakersChanged", () => [{
5200
5208
  no: 1,
5201
5209
  name: "speakers",
5202
5210
  kind: "message",
5203
5211
  T: Lr,
5204
5212
  repeated: !0
5205
- }]), Ji = /* @__PURE__ */ D.makeMessageType("livekit.RoomUpdate", () => [{
5213
+ }]), Ji = /* @__PURE__ */ O.makeMessageType("livekit.RoomUpdate", () => [{
5206
5214
  no: 1,
5207
5215
  name: "room",
5208
5216
  kind: "message",
5209
5217
  T: fr
5210
- }]), Yi = /* @__PURE__ */ D.makeMessageType("livekit.ConnectionQualityInfo", () => [
5218
+ }]), Yi = /* @__PURE__ */ O.makeMessageType("livekit.ConnectionQualityInfo", () => [
5211
5219
  {
5212
5220
  no: 1,
5213
5221
  name: "participant_sid",
@@ -5218,7 +5226,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5218
5226
  no: 2,
5219
5227
  name: "quality",
5220
5228
  kind: "enum",
5221
- T: D.getEnumType(or)
5229
+ T: O.getEnumType(ar)
5222
5230
  },
5223
5231
  {
5224
5232
  no: 3,
@@ -5226,13 +5234,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5226
5234
  kind: "scalar",
5227
5235
  T: 2
5228
5236
  }
5229
- ]), Xi = /* @__PURE__ */ D.makeMessageType("livekit.ConnectionQualityUpdate", () => [{
5237
+ ]), Xi = /* @__PURE__ */ O.makeMessageType("livekit.ConnectionQualityUpdate", () => [{
5230
5238
  no: 1,
5231
5239
  name: "updates",
5232
5240
  kind: "message",
5233
5241
  T: Yi,
5234
5242
  repeated: !0
5235
- }]), Zi = /* @__PURE__ */ D.makeMessageType("livekit.StreamStateInfo", () => [
5243
+ }]), Zi = /* @__PURE__ */ O.makeMessageType("livekit.StreamStateInfo", () => [
5236
5244
  {
5237
5245
  no: 1,
5238
5246
  name: "participant_sid",
@@ -5249,25 +5257,25 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5249
5257
  no: 3,
5250
5258
  name: "state",
5251
5259
  kind: "enum",
5252
- T: D.getEnumType(fi)
5260
+ T: O.getEnumType(fi)
5253
5261
  }
5254
- ]), Qi = /* @__PURE__ */ D.makeMessageType("livekit.StreamStateUpdate", () => [{
5262
+ ]), Qi = /* @__PURE__ */ O.makeMessageType("livekit.StreamStateUpdate", () => [{
5255
5263
  no: 1,
5256
5264
  name: "stream_states",
5257
5265
  kind: "message",
5258
5266
  T: Zi,
5259
5267
  repeated: !0
5260
- }]), $i = /* @__PURE__ */ D.makeMessageType("livekit.SubscribedQuality", () => [{
5268
+ }]), $i = /* @__PURE__ */ O.makeMessageType("livekit.SubscribedQuality", () => [{
5261
5269
  no: 1,
5262
5270
  name: "quality",
5263
5271
  kind: "enum",
5264
- T: D.getEnumType(ar)
5272
+ T: O.getEnumType(ir)
5265
5273
  }, {
5266
5274
  no: 2,
5267
5275
  name: "enabled",
5268
5276
  kind: "scalar",
5269
5277
  T: 8
5270
- }]), ea = /* @__PURE__ */ D.makeMessageType("livekit.SubscribedCodec", () => [{
5278
+ }]), ea = /* @__PURE__ */ O.makeMessageType("livekit.SubscribedCodec", () => [{
5271
5279
  no: 1,
5272
5280
  name: "codec",
5273
5281
  kind: "scalar",
@@ -5278,7 +5286,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5278
5286
  kind: "message",
5279
5287
  T: $i,
5280
5288
  repeated: !0
5281
- }]), ta = /* @__PURE__ */ D.makeMessageType("livekit.SubscribedQualityUpdate", () => [
5289
+ }]), ta = /* @__PURE__ */ O.makeMessageType("livekit.SubscribedQualityUpdate", () => [
5282
5290
  {
5283
5291
  no: 1,
5284
5292
  name: "track_sid",
@@ -5299,7 +5307,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5299
5307
  T: ea,
5300
5308
  repeated: !0
5301
5309
  }
5302
- ]), na = /* @__PURE__ */ D.makeMessageType("livekit.SubscribedAudioCodecUpdate", () => [{
5310
+ ]), na = /* @__PURE__ */ O.makeMessageType("livekit.SubscribedAudioCodecUpdate", () => [{
5303
5311
  no: 1,
5304
5312
  name: "track_sid",
5305
5313
  kind: "scalar",
@@ -5310,7 +5318,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5310
5318
  kind: "message",
5311
5319
  T: ui,
5312
5320
  repeated: !0
5313
- }]), ra = /* @__PURE__ */ D.makeMessageType("livekit.TrackPermission", () => [
5321
+ }]), ra = /* @__PURE__ */ O.makeMessageType("livekit.TrackPermission", () => [
5314
5322
  {
5315
5323
  no: 1,
5316
5324
  name: "participant_sid",
@@ -5336,7 +5344,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5336
5344
  kind: "scalar",
5337
5345
  T: 9
5338
5346
  }
5339
- ]), ia = /* @__PURE__ */ D.makeMessageType("livekit.SubscriptionPermission", () => [{
5347
+ ]), ia = /* @__PURE__ */ O.makeMessageType("livekit.SubscriptionPermission", () => [{
5340
5348
  no: 1,
5341
5349
  name: "all_participants",
5342
5350
  kind: "scalar",
@@ -5347,7 +5355,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5347
5355
  kind: "message",
5348
5356
  T: ra,
5349
5357
  repeated: !0
5350
- }]), aa = /* @__PURE__ */ D.makeMessageType("livekit.SubscriptionPermissionUpdate", () => [
5358
+ }]), aa = /* @__PURE__ */ O.makeMessageType("livekit.SubscriptionPermissionUpdate", () => [
5351
5359
  {
5352
5360
  no: 1,
5353
5361
  name: "participant_sid",
@@ -5366,7 +5374,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5366
5374
  kind: "scalar",
5367
5375
  T: 8
5368
5376
  }
5369
- ]), oa = /* @__PURE__ */ D.makeMessageType("livekit.RoomMovedResponse", () => [
5377
+ ]), oa = /* @__PURE__ */ O.makeMessageType("livekit.RoomMovedResponse", () => [
5370
5378
  {
5371
5379
  no: 1,
5372
5380
  name: "room",
@@ -5392,7 +5400,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5392
5400
  T: hr,
5393
5401
  repeated: !0
5394
5402
  }
5395
- ]), sa = /* @__PURE__ */ D.makeMessageType("livekit.SyncState", () => [
5403
+ ]), sa = /* @__PURE__ */ O.makeMessageType("livekit.SyncState", () => [
5396
5404
  {
5397
5405
  no: 1,
5398
5406
  name: "answer",
@@ -5446,7 +5454,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5446
5454
  T: yi,
5447
5455
  repeated: !0
5448
5456
  }
5449
- ]), ca = /* @__PURE__ */ D.makeMessageType("livekit.DataChannelReceiveState", () => [{
5457
+ ]), ca = /* @__PURE__ */ O.makeMessageType("livekit.DataChannelReceiveState", () => [{
5450
5458
  no: 1,
5451
5459
  name: "publisher_sid",
5452
5460
  kind: "scalar",
@@ -5456,7 +5464,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5456
5464
  name: "last_seq",
5457
5465
  kind: "scalar",
5458
5466
  T: 13
5459
- }]), la = /* @__PURE__ */ D.makeMessageType("livekit.DataChannelInfo", () => [
5467
+ }]), la = /* @__PURE__ */ O.makeMessageType("livekit.DataChannelInfo", () => [
5460
5468
  {
5461
5469
  no: 1,
5462
5470
  name: "label",
@@ -5473,9 +5481,9 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5473
5481
  no: 3,
5474
5482
  name: "target",
5475
5483
  kind: "enum",
5476
- T: D.getEnumType(di)
5484
+ T: O.getEnumType(di)
5477
5485
  }
5478
- ]), ua = /* @__PURE__ */ D.makeMessageType("livekit.SimulateScenario", () => [
5486
+ ]), ua = /* @__PURE__ */ O.makeMessageType("livekit.SimulateScenario", () => [
5479
5487
  {
5480
5488
  no: 1,
5481
5489
  name: "speaker_update",
@@ -5508,7 +5516,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5508
5516
  no: 5,
5509
5517
  name: "switch_candidate_protocol",
5510
5518
  kind: "enum",
5511
- T: D.getEnumType(pi),
5519
+ T: O.getEnumType(pi),
5512
5520
  oneof: "scenario"
5513
5521
  },
5514
5522
  {
@@ -5539,7 +5547,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5539
5547
  T: 8,
5540
5548
  oneof: "scenario"
5541
5549
  }
5542
- ]), da = /* @__PURE__ */ D.makeMessageType("livekit.Ping", () => [{
5550
+ ]), da = /* @__PURE__ */ O.makeMessageType("livekit.Ping", () => [{
5543
5551
  no: 1,
5544
5552
  name: "timestamp",
5545
5553
  kind: "scalar",
@@ -5549,7 +5557,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5549
5557
  name: "rtt",
5550
5558
  kind: "scalar",
5551
5559
  T: 3
5552
- }]), fa = /* @__PURE__ */ D.makeMessageType("livekit.Pong", () => [{
5560
+ }]), fa = /* @__PURE__ */ O.makeMessageType("livekit.Pong", () => [{
5553
5561
  no: 1,
5554
5562
  name: "last_ping_timestamp",
5555
5563
  kind: "scalar",
@@ -5559,13 +5567,13 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5559
5567
  name: "timestamp",
5560
5568
  kind: "scalar",
5561
5569
  T: 3
5562
- }]), pa = /* @__PURE__ */ D.makeMessageType("livekit.RegionSettings", () => [{
5570
+ }]), pa = /* @__PURE__ */ O.makeMessageType("livekit.RegionSettings", () => [{
5563
5571
  no: 1,
5564
5572
  name: "regions",
5565
5573
  kind: "message",
5566
5574
  T: ma,
5567
5575
  repeated: !0
5568
- }]), ma = /* @__PURE__ */ D.makeMessageType("livekit.RegionInfo", () => [
5576
+ }]), ma = /* @__PURE__ */ O.makeMessageType("livekit.RegionInfo", () => [
5569
5577
  {
5570
5578
  no: 1,
5571
5579
  name: "region",
@@ -5584,7 +5592,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5584
5592
  kind: "scalar",
5585
5593
  T: 3
5586
5594
  }
5587
- ]), ha = /* @__PURE__ */ D.makeMessageType("livekit.SubscriptionResponse", () => [{
5595
+ ]), ha = /* @__PURE__ */ O.makeMessageType("livekit.SubscriptionResponse", () => [{
5588
5596
  no: 1,
5589
5597
  name: "track_sid",
5590
5598
  kind: "scalar",
@@ -5593,8 +5601,8 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5593
5601
  no: 2,
5594
5602
  name: "err",
5595
5603
  kind: "enum",
5596
- T: D.getEnumType(ur)
5597
- }]), ga = /* @__PURE__ */ D.makeMessageType("livekit.RequestResponse", () => [
5604
+ T: O.getEnumType(lr)
5605
+ }]), ga = /* @__PURE__ */ O.makeMessageType("livekit.RequestResponse", () => [
5598
5606
  {
5599
5607
  no: 1,
5600
5608
  name: "request_id",
@@ -5605,7 +5613,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5605
5613
  no: 2,
5606
5614
  name: "reason",
5607
5615
  kind: "enum",
5608
- T: D.getEnumType(_a)
5616
+ T: O.getEnumType(_a)
5609
5617
  },
5610
5618
  {
5611
5619
  no: 3,
@@ -5669,7 +5677,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5669
5677
  T: bi,
5670
5678
  oneof: "request"
5671
5679
  }
5672
- ]), _a = /* @__PURE__ */ D.makeEnum("livekit.RequestResponse.Reason", [
5680
+ ]), _a = /* @__PURE__ */ O.makeEnum("livekit.RequestResponse.Reason", [
5673
5681
  {
5674
5682
  no: 0,
5675
5683
  name: "OK"
@@ -5718,12 +5726,12 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5718
5726
  no: 11,
5719
5727
  name: "INVALID_REQUEST"
5720
5728
  }
5721
- ]), va = /* @__PURE__ */ D.makeMessageType("livekit.TrackSubscribed", () => [{
5729
+ ]), va = /* @__PURE__ */ O.makeMessageType("livekit.TrackSubscribed", () => [{
5722
5730
  no: 1,
5723
5731
  name: "track_sid",
5724
5732
  kind: "scalar",
5725
5733
  T: 9
5726
- }]), ya = /* @__PURE__ */ D.makeMessageType("livekit.ConnectionSettings", () => [
5734
+ }]), ya = /* @__PURE__ */ O.makeMessageType("livekit.ConnectionSettings", () => [
5727
5735
  {
5728
5736
  no: 1,
5729
5737
  name: "auto_subscribe",
@@ -5756,7 +5764,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5756
5764
  T: 8,
5757
5765
  opt: !0
5758
5766
  }
5759
- ]), ba = /* @__PURE__ */ D.makeMessageType("livekit.JoinRequest", () => [
5767
+ ]), ba = /* @__PURE__ */ O.makeMessageType("livekit.JoinRequest", () => [
5760
5768
  {
5761
5769
  no: 1,
5762
5770
  name: "client_info",
@@ -5808,7 +5816,7 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5808
5816
  no: 8,
5809
5817
  name: "reconnect_reason",
5810
5818
  kind: "enum",
5811
- T: D.getEnumType(lr)
5819
+ T: O.getEnumType(cr)
5812
5820
  },
5813
5821
  {
5814
5822
  no: 9,
@@ -5822,23 +5830,23 @@ var $n = /* @__PURE__ */ D.makeMessageType("livekit.MetricsBatch", () => [
5822
5830
  kind: "message",
5823
5831
  T: sa
5824
5832
  }
5825
- ]), xa = /* @__PURE__ */ D.makeMessageType("livekit.WrappedJoinRequest", () => [{
5833
+ ]), xa = /* @__PURE__ */ O.makeMessageType("livekit.WrappedJoinRequest", () => [{
5826
5834
  no: 1,
5827
5835
  name: "compression",
5828
5836
  kind: "enum",
5829
- T: D.getEnumType(Sa)
5837
+ T: O.getEnumType(Sa)
5830
5838
  }, {
5831
5839
  no: 2,
5832
5840
  name: "join_request",
5833
5841
  kind: "scalar",
5834
5842
  T: 12
5835
- }]), Sa = /* @__PURE__ */ D.makeEnum("livekit.WrappedJoinRequest.Compression", [{
5843
+ }]), Sa = /* @__PURE__ */ O.makeEnum("livekit.WrappedJoinRequest.Compression", [{
5836
5844
  no: 0,
5837
5845
  name: "NONE"
5838
5846
  }, {
5839
5847
  no: 1,
5840
5848
  name: "GZIP"
5841
- }]), Ca = /* @__PURE__ */ D.makeMessageType("livekit.MediaSectionsRequirement", () => [{
5849
+ }]), Ca = /* @__PURE__ */ O.makeMessageType("livekit.MediaSectionsRequirement", () => [{
5842
5850
  no: 1,
5843
5851
  name: "num_audios",
5844
5852
  kind: "scalar",
@@ -5912,7 +5920,7 @@ function Oa() {
5912
5920
  } catch {}
5913
5921
  }
5914
5922
  }
5915
- function ee() {
5923
+ function m() {
5916
5924
  var e;
5917
5925
  if (!(typeof window === t || !f)) {
5918
5926
  try {
@@ -5925,7 +5933,7 @@ function Oa() {
5925
5933
  return o.levels[e] === void 0 && (e = void 0), e;
5926
5934
  }
5927
5935
  }
5928
- function m() {
5936
+ function ee() {
5929
5937
  if (!(typeof window === t || !f)) {
5930
5938
  try {
5931
5939
  window.localStorage.removeItem(f);
@@ -5952,9 +5960,9 @@ function Oa() {
5952
5960
  }, o.setLevel = function(e, t) {
5953
5961
  return u = h(e), t !== !1 && p(u), l.call(o);
5954
5962
  }, o.setDefaultLevel = function(e) {
5955
- c = h(e), ee() || o.setLevel(e, !1);
5963
+ c = h(e), m() || o.setLevel(e, !1);
5956
5964
  }, o.resetLevel = function() {
5957
- u = null, m(), l.call(o);
5965
+ u = null, ee(), l.call(o);
5958
5966
  }, o.enableAll = function(e) {
5959
5967
  o.setLevel(o.levels.TRACE, e);
5960
5968
  }, o.disableAll = function(e) {
@@ -5962,8 +5970,8 @@ function Oa() {
5962
5970
  }, o.rebuild = function() {
5963
5971
  if (a !== o && (s = h(a.getLevel())), l.call(o), a === o) for (var e in i) i[e].rebuild();
5964
5972
  }, s = h(a ? a.getLevel() : "WARN");
5965
- var te = ee();
5966
- te != null && (u = h(te)), l.call(o);
5973
+ var g = m();
5974
+ g != null && (u = h(g)), l.call(o);
5967
5975
  }
5968
5976
  a = new f(), a.getLogger = function(e) {
5969
5977
  if (typeof e != "symbol" && typeof e != "string" || e === "") throw TypeError("You must supply a name when creating a logger.");
@@ -6169,7 +6177,7 @@ function Ga() {
6169
6177
  function a() {
6170
6178
  a.init.call(this);
6171
6179
  }
6172
- Ua.exports = a, Ua.exports.once = te, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
6180
+ Ua.exports = a, Ua.exports.once = g, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
6173
6181
  var o = 10;
6174
6182
  function s(e) {
6175
6183
  if (typeof e != "function") throw TypeError("The \"listener\" argument must be of type Function. Received type " + typeof e);
@@ -6208,7 +6216,7 @@ function Ga() {
6208
6216
  var c = a[e];
6209
6217
  if (c === void 0) return !1;
6210
6218
  if (typeof c == "function") t(c, this, n);
6211
- else for (var l = c.length, u = ee(c, l), r = 0; r < l; ++r) t(u[r], this, n);
6219
+ else for (var l = c.length, u = m(c, l), r = 0; r < l; ++r) t(u[r], this, n);
6212
6220
  return !0;
6213
6221
  };
6214
6222
  function l(e, t, n, i) {
@@ -6253,7 +6261,7 @@ function Ga() {
6253
6261
  break;
6254
6262
  }
6255
6263
  if (i < 0) return this;
6256
- i === 0 ? n.shift() : m(n, i), n.length === 1 && (r[e] = n[0]), r.removeListener !== void 0 && this.emit("removeListener", e, o || t);
6264
+ i === 0 ? n.shift() : ee(n, i), n.length === 1 && (r[e] = n[0]), r.removeListener !== void 0 && this.emit("removeListener", e, o || t);
6257
6265
  }
6258
6266
  return this;
6259
6267
  }, a.prototype.off = a.prototype.removeListener, a.prototype.removeAllListeners = function(e) {
@@ -6273,7 +6281,7 @@ function Ga() {
6273
6281
  var r = e._events;
6274
6282
  if (r === void 0) return [];
6275
6283
  var i = r[t];
6276
- return i === void 0 ? [] : typeof i == "function" ? n ? [i.listener || i] : [i] : n ? h(i) : ee(i, i.length);
6284
+ return i === void 0 ? [] : typeof i == "function" ? n ? [i.listener || i] : [i] : n ? h(i) : m(i, i.length);
6277
6285
  }
6278
6286
  a.prototype.listeners = function(e) {
6279
6287
  return f(this, e, !0);
@@ -6294,11 +6302,11 @@ function Ga() {
6294
6302
  a.prototype.eventNames = function() {
6295
6303
  return this._eventsCount > 0 ? n(this._events) : [];
6296
6304
  };
6297
- function ee(e, t) {
6305
+ function m(e, t) {
6298
6306
  for (var n = Array(t), r = 0; r < t; ++r) n[r] = e[r];
6299
6307
  return n;
6300
6308
  }
6301
- function m(e, t) {
6309
+ function ee(e, t) {
6302
6310
  for (; t + 1 < e.length; t++) e[t] = e[t + 1];
6303
6311
  e.pop();
6304
6312
  }
@@ -6306,7 +6314,7 @@ function Ga() {
6306
6314
  for (var t = Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
6307
6315
  return t;
6308
6316
  }
6309
- function te(e, t) {
6317
+ function g(e, t) {
6310
6318
  return new Promise(function(n, r) {
6311
6319
  function i(n) {
6312
6320
  e.removeListener(t, a), r(n);
@@ -6314,10 +6322,10 @@ function Ga() {
6314
6322
  function a() {
6315
6323
  typeof e.removeListener == "function" && e.removeListener("error", i), n([].slice.call(arguments));
6316
6324
  }
6317
- ne(e, t, a, { once: !0 }), t !== "error" && g(e, i, { once: !0 });
6325
+ ne(e, t, a, { once: !0 }), t !== "error" && te(e, i, { once: !0 });
6318
6326
  });
6319
6327
  }
6320
- function g(e, t, n) {
6328
+ function te(e, t, n) {
6321
6329
  typeof e.on == "function" && ne(e, "error", t, n);
6322
6330
  }
6323
6331
  function ne(e, t, n, r) {
@@ -8055,10 +8063,10 @@ function qs(e) {
8055
8063
  }
8056
8064
  function Js(e) {
8057
8065
  switch (e) {
8058
- case O.CAMERA: return K.Source.Camera;
8059
- case O.MICROPHONE: return K.Source.Microphone;
8060
- case O.SCREEN_SHARE: return K.Source.ScreenShare;
8061
- case O.SCREEN_SHARE_AUDIO: return K.Source.ScreenShareAudio;
8066
+ case k.CAMERA: return K.Source.Camera;
8067
+ case k.MICROPHONE: return K.Source.Microphone;
8068
+ case k.SCREEN_SHARE: return K.Source.ScreenShare;
8069
+ case k.SCREEN_SHARE_AUDIO: return K.Source.ScreenShareAudio;
8062
8070
  default: return K.Source.Unknown;
8063
8071
  }
8064
8072
  }
@@ -8190,36 +8198,36 @@ function tc(e, t) {
8190
8198
  })(r = e.StreamState ||= {});
8191
8199
  function i(e) {
8192
8200
  switch (e) {
8193
- case t.Audio: return ir.AUDIO;
8194
- case t.Video: return ir.VIDEO;
8195
- default: return ir.DATA;
8201
+ case t.Audio: return rr.AUDIO;
8202
+ case t.Video: return rr.VIDEO;
8203
+ default: return rr.DATA;
8196
8204
  }
8197
8205
  }
8198
8206
  e.kindToProto = i;
8199
8207
  function a(e) {
8200
8208
  switch (e) {
8201
- case ir.AUDIO: return t.Audio;
8202
- case ir.VIDEO: return t.Video;
8209
+ case rr.AUDIO: return t.Audio;
8210
+ case rr.VIDEO: return t.Video;
8203
8211
  default: return t.Unknown;
8204
8212
  }
8205
8213
  }
8206
8214
  e.kindFromProto = a;
8207
8215
  function o(e) {
8208
8216
  switch (e) {
8209
- case n.Camera: return O.CAMERA;
8210
- case n.Microphone: return O.MICROPHONE;
8211
- case n.ScreenShare: return O.SCREEN_SHARE;
8212
- case n.ScreenShareAudio: return O.SCREEN_SHARE_AUDIO;
8213
- default: return O.UNKNOWN;
8217
+ case n.Camera: return k.CAMERA;
8218
+ case n.Microphone: return k.MICROPHONE;
8219
+ case n.ScreenShare: return k.SCREEN_SHARE;
8220
+ case n.ScreenShareAudio: return k.SCREEN_SHARE_AUDIO;
8221
+ default: return k.UNKNOWN;
8214
8222
  }
8215
8223
  }
8216
8224
  e.sourceToProto = o;
8217
8225
  function s(e) {
8218
8226
  switch (e) {
8219
- case O.CAMERA: return n.Camera;
8220
- case O.MICROPHONE: return n.Microphone;
8221
- case O.SCREEN_SHARE: return n.ScreenShare;
8222
- case O.SCREEN_SHARE_AUDIO: return n.ScreenShareAudio;
8227
+ case k.CAMERA: return n.Camera;
8228
+ case k.MICROPHONE: return n.Microphone;
8229
+ case k.SCREEN_SHARE: return n.ScreenShare;
8230
+ case k.SCREEN_SHARE_AUDIO: return n.ScreenShareAudio;
8223
8231
  default: return n.Unknown;
8224
8232
  }
8225
8233
  }
@@ -8389,7 +8397,7 @@ function Rc() {
8389
8397
  i.width = e, i.height = t;
8390
8398
  let a = i.getContext("2d");
8391
8399
  a?.fillRect(0, 0, i.width, i.height), r && a && (a.beginPath(), a.arc(e / 2, t / 2, 50, 0, Math.PI * 2, !0), a.closePath(), a.fillStyle = "grey", a.fill());
8392
- let o = T(i.captureStream().getTracks(), 1)[0];
8400
+ let o = E(i.captureStream().getTracks(), 1)[0];
8393
8401
  if (!o) throw Error("Could not get empty media stream video track");
8394
8402
  return o.enabled = n, o;
8395
8403
  }
@@ -8399,7 +8407,7 @@ function Bc() {
8399
8407
  let e = new AudioContext(), t = e.createOscillator(), n = e.createGain();
8400
8408
  n.gain.setValueAtTime(0, 0);
8401
8409
  let r = e.createMediaStreamDestination();
8402
- if (t.connect(n), n.connect(r), t.start(), zc = T(r.stream.getAudioTracks(), 1)[0], !zc) throw Error("Could not get empty media stream audio track");
8410
+ if (t.connect(n), n.connect(r), t.start(), zc = E(r.stream.getAudioTracks(), 1)[0], !zc) throw Error("Could not get empty media stream audio track");
8403
8411
  zc.enabled = !1;
8404
8412
  }
8405
8413
  return zc.clone();
@@ -8460,10 +8468,10 @@ function qc(e) {
8460
8468
  function Jc(e) {
8461
8469
  switch (e.reason) {
8462
8470
  case P.LeaveRequest: return e.context;
8463
- case P.Cancelled: return cr.CLIENT_INITIATED;
8464
- case P.NotAllowed: return cr.USER_REJECTED;
8465
- case P.ServerUnreachable: return cr.JOIN_FAILURE;
8466
- default: return cr.UNKNOWN_REASON;
8471
+ case P.Cancelled: return sr.CLIENT_INITIATED;
8472
+ case P.NotAllowed: return sr.USER_REJECTED;
8473
+ case P.ServerUnreachable: return sr.JOIN_FAILURE;
8474
+ default: return sr.UNKNOWN_REASON;
8467
8475
  }
8468
8476
  }
8469
8477
  function Yc(e) {
@@ -8548,7 +8556,7 @@ function dl() {
8548
8556
  return ul() && !mc();
8549
8557
  }
8550
8558
  function fl(e, t) {
8551
- let n = T(ic(t.id), 2)[1];
8559
+ let n = E(ic(t.id), 2)[1];
8552
8560
  if (n?.startsWith("TR")) return n;
8553
8561
  if (e.id.startsWith("TR")) return e.id;
8554
8562
  }
@@ -9996,7 +10004,7 @@ var hu = 250, gu = 5e3, _u = class {
9996
10004
  return this.sendRequest({
9997
10005
  case: "leave",
9998
10006
  value: new Hi({
9999
- reason: cr.CLIENT_INITIATED,
10007
+ reason: sr.CLIENT_INITIATED,
10000
10008
  action: Ui.DISCONNECT
10001
10009
  })
10002
10010
  });
@@ -10260,7 +10268,7 @@ var Su = class {
10260
10268
  cleanup() {
10261
10269
  let e = Date.now();
10262
10270
  for (let n of this._map.entries()) {
10263
- var t = T(n, 2);
10271
+ var t = E(n, 2);
10264
10272
  let r = t[0];
10265
10273
  t[1].expiresAt < e && this._map.delete(r);
10266
10274
  }
@@ -10272,7 +10280,7 @@ var Su = class {
10272
10280
  forEach(e) {
10273
10281
  this.cleanup();
10274
10282
  for (let n of this._map.entries()) {
10275
- var t = T(n, 2);
10283
+ var t = E(n, 2);
10276
10284
  let r = t[0], i = t[1];
10277
10285
  i.expiresAt >= Date.now() && e(i.value, r, this.asValueMap());
10278
10286
  }
@@ -10281,7 +10289,7 @@ var Su = class {
10281
10289
  this.cleanup();
10282
10290
  let t = [], n = this.asValueMap();
10283
10291
  for (let i of n.entries()) {
10284
- var r = T(i, 2);
10292
+ var r = E(i, 2);
10285
10293
  let a = r[0], o = r[1];
10286
10294
  t.push(e(o, a, n));
10287
10295
  }
@@ -10290,7 +10298,7 @@ var Su = class {
10290
10298
  asValueMap() {
10291
10299
  let e = /* @__PURE__ */ new Map();
10292
10300
  for (let n of this._map.entries()) {
10293
- var t = T(n, 2);
10301
+ var t = E(n, 2);
10294
10302
  let r = t[0], i = t[1];
10295
10303
  i.expiresAt >= Date.now() && e.set(r, i.value);
10296
10304
  }
@@ -12129,9 +12137,9 @@ var Td = 1e3, Ed = 1e4, Dd = class extends K {
12129
12137
  }
12130
12138
  e && this.prevStats && (this._currentBitrate = Ll(e, this.prevStats)), this.prevStats = e;
12131
12139
  }), this.handleKrispNoiseFilterEnable = () => {
12132
- this.isKrispNoiseFilterEnabled = !0, this.log.debug("Krisp noise filter enabled", this.logContext), this.emit(U.AudioTrackFeatureUpdate, this, k.TF_ENHANCED_NOISE_CANCELLATION, !0);
12140
+ this.isKrispNoiseFilterEnabled = !0, this.log.debug("Krisp noise filter enabled", this.logContext), this.emit(U.AudioTrackFeatureUpdate, this, ur.TF_ENHANCED_NOISE_CANCELLATION, !0);
12133
12141
  }, this.handleKrispNoiseFilterDisable = () => {
12134
- this.isKrispNoiseFilterEnabled = !1, this.log.debug("Krisp noise filter disabled", this.logContext), this.emit(U.AudioTrackFeatureUpdate, this, k.TF_ENHANCED_NOISE_CANCELLATION, !1);
12142
+ this.isKrispNoiseFilterEnabled = !1, this.log.debug("Krisp noise filter disabled", this.logContext), this.emit(U.AudioTrackFeatureUpdate, this, ur.TF_ENHANCED_NOISE_CANCELLATION, !1);
12135
12143
  }, this.audioContext = r, this.checkForSilence();
12136
12144
  }
12137
12145
  mute() {
@@ -12283,7 +12291,7 @@ function Ld(e, t, n, r) {
12283
12291
  let d;
12284
12292
  if (u.length > 0) {
12285
12293
  let e = u[0];
12286
- u.length > 1 && (d = T(u, 2)[1]);
12294
+ u.length > 1 && (d = E(u, 2)[1]);
12287
12295
  let r = Math.max(t, n);
12288
12296
  if (r >= 960 && d) return Hd(t, n, [
12289
12297
  e,
@@ -12579,7 +12587,7 @@ var Kd = 5e3, qd = class extends Dd {
12579
12587
  let n = Ld(this.source === K.Source.ScreenShare, e.width, e.height, Object.assign({}, this.publishOptions));
12580
12588
  yield this.applyEncodingsToSender(this.sender, n), this.encodings = n, this.lastEncodedDimensions = e;
12581
12589
  for (let e of this.simulcastCodecs) {
12582
- var t = T(e, 2);
12590
+ var t = E(e, 2);
12583
12591
  let n = t[0], r = t[1];
12584
12592
  if (!r.sender || r.sender.transport?.state === "closed" || !Os(n)) continue;
12585
12593
  let i = Object.assign({}, this.publishOptions), a = Rd(this, n, i);
@@ -12904,7 +12912,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
12904
12912
  Hc(n) && t.set(e.payload, n);
12905
12913
  }), this.emit(H.RTPVideoMapUpdate, t);
12906
12914
  }, this.handleBrowserOnLine = () => N(this, void 0, void 0, function* () {
12907
- this.url && (yield fetch(Gc(this.url), { method: "HEAD" }).then((e) => e.ok).catch(() => !1)) && (this.log.info("detected network reconnected"), (this.client.currentState === q.RECONNECTING || this.isWaitingForNetworkReconnect && this.client.currentState === q.CONNECTED) && (this.clearReconnectTimeout(), this.attemptReconnect(lr.RR_SIGNAL_DISCONNECTED), this.isWaitingForNetworkReconnect = !1));
12915
+ this.url && (yield fetch(Gc(this.url), { method: "HEAD" }).then((e) => e.ok).catch(() => !1)) && (this.log.info("detected network reconnected"), (this.client.currentState === q.RECONNECTING || this.isWaitingForNetworkReconnect && this.client.currentState === q.CONNECTED) && (this.clearReconnectTimeout(), this.attemptReconnect(cr.RR_SIGNAL_DISCONNECTED), this.isWaitingForNetworkReconnect = !1));
12908
12916
  }), this.handleBrowserOffline = () => N(this, void 0, void 0, function* () {
12909
12917
  if (this.url) try {
12910
12918
  yield Promise.race([fetch(Gc(this.url), { method: "HEAD" }), ac(4e3).then(() => Promise.reject())]);
@@ -12960,7 +12968,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
12960
12968
  version: l.serverVersion,
12961
12969
  region: l.serverRegion
12962
12970
  }, i.log.info(`connected to Livekit Server ${Object.entries(u).map((e) => {
12963
- let t = T(e, 2);
12971
+ let t = E(e, 2);
12964
12972
  return `${t[0]}: ${t[1]}`;
12965
12973
  }).join(", ")}`), {
12966
12974
  joinResponse: l,
@@ -13071,7 +13079,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13071
13079
  ].includes(t) && (this.publisherConnectionPromise = void 0), e === J.CONNECTED) {
13072
13080
  let e = this.pcState === rf.New;
13073
13081
  this.pcState = rf.Connected, e && this.emit(H.Connected, this.latestJoinResponse);
13074
- } else e === J.FAILED && (this.pcState === rf.Connected || this.pcState === rf.Reconnecting) && (this.pcState = rf.Disconnected, this.handleDisconnect("peerconnection failed", n === "failed" ? lr.RR_SUBSCRIBER_FAILED : lr.RR_PUBLISHER_FAILED));
13082
+ } else e === J.FAILED && (this.pcState === rf.Connected || this.pcState === rf.Reconnecting) && (this.pcState = rf.Disconnected, this.handleDisconnect("peerconnection failed", n === "failed" ? cr.RR_SUBSCRIBER_FAILED : cr.RR_PUBLISHER_FAILED));
13075
13083
  let r = this.client.isDisconnected || this.client.currentState === q.RECONNECTING, i = [
13076
13084
  J.FAILED,
13077
13085
  J.CLOSING,
@@ -13132,7 +13140,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13132
13140
  }, this.client.onDataTrackSubscriberHandles = (e) => {
13133
13141
  this.emit(H.DataTrackSubscriberHandles, e);
13134
13142
  }, this.client.onClose = () => {
13135
- this.handleDisconnect("signal", lr.RR_SIGNAL_DISCONNECTED);
13143
+ this.handleDisconnect("signal", cr.RR_SIGNAL_DISCONNECTED);
13136
13144
  }, this.client.onLeave = (e) => {
13137
13145
  switch (this.log.info(`client leave request received (action=${e?.action})`, { reason: e?.reason }), e.regions && (this.log.debug("updating regions"), this.emit(H.ServerRegionsReported, e.regions)), e.action) {
13138
13146
  case Ui.DISCONNECT:
@@ -13155,7 +13163,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13155
13163
  e.username && (t.username = e.username), e.credential && (t.credential = e.credential), n.push(t);
13156
13164
  }), t.iceServers = n;
13157
13165
  }
13158
- return e.clientConfiguration && e.clientConfiguration.forceRelay === sr.ENABLED && (t.iceTransportPolicy = "relay"), t;
13166
+ return e.clientConfiguration && e.clientConfiguration.forceRelay === or.ENABLED && (t.iceTransportPolicy = "relay"), t;
13159
13167
  }
13160
13168
  applyInitialPublisherLayout() {
13161
13169
  this.createDataChannels(), wc() || this.addMediaSections(tf, nf);
@@ -13259,11 +13267,11 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13259
13267
  handleLocalConnectionQuality(e) {
13260
13268
  if (!this.participantSid) return;
13261
13269
  let t = e.updates.find((e) => e.participantSid === this.participantSid);
13262
- t && (t.quality === or.LOST ? this.scheduleLostQualityReconnect() : this.clearLostQualityTimeout());
13270
+ t && (t.quality === ar.LOST ? this.scheduleLostQualityReconnect() : this.clearLostQualityTimeout());
13263
13271
  }
13264
13272
  scheduleLostQualityReconnect() {
13265
13273
  this.lostQualityTimeout ||= z.setTimeout(() => {
13266
- this.lostQualityTimeout = void 0, !(this._isClosed || this.pcState !== rf.Connected || this.attemptingReconnect) && this.hasActivePublisherSenders() && (this.log.warn("local connection quality lost while publishing, triggering full reconnect", this.logContext), this.fullReconnectOnNext = !0, this.handleDisconnect("connection quality lost", lr.RR_PUBLISHER_FAILED));
13274
+ this.lostQualityTimeout = void 0, !(this._isClosed || this.pcState !== rf.Connected || this.attemptingReconnect) && this.hasActivePublisherSenders() && (this.log.warn("local connection quality lost while publishing, triggering full reconnect", this.logContext), this.fullReconnectOnNext = !0, this.handleDisconnect("connection quality lost", cr.RR_PUBLISHER_FAILED));
13267
13275
  }, $d);
13268
13276
  }
13269
13277
  clearLostQualityTimeout() {
@@ -13273,7 +13281,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13273
13281
  return this.pcManager?.publisher.getSenders().some((e) => !!e.track && e.track.readyState === "live") ?? !1;
13274
13282
  }
13275
13283
  reconnect() {
13276
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : lr.RR_UNKNOWN;
13284
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cr.RR_UNKNOWN;
13277
13285
  this.fullReconnectOnNext = !0, this.handleDisconnect("reconcile", e);
13278
13286
  }
13279
13287
  attemptReconnect(e) {
@@ -13283,7 +13291,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13283
13291
  this.log.warn("already attempting reconnect, returning early");
13284
13292
  return;
13285
13293
  }
13286
- this.clearLostQualityTimeout(), (this.clientConfiguration?.resumeConnection === sr.DISABLED || (this.pcManager?.currentState ?? J.NEW) === J.NEW) && (this.fullReconnectOnNext = !0);
13294
+ this.clearLostQualityTimeout(), (this.clientConfiguration?.resumeConnection === or.DISABLED || (this.pcManager?.currentState ?? J.NEW) === J.NEW) && (this.fullReconnectOnNext = !0);
13287
13295
  let t = this.fullReconnectOnNext;
13288
13296
  this.fullReconnectOnNext = !1;
13289
13297
  let n = !1;
@@ -13292,7 +13300,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13292
13300
  } catch (e) {
13293
13301
  this.reconnectAttempts += 1;
13294
13302
  let n = !0;
13295
- e instanceof I ? (this.log.debug("received unrecoverable error", { error: e }), n = !1) : (t || !(e instanceof Cs)) && (this.fullReconnectOnNext = !0), n ? this.handleDisconnect("reconnect", lr.RR_UNKNOWN) : (this.log.info(`could not recover connection after ${this.reconnectAttempts} attempts, ${Date.now() - this.reconnectStart}ms. giving up`), this.emit(H.Disconnected), yield this.close());
13303
+ e instanceof I ? (this.log.debug("received unrecoverable error", { error: e }), n = !1) : (t || !(e instanceof Cs)) && (this.fullReconnectOnNext = !0), n ? this.handleDisconnect("reconnect", cr.RR_UNKNOWN) : (this.log.info(`could not recover connection after ${this.reconnectAttempts} attempts, ${Date.now() - this.reconnectStart}ms. giving up`), this.emit(H.Disconnected), yield this.close());
13296
13304
  } finally {
13297
13305
  this.attemptingReconnect = !1, n && this.fullReconnectOnNext && !this._isClosed && (this.log.debug("full reconnect requested during in-progress attempt, dispatching"), this.handleDisconnect("reconnect"));
13298
13306
  }
@@ -13477,7 +13485,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13477
13485
  e();
13478
13486
  return;
13479
13487
  }
13480
- r instanceof ys && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", lr.RR_UNKNOWN), r instanceof Error ? t(r) : t(Error(String(r)));
13488
+ r instanceof ys && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", cr.RR_UNKNOWN), r instanceof Error ? t(r) : t(Error(String(r)));
13481
13489
  } finally {
13482
13490
  this.off(H.Closing, r), this.off(H.Restarting, r);
13483
13491
  }
@@ -13556,7 +13564,7 @@ var af = 64e3, of = class extends Ka.EventEmitter {
13556
13564
  getTrackIdForReceiver(e) {
13557
13565
  let t = this.pcManager?.getMidForReceiver(e);
13558
13566
  if (t) {
13559
- let e = Object.entries(this.midToTrackId).find((e) => T(e, 1)[0] === t);
13567
+ let e = Object.entries(this.midToTrackId).find((e) => E(e, 1)[0] === t);
13560
13568
  if (e) return e[1];
13561
13569
  }
13562
13570
  }
@@ -13919,12 +13927,12 @@ var _f = 15e3, vf = 5e9, yf = class {
13919
13927
  if (t.length > 0 || n.length > 0) {
13920
13928
  let a = new R(`Participant ${e} unexpectedly disconnected in the middle of sending data`, L.AbnormalEnd);
13921
13929
  for (let e of n) {
13922
- var r = T(e, 2);
13930
+ var r = E(e, 2);
13923
13931
  let t = r[0];
13924
13932
  r[1].controller.error(a), this.byteStreamControllers.delete(t);
13925
13933
  }
13926
13934
  for (let e of t) {
13927
- var i = T(e, 2);
13935
+ var i = E(e, 2);
13928
13936
  let t = i[0];
13929
13937
  i[1].controller.error(a), this.textStreamControllers.delete(t);
13930
13938
  }
@@ -14700,7 +14708,7 @@ var vp = class e extends pp {
14700
14708
  }
14701
14709
  subscribe(e) {
14702
14710
  try {
14703
- let t = T(this.manager.openSubscriptionStream(this.info.sid, e?.signal, e?.bufferSize), 2), n = t[0];
14711
+ let t = E(this.manager.openSubscriptionStream(this.info.sid, e?.signal, e?.bufferSize), 2), n = t[0];
14704
14712
  return t[1].catch(() => {}), n;
14705
14713
  } catch (e) {
14706
14714
  throw e;
@@ -14798,7 +14806,7 @@ var vp = class e extends pp {
14798
14806
  r += Kf;
14799
14807
  let t = 4 * (e + 1) - ap;
14800
14808
  if (r + t > n.byteLength) throw up.headerOverrun();
14801
- let i = new DataView(n.buffer, n.byteOffset + r, t), a = T(vp.fromBinary(i), 2), o = a[0], s = a[1];
14809
+ let i = new DataView(n.buffer, n.byteOffset + r, t), a = E(vp.fromBinary(i), 2), o = a[0], s = a[1];
14802
14810
  f = o, r += s;
14803
14811
  }
14804
14812
  return [new e({
@@ -14840,7 +14848,7 @@ var wp = class e extends pp {
14840
14848
  return r;
14841
14849
  }
14842
14850
  static fromBinary(t) {
14843
- let n = iu(t), r = T(Cp.fromBinary(n), 2), i = r[0], a = r[1], o = n.buffer.slice(n.byteOffset + a, n.byteOffset + n.byteLength);
14851
+ let n = iu(t), r = E(Cp.fromBinary(n), 2), i = r[0], a = r[1], o = n.buffer.slice(n.byteOffset + a, n.byteOffset + n.byteLength);
14844
14852
  return [new e(i, new Uint8Array(o)), n.byteLength];
14845
14853
  }
14846
14854
  toJSON() {
@@ -15156,7 +15164,7 @@ var Ap = class e extends hs {
15156
15164
  }
15157
15165
  closeStreamControllers(e, t) {
15158
15166
  for (let r of e) {
15159
- var n = T(r, 2);
15167
+ var n = E(r, 2);
15160
15168
  let e = n[0], i = n[1];
15161
15169
  i();
15162
15170
  try {
@@ -15171,17 +15179,17 @@ var Ap = class e extends hs {
15171
15179
  if (e.size === 0) return;
15172
15180
  let t = /* @__PURE__ */ new Map();
15173
15181
  for (let r of e.entries()) {
15174
- var n = T(r, 2);
15182
+ var n = E(r, 2);
15175
15183
  let e = n[0], i = n[1], a = /* @__PURE__ */ new Set();
15176
15184
  for (let t of i) a.add(t.sid), !this.descriptors.has(t.sid) && (this.handleSidReassigned(e, t) || (yield this.handleTrackPublished(e, t)));
15177
15185
  t.set(e, a);
15178
15186
  }
15179
15187
  for (let e of t.entries()) {
15180
- var r = T(e, 2);
15188
+ var r = E(e, 2);
15181
15189
  let t = r[0], n = r[1], i = Array.from(this.descriptors.entries()).filter((e) => {
15182
- let n = T(e, 2);
15190
+ let n = E(e, 2);
15183
15191
  return n[0], n[1].publisherIdentity === t;
15184
- }).map((e) => T(e, 1)[0]).filter((e) => !n.has(e));
15192
+ }).map((e) => E(e, 1)[0]).filter((e) => !n.has(e));
15185
15193
  for (let e of i) this.handleTrackUnpublished(e);
15186
15194
  }
15187
15195
  });
@@ -15210,13 +15218,13 @@ var Ap = class e extends hs {
15210
15218
  }
15211
15219
  handleSidReassigned(e, t) {
15212
15220
  let n = Array.from(this.descriptors.entries()).find((n) => {
15213
- let r = T(n, 2);
15221
+ let r = E(n, 2);
15214
15222
  r[0];
15215
15223
  let i = r[1];
15216
15224
  return i.publisherIdentity === e && i.info.pubHandle === t.pubHandle;
15217
15225
  });
15218
15226
  if (!n) return !1;
15219
- let r = T(n, 2), i = r[0], a = r[1], o = a.info, s = o.name, c = o.usesE2ee;
15227
+ let r = E(n, 2), i = r[0], a = r[1], o = a.info, s = o.name, c = o.usesE2ee;
15220
15228
  if (s !== t.name || c !== t.usesE2ee) return Z.warn(`Info mismatch for ${i}, treating as new publication`), !1;
15221
15229
  let l = t.sid;
15222
15230
  if (Z.debug(`SID reassigned: ${i} -> ${l}`), !this.descriptors.delete(i)) return !1;
@@ -15243,7 +15251,7 @@ var Ap = class e extends hs {
15243
15251
  }
15244
15252
  receivedSfuSubscriberHandles(e) {
15245
15253
  for (let n of e.entries()) {
15246
- var t = T(n, 2);
15254
+ var t = E(n, 2);
15247
15255
  let e = t[0], r = t[1];
15248
15256
  this.registerSubscriberHandle(e, r);
15249
15257
  }
@@ -15286,7 +15294,7 @@ var Ap = class e extends hs {
15286
15294
  return N(this, void 0, void 0, function* () {
15287
15295
  let t;
15288
15296
  try {
15289
- t = T(wp.fromBinary(e), 1)[0];
15297
+ t = E(wp.fromBinary(e), 1)[0];
15290
15298
  } catch (e) {
15291
15299
  Z.error(`Failed to deserialize packet: ${e}`);
15292
15300
  return;
@@ -15318,7 +15326,7 @@ var Ap = class e extends hs {
15318
15326
  }
15319
15327
  resendSubscriptionUpdates() {
15320
15328
  for (let t of this.descriptors) {
15321
- var e = T(t, 2);
15329
+ var e = E(t, 2);
15322
15330
  let n = e[0];
15323
15331
  e[1].subscription.type !== "none" && this.emit("sfuUpdateSubscription", {
15324
15332
  sid: n,
@@ -15692,7 +15700,7 @@ var qp = ja(j.DataTracks), Jp = {
15692
15700
  sfuWillRepublishTracks() {
15693
15701
  var e, t;
15694
15702
  for (let r of this.descriptors.entries()) {
15695
- var n = T(r, 2);
15703
+ var n = E(r, 2);
15696
15704
  let i = n[0], a = n[1];
15697
15705
  switch (a.type) {
15698
15706
  case "pending":
@@ -15883,12 +15891,12 @@ var am = class extends Ka.EventEmitter {
15883
15891
  handleParticipantDisconnected(e) {
15884
15892
  var t;
15885
15893
  for (let t of this.pendingAcks) {
15886
- var n = T(t, 2);
15894
+ var n = E(t, 2);
15887
15895
  let r = n[0];
15888
15896
  n[1].participantIdentity === e && this.pendingAcks.delete(r);
15889
15897
  }
15890
15898
  for (let n of this.pendingResponses) {
15891
- var r = T(n, 2);
15899
+ var r = E(n, 2);
15892
15900
  let a = r[0];
15893
15901
  var i = r[1];
15894
15902
  let o = i.participantIdentity, s = i.completionFuture;
@@ -16196,7 +16204,7 @@ var lm = class extends cm {
16196
16204
  getTrackFeatures() {
16197
16205
  if (Qc(this.track)) {
16198
16206
  let e = this.track.getSourceTrackSettings(), t = /* @__PURE__ */ new Set();
16199
- return e.autoGainControl && t.add(k.TF_AUTO_GAIN_CONTROL), e.echoCancellation && t.add(k.TF_ECHO_CANCELLATION), e.noiseSuppression && t.add(k.TF_NOISE_SUPPRESSION), e.channelCount && e.channelCount > 1 && t.add(k.TF_STEREO), this.options?.dtx || t.add(k.TF_NO_DTX), this.track.enhancedNoiseCancellation && t.add(k.TF_ENHANCED_NOISE_CANCELLATION), Array.from(t.values());
16207
+ return e.autoGainControl && t.add(ur.TF_AUTO_GAIN_CONTROL), e.echoCancellation && t.add(ur.TF_ECHO_CANCELLATION), e.noiseSuppression && t.add(ur.TF_NOISE_SUPPRESSION), e.channelCount && e.channelCount > 1 && t.add(ur.TF_STEREO), this.options?.dtx || t.add(ur.TF_NO_DTX), this.track.enhancedNoiseCancellation && t.add(ur.TF_ENHANCED_NOISE_CANCELLATION), Array.from(t.values());
16200
16208
  }
16201
16209
  return [];
16202
16210
  }
@@ -16249,10 +16257,10 @@ var fm;
16249
16257
  })(fm ||= {});
16250
16258
  function pm(e) {
16251
16259
  switch (e) {
16252
- case or.EXCELLENT: return fm.Excellent;
16253
- case or.GOOD: return fm.Good;
16254
- case or.POOR: return fm.Poor;
16255
- case or.LOST: return fm.Lost;
16260
+ case ar.EXCELLENT: return fm.Excellent;
16261
+ case ar.GOOD: return fm.Good;
16262
+ case ar.POOR: return fm.Poor;
16263
+ case ar.LOST: return fm.Lost;
16256
16264
  default: return fm.Unknown;
16257
16265
  }
16258
16266
  }
@@ -16285,13 +16293,13 @@ var mm = class extends Ka.EventEmitter {
16285
16293
  }
16286
16294
  getTrackPublication(e) {
16287
16295
  for (let t of this.trackPublications) {
16288
- let n = T(t, 2)[1];
16296
+ let n = E(t, 2)[1];
16289
16297
  if (n.source === e) return n;
16290
16298
  }
16291
16299
  }
16292
16300
  getTrackPublicationByName(e) {
16293
16301
  for (let t of this.trackPublications) {
16294
- let n = T(t, 2)[1];
16302
+ let n = E(t, 2)[1];
16295
16303
  if (n.trackName === e) return n;
16296
16304
  }
16297
16305
  }
@@ -16559,7 +16567,7 @@ var gm = class extends mm {
16559
16567
  }
16560
16568
  }); performance.now() - s < 5e3 && !t;) {
16561
16569
  if ((!r || this.name === r) && (!n || this.metadata === n) && (!i || Object.entries(i).every((e) => {
16562
- let t = T(e, 2), n = t[0], r = t[1];
16570
+ let t = E(e, 2), n = t[0], r = t[1];
16563
16571
  return this.attributes[n] === r || r === "" && !this.attributes[n];
16564
16572
  }))) {
16565
16573
  this.pendingSignalRequests.delete(o), e();
@@ -16636,7 +16644,7 @@ var gm = class extends mm {
16636
16644
  try {
16637
16645
  let e = [];
16638
16646
  for (let n of t) this.log.info("publishing track", G(n)), e.push(this.publishTrack(n, r));
16639
- i = T(yield Promise.all(e), 1)[0];
16647
+ i = E(yield Promise.all(e), 1)[0];
16640
16648
  } catch (e) {
16641
16649
  throw t?.forEach((e) => {
16642
16650
  e.stop();
@@ -16648,7 +16656,7 @@ var gm = class extends mm {
16648
16656
  } else if (!i?.track && this.pendingPublishing.has(e) && (i = yield this.waitForPendingPublicationOfSource(e), i || this.log.info("waiting for pending publication promise timed out", { source: e })), i && i.track) {
16649
16657
  if (e === K.Source.ScreenShare) {
16650
16658
  let e = [this.unpublishTrack(i.track)], t = this.getTrackPublication(K.Source.ScreenShareAudio);
16651
- t && t.track && e.push(this.unpublishTrack(t.track)), i = T(yield Promise.all(e), 1)[0];
16659
+ t && t.track && e.push(this.unpublishTrack(t.track)), i = E(yield Promise.all(e), 1)[0];
16652
16660
  } else yield i.mute();
16653
16661
  }
16654
16662
  return i;
@@ -16816,7 +16824,7 @@ var gm = class extends mm {
16816
16824
  let r = t.videoCodec;
16817
16825
  e.on(U.Muted, this.onTrackMuted), e.on(U.Unmuted, this.onTrackUnmuted), e.on(U.Ended, this.handleTrackEnded), e.on(U.UpstreamPaused, this.onTrackUpstreamPaused), e.on(U.UpstreamResumed, this.onTrackUpstreamResumed), e.on(U.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate);
16818
16826
  let i = [], a = !(t.dtx ?? !0), o = e.getSourceTrackSettings();
16819
- o.autoGainControl && i.push(k.TF_AUTO_GAIN_CONTROL), o.echoCancellation && i.push(k.TF_ECHO_CANCELLATION), o.noiseSuppression && i.push(k.TF_NOISE_SUPPRESSION), o.channelCount && o.channelCount > 1 && i.push(k.TF_STEREO), a && i.push(k.TF_NO_DTX), tl(e) && e.hasPreConnectBuffer && i.push(k.TF_PRECONNECT_BUFFER);
16827
+ o.autoGainControl && i.push(ur.TF_AUTO_GAIN_CONTROL), o.echoCancellation && i.push(ur.TF_ECHO_CANCELLATION), o.noiseSuppression && i.push(ur.TF_NOISE_SUPPRESSION), o.channelCount && o.channelCount > 1 && i.push(ur.TF_STEREO), a && i.push(ur.TF_NO_DTX), tl(e) && e.hasPreConnectBuffer && i.push(ur.TF_PRECONNECT_BUFFER);
16820
16828
  let s = this.normalizeRequestedFrameMetadataOptions(e, t), c = new _i({
16821
16829
  cid: e.mediaStreamTrack.id,
16822
16830
  name: t.name,
@@ -16920,7 +16928,7 @@ var gm = class extends mm {
16920
16928
  })), this.log.debug(`publishing ${e.kind} with encodings`, {
16921
16929
  encodings: l,
16922
16930
  trackInfo: d
16923
- }), el(e) ? e.startMonitor(this.engine.client) : tl(e) && e.startMonitor(), this.addTrackPublication(p), this.emit(V.LocalTrackPublished, p), tl(e) && d.audioFeatures.includes(k.TF_PRECONNECT_BUFFER)) {
16931
+ }), el(e) ? e.startMonitor(this.engine.client) : tl(e) && e.startMonitor(), this.addTrackPublication(p), this.emit(V.LocalTrackPublished, p), tl(e) && d.audioFeatures.includes(ur.TF_PRECONNECT_BUFFER)) {
16924
16932
  let t = e.getPreConnectBuffer(), n = e.getPreConnectBufferMimeType();
16925
16933
  this.on(V.LocalTrackSubscribed, (t) => {
16926
16934
  if (t.trackSid === d.sid) {
@@ -16934,15 +16942,15 @@ var gm = class extends mm {
16934
16942
  var a, s, c, l;
16935
16943
  try {
16936
16944
  this.log.debug("waiting for agent", G(e));
16937
- let ee = setTimeout(() => {
16945
+ let m = setTimeout(() => {
16938
16946
  i(/* @__PURE__ */ Error("agent not active within 10 seconds"));
16939
- }, 1e4), m = yield this.waitUntilActiveAgentPresent();
16940
- clearTimeout(ee), this.log.debug("sending preconnect buffer", G(e));
16947
+ }, 1e4), ee = yield this.waitUntilActiveAgentPresent();
16948
+ clearTimeout(m), this.log.debug("sending preconnect buffer", G(e));
16941
16949
  let h = yield this.streamBytes({
16942
16950
  name: "preconnect-buffer",
16943
16951
  mimeType: n,
16944
16952
  topic: "lk.agent.pre-connect-audio-buffer",
16945
- destinationIdentities: [m.identity],
16953
+ destinationIdentities: [ee.identity],
16946
16954
  attributes: {
16947
16955
  trackId: p.trackSid,
16948
16956
  sampleRate: String(o.sampleRate ?? "48000"),
@@ -17049,7 +17057,7 @@ var gm = class extends mm {
17049
17057
  }
17050
17058
  if (el(e)) {
17051
17059
  for (let t of e.simulcastCodecs) {
17052
- let e = T(t, 2)[1];
17060
+ let e = E(t, 2)[1];
17053
17061
  if (e.sender) {
17054
17062
  try {
17055
17063
  i = this.engine.removeTrack(e.sender);
@@ -17193,7 +17201,7 @@ var gm = class extends mm {
17193
17201
  }
17194
17202
  performRpc(e) {
17195
17203
  return this.rpcClientManager.performRpc(e).then((e) => {
17196
- let t = T(e, 2);
17204
+ let t = E(e, 2);
17197
17205
  return t[0], t[1];
17198
17206
  });
17199
17207
  }
@@ -17237,7 +17245,7 @@ var gm = class extends mm {
17237
17245
  return N(this, void 0, void 0, function* () {
17238
17246
  let t = Date.now();
17239
17247
  for (; Date.now() < t + 1e4;) {
17240
- let t = Array.from(this.pendingPublishPromises.entries()).find((t) => T(t, 1)[0].source === e);
17248
+ let t = Array.from(this.pendingPublishPromises.entries()).find((t) => E(t, 1)[0].source === e);
17241
17249
  if (t) return t[1];
17242
17250
  yield ac(20);
17243
17251
  }
@@ -17527,7 +17535,7 @@ var gm = class extends mm {
17527
17535
  }
17528
17536
  removeRemoteDataTrack(e) {
17529
17537
  for (let n of this.dataTracks.entries()) {
17530
- var t = T(n, 2);
17538
+ var t = E(n, 2);
17531
17539
  let r = t[0];
17532
17540
  e === t[1].info.sid && this.dataTracks.delete(r);
17533
17541
  }
@@ -17584,7 +17592,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
17584
17592
  P.Timeout
17585
17593
  ].includes(t.reason) && (this.log.debug("Adding failed connection attempt to back off"), Xl.getInstance().addFailedConnectionAttempt(e)), n && !this.abortController?.signal.aborted ? (this.log.info(`Initial connection failed with ConnectionError: ${t.message}. Retrying with another region: ${n}`), this.recreateEngine(!0), yield i(a, o, n)) : (this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, Jc(t)), o(t));
17586
17594
  } else {
17587
- let e = cr.UNKNOWN_REASON;
17595
+ let e = sr.UNKNOWN_REASON;
17588
17596
  t instanceof F && (e = Jc(t)), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, e), o(t);
17589
17597
  }
17590
17598
  }
@@ -17646,7 +17654,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
17646
17654
  let t = "Abort connection attempt due to user initiated disconnect";
17647
17655
  e.log.warn(t), (n = e.abortController) == null || n.abort(t), (i = (r = e.connectFuture)?.reject) == null || i.call(r, F.cancelled("Client initiated disconnect")), e.connectFuture = void 0;
17648
17656
  }
17649
- e.engine && (e.engine.client.isDisconnected || (yield e.engine.client.sendLeave()), yield e.engine.close()), e.handleDisconnect(t, cr.CLIENT_INITIATED), e.engine = void 0;
17657
+ e.engine && (e.engine.client.isDisconnected || (yield e.engine.client.sendLeave()), yield e.engine.close()), e.handleDisconnect(t, sr.CLIENT_INITIATED), e.engine = void 0;
17650
17658
  } finally {
17651
17659
  a();
17652
17660
  }
@@ -18020,7 +18028,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18020
18028
  this.outgoingDataTrackManager.receivedSfuUnpublishResponse(e.info.pubHandle);
18021
18029
  }).on(H.DataTrackSubscriberHandles, (e) => {
18022
18030
  let t = new Map(Object.entries(e.subHandles).map((e) => {
18023
- let t = T(e, 2), n = t[0], r = t[1];
18031
+ let t = E(e, 2), n = t[0], r = t[1];
18024
18032
  return [parseInt(n, 10), r.trackSid];
18025
18033
  }));
18026
18034
  this.incomingDataTrackManager.receivedSfuSubscriberHandles(t);
@@ -18143,7 +18151,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18143
18151
  } }), n = () => N(this, void 0, void 0, function* () {
18144
18152
  let e = this.engine.client.onLeave;
18145
18153
  e && e(new Hi({
18146
- reason: cr.CLIENT_INITIATED,
18154
+ reason: sr.CLIENT_INITIATED,
18147
18155
  action: Ui.RECONNECT
18148
18156
  }));
18149
18157
  });
@@ -18456,7 +18464,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18456
18464
  closed: this.engine.isClosed,
18457
18465
  transportsConnectedOrConnecting: this.engine.verifyTransport()
18458
18466
  } : void 0
18459
- }), e >= 3 && (this.clearConnectionReconcile(), this.engine && !this.engine.isClosed ? (this.log.warn("detected connection state mismatch, attempting full reconnect"), this.engine.reconnect()) : (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, cr.STATE_MISMATCH)))) : e = 0;
18467
+ }), e >= 3 && (this.clearConnectionReconcile(), this.engine && !this.engine.isClosed ? (this.log.warn("detected connection state mismatch, attempting full reconnect"), this.engine.reconnect()) : (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, sr.STATE_MISMATCH)))) : e = 0;
18460
18468
  }, xm);
18461
18469
  }
18462
18470
  clearConnectionReconcile() {
@@ -18467,7 +18475,7 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18467
18475
  }
18468
18476
  emitBufferedEvents() {
18469
18477
  this.bufferedEvents.forEach((e) => {
18470
- let t = T(e, 2), n = t[0], r = t[1];
18478
+ let t = E(e, 2), n = t[0], r = t[1];
18471
18479
  this.emit(n, ...r);
18472
18480
  }), this.bufferedEvents = [];
18473
18481
  }
@@ -18510,9 +18518,9 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18510
18518
  name: "local-name"
18511
18519
  })), this.setupLocalParticipantEvents(), this.emit(B.SignalConnected), this.emit(B.Connected), this.setAndEmitConnectionState($.Connected), t.video) {
18512
18520
  let e = new lm(K.Kind.Video, new br({
18513
- source: O.CAMERA,
18521
+ source: k.CAMERA,
18514
18522
  sid: Math.floor(Math.random() * 1e4).toString(),
18515
- type: ir.AUDIO,
18523
+ type: rr.AUDIO,
18516
18524
  name: "video-dummy"
18517
18525
  }), new qd(t.useRealTracks && window.navigator.mediaDevices?.getUserMedia ? (yield window.navigator.mediaDevices.getUserMedia({ video: !0 })).getVideoTracks()[0] : Rc(160 * (n.aspectRatios[0] ?? 1), 160, !0, !0), void 0, !1, {
18518
18526
  loggerName: this.options.loggerName,
@@ -18525,9 +18533,9 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18525
18533
  }
18526
18534
  if (t.audio) {
18527
18535
  let e = new lm(K.Kind.Audio, new br({
18528
- source: O.MICROPHONE,
18536
+ source: k.MICROPHONE,
18529
18537
  sid: Math.floor(Math.random() * 1e4).toString(),
18530
- type: ir.AUDIO
18538
+ type: rr.AUDIO
18531
18539
  }), new Od(t.useRealTracks && navigator.mediaDevices?.getUserMedia ? (yield navigator.mediaDevices.getUserMedia({ audio: !0 })).getAudioTracks()[0] : Bc(), void 0, !1, this.audioContext, {
18532
18540
  loggerName: this.options.loggerName,
18533
18541
  loggerContextCb: () => this.logContext
@@ -18547,17 +18555,17 @@ var xm = 4e3, Sm = class e extends Ka.EventEmitter {
18547
18555
  }), r = this.getOrCreateParticipant(t.identity, t);
18548
18556
  if (n.video) {
18549
18557
  let i = Rc(160 * (n.aspectRatios[e % n.aspectRatios.length] ?? 1), 160, !1, !0), a = new br({
18550
- source: O.CAMERA,
18558
+ source: k.CAMERA,
18551
18559
  sid: Math.floor(Math.random() * 1e4).toString(),
18552
- type: ir.AUDIO
18560
+ type: rr.AUDIO
18553
18561
  });
18554
18562
  r.addSubscribedMediaTrack(i, a.sid, new MediaStream([i]), new RTCRtpReceiver()), t.tracks = [...t.tracks, a];
18555
18563
  }
18556
18564
  if (n.audio) {
18557
18565
  let e = Bc(), n = new br({
18558
- source: O.MICROPHONE,
18566
+ source: k.MICROPHONE,
18559
18567
  sid: Math.floor(Math.random() * 1e4).toString(),
18560
- type: ir.AUDIO
18568
+ type: rr.AUDIO
18561
18569
  });
18562
18570
  r.addSubscribedMediaTrack(e, n.sid, new MediaStream([e]), new RTCRtpReceiver()), t.tracks = [...t.tracks, n];
18563
18571
  }
@@ -18595,79 +18603,79 @@ var wm;
18595
18603
  var Tm = class extends Error {
18596
18604
  constructor(e, t) {
18597
18605
  var n;
18598
- super(e, t), w(this, "code", "ERR_JOSE_GENERIC"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
18606
+ super(e, t), T(this, "code", "ERR_JOSE_GENERIC"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
18599
18607
  }
18600
18608
  };
18601
- w(Tm, "code", "ERR_JOSE_GENERIC"), w(class extends Tm {
18609
+ T(Tm, "code", "ERR_JOSE_GENERIC"), T(class extends Tm {
18602
18610
  constructor(e, t) {
18603
18611
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "unspecified", r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unspecified";
18604
18612
  super(e, { cause: {
18605
18613
  claim: n,
18606
18614
  reason: r,
18607
18615
  payload: t
18608
- } }), w(this, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), w(this, "claim", void 0), w(this, "reason", void 0), w(this, "payload", void 0), this.claim = n, this.reason = r, this.payload = t;
18616
+ } }), T(this, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), T(this, "claim", void 0), T(this, "reason", void 0), T(this, "payload", void 0), this.claim = n, this.reason = r, this.payload = t;
18609
18617
  }
18610
- }, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), w(class extends Tm {
18618
+ }, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), T(class extends Tm {
18611
18619
  constructor(e, t) {
18612
18620
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "unspecified", r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unspecified";
18613
18621
  super(e, { cause: {
18614
18622
  claim: n,
18615
18623
  reason: r,
18616
18624
  payload: t
18617
- } }), w(this, "code", "ERR_JWT_EXPIRED"), w(this, "claim", void 0), w(this, "reason", void 0), w(this, "payload", void 0), this.claim = n, this.reason = r, this.payload = t;
18625
+ } }), T(this, "code", "ERR_JWT_EXPIRED"), T(this, "claim", void 0), T(this, "reason", void 0), T(this, "payload", void 0), this.claim = n, this.reason = r, this.payload = t;
18618
18626
  }
18619
- }, "code", "ERR_JWT_EXPIRED"), w(class extends Tm {
18627
+ }, "code", "ERR_JWT_EXPIRED"), T(class extends Tm {
18620
18628
  constructor() {
18621
- super(...arguments), w(this, "code", "ERR_JOSE_ALG_NOT_ALLOWED");
18629
+ super(...arguments), T(this, "code", "ERR_JOSE_ALG_NOT_ALLOWED");
18622
18630
  }
18623
- }, "code", "ERR_JOSE_ALG_NOT_ALLOWED"), w(class extends Tm {
18631
+ }, "code", "ERR_JOSE_ALG_NOT_ALLOWED"), T(class extends Tm {
18624
18632
  constructor() {
18625
- super(...arguments), w(this, "code", "ERR_JOSE_NOT_SUPPORTED");
18633
+ super(...arguments), T(this, "code", "ERR_JOSE_NOT_SUPPORTED");
18626
18634
  }
18627
- }, "code", "ERR_JOSE_NOT_SUPPORTED"), w(class extends Tm {
18635
+ }, "code", "ERR_JOSE_NOT_SUPPORTED"), T(class extends Tm {
18628
18636
  constructor() {
18629
18637
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "decryption operation failed", t = arguments.length > 1 ? arguments[1] : void 0;
18630
- super(e, t), w(this, "code", "ERR_JWE_DECRYPTION_FAILED");
18638
+ super(e, t), T(this, "code", "ERR_JWE_DECRYPTION_FAILED");
18631
18639
  }
18632
- }, "code", "ERR_JWE_DECRYPTION_FAILED"), w(class extends Tm {
18640
+ }, "code", "ERR_JWE_DECRYPTION_FAILED"), T(class extends Tm {
18633
18641
  constructor() {
18634
- super(...arguments), w(this, "code", "ERR_JWE_INVALID");
18642
+ super(...arguments), T(this, "code", "ERR_JWE_INVALID");
18635
18643
  }
18636
- }, "code", "ERR_JWE_INVALID"), w(class extends Tm {
18644
+ }, "code", "ERR_JWE_INVALID"), T(class extends Tm {
18637
18645
  constructor() {
18638
- super(...arguments), w(this, "code", "ERR_JWS_INVALID");
18646
+ super(...arguments), T(this, "code", "ERR_JWS_INVALID");
18639
18647
  }
18640
- }, "code", "ERR_JWS_INVALID"), w(class extends Tm {
18648
+ }, "code", "ERR_JWS_INVALID"), T(class extends Tm {
18641
18649
  constructor() {
18642
- super(...arguments), w(this, "code", "ERR_JWT_INVALID");
18650
+ super(...arguments), T(this, "code", "ERR_JWT_INVALID");
18643
18651
  }
18644
- }, "code", "ERR_JWT_INVALID"), w(class extends Tm {
18652
+ }, "code", "ERR_JWT_INVALID"), T(class extends Tm {
18645
18653
  constructor() {
18646
- super(...arguments), w(this, "code", "ERR_JWK_INVALID");
18654
+ super(...arguments), T(this, "code", "ERR_JWK_INVALID");
18647
18655
  }
18648
- }, "code", "ERR_JWK_INVALID"), w(class extends Tm {
18656
+ }, "code", "ERR_JWK_INVALID"), T(class extends Tm {
18649
18657
  constructor() {
18650
- super(...arguments), w(this, "code", "ERR_JWKS_INVALID");
18658
+ super(...arguments), T(this, "code", "ERR_JWKS_INVALID");
18651
18659
  }
18652
- }, "code", "ERR_JWKS_INVALID"), w(class extends Tm {
18660
+ }, "code", "ERR_JWKS_INVALID"), T(class extends Tm {
18653
18661
  constructor() {
18654
18662
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "no applicable key found in the JSON Web Key Set", t = arguments.length > 1 ? arguments[1] : void 0;
18655
- super(e, t), w(this, "code", "ERR_JWKS_NO_MATCHING_KEY");
18663
+ super(e, t), T(this, "code", "ERR_JWKS_NO_MATCHING_KEY");
18656
18664
  }
18657
- }, "code", "ERR_JWKS_NO_MATCHING_KEY"), w(class extends Tm {
18665
+ }, "code", "ERR_JWKS_NO_MATCHING_KEY"), T(class extends Tm {
18658
18666
  constructor() {
18659
18667
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "multiple matching keys found in the JSON Web Key Set", t = arguments.length > 1 ? arguments[1] : void 0;
18660
- super(e, t), w(this, Symbol.asyncIterator, void 0), w(this, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS");
18668
+ super(e, t), T(this, Symbol.asyncIterator, void 0), T(this, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS");
18661
18669
  }
18662
- }, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS"), w(class extends Tm {
18670
+ }, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS"), T(class extends Tm {
18663
18671
  constructor() {
18664
18672
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "request timed out", t = arguments.length > 1 ? arguments[1] : void 0;
18665
- super(e, t), w(this, "code", "ERR_JWKS_TIMEOUT");
18673
+ super(e, t), T(this, "code", "ERR_JWKS_TIMEOUT");
18666
18674
  }
18667
- }, "code", "ERR_JWKS_TIMEOUT"), w(class extends Tm {
18675
+ }, "code", "ERR_JWKS_TIMEOUT"), T(class extends Tm {
18668
18676
  constructor() {
18669
18677
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "signature verification failed", t = arguments.length > 1 ? arguments[1] : void 0;
18670
- super(e, t), w(this, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
18678
+ super(e, t), T(this, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
18671
18679
  }
18672
18680
  }, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
18673
18681
  //#endregion
@@ -19223,20 +19231,20 @@ var ih = class e {
19223
19231
  l = new window.AudioContext(f ? { sampleRate: t } : {});
19224
19232
  let p = l.createAnalyser();
19225
19233
  f || await Qm(l, o), await ah(l.audioWorklet, a?.rawAudioProcessor);
19226
- let ee = {
19234
+ let m = {
19227
19235
  voiceIsolation: !0,
19228
19236
  ...d
19229
19237
  };
19230
- u = await navigator.mediaDevices.getUserMedia({ audio: ee });
19231
- let m = l.createMediaStreamSource(u), h = new AudioWorkletNode(l, "rawAudioProcessor");
19238
+ u = await navigator.mediaDevices.getUserMedia({ audio: m });
19239
+ let ee = l.createMediaStreamSource(u), h = new AudioWorkletNode(l, "rawAudioProcessor");
19232
19240
  h.port.postMessage({
19233
19241
  type: "setFormat",
19234
19242
  format: n,
19235
19243
  sampleRate: t,
19236
19244
  chunkDurationMs: c
19237
- }), m.connect(p), p.connect(h), await l.resume();
19238
- let te = await navigator.permissions.query({ name: "microphone" });
19239
- return new e(l, p, h, u, m, te, s);
19245
+ }), ee.connect(p), p.connect(h), await l.resume();
19246
+ let g = await navigator.permissions.query({ name: "microphone" });
19247
+ return new e(l, p, h, u, ee, g, s);
19240
19248
  } catch (e) {
19241
19249
  throw u?.getTracks().forEach((e) => {
19242
19250
  e.stop();
@@ -20166,43 +20174,43 @@ var qh;
20166
20174
  //#endregion
20167
20175
  //#region ../../packages/components/src/chat/useVoiceSession.ts
20168
20176
  var Jh = (e) => {
20169
- let t = ge(), n = me("disconnected"), r = me("listening"), a = me(), o = me([]), s = me(), c = me(), l, u, d = 0, f = !1, p = () => {
20177
+ let t = he(), n = pe("disconnected"), i = pe("listening"), a = pe(), o = pe([]), s = pe(), c = pe(), l, u, d = 0, f = !1, p = () => {
20170
20178
  u &&= (clearInterval(u), void 0), s.value = void 0;
20171
20179
  }, ee = (e) => {
20172
20180
  let t = Date.now() + e * 1e3, n = () => {
20173
20181
  let e = Math.max(0, Math.ceil((t - Date.now()) / 1e3));
20174
- s.value = e, e === 0 && te();
20182
+ s.value = e, e === 0 && g();
20175
20183
  };
20176
20184
  n(), u = setInterval(n, 1e3);
20177
20185
  }, h = async (t) => {
20178
20186
  t && (l === t && (l = void 0), await e.closeGrant?.(t).catch(() => void 0));
20179
- }, te = async () => {
20187
+ }, g = async () => {
20180
20188
  d += 1, p();
20181
20189
  let e = l;
20182
20190
  l = void 0;
20183
- let i = t.value;
20184
- t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
20185
- }, g = async () => {
20191
+ let r = t.value;
20192
+ t.value = void 0, await r?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", i.value = "listening";
20193
+ }, te = async () => {
20186
20194
  if (f || t.value || n.value === "connecting") return;
20187
- a.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
20188
- let i = d, s = () => i === d && !f;
20195
+ a.value = void 0, o.value = [], i.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
20196
+ let r = d, s = () => r === d && !f;
20189
20197
  try {
20190
- let i = await e.fetchGrant();
20198
+ let r = await e.fetchGrant();
20191
20199
  if (!s()) {
20192
- await e.closeGrant?.(i.sessionId).catch(() => void 0);
20200
+ await e.closeGrant?.(r.sessionId).catch(() => void 0);
20193
20201
  return;
20194
20202
  }
20195
- l = i.sessionId, c.value = i.chatId;
20203
+ l = r.sessionId, c.value = r.chatId;
20196
20204
  let u = await Wh.startSession({
20197
- signedUrl: i.signedUrl,
20198
- customLlmExtraBody: { voice_session_id: i.sessionId },
20205
+ signedUrl: r.signedUrl,
20206
+ customLlmExtraBody: { voice_session_id: r.sessionId },
20199
20207
  onStatusChange: ({ status: e }) => {
20200
20208
  s() && (n.value = e);
20201
20209
  },
20202
20210
  onModeChange: ({ mode: t }) => {
20203
20211
  if (!s()) return;
20204
- let n = r.value === "speaking";
20205
- r.value = t, n && t !== "speaking" && e.onTurnEnd?.();
20212
+ let n = i.value === "speaking";
20213
+ i.value = t, n && t !== "speaking" && e.onTurnEnd?.();
20206
20214
  },
20207
20215
  onMessage: ({ message: t, role: n }) => {
20208
20216
  if (!s()) return;
@@ -20216,14 +20224,14 @@ var Jh = (e) => {
20216
20224
  s() && (a.value = e);
20217
20225
  },
20218
20226
  onDisconnect: (o) => {
20219
- s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", o.reason === "error" && (a.value = o.message), h(i.sessionId), e.onTurnEnd?.());
20227
+ s() && (p(), t.value = void 0, n.value = "disconnected", i.value = "listening", o.reason === "error" && (a.value = o.message), h(r.sessionId), e.onTurnEnd?.());
20220
20228
  }
20221
20229
  });
20222
20230
  if (!s()) {
20223
- await u.endSession().catch(() => void 0), await h(i.sessionId);
20231
+ await u.endSession().catch(() => void 0), await h(r.sessionId);
20224
20232
  return;
20225
20233
  }
20226
- t.value = u, ee(i.maxSessionSeconds);
20234
+ t.value = u, ee(r.maxSessionSeconds);
20227
20235
  } catch (e) {
20228
20236
  if (t.value = void 0, p(), await h(l), !s()) return;
20229
20237
  n.value = "disconnected", a.value = e instanceof Error ? e.message : String(e);
@@ -20232,15 +20240,15 @@ var Jh = (e) => {
20232
20240
  a.value = void 0;
20233
20241
  }, re = (e) => {
20234
20242
  t.value?.setMicMuted(e);
20235
- }, ie = (e) => {
20243
+ }, _ = (e) => {
20236
20244
  let n = t.value;
20237
20245
  if (!n || !e.trim()) return !1;
20238
20246
  try {
20239
20247
  return n.sendUserMessage(e), !0;
20240
20248
  } catch (e) {
20241
- return i.warn("The spoken answer could not be sent", e), !1;
20249
+ return r.warn("The spoken answer could not be sent", e), !1;
20242
20250
  }
20243
- }, _ = (e) => {
20251
+ }, ie = (e) => {
20244
20252
  let n = t.value;
20245
20253
  if (!n) return 0;
20246
20254
  try {
@@ -20261,25 +20269,25 @@ var Jh = (e) => {
20261
20269
  let r = t.value;
20262
20270
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
20263
20271
  };
20264
- return typeof window < "u" && window.addEventListener("pagehide", oe), fe(() => {
20265
- f = !0, typeof window < "u" && window.removeEventListener("pagehide", oe), te();
20272
+ return typeof window < "u" && window.addEventListener("pagehide", oe), de(() => {
20273
+ f = !0, typeof window < "u" && window.removeEventListener("pagehide", oe), g();
20266
20274
  }), {
20267
20275
  status: n,
20268
- mode: r,
20276
+ mode: i,
20269
20277
  error: a,
20270
20278
  transcript: o,
20271
20279
  remainingSeconds: s,
20272
20280
  chatId: c,
20273
20281
  isActive: m(() => n.value === "connected" || n.value === "connecting"),
20274
20282
  isConnecting: m(() => n.value === "connecting"),
20275
- isSpeaking: m(() => n.value === "connected" && r.value === "speaking"),
20276
- isListening: m(() => n.value === "connected" && r.value === "listening"),
20277
- start: g,
20278
- stop: te,
20283
+ isSpeaking: m(() => n.value === "connected" && i.value === "speaking"),
20284
+ isListening: m(() => n.value === "connected" && i.value === "listening"),
20285
+ start: te,
20286
+ stop: g,
20279
20287
  dismissError: ne,
20280
20288
  setMuted: re,
20281
- sendUserMessage: ie,
20282
- readLevel: _,
20289
+ sendUserMessage: _,
20290
+ readLevel: ie,
20283
20291
  readSpectrum: ae
20284
20292
  };
20285
20293
  }, Yh = { class: "pk-chatbot-view-chat__input-stage" }, Xh = {
@@ -20291,7 +20299,7 @@ var Jh = (e) => {
20291
20299
  }, $h = {
20292
20300
  key: 0,
20293
20301
  class: "pk-chatbot-view-chat__drop-overlay"
20294
- }, eg = 3e3, tg = 6e4, ng = 3e5, rg = 6e5, ig = /* @__PURE__ */ oe({
20302
+ }, eg = 3e3, tg = 6e4, ng = 3e5, rg = 6e5, ig = /* @__PURE__ */ ae({
20295
20303
  __name: "PkChatbotViewChat",
20296
20304
  props: {
20297
20305
  agentId: {},
@@ -20299,198 +20307,202 @@ var Jh = (e) => {
20299
20307
  userName: {}
20300
20308
  },
20301
20309
  emits: ["show-info", "revise"],
20302
- setup(i, { emit: l }) {
20303
- let p = ae(() => import("./PkToolShowForm-vXgu3bZO.js").then((e) => e.n)), ie = ae(() => import("./PkToolShowContactForm-CMK4zR2J.js").then((e) => e.n)), oe = ae(() => import("./PkToolShowSuggestedReply-CryAdy6t.js").then((e) => e.n)), ce = ae(() => import("./PkToolShowSources-Die_j1bn.js").then((e) => e.n)), de = ae(() => import("./PkToolRequestGeolocation-CaHo_418.js")), fe = ae(() => import("./PkToolRequestOAuthConnection-URjYDFhm.js")), pe = ae(() => import("./PkToolShowLocation-BBdeY0Ae.js").then((e) => e.n)), he = ae(() => import("./PkToolShowDiagram-CuQyY0uv.js")), ge = i, ve = l, Ee = n(ge.agentId), { agentInterface: De, agentFileUpload: Oe, agentVoice: ke, actions: Ae, revisedAnswers: Me, messages: Ne, chat: Pe, messageFeedbacks: Fe, feedbackDialogMessage: Ie, isFeedbackSubmitting: Le, isFeedbackSubmitted: Re, feedbackSubmitError: ze, isLeadSubmitted: Ve, isLoadingSubmitLead: He, submitLeadError: Ue, input: We, inputMessagePlaceholder: Ge, isConversationBlocked: Ke, baseUrl: qe, pendingAttachments: Je, isAttachmentLimitReached: Ye, fileLimitError: Xe, apiClient: Ze, isDark: Qe, voiceProviderSentences: b } = we(Ee), { handleSubmit: x, stopGeneration: $e, regenerate: et, onUpvote: tt, onDownvote: nt, onFeedback: rt, onFeedbackSubmit: it, onLeadSubmit: at, startNewChat: ot, addToolOutput: st, addToolApprovalResponse: ct, handleFileSelect: lt, clearFileLimitError: ut, refreshMessages: dt, appendMessage: ft } = Ee, { t: pt } = Se({ useScope: "global" }), mt = m(() => {
20304
- let e = Xe.value;
20305
- if (e) return e.reason === "per-chat" ? pt("message.fileLimitPerChat", { max: e.max }) : pt("message.fileLimitPerMessage", { max: e.max });
20306
- }), ht = o(() => De.value?.dismissableNotice), gt = m(() => Ne.value.some((e) => e.role === "user")), _t = m(() => ge.modifier === "fullscreen" && !gt.value), vt = Te(De, () => ge.userName), yt = ye("chatViewEl"), bt = async (e) => (await Ze.value.expandSourceContext(ge.agentId, e.documentId, e.chunkIndex)).content, xt = async (e) => {
20307
- let t = await Ze.value.downloadSourceDocument(ge.agentId, e);
20310
+ setup(r, { emit: c }) {
20311
+ let f = ie(() => import("./PkToolShowForm-CpY1KKUt.js").then((e) => e.n)), re = ie(() => import("./PkToolShowContactForm-CMK4zR2J.js").then((e) => e.n)), ae = ie(() => import("./PkToolShowSuggestedReply-B-QwwART.js").then((e) => e.n)), se = ie(() => import("./PkToolShowSources-CLsbqcDd.js").then((e) => e.n)), ue = ie(() => import("./PkToolRequestGeolocation-CsQghLEb.js")), de = ie(() => import("./PkToolRequestOAuthConnection-D5Jq6UZh.js")), fe = ie(() => import("./PkToolShowLocation-BBdeY0Ae.js").then((e) => e.n)), me = ie(() => import("./PkToolShowDiagram-DoklcF3f.js")), he = r, _e = c, Te = t(he.agentId), { agentInterface: Ee, agentFileUpload: De, agentVoice: Oe, actions: ke, revisedAnswers: je, messages: Me, chat: Ne, messageFeedbacks: Pe, feedbackDialogMessage: Fe, isFeedbackSubmitting: Ie, isFeedbackSubmitted: Le, feedbackSubmitError: Re, isLeadSubmitted: ze, isLoadingSubmitLead: Ve, submitLeadError: He, input: Ue, inputMessagePlaceholder: We, isConversationBlocked: Ge, baseUrl: Ke, pendingAttachments: qe, isAttachmentLimitReached: Je, fileLimitError: Ye, apiClient: Xe, isDark: Ze } = Ce(Te), { handleSubmit: Qe, stopGeneration: b, regenerate: x, onUpvote: $e, onDownvote: et, onFeedback: tt, onFeedbackSubmit: nt, onLeadSubmit: rt, startNewChat: it, addToolOutput: at, addToolApprovalResponse: ot, handleFileSelect: st, clearFileLimitError: ct, refreshMessages: lt, appendMessage: ut } = Te, { t: dt } = xe({ useScope: "global" }), ft = m(() => {
20312
+ let e = Ye.value;
20313
+ if (e) return e.reason === "per-chat" ? dt("message.fileLimitPerChat", { max: e.max }) : dt("message.fileLimitPerMessage", { max: e.max });
20314
+ }), pt = a(() => Ee.value?.dismissableNotice), mt = m(() => Me.value.some((e) => e.role === "user")), ht = m(() => he.modifier === "fullscreen" && !mt.value), gt = we(Ee, () => he.userName), _t = ve("chatViewEl"), vt = async (e) => (await Xe.value.expandSourceContext(he.agentId, e.documentId, e.chunkIndex)).content, yt = async (e) => {
20315
+ let t = await Xe.value.downloadSourceDocument(he.agentId, e);
20308
20316
  window.open(t.downloadUrl, "_blank");
20309
- }, { isOverDropZone: St } = Ce(yt, {
20310
- dataTypes: m(() => Oe.value?.allowedMimeTypes ?? []),
20317
+ }, { isOverDropZone: bt } = Se(_t, {
20318
+ dataTypes: m(() => De.value?.allowedMimeTypes ?? []),
20311
20319
  onDrop: (e) => {
20312
- if (!(!Oe.value?.enabled || !e)) for (let t of e) lt(t);
20320
+ if (!(!De.value?.enabled || !e)) for (let t of e) st(t);
20313
20321
  }
20314
- }), Ct = me(!1), wt = !1, Tt = me(!1), Et = [
20322
+ }), xt = pe(!1), St = !1, Ct = pe(!1), wt = [
20315
20323
  3e3,
20316
20324
  5e3,
20317
20325
  1e4
20318
- ], Dt, S, C = !1, Ot = 0, kt = !1;
20319
- function At() {
20320
- clearTimeout(Dt), Dt = void 0, S = void 0, C = !1, Ot = 0, Tt.value = !1;
20326
+ ], Tt, Et, Dt = !1, S = 0, C = !1;
20327
+ function Ot() {
20328
+ clearTimeout(Tt), Tt = void 0, Et = void 0, Dt = !1, S = 0, Ct.value = !1;
20321
20329
  }
20322
- function jt(e) {
20323
- wt || (clearTimeout(Dt), Dt = setTimeout(() => {
20324
- Mt();
20330
+ function kt(e) {
20331
+ St || (clearTimeout(Tt), Tt = setTimeout(() => {
20332
+ At();
20325
20333
  }, e));
20326
20334
  }
20327
- async function Mt() {
20328
- if (wt || kt) return;
20329
- kt = !0;
20335
+ async function At() {
20336
+ if (St || C) return;
20337
+ C = !0;
20330
20338
  let e;
20331
20339
  try {
20332
- e = await dt();
20340
+ e = await lt();
20333
20341
  } finally {
20334
- kt = !1;
20342
+ C = !1;
20335
20343
  }
20336
- if (wt) return;
20337
- if (e === "caught-up" && (Tt.value = !1), w.isActive.value) {
20338
- S = void 0, C = !1, Ot = 0, jt(eg);
20344
+ if (St) return;
20345
+ if (e === "caught-up" && (Ct.value = !1), w.isActive.value) {
20346
+ Et = void 0, Dt = !1, S = 0, kt(eg);
20339
20347
  return;
20340
20348
  }
20341
- S === void 0 && (S = Date.now(), C = !!w.error.value);
20342
- let t = Date.now() - S;
20343
- if (e === "caught-up" && t >= (C ? ng : tg) || t >= rg) {
20344
- At();
20349
+ Et === void 0 && (Et = Date.now(), Dt = !!w.error.value);
20350
+ let t = Date.now() - Et;
20351
+ if (e === "caught-up" && t >= (Dt ? ng : tg) || t >= rg) {
20352
+ Ot();
20345
20353
  return;
20346
20354
  }
20347
- let n = Et[Math.min(Ot, Et.length - 1)];
20348
- Ot += 1, jt(n);
20355
+ let n = wt[Math.min(S, wt.length - 1)];
20356
+ S += 1, kt(n);
20349
20357
  }
20350
- let Nt = (e = 1200) => {
20351
- jt(e);
20358
+ let jt = (e = 1200) => {
20359
+ kt(e);
20352
20360
  }, w = Jh({
20353
20361
  fetchGrant: async () => {
20354
- let e = await Ze.value.createVoiceSession(ge.agentId, Ee.localChatId, {
20355
- deviceContext: Ee.buildDeviceContext(),
20356
- externalContext: Ee.externalContext
20362
+ let e = await Xe.value.createVoiceSession(he.agentId, Te.localChatId, {
20363
+ deviceContext: Te.buildDeviceContext(),
20364
+ externalContext: Te.externalContext
20357
20365
  });
20358
- return e.chatId !== Ee.localChatId && (Ee.localChatId = e.chatId), b.value = e.providerSpokenSentences ?? [], e;
20366
+ return e.chatId !== Te.localChatId && (Te.localChatId = e.chatId), e;
20359
20367
  },
20360
- closeGrant: (e) => Ze.value.closeVoiceSession(ge.agentId, e),
20361
- onTranscript: (n) => {
20362
- n.role === "agent" && e(n.text, b.value) || (Tt.value = n.role === "user", ft({
20363
- id: `${r}${n.role}-${t()}`,
20364
- role: n.role === "user" ? "user" : "assistant",
20368
+ closeGrant: (e) => Xe.value.closeVoiceSession(he.agentId, e),
20369
+ onTranscript: (t) => {
20370
+ if (t.role !== "user") {
20371
+ Ct.value = !1;
20372
+ return;
20373
+ }
20374
+ Ct.value = !0, ut({
20375
+ id: `${n}user-${e()}`,
20376
+ role: "user",
20365
20377
  parts: [{
20366
20378
  type: "text",
20367
- text: n.text
20379
+ text: t.text
20368
20380
  }]
20369
- }));
20381
+ });
20370
20382
  },
20371
20383
  onTurnEnd: () => {
20372
- Nt();
20384
+ jt();
20373
20385
  }
20374
20386
  });
20375
- be(() => w.error.value, (e) => {
20376
- e && (Tt.value = !1);
20387
+ ye(() => w.error.value, (e) => {
20388
+ e && (Ct.value = !1);
20377
20389
  });
20378
- let Pt = m(() => ke.value?.enabled === !0), Ft = m(() => w.error.value ? "error" : w.isConnecting.value ? "connecting" : w.isSpeaking.value ? "speaking" : w.isActive.value ? "listening" : "idle"), T = m(() => {
20390
+ let Mt = m(() => Oe.value?.enabled === !0), T = m(() => w.error.value ? "error" : w.isConnecting.value ? "connecting" : w.isSpeaking.value ? "speaking" : w.isActive.value ? "listening" : "idle"), Nt = m(() => {
20379
20391
  let e = w.error.value;
20380
- if (e) return /took too long/i.test(e) ? pt("message.voiceTookTooLong") : e;
20381
- }), It = m(() => w.isSpeaking.value ? "output" : "input"), Lt = () => w.readLevel(It.value), Rt = () => w.readSpectrum(It.value), E = async () => {
20382
- Ct.value = !1, await w.start(), w.isActive.value && (At(), jt(eg));
20383
- }, zt = async () => {
20384
- Tt.value = !1, await w.stop(), !wt && Nt(0);
20385
- }, Bt = () => {
20392
+ if (e) return /took too long/i.test(e) ? dt("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? dt("message.voiceNoAnswer") : dt("message.voiceInterrupted");
20393
+ }), Pt = m(() => w.isSpeaking.value ? "output" : "input"), E = () => w.readLevel(Pt.value), Ft = () => w.readSpectrum(Pt.value), It = async () => {
20394
+ xt.value = !1, await w.start(), w.isActive.value && (Ot(), kt(eg));
20395
+ }, Lt = async () => {
20396
+ Ct.value = !1, await w.stop(), !St && jt(0);
20397
+ }, D = () => {
20386
20398
  w.dismissError();
20387
- }, Vt = async () => {
20388
- w.dismissError(), await w.stop(), await E();
20389
- }, Ht = (e) => e?.toolCallId ?? "", Ut = me(/* @__PURE__ */ new Set()), Wt = (e) => Ut.value.has(Ht(e)), Gt = me(/* @__PURE__ */ new Map()), Kt = (e, t) => w.isActive.value ? !w.sendUserMessage(t) || (Ut.value = new Set(Ut.value).add(Ht(e)), Nt(), !0) : !1, qt = (e, t, n) => {
20390
- Kt(t, c(t, n)) || st({
20399
+ }, Rt = async () => {
20400
+ w.dismissError(), await w.stop(), await It();
20401
+ }, zt = (e) => e?.toolCallId ?? "", Bt = pe(/* @__PURE__ */ new Set()), Vt = (e) => Bt.value.has(zt(e)), Ht = pe(/* @__PURE__ */ new Map()), Ut = (e, t) => w.isActive.value ? !w.sendUserMessage(t) || (Bt.value = new Set(Bt.value).add(zt(e)), jt(), !0) : !1, Wt = (e, t, n) => {
20402
+ Ut(t, s(t, n)) || at({
20391
20403
  tool: e,
20392
- toolCallId: Ht(t),
20404
+ toolCallId: zt(t),
20393
20405
  output: n
20394
20406
  });
20395
- }, Jt = (e) => {
20396
- let t = e.confirmed ? pt("message.voiceConfirmed") : pt("message.voiceCancelled");
20397
- if (Kt({ toolCallId: e.toolCallId }, t)) {
20398
- Ut.value.has(e.toolCallId) && (Gt.value = new Map(Gt.value).set(e.toolCallId, e.confirmed));
20407
+ }, Gt = (e) => {
20408
+ let t = e.confirmed ? dt("message.voiceConfirmed") : dt("message.voiceCancelled");
20409
+ if (Ut({ toolCallId: e.toolCallId }, t)) {
20410
+ Bt.value.has(e.toolCallId) && (Ht.value = new Map(Ht.value).set(e.toolCallId, e.confirmed));
20399
20411
  return;
20400
20412
  }
20401
- st({
20413
+ at({
20402
20414
  tool: "requestConfirm",
20403
20415
  toolCallId: e.toolCallId,
20404
20416
  output: e.confirmed ? "confirmed" : "cancelled"
20405
20417
  });
20406
- }, Yt = (e, t) => {
20407
- Kt(e, t) || (We.value = t, x());
20408
- }, Xt = (e, t) => {
20409
- let n = t.error ? pt("message.voiceLocationRefused") : pt("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
20410
- Kt(e, n) || st({
20418
+ }, Kt = (e, t) => {
20419
+ Ut(e, t) || (Ue.value = t, Qe());
20420
+ }, qt = (e, t) => {
20421
+ let n = t.error ? dt("message.voiceLocationRefused") : dt("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
20422
+ Ut(e, n) || at({
20411
20423
  tool: "requestGeolocation",
20412
- toolCallId: Ht(e),
20424
+ toolCallId: zt(e),
20413
20425
  output: t
20414
20426
  });
20415
- }, Zt = (e, t) => {
20416
- Kt(e, pt("message.voiceConnectionDone")) || st({
20427
+ }, Jt = (e, t) => {
20428
+ Ut(e, dt("message.voiceConnectionDone")) || at({
20417
20429
  tool: "requestOAuthConnection",
20418
- toolCallId: Ht(e),
20430
+ toolCallId: zt(e),
20419
20431
  output: {
20420
20432
  connected: !0,
20421
20433
  mcpServerId: t
20422
20434
  }
20423
20435
  });
20424
- }, Qt = () => {
20425
- Ct.value = !Ct.value, w.setMuted(Ct.value);
20436
+ }, Yt = () => {
20437
+ xt.value = !xt.value, w.setMuted(xt.value);
20426
20438
  };
20427
- return ue(() => {
20428
- wt = !0, At();
20439
+ return le(() => {
20440
+ St = !0, Ot();
20429
20441
  }), (e, t) => {
20430
- let n = f;
20442
+ let n = d;
20431
20443
  return v(), g("div", {
20432
20444
  ref_key: "chatViewEl",
20433
- ref: yt,
20434
- class: le(["pk-chatbot-view-chat", {
20435
- "pk-chatbot-view-chat--dragover": y(St) && y(Oe)?.enabled,
20436
- "pk-chatbot-view-chat--empty": _t.value
20445
+ ref: _t,
20446
+ class: ce(["pk-chatbot-view-chat", {
20447
+ "pk-chatbot-view-chat--dragover": y(bt) && y(De)?.enabled,
20448
+ "pk-chatbot-view-chat--empty": ht.value
20437
20449
  }])
20438
20450
  }, [
20439
- _(ee, {
20451
+ _(p, {
20440
20452
  name: "pk-chatbot-view-chat-fade",
20441
20453
  mode: "out-in"
20442
20454
  }, {
20443
- default: xe(() => [_t.value ? (v(), h(d, {
20455
+ default: be(() => [ht.value ? (v(), ee(u, {
20444
20456
  key: 0,
20445
- greeting: y(vt),
20446
- logo: y(De)?.logo,
20447
- name: y(Ee).name
20457
+ greeting: y(gt),
20458
+ logo: y(Ee)?.logo,
20459
+ name: y(Te).name
20448
20460
  }, null, 8, [
20449
20461
  "greeting",
20450
20462
  "logo",
20451
20463
  "name"
20452
- ])) : (v(), h(a, {
20464
+ ])) : (v(), ee(i, {
20453
20465
  key: 1,
20454
20466
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
20455
20467
  interactive: "",
20456
- messages: y(Ne),
20457
- "confirm-verdicts-on-call": Gt.value,
20458
- status: y(Pe).status,
20459
- error: y(Pe).error,
20460
- "main-color": y(De)?.mainColor,
20461
- "text-color": y(De)?.textColor,
20462
- "revised-answers": y(Me),
20463
- actions: y(Ae),
20464
- "message-feedbacks": y(Fe),
20465
- "feedback-message-id": y(Ie)?.id,
20466
- "feedback-loading": y(Le),
20467
- "feedback-submitted": y(Re),
20468
- "feedback-error": y(ze),
20469
- "show-extended-steps": y(De)?.showExtendedSteps,
20470
- "awaiting-spoken-answer": Tt.value,
20471
- "is-dark": y(Qe),
20472
- "show-scroll-to-bottom": i.modifier === "fullscreen",
20473
- onFeedbackSubmit: t[0] ||= (e) => y(it)(e),
20474
- onFeedbackClose: t[1] ||= (e) => Ie.value = void 0,
20475
- onRegenerate: y(et),
20476
- onAutoRetry: y(et),
20477
- onResetChat: y(ot),
20478
- onShowInfo: t[2] ||= (e) => ve("show-info", e),
20479
- onRevise: t[3] ||= (e) => ve("revise", e),
20480
- onUpvote: y(tt),
20481
- onDownvote: y(nt),
20482
- onFeedback: y(rt),
20483
- onApprovalRespond: y(ct),
20484
- onConfirmRespond: Jt
20468
+ messages: y(Me),
20469
+ "confirm-verdicts-on-call": Ht.value,
20470
+ status: y(Ne).status,
20471
+ error: y(Ne).error,
20472
+ "main-color": y(Ee)?.mainColor,
20473
+ "text-color": y(Ee)?.textColor,
20474
+ "revised-answers": y(je),
20475
+ actions: y(ke),
20476
+ "message-feedbacks": y(Pe),
20477
+ "feedback-message-id": y(Fe)?.id,
20478
+ "feedback-loading": y(Ie),
20479
+ "feedback-submitted": y(Le),
20480
+ "feedback-error": y(Re),
20481
+ "show-extended-steps": y(Ee)?.showExtendedSteps,
20482
+ "awaiting-spoken-answer": Ct.value,
20483
+ "is-dark": y(Ze),
20484
+ "show-scroll-to-bottom": r.modifier === "fullscreen",
20485
+ onFeedbackSubmit: t[0] ||= (e) => y(nt)(e),
20486
+ onFeedbackClose: t[1] ||= (e) => Fe.value = void 0,
20487
+ onRegenerate: y(x),
20488
+ onAutoRetry: y(x),
20489
+ onResetChat: y(it),
20490
+ onShowInfo: t[2] ||= (e) => _e("show-info", e),
20491
+ onRevise: t[3] ||= (e) => _e("revise", e),
20492
+ onUpvote: y($e),
20493
+ onDownvote: y(et),
20494
+ onFeedback: y(tt),
20495
+ onApprovalRespond: y(ot),
20496
+ onConfirmRespond: Gt
20485
20497
  }, {
20486
- "tool-showContactForm": xe(({ part: e }) => [_(y(ie), {
20498
+ "tool-showContactForm": be(({ part: e }) => [_(y(re), {
20487
20499
  part: e,
20488
- readonly: !y(qe),
20489
- submitted: y(Ve),
20490
- loading: y(He),
20491
- error: y(Ue),
20492
- "privacy-policy-notice": y(De)?.privacyPolicyNotice,
20493
- onSubmit: y(at)
20500
+ readonly: !y(Ke),
20501
+ submitted: y(ze),
20502
+ loading: y(Ve),
20503
+ error: y(He),
20504
+ "privacy-policy-notice": y(Ee)?.privacyPolicyNotice,
20505
+ onSubmit: y(rt)
20494
20506
  }, null, 8, [
20495
20507
  "part",
20496
20508
  "readonly",
@@ -20500,20 +20512,20 @@ var Jh = (e) => {
20500
20512
  "privacy-policy-notice",
20501
20513
  "onSubmit"
20502
20514
  ])]),
20503
- "tool-showSuggestedReply": xe(({ part: e }) => [_(y(oe), {
20515
+ "tool-showSuggestedReply": be(({ part: e }) => [_(y(ae), {
20504
20516
  part: e,
20505
- onSelect: (t) => Yt(e, t)
20517
+ onSelect: (t) => Kt(e, t)
20506
20518
  }, null, 8, ["part", "onSelect"])]),
20507
- "tool-showSources": xe(({ part: e }) => [_(y(ce), {
20519
+ "tool-showSources": be(({ part: e }) => [_(y(se), {
20508
20520
  part: e,
20509
- "on-expand-context": bt,
20510
- "on-download": xt
20521
+ "on-expand-context": vt,
20522
+ "on-download": yt
20511
20523
  }, null, 8, ["part"])]),
20512
- "tool-showForm": xe(({ part: e }) => [_(ee, { mode: "out-in" }, {
20513
- default: xe(() => [_(y(p), {
20524
+ "tool-showForm": be(({ part: e }) => [_(p, { mode: "out-in" }, {
20525
+ default: be(() => [_(y(f), {
20514
20526
  part: e,
20515
- answered: Wt(e),
20516
- onSelect: (t) => qt("showForm", e, t)
20527
+ answered: Vt(e),
20528
+ onSelect: (t) => Wt("showForm", e, t)
20517
20529
  }, null, 8, [
20518
20530
  "part",
20519
20531
  "answered",
@@ -20521,12 +20533,12 @@ var Jh = (e) => {
20521
20533
  ])]),
20522
20534
  _: 2
20523
20535
  }, 1024)]),
20524
- "tool-showMultipleChoice": xe(({ part: e }) => [_(ee, { mode: "out-in" }, {
20525
- default: xe(() => [_(y(p), {
20536
+ "tool-showMultipleChoice": be(({ part: e }) => [_(p, { mode: "out-in" }, {
20537
+ default: be(() => [_(y(f), {
20526
20538
  part: e,
20527
20539
  "allow-custom-answer": "",
20528
- answered: Wt(e),
20529
- onSelect: (t) => qt("showMultipleChoice", e, t)
20540
+ answered: Vt(e),
20541
+ onSelect: (t) => Wt("showMultipleChoice", e, t)
20530
20542
  }, null, 8, [
20531
20543
  "part",
20532
20544
  "answered",
@@ -20534,40 +20546,42 @@ var Jh = (e) => {
20534
20546
  ])]),
20535
20547
  _: 2
20536
20548
  }, 1024)]),
20537
- "tool-requestOAuthConnection": xe(({ part: e }) => [_(y(fe), {
20549
+ "tool-requestOAuthConnection": be(({ part: e }) => [_(y(de), {
20538
20550
  part: e,
20539
- "resolve-connection": (e) => y(Ze).getOAuthAuthorizeUrl(ge.agentId, e),
20540
- onConnected: (t) => Zt(e, t)
20551
+ "resolve-connection": (e) => y(Xe).getOAuthAuthorizeUrl(he.agentId, e),
20552
+ "check-connection": (e) => y(Xe).getOAuthConnectionStatus(he.agentId, e),
20553
+ onConnected: (t) => Jt(e, t)
20541
20554
  }, null, 8, [
20542
20555
  "part",
20543
20556
  "resolve-connection",
20557
+ "check-connection",
20544
20558
  "onConnected"
20545
20559
  ])]),
20546
- "tool-requestGeolocation": xe(({ part: e }) => [_(y(de), {
20560
+ "tool-requestGeolocation": be(({ part: e }) => [_(y(ue), {
20547
20561
  part: e,
20548
20562
  "call-live": y(w).isActive.value,
20549
- "reverse-geocode": (e, t) => y(Ze).reverseGeocode(e, t),
20550
- onResult: (t) => Xt(e, t)
20563
+ "reverse-geocode": (e, t) => y(Xe).reverseGeocode(e, t),
20564
+ onResult: (t) => qt(e, t)
20551
20565
  }, null, 8, [
20552
20566
  "part",
20553
20567
  "call-live",
20554
20568
  "reverse-geocode",
20555
20569
  "onResult"
20556
20570
  ])]),
20557
- "tool-showLocation": xe(({ part: e }) => [_(y(pe), {
20571
+ "tool-showLocation": be(({ part: e }) => [_(y(fe), {
20558
20572
  part: e,
20559
- "is-dark": y(Qe),
20560
- "main-color": y(De)?.mainColor,
20561
- "forward-geocode": (e, t) => y(Ze).forwardGeocode(e, t)
20573
+ "is-dark": y(Ze),
20574
+ "main-color": y(Ee)?.mainColor,
20575
+ "forward-geocode": (e, t) => y(Xe).forwardGeocode(e, t)
20562
20576
  }, null, 8, [
20563
20577
  "part",
20564
20578
  "is-dark",
20565
20579
  "main-color",
20566
20580
  "forward-geocode"
20567
20581
  ])]),
20568
- "tool-showDiagram": xe(({ part: e }) => [_(y(he), {
20582
+ "tool-showDiagram": be(({ part: e }) => [_(y(me), {
20569
20583
  part: e,
20570
- "is-dark": y(Qe)
20584
+ "is-dark": y(Ze)
20571
20585
  }, null, 8, ["part", "is-dark"])]),
20572
20586
  _: 1
20573
20587
  }, 8, [
@@ -20598,40 +20612,40 @@ var Jh = (e) => {
20598
20612
  ]))]),
20599
20613
  _: 1
20600
20614
  }),
20601
- ne("div", Yh, [_(ee, { name: "pk-chatbot-view-chat-fade" }, {
20602
- default: xe(() => [_t.value ? (v(), h(je, {
20615
+ te("div", Yh, [_(p, { name: "pk-chatbot-view-chat-fade" }, {
20616
+ default: be(() => [ht.value ? (v(), ee(Ae, {
20603
20617
  key: 0,
20604
20618
  class: "pk-chatbot-view-chat__aurora",
20605
20619
  "source-selector": ".pk-chatbot-input__form"
20606
- })) : te("", !0)]),
20620
+ })) : h("", !0)]),
20607
20621
  _: 1
20608
- }), y(Ke) ? (v(), g("div", Xh, _e(y(pt)("message.chatErrorConversationBlocked")), 1)) : Ft.value === "idle" ? (v(), h(u, {
20622
+ }), y(Ge) ? (v(), g("div", Xh, ge(y(dt)("message.chatErrorConversationBlocked")), 1)) : T.value === "idle" ? (v(), ee(l, {
20609
20623
  key: 2,
20610
- modelValue: y(We),
20611
- "onUpdate:modelValue": t[4] ||= (e) => se(We) ? We.value = e : null,
20612
- "pending-attachments": y(Je),
20613
- "onUpdate:pendingAttachments": t[5] ||= (e) => se(Je) ? Je.value = e : null,
20614
- placeholder: y(Ge),
20615
- "dismissable-notice": y(ht) && y(Pe).messages.length <= 1 ? y(ht) : void 0,
20616
- status: y(Pe).status,
20617
- "max-message-length": y(De)?.maxMessageLength,
20618
- "file-upload": y(Oe),
20619
- "attachment-limit-reached": y(Ye),
20620
- "attachment-notice": mt.value,
20621
- "voice-enabled": Pt.value,
20622
- onStopGeneration: y($e),
20623
- onSubmit: y(x),
20624
- onFileSelect: y(lt),
20625
- onDismissAttachmentNotice: y(ut),
20626
- onVoiceStart: E
20627
- }, re({ _: 2 }, [i.modifier === "fullscreen" ? {
20624
+ modelValue: y(Ue),
20625
+ "onUpdate:modelValue": t[4] ||= (e) => oe(Ue) ? Ue.value = e : null,
20626
+ "pending-attachments": y(qe),
20627
+ "onUpdate:pendingAttachments": t[5] ||= (e) => oe(qe) ? qe.value = e : null,
20628
+ placeholder: y(We),
20629
+ "dismissable-notice": y(pt) && y(Ne).messages.length <= 1 ? y(pt) : void 0,
20630
+ status: y(Ne).status,
20631
+ "max-message-length": y(Ee)?.maxMessageLength,
20632
+ "file-upload": y(De),
20633
+ "attachment-limit-reached": y(Je),
20634
+ "attachment-notice": ft.value,
20635
+ "voice-enabled": Mt.value,
20636
+ onStopGeneration: y(b),
20637
+ onSubmit: y(Qe),
20638
+ onFileSelect: y(st),
20639
+ onDismissAttachmentNotice: y(ct),
20640
+ onVoiceStart: It
20641
+ }, ne({ _: 2 }, [r.modifier === "fullscreen" ? {
20628
20642
  name: "prepend",
20629
- fn: xe(() => [ne("span", Zh, [_(s, {
20643
+ fn: be(() => [te("span", Zh, [_(o, {
20630
20644
  modifiers: "surface",
20631
20645
  class: "pk-chatbot-view-chat__agent-chip-avatar",
20632
- "img-src": y(De)?.logo,
20633
- name: y(Ee).name
20634
- }, null, 8, ["img-src", "name"]), y(Ee).name ? (v(), g("strong", Qh, _e(y(Ee).name), 1)) : te("", !0)])]),
20646
+ "img-src": y(Ee)?.logo,
20647
+ name: y(Te).name
20648
+ }, null, 8, ["img-src", "name"]), y(Te).name ? (v(), g("strong", Qh, ge(y(Te).name), 1)) : h("", !0)])]),
20635
20649
  key: "0"
20636
20650
  } : void 0]), 1032, [
20637
20651
  "modelValue",
@@ -20648,21 +20662,21 @@ var Jh = (e) => {
20648
20662
  "onSubmit",
20649
20663
  "onFileSelect",
20650
20664
  "onDismissAttachmentNotice"
20651
- ])) : (v(), h(Be, {
20665
+ ])) : (v(), ee(Be, {
20652
20666
  key: 1,
20653
- state: Ft.value,
20654
- sample: Lt,
20655
- spectrum: Rt,
20667
+ state: T.value,
20668
+ sample: E,
20669
+ spectrum: Ft,
20656
20670
  "remaining-seconds": y(w).remainingSeconds.value,
20657
- muted: Ct.value,
20658
- error: T.value,
20671
+ muted: xt.value,
20672
+ error: Nt.value,
20659
20673
  "raw-error": y(w).error.value,
20660
20674
  live: y(w).isActive.value,
20661
20675
  class: "pk-chatbot-view-chat__voice",
20662
- onToggleMute: Qt,
20663
- onHangUp: zt,
20664
- onRetry: Vt,
20665
- onDismiss: Bt
20676
+ onToggleMute: Yt,
20677
+ onHangUp: Lt,
20678
+ onRetry: Rt,
20679
+ onDismiss: D
20666
20680
  }, null, 8, [
20667
20681
  "state",
20668
20682
  "remaining-seconds",
@@ -20671,11 +20685,11 @@ var Jh = (e) => {
20671
20685
  "raw-error",
20672
20686
  "live"
20673
20687
  ]))]),
20674
- _(ee, null, {
20675
- default: xe(() => [y(St) && y(Oe)?.enabled ? (v(), g("div", $h, [_(n, {
20688
+ _(p, null, {
20689
+ default: be(() => [y(bt) && y(De)?.enabled ? (v(), g("div", $h, [_(n, {
20676
20690
  name: "ri:upload-cloud-2-line",
20677
20691
  class: "pk-chatbot-view-chat__drop-overlay-icon"
20678
- }), ne("span", null, _e(y(pt)("action.dropFile")), 1)])) : te("", !0)]),
20692
+ }), te("span", null, ge(y(dt)("action.dropFile")), 1)])) : h("", !0)]),
20679
20693
  _: 1
20680
20694
  })
20681
20695
  ], 2);
@@ -20683,6 +20697,6 @@ var Jh = (e) => {
20683
20697
  }
20684
20698
  });
20685
20699
  //#endregion
20686
- export { je as i, Be as n, Pe as r, ig as t };
20700
+ export { Ae as i, Be as n, Ne as r, ig as t };
20687
20701
 
20688
- //# sourceMappingURL=PkChatbotViewChat-DeeGCFJf.js.map
20702
+ //# sourceMappingURL=PkChatbotViewChat-BMr1DpNY.js.map