@8wave/ai-elements 0.104.0-beta.1 → 0.105.0-beta.1

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 (125) hide show
  1. package/dist/_chunks/{Agent-DG4nPG72.js → Agent-VhugusRf.js} +2 -2
  2. package/dist/_chunks/Agent-VhugusRf.js.map +1 -0
  3. package/dist/_chunks/{Document-DXkvvAnt.js → Document-DjNrISX1.js} +2 -2
  4. package/dist/_chunks/{Document-DXkvvAnt.js.map → Document-DjNrISX1.js.map} +1 -1
  5. package/dist/_chunks/{Media-3Mo4NRj7.js → Media-hjgDyEMr.js} +2 -2
  6. package/dist/_chunks/Media-hjgDyEMr.js.map +1 -0
  7. package/dist/_chunks/{PkStreamingMarkdown-YKd9F3xU.js → PkStreamingMarkdown-B4eMb97I.js} +2 -2
  8. package/dist/_chunks/{PkStreamingMarkdown-YKd9F3xU.js.map → PkStreamingMarkdown-B4eMb97I.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestGeolocation-sf6LpUN_.js → PkToolRequestGeolocation-Bp-D2nDb.js} +3 -3
  10. package/{dist-vue/_chunks/PkToolRequestGeolocation-BdX5DzEN.js.map → dist/_chunks/PkToolRequestGeolocation-Bp-D2nDb.js.map} +1 -1
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-BB8mlQit.js → PkToolRequestOAuthConnection-CjjyDj9A.js} +3 -3
  12. package/dist/_chunks/{PkToolRequestOAuthConnection-BB8mlQit.js.map → PkToolRequestOAuthConnection-CjjyDj9A.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowArtifact-54saXXCe.js → PkToolShowArtifact-Dl8f7Q7q.js} +2 -2
  14. package/dist/_chunks/{PkToolShowArtifact-54saXXCe.js.map → PkToolShowArtifact-Dl8f7Q7q.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowCalendarEvent-B_HPVUDk.js → PkToolShowCalendarEvent-B_QmZrlZ.js} +2 -2
  16. package/dist/_chunks/{PkToolShowCalendarEvent-B_HPVUDk.js.map → PkToolShowCalendarEvent-B_QmZrlZ.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowContactForm-BtcNCixq.js → PkToolShowContactForm-CXE0485W.js} +14 -14
  18. package/dist/_chunks/{PkToolShowContactForm-BtcNCixq.js.map → PkToolShowContactForm-CXE0485W.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowDiagram-cA64c2_N.js → PkToolShowDiagram-D-TyCkCB.js} +2 -2
  20. package/dist/_chunks/{PkToolShowDiagram-cA64c2_N.js.map → PkToolShowDiagram-D-TyCkCB.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowForm-DdBAG0Qs.js → PkToolShowForm-BzaibKAz.js} +101 -115
  22. package/dist/_chunks/PkToolShowForm-BzaibKAz.js.map +1 -0
  23. package/dist/_chunks/{PkToolShowSources-0qudS-bu.js → PkToolShowSources-CoTIoupP.js} +3 -3
  24. package/dist/_chunks/{PkToolShowSources-0qudS-bu.js.map → PkToolShowSources-CoTIoupP.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSuggestedReply-B2IB6ioR.js → PkToolShowSuggestedReply-DA2Bi7k4.js} +2 -2
  26. package/dist/_chunks/{PkToolShowSuggestedReply-B2IB6ioR.js.map → PkToolShowSuggestedReply-DA2Bi7k4.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowWeather-Bl3Yoscl.js → PkToolShowWeather-ChDHtOLz.js} +2 -2
  28. package/dist/_chunks/{PkToolShowWeather-Bl3Yoscl.js.map → PkToolShowWeather-ChDHtOLz.js.map} +1 -1
  29. package/dist/_chunks/{browser-DuzNfJq0.js → browser-BXy4OnXA.js} +804 -779
  30. package/dist/_chunks/browser-BXy4OnXA.js.map +1 -0
  31. package/dist/_chunks/index.es-CnpsLhp_.js +1006 -0
  32. package/dist/_chunks/index.es-CnpsLhp_.js.map +1 -0
  33. package/dist/_chunks/utils-DtJdKlnF.js +185 -0
  34. package/dist/_chunks/utils-DtJdKlnF.js.map +1 -0
  35. package/dist/_chunks/{vue-i18n-_ouwlDGE.js → vue-i18n-C3J36GV4.js} +2 -2
  36. package/dist/_chunks/{vue-i18n-_ouwlDGE.js.map → vue-i18n-C3J36GV4.js.map} +1 -1
  37. package/dist/_chunks/{web-DnPxEADy.js → web-CzR5jWfC.js} +46 -45
  38. package/dist/_chunks/{web-DnPxEADy.js.map → web-CzR5jWfC.js.map} +1 -1
  39. package/dist/ai-elements.es.js +2100 -2159
  40. package/dist/ai-elements.es.js.map +1 -1
  41. package/dist-vue/PkChatbot.js +1 -1
  42. package/dist-vue/PkChatbotMessages.js +1 -1
  43. package/dist-vue/PkChatbotStepPayload.js +1 -1
  44. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  45. package/dist-vue/PkChatbotSteps.js +1 -1
  46. package/dist-vue/PkChatbotViewChat.js +1 -1
  47. package/dist-vue/PkChatbotViewConversations.js +1 -1
  48. package/dist-vue/PkChatbotViewFiles.js +1 -1
  49. package/dist-vue/PkChatbotViewProfile.js +1 -1
  50. package/dist-vue/_chunks/{Agent-gCuDMxHN.js → Agent-CpIgGdU4.js} +2 -2
  51. package/dist-vue/_chunks/Agent-CpIgGdU4.js.map +1 -0
  52. package/dist-vue/_chunks/{Document-iH61Cw06.js → Document-CiaGPYTR.js} +2 -2
  53. package/dist-vue/_chunks/{Document-iH61Cw06.js.map → Document-CiaGPYTR.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbot-Bg9oercD.js → PkChatbot-xmjKbljL.js} +7 -7
  55. package/dist-vue/_chunks/{PkChatbot-Bg9oercD.js.map → PkChatbot-xmjKbljL.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotMessages-DUQxuYaG.js → PkChatbotMessages-tHQ2JQrb.js} +75 -75
  57. package/dist-vue/_chunks/{PkChatbotMessages-DUQxuYaG.js.map → PkChatbotMessages-tHQ2JQrb.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotStepPayload-hCmy4XG9.js → PkChatbotStepPayload-BtsnkJIV.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-hCmy4XG9.js.map → PkChatbotStepPayload-BtsnkJIV.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B0WU0HcD.js → PkChatbotStepToolDetail-CCa95eBO.js} +116 -101
  61. package/dist-vue/_chunks/PkChatbotStepToolDetail-CCa95eBO.js.map +1 -0
  62. package/dist-vue/_chunks/PkChatbotSteps-CPBzs7Gi.js +180 -0
  63. package/dist-vue/_chunks/PkChatbotSteps-CPBzs7Gi.js.map +1 -0
  64. package/dist-vue/_chunks/{PkChatbotViewChat-YwjWNoqf.js → PkChatbotViewChat-CdiPjQLq.js} +6 -6
  65. package/dist-vue/_chunks/{PkChatbotViewChat-YwjWNoqf.js.map → PkChatbotViewChat-CdiPjQLq.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewConversations-vo57eSwy.js → PkChatbotViewConversations-BP-NJvlK.js} +2 -2
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-vo57eSwy.js.map → PkChatbotViewConversations-BP-NJvlK.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewFiles-DDPugn7F.js → PkChatbotViewFiles-DRUVmxU5.js} +3 -3
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-DDPugn7F.js.map → PkChatbotViewFiles-DRUVmxU5.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewProfile-Dww5KI21.js → PkChatbotViewProfile-ywvIs6N5.js} +2 -2
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-Dww5KI21.js.map → PkChatbotViewProfile-ywvIs6N5.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolRequestGeolocation-BdX5DzEN.js → PkToolRequestGeolocation-BdIyXoPQ.js} +2 -2
  73. package/{dist/_chunks/PkToolRequestGeolocation-sf6LpUN_.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BdIyXoPQ.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BUmnRgMi.js → PkToolRequestOAuthConnection-Dnch7xAB.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BUmnRgMi.js.map → PkToolRequestOAuthConnection-Dnch7xAB.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowDiagram-YMo-iVWr.js → PkToolShowDiagram-DgLxNNp7.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowDiagram-YMo-iVWr.js.map → PkToolShowDiagram-DgLxNNp7.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowForm-D2n2rA6J.js → PkToolShowForm-6eLi6Wr0.js} +103 -117
  79. package/dist-vue/_chunks/PkToolShowForm-6eLi6Wr0.js.map +1 -0
  80. package/dist-vue/_chunks/{PkToolShowSources-DUAsrrzC.js → PkToolShowSources-DTJgvDiB.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowSources-DUAsrrzC.js.map → PkToolShowSources-DTJgvDiB.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm28RIJF.js → PkToolShowSuggestedReply-D9RY2h6Z.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm28RIJF.js.map → PkToolShowSuggestedReply-D9RY2h6Z.js.map} +1 -1
  84. package/dist-vue/_chunks/{createChatbotApiClient-CAX-3-oK.js → createChatbotApiClient-12eL7hul.js} +2 -2
  85. package/dist-vue/_chunks/{createChatbotApiClient-CAX-3-oK.js.map → createChatbotApiClient-12eL7hul.js.map} +1 -1
  86. package/dist-vue/_chunks/{useChatbotStore-Rj18hAUf.js → useChatbotStore-Chtzi5jc.js} +1086 -1016
  87. package/dist-vue/_chunks/useChatbotStore-Chtzi5jc.js.map +1 -0
  88. package/dist-vue/_chunks/{utils-B0jsOUqd.js → utils-DKNWwMTQ.js} +46 -23
  89. package/dist-vue/_chunks/utils-DKNWwMTQ.js.map +1 -0
  90. package/dist-vue/_chunks/{web-DnPxEADy.js → web-CzR5jWfC.js} +46 -45
  91. package/dist-vue/_chunks/{web-DnPxEADy.js.map → web-CzR5jWfC.js.map} +1 -1
  92. package/dist-vue/api.js +1 -1
  93. package/dist-vue/composables.js +3 -3
  94. package/dist-vue/index.js +261 -261
  95. package/dist-vue/index.js.map +1 -1
  96. package/dist-vue/locales.js +10 -4
  97. package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +1 -1
  98. package/dist-vue/packages/components/src/chat/constants.d.ts +12 -0
  99. package/dist-vue/packages/components/src/chat/utils.d.ts +37 -0
  100. package/dist-vue/packages/models/src/schema/Agent.d.ts +24 -16
  101. package/dist-vue/packages/models/src/schema/AgentChatStatistics.d.ts +1 -1
  102. package/dist-vue/packages/models/src/schema/Chat.d.ts +9 -9
  103. package/dist-vue/packages/models/src/schema/Document.d.ts +6 -6
  104. package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +0 -1
  105. package/dist-vue/packages/models/src/schema/McpServer.d.ts +2 -2
  106. package/dist-vue/packages/models/src/schema/Member.d.ts +2 -2
  107. package/dist-vue/packages/models/src/schema/Organization.d.ts +4 -4
  108. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +29 -29
  109. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +20 -20
  110. package/dist-vue/packages/models/src/schema/User.d.ts +6 -6
  111. package/dist-vue/packages/models/src/schema/constants.d.ts +2 -0
  112. package/package.json +10 -5
  113. package/dist/_chunks/Agent-DG4nPG72.js.map +0 -1
  114. package/dist/_chunks/Media-3Mo4NRj7.js.map +0 -1
  115. package/dist/_chunks/PkToolShowForm-DdBAG0Qs.js.map +0 -1
  116. package/dist/_chunks/browser-DuzNfJq0.js.map +0 -1
  117. package/dist/_chunks/index.es-DXx8DNKf.js +0 -2986
  118. package/dist/_chunks/index.es-DXx8DNKf.js.map +0 -1
  119. package/dist-vue/_chunks/Agent-gCuDMxHN.js.map +0 -1
  120. package/dist-vue/_chunks/PkChatbotStepToolDetail-B0WU0HcD.js.map +0 -1
  121. package/dist-vue/_chunks/PkChatbotSteps-BrvTsAeZ.js +0 -177
  122. package/dist-vue/_chunks/PkChatbotSteps-BrvTsAeZ.js.map +0 -1
  123. package/dist-vue/_chunks/PkToolShowForm-D2n2rA6J.js.map +0 -1
  124. package/dist-vue/_chunks/useChatbotStore-Rj18hAUf.js.map +0 -1
  125. package/dist-vue/_chunks/utils-B0jsOUqd.js.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/BaseConnection.js
