@beterdichtbij/component-library 0.0.0-dev-timo.12 → 0.0.0-dev-timo.14

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.
@@ -32223,85 +32223,85 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32223
32223
  deviceManager: null,
32224
32224
  incomingCall: null,
32225
32225
  call: null
32226
- }), ue = A(null), de = A(null), fe = A(null), pe = A(!0), me = A(!1), he = A(null), ge = A(null), _e = A(null), ve = A(0), ye = A(0), be = A(null), xe = A(!1), Ce = A(""), we = A(""), Te = A(null), Ee = A(null), De = A(!0), Oe = A(!1), ke = A(!1), Ae = A(!1), je = A(null), Me = A(null), Ne = A(null), Pe = A(null), L = null, Fe = null, Ie = null, Le = a(() => Oe.value || at.value), Re = a(() => ke.value && Ae.value), ze = a(() => {
32226
+ }), ue = A(null), de = A(null), fe = A(null), pe = A(!0), me = A(!1), he = A(null), ge = A(null), _e = A(null), ve = A(0), ye = A(0), be = A(null), xe = A(!1), Ce = A(""), we = A(""), Te = A(null), Ee = A(null), De = A(!0), Oe = A(!1), ke = A(!1), Ae = A(!1), je = A(null), Me = A(null), Ne = A(null), Pe = A(null), L = null, Fe = null, Ie = null, Le = a(() => Oe.value || it.value), Re = a(() => {
32227
32227
  switch (ve.value) {
32228
- case 0: return Ze.value.hasNoAvailableCamera;
32229
- case 1: return Ze.value.hasOneAvailableCamera;
32230
- default: return Ze.value.hasMultipleAvailableCameras;
32228
+ case 0: return Xe.value.hasNoAvailableCamera;
32229
+ case 1: return Xe.value.hasOneAvailableCamera;
32230
+ default: return Xe.value.hasMultipleAvailableCameras;
32231
32231
  }
32232
- }), Be = a(() => {
32232
+ }), ze = a(() => {
32233
32233
  let e = navigator.userAgent;
32234
32234
  return /Mobi/.test(e) && !te.value;
32235
- }), Ve = a(() => {
32235
+ }), Be = a(() => {
32236
32236
  let e = navigator.userAgent, t = e.indexOf("Android") !== -1, n = /Mobi/.test(e), r = /iPad|iPhone|iPod/.test(e) && !window.MSStream;
32237
32237
  return !(t && n || r);
32238
- }), He = a(() => !j.value?.video && at.value), Ue = a(() => !j.value?.audio && at.value), We = a(() => M.value === i.Declined ? "incoming--declined" : "incoming--loading"), Ge = a(() => {
32238
+ }), Ve = a(() => !j.value?.video && it.value), He = a(() => !j.value?.audio && it.value), Ue = a(() => M.value === i.Declined ? "incoming--declined" : "incoming--loading"), We = a(() => {
32239
32239
  switch (se.value) {
32240
32240
  case 0: return "weak";
32241
32241
  case 1: return "steady";
32242
32242
  case 2: return "strong";
32243
32243
  default: return null;
32244
32244
  }
32245
- }), Ke = a(() => {
32245
+ }), Ge = a(() => {
32246
32246
  switch (se.value) {
32247
32247
  case 0: return O.value.signalStrength.weak;
32248
32248
  case 1: return O.value.signalStrength.steady;
32249
32249
  case 2: return O.value.signalStrength.strong;
32250
32250
  default: return null;
32251
32251
  }
32252
- }), qe = a(() => O.value.videoCallTemplate || O.value), Je = a(() => qe.value.actions || qe.value), Ye = a(() => qe.value.help || qe.value), Xe = a(() => qe.value.permissions || qe.value), Ze = a(() => qe.value.cameraAvailability || qe.value), Qe = a(() => te.value ? Je.value.stopSharingScreen : Je.value.shareScreen), $e = a(() => Ye.value.placeholderSettingsHelpTitle), et = a(() => Ye.value.placeholderSettingsHelpMessage), tt = a(() => M.value === i.Declined), nt = a(() => M.value === i.HangedUp), rt = a(() => M.value === i.Connected), it = a(() => !rt.value), at = a(() => M.value === i.DevicePermissionDenied), ot = a(() => qe.value.statusTextMessage || qe.value), st = a(() => qe.value.statusDetailMessage || qe.value), ct = a(() => x.participantRole), lt = a(() => ke.value ? Je.value.microphoneUnmute : Je.value.microphoneMute), ut = a(() => Oe.value ? Je.value.cameraOn : Je.value.cameraOff), dt = a(() => pe.value ? Je.value.backgroundBlurUnavailable : De.value ? Je.value.backgroundBlur : Je.value.backgroundUnblur);
32253
- function ft(e) {
32252
+ }), Ke = a(() => O.value.videoCallTemplate || O.value), qe = a(() => Ke.value.actions || Ke.value), Je = a(() => Ke.value.help || Ke.value), Ye = a(() => Ke.value.permissions || Ke.value), Xe = a(() => Ke.value.cameraAvailability || Ke.value), Ze = a(() => te.value ? qe.value.stopSharingScreen : qe.value.shareScreen), Qe = a(() => Je.value.placeholderSettingsHelpTitle), $e = a(() => Je.value.placeholderSettingsHelpMessage), et = a(() => M.value === i.Declined), tt = a(() => M.value === i.HangedUp), nt = a(() => M.value === i.Connected), rt = a(() => !nt.value), it = a(() => M.value === i.DevicePermissionDenied), at = a(() => Ke.value.statusTextMessage || Ke.value), ot = a(() => Ke.value.statusDetailMessage || Ke.value), st = a(() => x.participantRole), ct = a(() => ke.value ? qe.value.microphoneUnmute : qe.value.microphoneMute), lt = a(() => Oe.value ? qe.value.cameraOn : qe.value.cameraOff), ut = a(() => pe.value ? qe.value.backgroundBlurUnavailable : De.value ? qe.value.backgroundBlur : qe.value.backgroundUnblur);
32253
+ function dt(e) {
32254
32254
  if (typeof e != "string") return e;
32255
- let t = e.replaceAll("{participantRole}", ct.value);
32255
+ let t = e.replaceAll("{participantRole}", st.value);
32256
32256
  return t && t.charAt(0).toLocaleUpperCase() + t.slice(1);
32257
32257
  }