1
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/BaseConnection.js
2
2
  var e = class {
3
3
  queue = [];
4
4
  outgoingQueue = [];
@@ -62,7 +62,7 @@ function t(e) {
62
62
  };
63
63
  }
64
64
  //#endregion
65
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/assert.js
65
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/assert.js
66
66
  function n(e) {
67
67
  return typeof e == "object" && !!e && !Array.isArray(e);
68
68
  }
@@ -70,7 +70,7 @@ function r(e, t = "Expected a JSON object") {
70
70
  if (!n(e)) throw Error(t);
71
71
  }
72
72
  //#endregion
73
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/errors.js
73
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/errors.js
74
74
  async function i(e) {
75
75
  try {
76
76
  let t = await e.json();
@@ -90,10 +90,10 @@ var a = class extends Error {
90
90
  }
91
91
  }, o = Object.freeze({
92
92
  name: "js_sdk",
93
- version: "1.23.0"
93
+ version: "1.24.0"
94
94
  });
95
95
  //#endregion
96
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/events.js
96
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/events.js
97
97
  function s(e) {
98
98
  return !!e.type;
99
99
  }
@@ -18412,7 +18412,7 @@ g(Q, "code", "ERR_JOSE_GENERIC"), g(class extends Q {
18412
18412
  }
18413
18413
  }, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
18414
18414
  //#endregion
18415
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/overrides.js
18415
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/overrides.js
18416
18416
  var bp = "conversation_initiation_client_data";
18417
18417
  function xp(e) {
18418
18418
  let t = { type: bp };
@@ -18440,7 +18440,7 @@ function xp(e) {
18440
18440
  }), t;
18441
18441
  }
18442
18442
  //#endregion
18443
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/audio.js
18443
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/audio.js
18444
18444
  function Sp(e) {
18445
18445
  let t = new Uint8Array(e);
18446
18446
  return btoa(String.fromCharCode(...t));
@@ -18451,7 +18451,7 @@ function Cp(e) {
18451
18451
  return r.buffer;
18452
18452
  }
18453
18453
  //#endregion
18454
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/volumeProvider.js
18454
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/volumeProvider.js
18455
18455
  var wp = {
18456
18456
  getVolume: () => 0,
18457
18457
  getByteFrequencyData: () => {}
@@ -18464,7 +18464,7 @@ function Ep(e, t, n) {
18464
18464
  }
18465
18465
  }
18466
18466
  //#endregion
18467
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/WebRTCAudioAdapter.js
18467
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/WebRTCAudioAdapter.js
18468
18468
  var Dp;
18469
18469
  function Op(e) {
18470
18470
  Dp = e;
@@ -18473,7 +18473,7 @@ function kp() {
18473
18473
  return Dp?.() ?? null;
18474
18474
  }
18475
18475
  //#endregion
18476
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebRTCConnection.js
18476
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebRTCConnection.js
18477
18477
  var Ap = "wss://livekit.rtc.elevenlabs.io", jp = "https://api.elevenlabs.io", Mp = .01;
18478
18478
  function Np(e) {
18479
18479
  return e.replace(/^wss:\/\//, "https://");
@@ -18575,31 +18575,31 @@ var Pp = class r extends e {
18575
18575
  throw t instanceof Error && t.message.includes("401") && (n = "Your agent has authentication enabled, but no signed URL or conversation token was provided."), Error(`Failed to fetch conversation token for agent ${e.agentId}: ${n}`);
18576
18576
  }
18577
18577
  else throw Error("Either conversationToken or agentId is required for WebRTC connection");
18578
- let s = new _p();
18578
+ let s = e.webRtc?.singlePeerConnection, c = new _p(s === void 0 ? void 0 : { singlePeerConnection: s });
18579
18579
  try {
18580
- let n = `room_${Date.now()}`, i = t("pcm_48000"), o = t("pcm_48000"), c = new r(s, n, i, o, e), l = e.livekitUrl || Ap, u = e.textOnly ? Promise.resolve() : new Promise((t, n) => {
18581
- s.once(F.SignalConnected, () => {
18582
- c.enableMicrophone(e.inputDeviceId).then(() => t()).catch(n);
18580
+ let n = `room_${Date.now()}`, i = t("pcm_48000"), o = t("pcm_48000"), s = new r(c, n, i, o, e), l = e.livekitUrl || Ap, u = e.textOnly ? Promise.resolve() : new Promise((t, n) => {
18581
+ c.once(F.SignalConnected, () => {
18582
+ s.enableMicrophone(e.inputDeviceId).then(() => t()).catch(n);
18583
18583
  });
18584
18584
  }), d = e.webRtc?.iceTransportPolicy;
18585
- await s.connect(l, a, { rtcConfig: d ? { iceTransportPolicy: d } : void 0 }), await new Promise((e) => {
18586
- if (c.isConnected) e();
18585
+ await c.connect(l, a, { rtcConfig: d ? { iceTransportPolicy: d } : void 0 }), await new Promise((e) => {
18586
+ if (s.isConnected) e();
18587
18587
  else {
18588
18588
  let t = () => {
18589
- s.off(F.Connected, t), e();
18589
+ c.off(F.Connected, t), e();
18590
18590
  };
18591
- s.on(F.Connected, t);
18591
+ c.on(F.Connected, t);
18592
18592
  }
18593
18593
  }), await u;
18594
- let f = s.localParticipant.getTrackPublication(V.Source.Microphone)?.track;
18595
- f && c.setupInputAnalyser(f.mediaStreamTrack), s.name && (c.conversationId = s.name.match(/(conv_[a-zA-Z0-9]+)/)?.[0] || s.name);
18594
+ let f = c.localParticipant.getTrackPublication(V.Source.Microphone)?.track;
18595
+ f && s.setupInputAnalyser(f.mediaStreamTrack), c.name && (s.conversationId = c.name.match(/(conv_[a-zA-Z0-9]+)/)?.[0] || c.name);
18596
18596
  let p = xp(e);
18597
- return c.debug({
18597
+ return s.debug({
18598
18598
  type: bp,
18599
18599
  message: p
18600
- }), await c.sendRequiredMessage(p), c;
18600
+ }), await s.sendRequiredMessage(p), s;
18601
18601
  } catch (e) {
18602
- throw await s.disconnect(), e;
18602
+ throw await c.disconnect(), e;
18603
18603
  }
18604
18604
  }
18605
18605
  setupRoomEventListeners() {
@@ -18782,7 +18782,7 @@ function Ip(e) {
18782
18782
  return /* @__PURE__ */ Error(`No ${e} registered. ${Fp}`);
18783
18783
  }
18784
18784
  //#endregion
18785
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/VoiceSessionSetup.js
18785
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/VoiceSessionSetup.js
18786
18786
  var Lp;
18787
18787
  function Rp(e) {
18788
18788
  Lp = e;
@@ -18802,7 +18802,7 @@ function Bp(e) {
18802
18802
  };
18803
18803
  }
18804
18804
  //#endregion
18805
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/createWorkletModuleLoader.js
18805
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/createWorkletModuleLoader.js
18806
18806
  var Vp = /* @__PURE__ */ new Map();
18807
18807
  function Hp(e, t) {
18808
18808
  return t ? `${e} ${t}` : e;
@@ -18833,14 +18833,14 @@ function Up(e, t) {
18833
18833
  };
18834
18834
  }
18835
18835
  //#endregion
18836
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioConcatProcessor.generated.js
18836
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioConcatProcessor.generated.js
18837
18837
  var Wp = Up("audioConcatProcessor", "/*\n * ulaw decoding logic taken from the wavefile library\n * https://github.com/rochars/wavefile/blob/master/lib/codecs/mulaw.js\n * USED BY @elevenlabs/client\n */\n\nconst decodeTable = [0, 132, 396, 924, 1980, 4092, 8316, 16764];\n\nfunction decodeSample(muLawSample) {\n let sign;\n let exponent;\n let mantissa;\n let sample;\n muLawSample = ~muLawSample;\n sign = muLawSample & 0x80;\n exponent = (muLawSample >> 4) & 0x07;\n mantissa = muLawSample & 0x0f;\n sample = decodeTable[exponent] + (mantissa << (exponent + 3));\n if (sign !== 0) sample = -sample;\n\n return sample;\n}\n\nclass AudioConcatProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffers = []; // Initialize an empty buffer\n this.cursor = 0;\n this.currentBuffer = null;\n this.wasInterrupted = false;\n this.finished = false;\n\n this.port.onmessage = ({ data }) => {\n switch (data.type) {\n case \"setFormat\":\n this.format = data.format;\n if (globalThis.LibSampleRate && sampleRate !== data.sampleRate) {\n globalThis.LibSampleRate.create(\n 1,\n data.sampleRate,\n sampleRate\n ).then(resampler => {\n this.resampler = resampler;\n });\n }\n break;\n case \"buffer\":\n this.wasInterrupted = false;\n this.buffers.push(\n this.format === \"ulaw\"\n ? new Uint8Array(data.buffer)\n : new Int16Array(data.buffer)\n );\n break;\n case \"interrupt\":\n this.wasInterrupted = true;\n break;\n case \"clearInterrupted\":\n if (this.wasInterrupted) {\n this.wasInterrupted = false;\n this.buffers = [];\n this.currentBuffer = null;\n }\n }\n };\n }\n process(_, outputs) {\n let finished = false;\n const output = outputs[0][0];\n for (let i = 0; i < output.length; i++) {\n if (!this.currentBuffer) {\n if (this.buffers.length === 0) {\n finished = true;\n break;\n }\n this.currentBuffer = this.buffers.shift();\n if (this.resampler) {\n this.currentBuffer = this.resampler.full(this.currentBuffer);\n }\n this.cursor = 0;\n }\n\n let value = this.currentBuffer[this.cursor];\n if (this.format === \"ulaw\") {\n value = decodeSample(value);\n }\n output[i] = value / 32768;\n this.cursor++;\n\n if (this.cursor >= this.currentBuffer.length) {\n this.currentBuffer = null;\n }\n }\n\n if (this.finished !== finished) {\n this.finished = finished;\n this.port.postMessage({ type: \"process\", finished });\n }\n\n return true; // Continue processing\n }\n}\n\nregisterProcessor(\"audioConcatProcessor\", AudioConcatProcessor);\n"), Gp = "https://cdn.jsdelivr.net/npm/@alexanderolsen/libsamplerate-js@2.1.2/dist/libsamplerate.worklet.js";
18838
18838
  async function Kp(e, t) {
18839
18839
  let n = t || Gp;
18840
18840
  await e.audioWorklet.addModule(n);
18841
18841
  }
18842
18842
  //#endregion
18843
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/calculateVolume.js
18843
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/calculateVolume.js
18844
18844
  function qp(e) {
18845
18845
  if (e.length === 0) return 0;
18846
18846
  let t = 0;
@@ -18848,7 +18848,7 @@ function qp(e) {
18848
18848
  return t /= e.length, t < 0 ? 0 : t > 1 ? 1 : t;
18849
18849
  }
18850
18850
  //#endregion
18851
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/volumeProvider.js
18851
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/volumeProvider.js
18852
18852
  function Jp(e, t) {
18853
18853
  let n = e.frequencyBinCount, r, i;
18854
18854
  return {
@@ -18861,7 +18861,7 @@ function Jp(e, t) {
18861
18861
  };
18862
18862
  }
18863
18863
  //#endregion
18864
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/compatibility.js
18864
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/compatibility.js
18865
18865
  function Yp() {
18866
18866
  return [
18867
18867
  "iPad Simulator",
@@ -18876,7 +18876,7 @@ function Xp() {
18876
18876
  return /android/i.test(navigator.userAgent);
18877
18877
  }
18878
18878
  //#endregion
18879
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/output.js
18879
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/output.js
18880
18880
  function Zp({ sampleRate: e, format: t, worklet: n, audioElement: r }) {
18881
18881
  if (!Yp()) return;
18882
18882
  let i = Math.floor(e * 100 / 1e3), a = t === "ulaw" ? new Uint8Array(i).fill(255) : new Int16Array(i);
@@ -19100,7 +19100,7 @@ function am(e) {
19100
19100
  return e.bedrockInferenceProfile !== void 0 && (t.bedrock_inference_profile = e.bedrockInferenceProfile), e.postCallTranscriptionWebhook && (t.post_call_transcription_webhook = im(e.postCallTranscriptionWebhook)), e.postCallAudioWebhook && (t.post_call_audio_webhook = im(e.postCallAudioWebhook)), t;
19101
19101
  }
19102
19102
  //#endregion
19103
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebSocketConnection.js
19103
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebSocketConnection.js
19104
19104
  var om = "convai", sm = "wss://api.elevenlabs.io", cm = "/v1/convai/conversation?agent_id=", lm = class n extends e {
19105
19105
  socket;
19106
19106
  conversationId;
@@ -19219,7 +19219,7 @@ var om = "convai", sm = "wss://api.elevenlabs.io", cm = "/v1/convai/conversation
19219
19219
  }
19220
19220
  };
19221
19221
  //#endregion
19222
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachInputToConnection.js
19222
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachInputToConnection.js
19223
19223
  function um(e, t) {
19224
19224
  let n = (e) => {
19225
19225
  let n = e.data[0];
@@ -19230,7 +19230,7 @@ function um(e, t) {
19230
19230
  };
19231
19231
  }
19232
19232
  //#endregion
19233
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachConnectionToOutput.js
19233
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachConnectionToOutput.js
19234
19234
  function dm(e, t) {
19235
19235
  let n = (e) => {
19236
19236
  t.playAudio(Cp(e.audio_base_64));
@@ -19240,7 +19240,7 @@ function dm(e, t) {
19240
19240
  };
19241
19241
  }
19242
19242
  //#endregion
19243
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/ConnectionFactory.js
19243
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/ConnectionFactory.js
19244
19244
  function fm(e) {
19245
19245
  let t = "signedUrl" in e && e.signedUrl, n = "orchestrator" in e && e.orchestrator;
19246
19246
  if (t && e.connectionType === "webrtc") throw Error("signedUrl only supports websocket connections. Remove connectionType or set it to 'websocket'.");
@@ -19257,7 +19257,7 @@ async function pm(e) {
19257
19257
  }
19258
19258
  }
19259
19259
  //#endregion
19260
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/applyDelay.js
19260
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/applyDelay.js
19261
19261
  var mm = {
19262
19262
  default: 0,
19263
19263
  android: 3e3
@@ -19270,7 +19270,7 @@ async function gm(e) {
19270
19270
  e > 0 && await new Promise((t) => setTimeout(t, e));
19271
19271
  }
19272
19272
  //#endregion
19273
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioUnlock.js
19273
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioUnlock.js
19274
19274
  var _m = 3e4, vm = [
19275
19275
  "touchstart",
19276
19276
  "touchend",
@@ -19309,7 +19309,7 @@ function Om() {
19309
19309
  ym && (ym.close().catch(() => {}), ym = null, wm());
19310
19310
  }
19311
19311
  //#endregion
19312
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/VoiceSessionSetup.js
19312
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/VoiceSessionSetup.js
19313
19313
  function km() {
19314
19314
  return Xp() ? "android" : Yp() ? "ios" : "default";
19315
19315
  }
@@ -19387,7 +19387,7 @@ async function Mm(e) {
19387
19387
  }
19388
19388
  Rp(Mm);
19389
19389
  //#endregion
19390
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/webAudioAdapter.js
19390
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/webAudioAdapter.js
19391
19391
  var Nm = class {
19392
19392
  audioElements = [];
19393
19393
  inputAudioContext = null;
@@ -19461,7 +19461,7 @@ function Im() {
19461
19461
  return Pm;
19462
19462
  }
19463
19463
  //#endregion
19464
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/scribeAudioProcessor.generated.js
19464
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/scribeAudioProcessor.generated.js
19465
19465
  var Lm = Up("scribeAudioProcessor", "/*\n * Scribe Audio Processor for converting microphone audio to PCM16 format\n * Supports resampling for browsers like Firefox that don't support\n * AudioContext sample rate constraints.\n * USED BY @elevenlabs/client\n */\n\nclass ScribeAudioProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = [];\n this.bufferSize = 4096; // Buffer size for optimal chunk transmission\n\n // Resampling state\n this.inputSampleRate = null;\n this.outputSampleRate = null;\n this.resampleRatio = 1;\n this.lastSample = 0;\n this.resampleAccumulator = 0;\n\n this.port.onmessage = ({ data }) => {\n if (data.type === \"configure\") {\n this.inputSampleRate = data.inputSampleRate;\n this.outputSampleRate = data.outputSampleRate;\n if (this.inputSampleRate && this.outputSampleRate) {\n this.resampleRatio = this.inputSampleRate / this.outputSampleRate;\n }\n }\n };\n }\n\n // Linear interpolation resampling\n resample(inputData) {\n if (this.resampleRatio === 1 || !this.inputSampleRate) {\n return inputData;\n }\n\n const outputSamples = [];\n\n for (let i = 0; i < inputData.length; i++) {\n const currentSample = inputData[i];\n\n // Generate output samples using linear interpolation\n while (this.resampleAccumulator < 1) {\n const interpolated =\n this.lastSample +\n (currentSample - this.lastSample) * this.resampleAccumulator;\n outputSamples.push(interpolated);\n this.resampleAccumulator += this.resampleRatio;\n }\n\n this.resampleAccumulator -= 1;\n this.lastSample = currentSample;\n }\n\n return new Float32Array(outputSamples);\n }\n\n process(inputs) {\n const input = inputs[0];\n if (input.length > 0) {\n let channelData = input[0]; // Get first channel (mono)\n\n // Resample if needed (for Firefox and other browsers that don't\n // support AudioContext sample rate constraints)\n if (this.resampleRatio !== 1) {\n channelData = this.resample(channelData);\n }\n\n // Add incoming audio to buffer\n for (let i = 0; i < channelData.length; i++) {\n this.buffer.push(channelData[i]);\n }\n\n // When buffer reaches threshold, convert and send\n if (this.buffer.length >= this.bufferSize) {\n const float32Array = new Float32Array(this.buffer);\n const int16Array = new Int16Array(float32Array.length);\n\n // Convert Float32 [-1, 1] to Int16 [-32768, 32767]\n for (let i = 0; i < float32Array.length; i++) {\n // Clamp the value to prevent overflow\n const sample = Math.max(-1, Math.min(1, float32Array[i]));\n // Scale to PCM16 range\n int16Array[i] = sample < 0 ? sample * 32768 : sample * 32767;\n }\n\n // Send to main thread as transferable ArrayBuffer\n this.port.postMessage(\n {\n audioData: int16Array.buffer\n },\n [int16Array.buffer]\n );\n\n // Clear buffer\n this.buffer = [];\n }\n }\n\n return true; // Continue processing\n }\n}\n\nregisterProcessor(\"scribeAudioProcessor\", ScribeAudioProcessor);\n\n"), Rm = 16e3, zm = async (e, t) => {
19466
19466
  let n, r, i, a, o = () => {
19467
19467
  for (let e of n?.getTracks() ?? []) e.stop();
@@ -19509,7 +19509,7 @@ async function Vm({ conversationId: e, origin: t, file: n, filename: a }) {
19509
19509
  return { fileId: d };
19510
19510
  }
19511
19511
  //#endregion
19512
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/BaseConversation.js
19512
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/BaseConversation.js
19513
19513
  var Hm = {
19514
19514
  reason: "agent",
19515
19515
  context: {
@@ -19603,7 +19603,8 @@ var Wm = class {
19603
19603
  source: "ai",
19604
19604
  role: "agent",
19605
19605
  message: e.agent_response_event.agent_response,
19606
- event_id: e.agent_response_event.event_id
19606
+ event_id: e.agent_response_event.event_id,
19607
+ attachments: e.agent_response_event.attachments
19607
19608
  });
19608
19609
  }
19609
19610
  handleAgentResponseCorrection(e) {
@@ -19949,7 +19950,7 @@ var Wm = class {
19949
19950
  }
19950
19951
  };
19951
19952
  //#endregion
19952
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/runtime.js
19953
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/runtime.js
19953
19954
  function Gm() {
19954
19955
  for (let e of [
19955
19956
  "fetch",
@@ -19962,7 +19963,7 @@ function Gm() {
19962
19963
  ]) if (globalThis[e] === void 0) throw Error(`${e} is not available in this environment.`);
19963
19964
  }
19964
19965
  //#endregion
19965
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/TextConversation.js
19966
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/TextConversation.js
19966
19967
  var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
19967
19968
  type = "text";
19968
19969
  setVolume() {
@@ -20081,7 +20082,7 @@ function Xm(e, t, n = Ym) {
20081
20082
  });
20082
20083
  }
20083
20084
  //#endregion
20084
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.23.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/scribe/connection.js
20085
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.24.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/scribe/connection.js
20085
20086
  var Zm = class {
20086
20087
  listeners = /* @__PURE__ */ new Map();
20087
20088
  on(e, t) {
@@ -20320,4 +20321,4 @@ Em(), Op(() => new Nm()), Fm(zm);
20320
20321
  //#endregion
20321
20322
  export { eh as AudioFormat, th as CommitStrategy, rh as Conversation, em as DEFAULT_INPUT_CHUNK_DURATION_MS, $m as RealtimeConnection, $ as RealtimeEvents, nh as Scribe, a as SessionConnectionError, qm as TextConversation, Jm as VoiceConversation, Pp as WebRTCConnection, lm as WebSocketConnection, pm as createConnection, Xm as postOverallFeedback };
20322
20323
 
20323
- //# sourceMappingURL=web-DnPxEADy.js.map
20324
+ //# sourceMappingURL=web-CzR5jWfC.js.map