32258
- let pt = a(() => {
32258
+ let ft = a(() => {
32259
32259
  switch (M.value) {
32260
- case i.Initializing: return ft(ot.value.initializing);
32261
- case i.Dialing: return ft(ot.value.dialing);
32262
- case i.Ringing: return ft(ot.value.ringing);
32263
- case i.Answered: return ft(ot.value.answered);
32264
- case i.Connected: return ft(ot.value.connected);
32265
- case i.Declined: return ft(ot.value.videoCallDeclined);
32266
- case i.HangedUp: return ft(ot.value.videoCallHangedUp);
32267
- case i.DevicePermissionDenied: return ft(ot.value.devicePermissionDenied);
32268
- }
32269
- }), mt = a(() => Ce.value || pt.value), ht = a(() => we.value);
32260
+ case i.Initializing: return dt(at.value.initializing);
32261
+ case i.Dialing: return dt(at.value.dialing);
32262
+ case i.Ringing: return dt(at.value.ringing);
32263
+ case i.Answered: return dt(at.value.answered);
32264
+ case i.Connected: return dt(at.value.connected);
32265
+ case i.Declined: return dt(at.value.videoCallDeclined);
32266
+ case i.HangedUp: return dt(at.value.videoCallHangedUp);
32267
+ case i.DevicePermissionDenied: return dt(at.value.devicePermissionDenied);
32268
+ }
32269
+ }), pt = a(() => Ce.value || ft.value), mt = a(() => we.value);
32270
32270
  ne(() => {
32271
- nn(), _t(), Ee.value = window.setInterval(At, 5e3);
32271
+ tn(), gt(), Ee.value = window.setInterval(kt, 5e3);
32272
32272
  }), ie(() => {
32273
- be.value && window.clearInterval(be.value), Ee.value && window.clearInterval(Ee.value), gt(), en();
32273
+ be.value && window.clearInterval(be.value), Ee.value && window.clearInterval(Ee.value), ht(), $t();
32274
32274
  });
32275
- function gt() {
32275
+ function ht() {
32276
32276
  L &&= (window.clearTimeout(L), null), Fe &&= (window.clearTimeout(Fe), null), Ie &&= (window.clearTimeout(Ie), null);
32277
32277
  }
32278
- function _t() {
32279
- gt(), M.value === i.Initializing ? L = window.setTimeout(() => {
32280
- M.value === i.Initializing && (Ce.value = ft(ot.value.callNotDelivered), we.value = ft(st.value.callNotDeliveredDetail));
32278
+ function gt() {
32279
+ ht(), M.value === i.Initializing ? L = window.setTimeout(() => {
32280
+ M.value === i.Initializing && (Ce.value = dt(at.value.callNotDelivered), we.value = dt(ot.value.callNotDeliveredDetail));
32281
32281
  }, 3e4) : M.value === i.Dialing ? Fe = window.setTimeout(() => {
32282
- M.value === i.Dialing && (Ce.value = "", we.value = ft(st.value.notAnsweredDetail));
32282
+ M.value === i.Dialing && (Ce.value = "", we.value = dt(ot.value.notAnsweredDetail));
32283
32283
  }, 1e4) : M.value === i.Connected && (Ie = window.setTimeout(() => {
32284
- M.value === i.Connected && (we.value = ft(st.value.noVideoHint));
32284
+ M.value === i.Connected && (we.value = dt(ot.value.noVideoHint));
32285
32285
  }, 5e3));
32286
32286
  }
32287
- function vt(e) {
32287
+ function _t(e) {
32288
32288
  [
32289
32289
  i.Declined,
32290
32290
  i.HangedUp,
32291
32291
  i.DevicePermissionDenied
32292
- ].includes(M.value) || (M.value = e, Ce.value = "", we.value = "", _t());
32292
+ ].includes(M.value) || (M.value = e, Ce.value = "", we.value = "", gt());
32293
32293
  }
32294
- async function yt() {
32294
+ async function vt() {
32295
32295
  if (N.call) try {
32296
32296
  ke.value ? await N.call.unmute() : await N.call.mute(), ke.value = !ke.value, ke.value || (Ae.value = !1);
32297
32297
  } catch (e) {
32298
32298
  console.error("Unable to toggle microphone", e);
32299
32299
  }
32300
32300
  }
32301
- async function bt() {
32301
+ async function yt() {
32302
32302
  if (N.call) try {
32303
32303
  if (Oe.value) {
32304
- let e = ue.value || await It();
32304
+ let e = ue.value || await Ft();
32305
32305
  if (!e) return;
32306
32306
  await N.call.startVideo(e), ue.value = e, Oe.value = !1, await ee();
32307
32307
  let t = Ne.value;
@@ -32318,7 +32318,7 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32318
32318
  console.error("Unable to toggle camera", e);
32319
32319
  }
32320
32320
  }
32321
- async function xt() {
32321
+ async function bt() {
32322
32322
  if (!(pe.value || me.value || !de.value || !fe.value)) {
32323
32323
  me.value = !0;
32324
32324
  try {
@@ -32330,96 +32330,96 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32330
32330
  }
32331
32331
  }
32332
32332
  }
32333
+ function xt() {
32334
+ _t(i.Declined);
32335
+ }
32333
32336
  function St() {
32334
- vt(i.Declined);
32337
+ _t(i.Answered);
32335
32338
  }
32336
32339
  function Ct() {
32337
- vt(i.Answered);
32340
+ M.value !== i.Connected && _t(i.Dialing);
32338
32341
  }
32339
32342
  function wt() {
32340
- M.value !== i.Connected && vt(i.Dialing);
32343
+ M.value !== i.DevicePermissionDenied && !x.isCallee && Nt();
32341
32344
  }
32342
- function Tt() {
32343
- M.value !== i.DevicePermissionDenied && !x.isCallee && Pt();
32345
+ async function Tt() {
32346
+ _t(i.HangedUp), j.value.video && Zt();
32344
32347
  }
32345
- async function Et() {
32346
- vt(i.HangedUp), j.value.video && Qt();
32348
+ function Et(e) {
32349
+ _t(i.HangedUp), we.value = Vt(e);
32347
32350
  }
32348
- function Dt(e) {
32349
- vt(i.HangedUp), we.value = Ht(e);
32351
+ function Dt() {
32352
+ Ce.value = dt(at.value.signalHold), we.value = dt(ot.value.signalHoldDetail);
32350
32353
  }
32351
32354
  function Ot() {
32352
- Ce.value = ft(ot.value.signalHold), we.value = ft(st.value.signalHoldDetail);
32353
- }
32354
- function kt() {
32355
32355
  Te.value = /* @__PURE__ */ new Date();
32356
32356
  }
32357
- function At() {
32357
+ function kt() {
32358
32358
  if (!Te.value || M.value === i.HangedUp) return;
32359
32359
  let e = /* @__PURE__ */ new Date(), t = new Date(Te.value), n = Math.abs(e.getTime() - t.getTime()), r = Math.ceil(n / 1e3);
32360
- r >= 40 ? (Ce.value = ot.value.connectionIssues, we.value = st.value.connectionIssuesStrong, se.value = 0) : r > 20 && (Ce.value = ot.value.connectionIssues, we.value = st.value.connectionIssuesMedium, se.value = 1);
32360
+ r >= 40 ? (Ce.value = at.value.connectionIssues, we.value = ot.value.connectionIssuesStrong, se.value = 0) : r > 20 && (Ce.value = at.value.connectionIssues, we.value = ot.value.connectionIssuesMedium, se.value = 1);
32361
32361
  }
32362
- async function jt(e) {
32363
- await tn(), N.client = w(new f());
32362
+ async function At(e) {
32363
+ await en(), N.client = w(new f());
32364
32364
  let t = new y(e);
32365
32365
  if (N.agent = w(await N.client.createCallAgent(t)), N.deviceManager = await N.client.getDeviceManager(), j.value = await N.deviceManager.askDevicePermission({
32366
32366
  video: !0,
32367
32367
  audio: !0
32368
- }), (await N.deviceManager.getCameras()).length || (j.value.video = !1), be.value = window.setInterval(Qt, 5e3), !j.value.audio || !j.value.video) {
32369
- vt(i.DevicePermissionDenied);
32368
+ }), (await N.deviceManager.getCameras()).length || (j.value.video = !1), be.value = window.setInterval(Zt, 5e3), !j.value.audio || !j.value.video) {
32369
+ _t(i.DevicePermissionDenied);
32370
32370
  return;
32371
32371
  }
32372
- N.agent.on("incomingCall", Mt), x.isCallee ? S("ready") : S("start-call");
32372
+ N.agent.on("incomingCall", jt), x.isCallee ? S("ready") : S("start-call");
32373
32373
  }
32374
- async function Mt(e) {
32374
+ async function jt(e) {
32375
32375
  if (!xe.value) try {
32376
- xe.value = !0, N.incomingCall = e.incomingCall, await Ft();
32376
+ xe.value = !0, N.incomingCall = e.incomingCall, await Pt();
32377
32377
  } catch (e) {
32378
32378
  console.log("error occured during starting call", e);
32379
32379
  } finally {
32380
32380
  xe.value = !1;
32381
32381
  }
32382
32382
  }
32383
- async function Nt() {
32384
- let e = await It();
32383
+ async function Mt() {
32384
+ let e = await Ft();
32385
32385
  return ue.value = e, e ? { localVideoStreams: [e] } : void 0;
32386
32386
  }
32387
- async function Pt() {
32387
+ async function Nt() {
32388
32388
  try {
32389
- vt(i.Dialing);
32390
- let e = { videoOptions: await Nt() }, t = [{ communicationUserId: x.participant.videoCallIdentityId }];
32391
- N.call = N.agent.startCall(t, e), Rt(), await zt(), Lt();
32389
+ _t(i.Dialing);
32390
+ let e = { videoOptions: await Mt() }, t = [{ communicationUserId: x.participant.videoCallIdentityId }];
32391
+ N.call = N.agent.startCall(t, e), Lt(), await Rt(), It();
32392
32392
  } catch (e) {
32393
32393
  console.error(e);
32394
32394
  }
32395
32395
  }
32396
- async function Ft() {
32397
- let e = await Nt();
32396
+ async function Pt() {
32397
+ let e = await Mt();
32398
32398
  try {
32399
32399
  N.call = await N.incomingCall.accept({ videoOptions: e });
32400
32400
  } catch (e) {
32401
32401
  console.error("Error occurred during accepting call", e);
32402
32402
  }
32403
- Rt(), await zt(), Lt();
32403
+ Lt(), await Rt(), It();
32404
32404
  }
32405
- async function It() {
32405
+ async function Ft() {
32406
32406
  let e = (await N.deviceManager.getCameras())[0];
32407
32407
  if (e) return new g(e);
32408
32408
  console.error("No camera device found on the system");
32409
32409
  }
32410
- function Lt() {
32411
- N.call.on("stateChanged", Vt), N.call.on("localVideoStreamsUpdated", (e) => {
32412
- e.added.forEach(Wt), e.removed.forEach(Ut);
32413
- }), N.call.remoteParticipants.forEach(Kt), N.call.on("remoteParticipantsUpdated", (e) => {
32414
- e.added.forEach(Kt);
32410
+ function It() {
32411
+ N.call.on("stateChanged", Bt), N.call.on("localVideoStreamsUpdated", (e) => {
32412
+ e.added.forEach(Ut), e.removed.forEach(Ht);
32413
+ }), N.call.remoteParticipants.forEach(Gt), N.call.on("remoteParticipantsUpdated", (e) => {
32414
+ e.added.forEach(Gt);
32415
32415
  }), N.call.on("isScreenSharingOnChanged", () => {
32416
32416
  te.value = N.call.isScreenSharingOn;
32417
32417
  });
32418
32418
  }
32419
- function Rt() {
32420
- le.value = N.call.feature(_.UserFacingDiagnostics), le.value.media.on("diagnosticChanged", Bt), le.value.network.on("diagnosticChanged", Bt);
32419
+ function Lt() {
32420
+ le.value = N.call.feature(_.UserFacingDiagnostics), le.value.media.on("diagnosticChanged", zt), le.value.network.on("diagnosticChanged", zt);
32421
32421
  }
32422
- async function zt() {
32422
+ async function Rt() {
32423
32423
  if (!(!ue.value || de.value)) try {
32424
32424
  let e = ue.value.feature(_.VideoEffects), t = new b();
32425
32425
  if (!await e.isSupported(t)) return;
@@ -32430,41 +32430,41 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32430
32430
  console.error("Unable to initialize background blur", e);
32431
32431
  }
32432
32432
  }
32433
- function Bt(e) {
32434
- if (e.diagnostic === "speakingWhileMicrophoneIsMuted") {
32433
+ function zt(e) {
32434
+ if (console.log("Diagnostic info changed:", e), e.diagnostic === "speakingWhileMicrophoneIsMuted") {
32435
32435
  Ae.value = e.value === !0;
32436
32436
  return;
32437
32437
  }
32438
32438
  (e.diagnostic === "networkReceiveQuality" || e.diagnostic === "networkSendQuality") && (e.value === v.Bad ? (console.error(`${e.diagnostic} is bad quality`), se.value = 0) : e.value === v.Poor ? (console.error(`${e.diagnostic} is poor quality`), se.value = 1) : se.value = 2);
32439
32439
  }
32440
- function Vt() {
32440
+ function Bt() {
32441
32441
  switch (N.call.state) {
32442
32442
  case "EarlyMedia":
32443
- vt(i.Dialing);
32443
+ _t(i.Dialing);
32444
32444
  break;
32445
32445
  case "Ringing":
32446
- vt(i.Ringing);
32446
+ _t(i.Ringing);
32447
32447
  break;
32448
32448
  case "Connected":
32449
- vt(i.Connected);
32449
+ _t(i.Connected);
32450
32450
  break;
32451
32451
  case "Disconnected":
32452
32452
  let e = N.call.callEndReason;
32453
- console.log("Call end reason:", e), console.log("Code:", e?.code), console.log("SubCode:", e?.subCode), Et();
32453
+ console.log("Call end reason:", e), console.log("Code:", e?.code), console.log("SubCode:", e?.subCode), Tt();
32454
32454
  break;
32455
32455
  }
32456
32456
  }
32457
- function Ht(e) {
32457
+ function Vt(e) {
32458
32458
  let t = String(e);
32459
- return ft(qe.value.endReasons?.[t] || "");
32459
+ return dt(Ke.value.endReasons?.[t] || "");
32460
32460
  }
32461
- async function Ut(e) {
32461
+ async function Ht(e) {
32462
32462
  if (!e || e.mediaStreamType !== "ScreenSharing" || !_e.value) return;
32463
32463
  _e.value.dispose();
32464
32464
  let t = Pe.value;
32465
32465
  t && (t.style.display = "none", Ne.value.style.display = "flex");
32466
32466
  }
32467
- async function Wt(e) {
32467
+ async function Ut(e) {
32468
32468
  if (!e || e.mediaStreamType !== "ScreenSharing") return;
32469
32469
  _e.value = await new h(e).createView();
32470
32470
  let t = Pe.value;
@@ -32473,8 +32473,9 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32473
32473
  let n = t.querySelector("video");
32474
32474
  n.style.objectFit = "contain";
32475
32475
  }
32476
- async function Gt(e) {
32477
- if (console.log("Displaying local video stream", e, ue.value), e && e.source && ue.value && ue.value.source && he.value && ue.value.source.id == e.source.id) return !0;
32476
+ async function Wt(e) {
32477
+ if (e && e.source && ue.value && ue.value.source && he.value && ue.value.source.id == e.source.id) return !0;
32478
+ console.log("Displaying local video stream", e, ue.value);
32478
32479
  try {
32479
32480
  he.value = new h(e);
32480
32481
  let t = await he.value.createView(), n = Ne.value;
@@ -32485,36 +32486,36 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32485
32486
  }
32486
32487
  return ue.value = e, !0;
32487
32488
  }
32488
- async function Kt(e) {
32489
- e.videoStreams.forEach(qt), e.on("videoStreamsUpdated", (e) => {
32490
- e.added.forEach(qt);
32489
+ async function Gt(e) {
32490
+ e.videoStreams.forEach(Kt), e.on("videoStreamsUpdated", (e) => {
32491
+ e.added.forEach(Kt);
32491
32492
  });
32492
32493
  }
32493
- async function qt(e) {
32494
- if (e.mediaStreamType === "Video" && (await Jt(e), e.on("isAvailableChanged", async () => await Jt(e))), e.mediaStreamType === "ScreenSharing" && e.on("isAvailableChanged", Xt), e.mediaStreamType === "ScreenSharing" && e.isAvailable) {
32494
+ async function Kt(e) {
32495
+ if (e.mediaStreamType === "Video" && (await qt(e), e.on("isAvailableChanged", async () => await qt(e))), e.mediaStreamType === "ScreenSharing" && e.on("isAvailableChanged", Yt), e.mediaStreamType === "ScreenSharing" && e.isAvailable) {
32495
32496
  ge.value = new h(e);
32496
32497
  let t = await ge.value.createView(), n = Me.value;
32497
32498
  if (!n) return;
32498
- Yt(!0), oe.value = !0, $t(n), n.replaceChildren(t.target);
32499
+ Jt(!0), oe.value = !0, Qt(n), n.replaceChildren(t.target);
32499
32500
  }
32500
32501
  }
32501
- async function Jt(e) {
32502
+ async function qt(e) {
32502
32503
  if (!e.isAvailable) return;
32503
32504
  ge.value = new h(e);
32504
32505
  let t = await ge.value.createView(), n = je.value;
32505
- n && (n.hidden = !1, n.replaceChildren(t.target), $t(n), Yt(!1));
32506
+ n && (n.hidden = !1, n.replaceChildren(t.target), Qt(n), Jt(!1));
32506
32507
  }
32507
- function Yt(e) {
32508
+ function Jt(e) {
32508
32509
  let t = je.value, n = Me.value;
32509
32510
  !t || !n || (t.style.display = e ? "none" : "block", n.style.display = e ? "flex" : "none");
32510
32511
  }
32511
- function Xt() {
32512
- oe.value = !1, Yt(!1);
32512
+ function Yt() {
32513
+ oe.value = !1, Jt(!1);
32513
32514
  }
32514
- async function Zt() {
32515
- Qt(!0);
32515
+ async function Xt() {
32516
+ Zt(!0);
32516
32517
  }
32517
- async function Qt(e = !1) {
32518
+ async function Zt(e = !1) {
32518
32519
  let t = N.call?.state;
32519
32520
  if (t === "Connecting" || t === "EarlyMedia") return;
32520
32521
  let n = (await N.deviceManager.getCameras()).filter((e) => e.name != "OBS Virtual Camera");
@@ -32522,18 +32523,18 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32522
32523
  for (let t = 0; t < ve.value; t++) {
32523
32524
  (e || t != 0) && (ye.value = (ye.value + 1) % ve.value);
32524
32525
  let r = n[ye.value];
32525
- if (await Gt(new g(r))) break;
32526
+ if (await Wt(new g(r))) break;
32526
32527
  }
32527
32528
  }
32528
- function $t(e) {
32529
+ function Qt(e) {
32529
32530
  if (!e) return;
32530
32531
  let t = e.querySelector("video");
32531
32532
  t && (t.style.objectFit = "contain", t.disablePictureInPicture = !1);
32532
32533
  }
32533
- async function en() {
32534
+ async function $t() {
32534
32535
  N.call && N.call.state !== "Disconnected" && (await N.call.hangUp({ forEveryone: !0 }), await N.agent.dispose()), S("end-call", T.value);
32535
32536
  }
32536
- async function tn() {
32537
+ async function en() {
32537
32538
  return o ||= Promise.all([
32538
32539
  import("@azure/communication-calling"),
32539
32540
  import("@azure/communication-common"),
@@ -32542,7 +32543,7 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32542
32543
  f = e.CallClient, h = e.VideoStreamRenderer, g = e.LocalVideoStream, _ = e.Features, v = e.DiagnosticQuality, y = t.AzureCommunicationTokenCredential, b = n.BackgroundBlurEffect;
32543
32544
  }), o;
32544
32545
  }
32545
- async function nn() {
32546
+ async function tn() {
32546
32547
  d ||= import("./browser-1gKVsH6_.js").then((e) => e.t);
32547
32548
  let { AzureLogger: e, setLogLevel: t } = await d;
32548
32549
  e.log = (...e) => console.log(...e), t("info"), e.log = (...e) => {
@@ -32550,29 +32551,29 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32550
32551
  T.value = T.value.splice(1 - PZ).concat(t);
32551
32552
  };
32552
32553
  }
32553
- function rn() {
32554
+ function nn() {
32554
32555
  let e = oe.value ? Me.value : je.value;
32555
32556
  e && e.querySelector("video")?.requestFullscreen();
32556
32557
  }
32557
- function an() {
32558
+ function rn() {
32558
32559
  let e = oe.value ? Me.value : je.value;
32559
32560
  if (!e) return;
32560
32561
  let t = e.querySelector("video");
32561
32562
  t && (document.pictureInPictureElement ? t.exitPictureInPicture() : document.pictureInPictureEnabled && t.requestPictureInPicture());
32562
32563
  }
32563
- async function on() {
32564
+ async function an() {
32564
32565
  N.call && N.call.isScreenSharingOn ? await N.call.stopScreenSharing() : await N.call.startScreenSharing();
32565
32566
  }
32566
32567
  return n({
32567
- CallDeclined: St,
32568
- CallAnswered: Ct,
32569
- CallForDataReceived: wt,
32570
- CallClosedWithStatusCode: Dt,
32571
- CallHeartbeatReceived: kt,
32572
- CallSignalHoldDetected: Ot,
32573
- CallStartVideoCall: Tt,
32574
- CallHangUp: Et,
32575
- InitializeAcsConnection: jt
32568
+ CallDeclined: xt,
32569
+ CallAnswered: St,
32570
+ CallForDataReceived: Ct,
32571
+ CallClosedWithStatusCode: Et,
32572
+ CallHeartbeatReceived: Ot,
32573
+ CallSignalHoldDetected: Dt,
32574
+ CallStartVideoCall: wt,
32575
+ CallHangUp: Tt,
32576
+ InitializeAcsConnection: At
32576
32577
  }), (e, n) => {
32577
32578
  let r = ce("BDLoader");
32578
32579
  return k(), l("div", aZ, [m($q, null, {
@@ -32585,23 +32586,23 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32585
32586
  }), m(eJ, null, {
32586
32587
  default: I(() => [m(Qq, {
32587
32588
  sm: "12",
32588
- lg: tt.value ? "12" : "8"
32589
+ lg: et.value ? "12" : "8"
32589
32590
  }, {
32590
- default: I(() => [u("div", { class: D(["incoming", We.value]) }, [it.value ? (k(), l("div", oZ, [
32591
+ default: I(() => [u("div", { class: D(["incoming", Ue.value]) }, [rt.value ? (k(), l("div", oZ, [
32591
32592
  m(r, {
32592
32593
  size: "lg",
32593
- message: pt.value,
32594
- stopAnimation: tt.value || nt.value || at.value
32594
+ message: ft.value,
32595
+ stopAnimation: et.value || tt.value || it.value
32595
32596
  }, null, 8, ["message", "stopAnimation"]),
32596
- Ue.value ? (k(), l("div", sZ, [u("div", cZ, [m(Ri, { class: "icon-xl icon-state-error" })]), u("span", null, P(Xe.value.permissionDeniedForAudio), 1)])) : c("", !0),
32597
- He.value ? (k(), l("div", lZ, [u("div", uZ, [m(oo, { class: "icon-xl icon-state-error" })]), u("span", null, P(Xe.value.permissionDeniedForVideo), 1)])) : c("", !0),
32598
- tt.value || nt.value || at.value ? (k(), s(R, {
32597
+ He.value ? (k(), l("div", sZ, [u("div", cZ, [m(Ri, { class: "icon-xl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForAudio), 1)])) : c("", !0),
32598
+ Ve.value ? (k(), l("div", lZ, [u("div", uZ, [m(oo, { class: "icon-xl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForVideo), 1)])) : c("", !0),
32599
+ et.value || tt.value || it.value ? (k(), s(R, {
32599
32600
  key: 2,
32600
32601
  variant: "primary",
32601
32602
  class: "text-center",
32602
- onClick: en
32603
+ onClick: $t
32603
32604
  }, {
32604
- default: I(() => [p(P(Je.value.closeWindow), 1)]),
32605
+ default: I(() => [p(P(qe.value.closeWindow), 1)]),
32605
32606
  _: 1
32606
32607
  })) : c("", !0)
32607
32608
  ])) : (k(), l("div", dZ, [
@@ -32618,22 +32619,22 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32618
32619
  u("div", fZ, [m(R, {
32619
32620
  variant: "primary",
32620
32621
  class: "text-center",
32621
- onClick: rn
32622
+ onClick: nn
32622
32623
  }, {
32623
- default: I(() => [m(xa), u("span", null, P(Je.value.fullScreen), 1)]),
32624
+ default: I(() => [m(xa), u("span", null, P(qe.value.fullScreen), 1)]),
32624
32625
  _: 1
32625
32626
  }), !E && !re.value ? (k(), s(R, {
32626
32627
  key: 0,
32627
32628
  variant: "primary",
32628
32629
  class: "text-center",
32629
- onClick: an
32630
+ onClick: rn
32630
32631
  }, {
32631
- default: I(() => [m(xa), u("span", null, P(Je.value.miniPlayer), 1)]),
32632
+ default: I(() => [m(xa), u("span", null, P(qe.value.miniPlayer), 1)]),
32632
32633
  _: 1
32633
32634
  })) : c("", !0)])
32634
32635
  ]))], 2)]),
32635
32636
  _: 1
32636
- }, 8, ["lg"]), tt.value ? c("", !0) : (k(), s(Qq, {
32637
+ }, 8, ["lg"]), et.value ? c("", !0) : (k(), s(Qq, {
32637
32638
  key: 0,
32638
32639
  sm: "12",
32639
32640
  lg: "4"
@@ -32652,95 +32653,95 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
32652
32653
  ref: Pe,
32653
32654
  class: "outgoing__screenshare"
32654
32655
  }, null, 512),
32655
- u("div", _Z, [Re.value ? (k(), l("div", vZ, [m(Ri), u("span", null, P(Je.value.microphoneMutedNotice), 1)])) : c("", !0)])
32656
+ u("div", _Z, [Ae.value ? (k(), l("div", vZ, [m(Ri), u("span", null, P(qe.value.microphoneMutedNotice), 1)])) : c("", !0)])
32656
32657
  ]),
32657
32658
  u("div", yZ, [
32658
32659
  Se((k(), s(R, {
32659
32660
  class: D({ "btn-danger": ke.value }),
32660
- onClick: yt
32661
+ onClick: vt
32661
32662
  }, {
32662
32663
  default: I(() => [ke.value ? (k(), l("img", {
32663
32664
  key: 0,
32664
32665
  src: UX,
32665
- alt: lt.value
32666
+ alt: ct.value
32666
32667
  }, null, 8, bZ)) : (k(), l("img", {
32667
32668
  key: 1,
32668
32669
  src: WX,
32669
- alt: lt.value
32670
+ alt: ct.value
32670
32671
  }, null, 8, xZ))]),
32671
32672
  _: 1
32672
- }, 8, ["class"])), [[F(DK), lt.value]]),
32673
+ }, 8, ["class"])), [[F(DK), ct.value]]),
32673
32674
  Se((k(), s(R, {
32674
32675
  class: D({ "btn-danger": Oe.value }),
32675
- onClick: bt
32676
+ onClick: yt
32676
32677
  }, {
32677
32678
  default: I(() => [Oe.value ? (k(), l("img", {
32678
32679
  key: 0,
32679
32680
  src: GX,
32680
- alt: ut.value
32681
+ alt: lt.value
32681
32682
  }, null, 8, SZ)) : (k(), l("img", {
32682
32683
  key: 1,
32683
32684
  src: KX,
32684
- alt: ut.value
32685
+ alt: lt.value
32685
32686
  }, null, 8, CZ))]),
32686
32687
  _: 1
32687
- }, 8, ["class"])), [[F(DK), ut.value]]),
32688
+ }, 8, ["class"])), [[F(DK), lt.value]]),
32688
32689
  Se((k(), s(R, {
32689
32690
  class: D(["blur-button", {
32690
32691
  off: De.value,
32691
32692
  unavailable: pe.value
32692
32693
  }]),
32693
- onClick: xt
32694
+ onClick: bt
32694
32695
  }, {
32695
32696
  default: I(() => [m(iZ), m(eZ)]),
32696
32697
  _: 1
32697
- }, 8, ["class"])), [[F(DK), dt.value]])
32698
+ }, 8, ["class"])), [[F(DK), ut.value]])
32698
32699
  ]),
32699
- Ve.value && !at.value && !re.value && !it.value ? (k(), s(R, {
32700
+ Be.value && !it.value && !re.value && !rt.value ? (k(), s(R, {
32700
32701
  key: 0,
32701
32702
  variant: te.value ? "danger" : "primary",
32702
32703
  class: "share-button",
32703
- onClick: on
32704
+ onClick: an
32704
32705
  }, {
32705
- default: I(() => [m(xa), u("span", null, P(Qe.value), 1)]),
32706
+ default: I(() => [m(xa), u("span", null, P(Ze.value), 1)]),
32706
32707
  _: 1
32707
32708
  }, 8, ["variant"])) : c("", !0),
32708
- Be.value ? (k(), l(t, { key: 1 }, [m(R, {
32709
+ ze.value ? (k(), l(t, { key: 1 }, [m(R, {
32709
32710
  class: "text-center",
32710
- onClick: Zt
32711
+ onClick: Xt
32711
32712
  }, {
32712
- default: I(() => [p(P(Je.value.switchCamera), 1)]),
32713
+ default: I(() => [p(P(qe.value.switchCamera), 1)]),
32713
32714
  _: 1
32714
- }), u("p", wZ, P(ze.value), 1)], 64)) : c("", !0),
32715
- He.value ? (k(), l("div", TZ, [u("div", EZ, [m(oo, { class: "icon-xxl icon-state-error" })]), u("span", null, P(Xe.value.permissionDeniedForVideo), 1)])) : c("", !0)
32715
+ }), u("p", wZ, P(Re.value), 1)], 64)) : c("", !0),
32716
+ Ve.value ? (k(), l("div", TZ, [u("div", EZ, [m(oo, { class: "icon-xxl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForVideo), 1)])) : c("", !0)
32716
32717
  ]),
32717
- !nt.value && !at.value ? (k(), s(R, {
32718
+ !tt.value && !it.value ? (k(), s(R, {
32718
32719
  key: 0,
32719
32720
  variant: "danger",
32720
32721
  class: "end-call-button text-center w-100",
32721
- onClick: en
32722
+ onClick: $t
32722
32723
  }, {
32723
- default: I(() => [m(zn), u("span", null, P(Je.value.endCall), 1)]),
32724
+ default: I(() => [m(zn), u("span", null, P(qe.value.endCall), 1)]),
32724
32725
  _: 1
32725
32726
  })) : c("", !0),
32726
32727
  u("div", DZ, [
32727
- u("div", { class: D(["settings__signal", Ge.value]) }, [n[0] ||= u("ul", { class: "indicator" }, [
32728
+ u("div", { class: D(["settings__signal", We.value]) }, [n[0] ||= u("ul", { class: "indicator" }, [
32728
32729
  u("li"),
32729
32730
  u("li"),
32730
32731
  u("li")
32731
- ], -1), u("p", null, P(Ke.value), 1)], 2),
32732
- u("div", OZ, [u("p", kZ, P(mt.value), 1), ht.value ? (k(), l("small", AZ, P(ht.value), 1)) : c("", !0)]),
32732
+ ], -1), u("p", null, P(Ge.value), 1)], 2),
32733
+ u("div", OZ, [u("p", kZ, P(pt.value), 1), mt.value ? (k(), l("small", AZ, P(mt.value), 1)) : c("", !0)]),
32733
32734
  u("div", jZ, [
32734
- u("p", null, [u("b", null, P($e.value), 1)]),
32735
- u("p", null, P(et.value), 1),
32735
+ u("p", null, [u("b", null, P(Qe.value), 1)]),
32736
+ u("p", null, P($e.value), 1),
32736
32737
  u("p", null, [
32737
32738
  u("a", {
32738
32739
  href: x.videoTestUrl,
32739
32740
  target: "_blank",
32740
32741
  rel: "noopener noreferrer"
32741
- }, P(Je.value.testCall), 9, MZ),
32742
+ }, P(qe.value.testCall), 9, MZ),
32742
32743
  n[1] ||= p(" • ", -1),
32743
- u("a", NZ, P(Je.value.serviceDesk), 1)
32744
+ u("a", NZ, P(qe.value.serviceDesk), 1)
32744
32745
  ])
32745
32746
  ])
32746
32747
  ])