@snapcall/stream-ui 1.12.0 → 1.13.0

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.
@@ -5,9 +5,10 @@ import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster,
5
5
  import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, ThemeContext as $3Sbms$ThemeContext, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
6
6
  import $3Sbms$react, {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback, forwardRef as $3Sbms$forwardRef} from "react";
7
7
  import "inobounce";
8
+ import {QueryClient as $3Sbms$QueryClient, QueryClientProvider as $3Sbms$QueryClientProvider, useMutation as $3Sbms$useMutation} from "react-query";
8
9
  import $3Sbms$i18next from "i18next";
9
10
  import {initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation, Trans as $3Sbms$Trans} from "react-i18next";
10
- import {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
11
+ import $3Sbms$bowser, {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
11
12
  import {v4 as $3Sbms$v4} from "uuid";
12
13
  import {WebSocketTransport as $3Sbms$WebSocketTransport, Peer as $3Sbms$Peer} from "protoo-client";
13
14
  import {captureException as $3Sbms$captureException, addBreadcrumb as $3Sbms$addBreadcrumb, setTag as $3Sbms$setTag} from "@sentry/browser";
@@ -18,10 +19,10 @@ import {createPortal as $3Sbms$createPortal} from "react-dom";
18
19
  import {toCanvas as $3Sbms$toCanvas} from "qrcode";
19
20
  import {useOverlayTriggerState as $3Sbms$useOverlayTriggerState, useToggleState as $3Sbms$useToggleState} from "react-stately";
20
21
  import $3Sbms$classnames from "classnames";
21
- import {useToggleButton as $3Sbms$useToggleButton, useFocusRing as $3Sbms$useFocusRing, useModalOverlay as $3Sbms$useModalOverlay, Overlay as $3Sbms$Overlay, useButton as $3Sbms$useButton} from "react-aria";
22
+ import {useToggleButton as $3Sbms$useToggleButton, useFocusRing as $3Sbms$useFocusRing, useButton as $3Sbms$useButton, useModalOverlay as $3Sbms$useModalOverlay, Overlay as $3Sbms$Overlay} from "react-aria";
23
+ import {useHover as $3Sbms$useHover} from "@react-aria/interactions";
22
24
  import {useViewportSize as $3Sbms$useViewportSize} from "@react-aria/utils";
23
25
  import {CSSTransition as $3Sbms$CSSTransition} from "react-transition-group";
24
- import {useHover as $3Sbms$useHover} from "@react-aria/interactions";
25
26
  import {useModalOverlay as $3Sbms$useModalOverlay1, Overlay as $3Sbms$Overlay1} from "@react-aria/overlays";
26
27
  import $3Sbms$reactcontentloader from "react-content-loader";
27
28
 
@@ -315,6 +316,24 @@ const $a5146f9062d7bf28$export$3a57e165650c636f = (message, options = {})=>{
315
316
  };
316
317
 
317
318
 
319
+ const $35b37252690084e8$export$1cbfb36c1655a9a = (root, element)=>{
320
+ const mutationObserver = new MutationObserver((mutationRecords)=>{
321
+ mutationRecords.forEach((record)=>{
322
+ record.removedNodes.forEach((node)=>{
323
+ if (node.contains(element)) {
324
+ root.unmount();
325
+ mutationObserver.disconnect();
326
+ }
327
+ });
328
+ });
329
+ });
330
+ mutationObserver.observe(document.documentElement, {
331
+ childList: true,
332
+ subtree: true
333
+ });
334
+ };
335
+
336
+
318
337
 
319
338
 
320
339
 
@@ -491,44 +510,47 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
491
510
  footerDescription: "Meet SnapCall, the easiest way to add real-time video to platform, product or service."
492
511
  },
493
512
  recorder: {
513
+ limit: "Video recording limited to 5 min.",
494
514
  submissionTitle: "Thank you for your submission!",
495
- submissionDescription: "Your photo/video has been successfully sent. We will review it and get back to you soon.",
496
- confirmRemovalTitle: "Confirm removal",
497
- confirmRemovalDescription: "Are you sure you want to remove this photo/video? This action cannot be undone.",
498
- elementBeingProcessed: "Please wait a moment while your {{ type }} is being processed...",
499
- waitVideo: "It may take up to 15 seconds for a video to be ready.",
500
- elementCaptureSuccess: "{{ type }} successfully captured",
501
- takeNewElement: "Take new {{ type }}",
515
+ submissionDescription: "Your photo/video has been successfully submitted. We will review it and get back to you shortly.",
516
+ confirmRemovalTitle: "Confirm deletion",
517
+ confirmRemovalDescription: "Are you sure you want to delete this photo/video? This action cannot be undone.",
518
+ elementBeingProcessed: "Please wait while your {{ type }} is being processed...",
519
+ waitVideo: "A video may take up to 15 seconds to be ready.",
520
+ elementCaptureSuccess: "{{ type }} captured successfully",
521
+ takeNewElement: "Capture a new {{ type }}",
502
522
  sendElement: "Send {{ type }}",
503
523
  sendElements: "Send {{ count }} elements",
504
524
  allowAccess: "Allow access",
505
525
  okay: "Okay",
506
- allowCamMicAccess: "Allow access to cam/mic",
526
+ allowCamMicAccess: "Allow access to camera and microphone",
507
527
  allowScreenShareAccess: "Allow access to screen sharing",
508
528
  permissionDeniedTitle: "Something went wrong!",
509
- permissionDeniedDescription: "Without camera and microphone access, you can't take photos or videos to share with the support team. Please grant access in your browser settings.",
510
- photoInstructionsTitle: "Ready to take a shot?",
529
+ permissionDeniedDescription: "Without access to the camera and microphone, you won't be able to capture photos or videos to share with the support team. Please grant access in your browser settings.",
530
+ photoInstructionsTitle: "Ready to snap a photo?",
511
531
  videoInstructionsTitle: "Ready to record a video?",
512
- screenShareInstructionsTitle: "Ready to capture your screen?",
532
+ screenShareInstructionsTitle: "Ready to share your screen?",
513
533
  instructions: {
514
- allowAccessOnPrompt: "When prompted, <1>allow access</1> to camera and microphone.",
515
- tapPhotoButton: "Tap the <1 /><2> Camera button</2> to take a photo.",
516
- multiplePhotos: "Don't hesitate to take multiple photos for more detail.",
517
- reviewAndSendPhotos: "You can review your photo and then <1>send it when you're done.</1>",
518
- tapVideoButton: "Tap the <1 /><2> Record button</2> to start a recording.",
519
- videoSpeech: "You can <1>speak during</1> the recording for added detail.",
520
- tapStopVideoButton: "When you're finished, tap the <1 /><2> Stop button</2>.",
521
- reviewAndSendVideos: "You can review your video and then <1>send it when you're done</2>.",
522
- tapScreenShareButton: "Tap on <1> Record my screen</1> to start a recording.",
523
- tapStopScreenShareButton: "When you're finished, tap on <1>Stop recording</1>.",
524
- reviewAnsSendScreenShare: "You can review your video and then <1>send it when you're done</1>."
534
+ allowAccessOnPrompt: "When prompted, <1>allow access</1> to the camera and microphone.",
535
+ tapPhotoButton: "Tap the <1 /><2>Camera button</2> to take a photo.",
536
+ multiplePhotos: "Feel free to take multiple photos for more details.",
537
+ reviewAndSendPhotos: "Review your photo and <1>send it when you're satisfied.</1>",
538
+ reviewAndSendScreenShare: "Review your video and <1>send it when you're satisfied.</1>",
539
+ tapVideoButton: "Tap the <1 /><2>Record button</2> to start recording.",
540
+ videoSpeech: "You can <1>talk during</1> the recording to provide additional information.",
541
+ tapStopVideoButton: "When you're done, tap the <1 /><2>Stop button</2>.",
542
+ reviewAndSendVideos: "Review your video and <1>send it when you're satisfied</1>.",
543
+ tapScreenShareButton: "Tap <1>Record my screen</1> to begin recording.",
544
+ tapStopScreenShareButton: "When you're done, tap <1>Stop recording</1>.",
545
+ screenShareInstruction: "Select the screen or window you wish to record."
525
546
  },
526
- switchToMobileTitle: "Switch to your mobile",
527
- switchToMobileDescription: "Enjoy an even more convenient experience by using your phone to take photos and record videos.",
528
- useDesktopVersion: "Use desktop version",
547
+ switchToMobileTitle: "Switch to your mobile device",
548
+ switchToMobileDescription: "Experience greater convenience by using your phone to take photos and record videos.",
549
+ useDesktopVersion: "Use the desktop version",
529
550
  scanQRCode: "Scan this QR code with a compatible device.",
530
551
  startScreenShareButton: "Record my screen",
531
- stopScreenShareButton: "Stop recording"
552
+ stopScreenShareButton: "Stop recording",
553
+ screenTitle: "Ready to capture your screen?"
532
554
  }
533
555
  }
534
556
  };
@@ -690,44 +712,47 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
690
712
  footerDescription: "D\xe9couvrez SnapCall, ajoutez de la vid\xe9o en temps r\xe9el \xe0 n'importe quelle plateforme, produit ou service."
691
713
  },
692
714
  recorder: {
693
- submissionTitle: "Merci pour votre soumission!",
715
+ limit: "Enregistrement vid\xe9o limit\xe9 \xe0 5 min.",
716
+ submissionTitle: "Merci pour votre soumission !",
694
717
  submissionDescription: "Votre photo/vid\xe9o a \xe9t\xe9 envoy\xe9e avec succ\xe8s. Nous l'examinerons et reviendrons vers vous bient\xf4t.",
695
718
  confirmRemovalTitle: "Confirmer la suppression",
696
- confirmRemovalDescription: "Voulez-vous vraiment supprimer cette photo/vid\xe9o? Cette action ne peut pas \xeatre annul\xe9e.",
719
+ confirmRemovalDescription: "Voulez-vous vraiment supprimer cette photo/vid\xe9o ? Cette action ne peut pas \xeatre annul\xe9e.",
697
720
  elementBeingProcessed: "Veuillez patienter un moment pendant que votre {{ type }} est en cours de traitement...",
698
721
  waitVideo: "Cela peut prendre jusqu'\xe0 15 secondes pour qu'une vid\xe9o soit pr\xeate.",
699
- elementCaptureSuccess: "{{ type }} captur\xe9e avec succ\xe8s",
722
+ elementCaptureSuccess: "{{ type }} captur\xe9(e) avec succ\xe8s",
700
723
  takeNewElement: "Prendre une nouvelle {{ type }}",
701
- sendElement: "Envoyer une {{ type }}",
724
+ sendElement: "Envoyer la {{ type }}",
702
725
  sendElements: "Envoyer {{ count }} \xe9l\xe9ments",
703
- allowAccess: "Permettre l'acc\xe8s",
726
+ allowAccess: "Autoriser l'acc\xe8s",
704
727
  okay: "D'accord",
705
- allowCamMicAccess: "Autoriser l'acc\xe8s \xe0 la cam\xe9ra/au micro",
728
+ allowCamMicAccess: "Autoriser l'acc\xe8s \xe0 la cam\xe9ra et au micro",
706
729
  allowScreenShareAccess: "Autoriser l'acc\xe8s au partage d'\xe9cran",
707
- permissionDeniedTitle: "Quelque chose s'est mal pass\xe9!",
730
+ permissionDeniedTitle: "Quelque chose s'est mal pass\xe9 !",
708
731
  permissionDeniedDescription: "Sans acc\xe8s \xe0 la cam\xe9ra et au microphone, vous ne pouvez pas prendre de photos ou de vid\xe9os \xe0 partager avec l'\xe9quipe d'assistance. Veuillez accorder l'acc\xe8s dans les param\xe8tres de votre navigateur.",
709
- photoInstructionsTitle: "Pr\xeat \xe0 prendre une photo?",
710
- videoInstructionsTitle: "Pr\xeat \xe0 enregistrer une vid\xe9o?",
711
- screenShareInstructionsTitle: "Pr\xeat \xe0 capturer votre \xe9cran?",
732
+ photoInstructionsTitle: "Pr\xeat(e) \xe0 prendre une photo ?",
733
+ videoInstructionsTitle: "Pr\xeat(e) \xe0 enregistrer une vid\xe9o ?",
734
+ screenShareInstructionsTitle: "Pr\xeat(e) \xe0 partager votre \xe9cran ?",
712
735
  instructions: {
713
- allowAccessOnPrompt: "Lorsque vous y \xeates invit\xe9, <1>autorisez l'acc\xe8s</1> \xe0 la cam\xe9ra et au microphone.",
736
+ allowAccessOnPrompt: "Lorsque vous y \xeates invit\xe9(e), <1>autorisez l'acc\xe8s</1> \xe0 la cam\xe9ra et au microphone.",
714
737
  tapPhotoButton: "Appuyez sur le <1 /><2>bouton Appareil photo</2> pour prendre une photo.",
715
738
  multiplePhotos: "N'h\xe9sitez pas \xe0 prendre plusieurs photos pour plus de d\xe9tails.",
716
739
  reviewAndSendPhotos: "Vous pouvez revoir votre photo, puis <1>l'envoyer lorsque vous avez termin\xe9.</1>",
717
740
  tapVideoButton: "Appuyez sur le <1 /><2>bouton d'enregistrement</2> pour d\xe9marrer un enregistrement.",
718
- videoSpeech: "Vous pouvez <1>parler pendant</1> l'enregistrement pour plus de d\xe9tails.",
741
+ videoSpeech: "Vous pouvez <1>parler pendant</1> l'enregistrement pour ajouter des d\xe9tails.",
719
742
  tapStopVideoButton: "Lorsque vous avez termin\xe9, appuyez sur le <1 /><2>bouton Arr\xeater</2>.",
720
743
  reviewAndSendVideos: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9</2>.",
721
- tapScreenShareButton: "Appuyez sur <1>Enregistrer mon \xe9cran</1> pour d\xe9marrer un enregistrement.",
722
- tapStopScreenShareButton: "Lorsque vous avez termin\xe9, appuyez sur <1>Arr\xeater l'enregistrement</1>.",
723
- reviewAnsSendScreenShare: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9</1>."
744
+ tapScreenShareButton: "Appuyez sur <1>Enregistrer \xe9cran</1> pour d\xe9marrer un enregistrement.",
745
+ tapStopScreenShareButton: "Lorsque vous avez termin\xe9, appuyez sur <1>Stop enregistrement</1>.",
746
+ reviewAndSendScreenShare: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9.</1>",
747
+ screenShareInstruction: "S\xe9lectionnez l'\xe9cran ou la fen\xeatre que vous souhaitez enregistrer."
724
748
  },
725
- switchToMobileTitle: "Basculez vers votre mobile",
749
+ switchToMobileTitle: "Passez sur votre mobile",
726
750
  switchToMobileDescription: "Profitez d'une exp\xe9rience encore plus pratique en utilisant votre t\xe9l\xe9phone pour prendre des photos et enregistrer des vid\xe9os.",
727
- useDesktopVersion: "Utiliser la version de bureau",
751
+ useDesktopVersion: "Continuer",
728
752
  scanQRCode: "Scannez ce code QR avec un appareil compatible.",
729
- startScreenShareButton: "Enregistrer mon \xe9cran",
730
- stopScreenShareButton: "Arr\xeater d'enregistrer"
753
+ startScreenShareButton: "Enregistrer \xe9cran",
754
+ stopScreenShareButton: "Stop enregistrement",
755
+ screenTitle: "Pr\xeat \xe0 capturer votre \xe9cran ?"
731
756
  }
732
757
  }
733
758
  };
@@ -893,44 +918,47 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
893
918
  footerDescription: "Incontrare SnapCall, il modo pi\xf9 semplice per aggiungere video in tempo reale a piattaforma, prodotto o servizio."
894
919
  },
895
920
  recorder: {
896
- submissionTitle: "Grazie per la vostra presentazione!",
897
- submissionDescription: "La tua foto/video \xe8 stato inviato con successo. Lo esamineremo e ti ricontatteremo presto.",
898
- confirmRemovalTitle: "Conferma la rimozione",
921
+ limit: "Registrazione video limitata a 5 min.",
922
+ submissionTitle: "Grazie per il tuo invio!",
923
+ submissionDescription: "La tua foto/video \xe8 stata inviata con successo. La esamineremo e ti risponderemo al pi\xf9 presto.",
924
+ confirmRemovalTitle: "Conferma rimozione",
899
925
  confirmRemovalDescription: "Sei sicuro di voler rimuovere questa foto/video? Questa azione non pu\xf2 essere annullata.",
900
- elementBeingProcessed: "Attendi un momento mentre la tua {{ type }} \xe8 in fase di elaborazione...",
901
- waitVideo: "Potrebbero essere necessari fino a 15 secondi prima che un video sia pronto.",
926
+ elementBeingProcessed: "Attendi un momento mentre il tuo {{ type }} viene elaborato...",
927
+ waitVideo: "Potrebbero essere necessari fino a 15 secondi affinch\xe9 un video sia pronto.",
902
928
  elementCaptureSuccess: "{{ type }} catturato con successo",
903
- takeNewElement: "Scatta una nuova {{ type }}",
904
- sendElement: "Invia una {{ type }}",
929
+ takeNewElement: "Cattura un nuovo {{ type }}",
930
+ sendElement: "Invia {{ type }}",
905
931
  sendElements: "Invia {{ count }} elementi",
906
- allowAccess: "Consentire l'accesso",
907
- okay: "Va bene",
908
- allowCamMicAccess: "Consenti l'accesso a cam/microfono",
909
- allowScreenShareAccess: "Consenti l'accesso alla condivisione dello schermo",
932
+ allowAccess: "Consenti accesso",
933
+ okay: "Okay",
934
+ allowCamMicAccess: "Consenti accesso a fotocamera e microfono",
935
+ allowScreenShareAccess: "Consenti accesso alla condivisione dello schermo",
910
936
  permissionDeniedTitle: "Qualcosa \xe8 andato storto!",
911
- permissionDeniedDescription: "Senza l'accesso alla fotocamera e al microfono, non puoi scattare foto o registrare video da condividere con il team di supporto. Concedi l'accesso nelle impostazioni del tuo browser.",
912
- photoInstructionsTitle: "Pronto a fare un tentativo?",
937
+ permissionDeniedDescription: "Senza l'accesso alla fotocamera e al microfono, non \xe8 possibile scattare foto o registrare video da condividere con il team di supporto. Si prega di concedere l'accesso nelle impostazioni del browser.",
938
+ photoInstructionsTitle: "Pronto a scattare una foto?",
913
939
  videoInstructionsTitle: "Pronto a registrare un video?",
914
- screenShareInstructionsTitle: "Pronto a catturare il tuo schermo?",
940
+ screenShareInstructionsTitle: "Pronto a condividere il tuo schermo?",
915
941
  instructions: {
916
- allowAccessOnPrompt: "Quando richiesto, <1>consenti l'accesso</1> alla videocamera e al microfono.",
917
- tapPhotoButton: "Tocca il <1 /><2> pulsante Fotocamera</2> per scattare una foto.",
918
- multiplePhotos: "Non esitate a scattare pi\xf9 foto per maggiori dettagli.",
942
+ allowAccessOnPrompt: "Quando richiesto, <1>consenti l'accesso</1> a fotocamera e microfono.",
943
+ tapPhotoButton: "Tocca il pulsante <1 /><2>Fotocamera</2> per scattare una foto.",
944
+ multiplePhotos: "Non esitare a scattare pi\xf9 foto per maggiori dettagli.",
919
945
  reviewAndSendPhotos: "Puoi rivedere la tua foto e poi <1>inviarla quando hai finito.</1>",
920
- tapVideoButton: "Tocca il <1 /><2> pulsante Registra</2> per avviare una registrazione.",
921
- videoSpeech: "Puoi <1>parlare durante</1> la registrazione per ulteriori dettagli.",
922
- tapStopVideoButton: "Al termine, tocca il <1 /><2> pulsante Interrompi</2>.",
923
- reviewAndSendVideos: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</2>.",
924
- tapScreenShareButton: "Tocca <1> Registra il mio schermo</1> per avviare una registrazione.",
925
- tapStopScreenShareButton: "Al termine, tocca <1>Interrompi registrazione</1>.",
926
- reviewAnsSendScreenShare: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</1>."
946
+ tapVideoButton: "Tocca il pulsante <1 /><2>Registra</2> per avviare una registrazione.",
947
+ videoSpeech: "Puoi <1>parlare durante</1> la registrazione per aggiungere dettagli.",
948
+ tapStopVideoButton: "Quando hai finito, tocca il pulsante <1 /><2>Ferma</2>.",
949
+ reviewAndSendVideos: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</1>.",
950
+ tapScreenShareButton: "Tocca <1>Registra il mio schermo</1> per avviare una registrazione.",
951
+ tapStopScreenShareButton: "Quando hai finito, tocca <1>Ferma registrazione</1>.",
952
+ reviewAndSendScreenShare: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito.</1>",
953
+ screenShareInstruction: "Seleziona lo schermo o la finestra che desideri registrare."
927
954
  },
928
- switchToMobileTitle: "Passa al tuo cellulare",
929
- switchToMobileDescription: "Goditi un'esperienza ancora pi\xf9 comoda utilizzando il telefono per scattare foto e registrare video.",
955
+ switchToMobileTitle: "Passa al tuo dispositivo mobile",
956
+ switchToMobileDescription: "Goditi un'esperienza ancora pi\xf9 pratica utilizzando il tuo telefono per scattare foto e registrare video.",
930
957
  useDesktopVersion: "Usa la versione desktop",
931
958
  scanQRCode: "Scansiona questo codice QR con un dispositivo compatibile.",
932
959
  startScreenShareButton: "Registra il mio schermo",
933
- stopScreenShareButton: "Interrompi la registrazione"
960
+ stopScreenShareButton: "Ferma registrazione",
961
+ screenTitle: "Pronto a catturare il tuo schermo?"
934
962
  }
935
963
  }
936
964
  };
@@ -1219,6 +1247,11 @@ const $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas = (canvas, dpr = 1)=
1219
1247
  resolve(canvas);
1220
1248
  };
1221
1249
  watermarkImage.src = blobUrl;
1250
+ if (context) {
1251
+ context.fillStyle = "#00000064";
1252
+ context.fillRect(0, 0, canvas.width, canvas.height);
1253
+ context.restore();
1254
+ }
1222
1255
  });
1223
1256
  const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
1224
1257
  addPlayWatermark: false
@@ -1229,15 +1262,15 @@ const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
1229
1262
  const sourceHeight = orientation === "landscape" ? videoHeight : videoWidth;
1230
1263
  const sourceX = orientation === "landscape" ? (videoWidth - sourceWidth) / 2 : 0;
1231
1264
  const sourceY = orientation === "portrait" ? (videoHeight - sourceHeight) / 2 : 0;
1232
- const canvas = document.createElement("canvas");
1265
+ let canvas = document.createElement("canvas");
1233
1266
  const ctx = canvas.getContext("2d");
1234
1267
  const dpr = window.devicePixelRatio || 1;
1235
1268
  canvas.width = sourceWidth * dpr;
1236
1269
  canvas.height = sourceHeight * dpr;
1237
1270
  ctx?.scale(dpr, dpr);
1238
1271
  ctx?.drawImage(video, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, canvas.width / dpr, canvas.height / dpr);
1272
+ if (options.addPlayWatermark) canvas = await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas, window.devicePixelRatio);
1239
1273
  const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas, window.devicePixelRatio);
1240
- if (options.addPlayWatermark) return (await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas, window.devicePixelRatio)).toDataURL("image/jpeg");
1241
1274
  return watermarkedCanvas.toDataURL("image/jpeg");
1242
1275
  };
1243
1276
  const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src, options = {
@@ -1252,13 +1285,13 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src, options = {
1252
1285
  video.width = settings.width || 0;
1253
1286
  video.height = settings.height || 0;
1254
1287
  await video.play();
1255
- const canvas = document.createElement("canvas");
1288
+ let canvas = document.createElement("canvas");
1256
1289
  const ctx = canvas.getContext("2d");
1257
1290
  canvas.height = video.height;
1258
1291
  canvas.width = video.width;
1259
1292
  ctx?.drawImage(video, 0, 0);
1293
+ if (options.addPlayWatermark) canvas = await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas);
1260
1294
  const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas);
1261
- if (options.addPlayWatermark) return (await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas)).toDataURL("image/jpeg");
1262
1295
  return watermarkedCanvas.toDataURL("image/jpeg");
1263
1296
  };
1264
1297
 
@@ -2330,6 +2363,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2330
2363
  this.mediaPipe = undefined;
2331
2364
  }
2332
2365
  this.audioMedia?.removeAll();
2366
+ this.audioMedia = undefined;
2333
2367
  this.webcamTrack?.stop();
2334
2368
  this.webcamTrack = null;
2335
2369
  this.protooTransport.close();
@@ -2488,14 +2522,13 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2488
2522
  optionalParam.facingMode = this.webcam.facingMode;
2489
2523
  } else {
2490
2524
  const webcams = Array.from(this.webcams.keys());
2491
- const deviceId = this.webcam?.device?.deviceId || "unknow";
2525
+ const deviceId = this.webcam?.device?.deviceId || "unknown";
2492
2526
  let newWebcamIndex = webcams.indexOf(deviceId);
2493
2527
  if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
2494
2528
  else newWebcamIndex = 0;
2495
2529
  const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
2496
2530
  if (!newWebcamDevice) throw new Error("no webcam device");
2497
2531
  this.webcam.device = newWebcamDevice;
2498
- this.webcam.resolution = "hd";
2499
2532
  optionalParam.deviceId = {
2500
2533
  ideal: this.webcam.device?.deviceId
2501
2534
  };
@@ -2511,8 +2544,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2511
2544
  ideal: this.webcam.device.deviceId
2512
2545
  };
2513
2546
  }
2514
- if (resolution) this.webcam.resolution = resolution;
2515
2547
  }
2548
+ this.webcam.resolution = resolution || this.webcam.resolution || "hd";
2549
+ this.webcam.framerate = frameRate || this.webcam.framerate;
2516
2550
  let usedResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution];
2517
2551
  if (this.useVideoBackground) usedResolution = {
2518
2552
  width: {
@@ -2530,7 +2564,6 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2530
2564
  });
2531
2565
  const mediaStream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
2532
2566
  video: {
2533
- frameRate: frameRate,
2534
2567
  ...optionalParam,
2535
2568
  ...usedResolution
2536
2569
  }
@@ -2572,6 +2605,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2572
2605
  };
2573
2606
  }
2574
2607
  if (!this.webcam.device) throw new Error("no webcam devices");
2608
+ this.webcam.resolution = config?.resolution || this.webcam.resolution || "hd";
2609
+ this.webcam.framerate = config?.frameRate || this.webcam.framerate;
2575
2610
  let usedResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution];
2576
2611
  if (this.useVideoBackground) usedResolution = {
2577
2612
  width: {
@@ -9897,7 +9932,7 @@ const $df41bfe6da05853a$var$EndView = ()=>{
9897
9932
  const full = streamState === "full";
9898
9933
  const onGoBackClick = ()=>{
9899
9934
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).init();
9900
- setStreamState("streaming");
9935
+ setStreamState("loading");
9901
9936
  };
9902
9937
  (0, $3Sbms$useEffect)(()=>{
9903
9938
  if (document.pictureInPictureElement) document.exitPictureInPicture();
@@ -10712,6 +10747,50 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
10712
10747
 
10713
10748
 
10714
10749
 
10750
+ function $448b01a7ea61a08a$export$c74cd098b7a410cb({ mode: mode = "photo" , requestedMedia: requestedMedia = "camera" , permissionBlockedModalState: permissionBlockedModalState , captureThumbnail: captureThumbnail }) {
10751
+ const [currentMode, setMode] = (0, $3Sbms$useState)(mode);
10752
+ const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
10753
+ const [currentRequestedMedia] = (0, $3Sbms$useState)(requestedMedia);
10754
+ const [startRecordTime, setStartRecordTime] = (0, $3Sbms$useState)(undefined);
10755
+ const [timer, setTimer] = (0, $3Sbms$useState)(0);
10756
+ const [assets, setAssets] = (0, $3Sbms$useState)([]);
10757
+ const assetsPopupState = (0, $3Sbms$useOverlayTriggerState)({});
10758
+ const [assetLoading, setAssetLoading] = (0, $3Sbms$useState)(false);
10759
+ (0, $3Sbms$useEffect)(()=>{
10760
+ if (startRecordTime) {
10761
+ const interval = setInterval(()=>{
10762
+ const delta = (Date.now() - startRecordTime) / 1000;
10763
+ setTimer(delta);
10764
+ }, 1000);
10765
+ return ()=>clearInterval(interval);
10766
+ } else setTimer(0);
10767
+ }, [
10768
+ startRecordTime,
10769
+ setTimer
10770
+ ]);
10771
+ return {
10772
+ requestedMedia: currentRequestedMedia,
10773
+ mode: currentMode,
10774
+ setMode: setMode,
10775
+ streaming: streaming,
10776
+ setStreaming: setStreaming,
10777
+ permissionBlockedModalState: permissionBlockedModalState,
10778
+ startRecordTime: startRecordTime,
10779
+ setStartRecordTime: setStartRecordTime,
10780
+ timer: timer,
10781
+ assetsPopupState: assetsPopupState,
10782
+ assets: assets,
10783
+ setAssets: setAssets,
10784
+ assetLoading: assetLoading,
10785
+ setAssetLoading: setAssetLoading,
10786
+ captureThumbnail: captureThumbnail
10787
+ };
10788
+ }
10789
+
10790
+
10791
+
10792
+
10793
+
10715
10794
 
10716
10795
 
10717
10796
 
@@ -10724,7 +10803,7 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
10724
10803
 
10725
10804
 
10726
10805
 
10727
- function $5a48b7481979330f$export$61dc559f8a0b9bcf(ref) {
10806
+ function $f9059e11662133b7$export$61dc559f8a0b9bcf(ref) {
10728
10807
  const innerRef = (0, $3Sbms$useRef)(null);
10729
10808
  (0, $3Sbms$useEffect)(()=>{
10730
10809
  if (!ref) return;
@@ -10733,8 +10812,8 @@ function $5a48b7481979330f$export$61dc559f8a0b9bcf(ref) {
10733
10812
  });
10734
10813
  return innerRef;
10735
10814
  }
10736
- const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10737
- const ref = $5a48b7481979330f$export$61dc559f8a0b9bcf(forwardedRef);
10815
+ const $f9059e11662133b7$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10816
+ const ref = $f9059e11662133b7$export$61dc559f8a0b9bcf(forwardedRef);
10738
10817
  let state = (0, $3Sbms$useToggleState)(otherProps);
10739
10818
  const { buttonProps: buttonProps } = (0, $3Sbms$useToggleButton)(otherProps, state, ref);
10740
10819
  const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
@@ -10755,6 +10834,218 @@ const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwa
10755
10834
 
10756
10835
 
10757
10836
 
10837
+ const $f3d9f6a4bbe7f552$export$4e594bceac139abd = (props)=>{
10838
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
10839
+ if (props.state === "request") return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10840
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10841
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10842
+ className: (0, $3Sbms$classnames)("border-[7px] border-white border-b-[#E5484D] border-b-[7px] rounded-[50%] w-[64px] h-[64px] animate-spin")
10843
+ })
10844
+ });
10845
+ if (props.state === "live") return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10846
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10847
+ onClick: ()=>{
10848
+ props.onCapturePress();
10849
+ },
10850
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10851
+ className: "bg-white border-[4px] border-[#E5484D] w-[72px] h-[72px] rounded-full flex items-center justify-center",
10852
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10853
+ className: "bg-[#E5484D] w-[24px] h-[24px] rounded-[8px] "
10854
+ })
10855
+ })
10856
+ });
10857
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10858
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10859
+ onClick: ()=>{
10860
+ if (selfPeerId) props.onCapturePress();
10861
+ },
10862
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10863
+ className: "bg-[#E5484D] w-[70px] h-[70px] rounded-full flex items-center justify-center",
10864
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10865
+ className: "bg-[#E5484D] w-[62px] h-[62px] rounded-full border-[3px] border-[#FFFFF]"
10866
+ })
10867
+ })
10868
+ });
10869
+ };
10870
+ const $f3d9f6a4bbe7f552$export$f9da3144ae2525a3 = (props)=>{
10871
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10872
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),
10873
+ onClick: ()=>props.onCapturePress(),
10874
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10875
+ className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
10876
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10877
+ className: (0, $3Sbms$classnames)("w-full h-full transition-[transform,border-radius] duration-300", props.state.mode === "photo" ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
10878
+ })
10879
+ })
10880
+ });
10881
+ };
10882
+
10883
+
10884
+ const $a180b95972399d58$export$11a6fe490bbc4873 = (props)=>{
10885
+ const { t: t } = (0, $3Sbms$useTranslation)();
10886
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10887
+ className: "flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",
10888
+ children: [
10889
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10890
+ className: "flex flex-1 flex-row px-[10px] w-full",
10891
+ children: [
10892
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10893
+ className: "flex flex-row flex-auto items-center gap-[10px]",
10894
+ children: [
10895
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a1ac29d50bdaa837$export$3741e4ac43f04ca2), {}),
10896
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10897
+ className: " text-white text-base font-medium",
10898
+ children: "SnapCall"
10899
+ })
10900
+ ]
10901
+ }),
10902
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10903
+ className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
10904
+ children: [
10905
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f9059e11662133b7$export$d2b052e7b4be1756), {
10906
+ isSelected: props.state.mode === "photo",
10907
+ onPress: ()=>{
10908
+ if (!props.state.streaming) props.changeMode("photo");
10909
+ },
10910
+ children: t("misc.photo")
10911
+ }),
10912
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f9059e11662133b7$export$d2b052e7b4be1756), {
10913
+ isSelected: props.state.mode === "video",
10914
+ onPress: ()=>{
10915
+ if (!props.state.streaming) props.changeMode("video");
10916
+ },
10917
+ children: t("misc.video")
10918
+ })
10919
+ ]
10920
+ })
10921
+ ]
10922
+ }),
10923
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10924
+ className: "flex flex-row flex-1 items-center justify-between w-full ",
10925
+ children: [
10926
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10927
+ className: "w-[60px] h-[60px]",
10928
+ children: props.thumbnail
10929
+ }),
10930
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$f9da3144ae2525a3), {
10931
+ ...props
10932
+ }),
10933
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10934
+ onClick: props.onSwitch,
10935
+ className: "rounded-full w-[56px] h-[56px] flex items-center justify-center bg-[#565656] cursor-pointer",
10936
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $58d405d56c1abe95$export$aefffb14595958fe), {})
10937
+ })
10938
+ ]
10939
+ })
10940
+ ]
10941
+ });
10942
+ };
10943
+
10944
+
10945
+
10946
+
10947
+
10948
+ const $209863c2c7a7b6c0$export$53819c0e58f98d49 = (props)=>{
10949
+ const [countdown, setCountdown] = (0, $3Sbms$useState)(props.initialValue);
10950
+ (0, $3Sbms$useEffect)(()=>{
10951
+ if (countdown === undefined) return;
10952
+ const t = setTimeout(()=>{
10953
+ if (countdown === 1) props.onFinish();
10954
+ setCountdown(countdown - 1);
10955
+ }, 1000);
10956
+ return ()=>clearTimeout(t);
10957
+ }, [
10958
+ countdown,
10959
+ props
10960
+ ]);
10961
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10962
+ className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
10963
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
10964
+ className: "text-white/80 text-[112px] font-medium",
10965
+ children: countdown
10966
+ })
10967
+ });
10968
+ };
10969
+
10970
+
10971
+
10972
+
10973
+
10974
+
10975
+
10976
+
10977
+ const $7dc8075008cdffc1$export$8c410456846722ea = /*#__PURE__*/ (0, $3Sbms$forwardRef)((props, forwardedRef)=>{
10978
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
10979
+ (0, $3Sbms$useEffect)(()=>{
10980
+ const onScreenshareEnabled = ()=>{
10981
+ if (!ref?.current) return;
10982
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalScreenshare(ref.current);
10983
+ };
10984
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreenshareEnabled);
10985
+ return ()=>{
10986
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreenshareEnabled);
10987
+ };
10988
+ }, [
10989
+ ref
10990
+ ]);
10991
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
10992
+ autoPlay: true,
10993
+ muted: true,
10994
+ playsInline: true,
10995
+ ref: ref,
10996
+ className: "rounded-[10px] max-w-[100%] max-h-[100%] object-fit ",
10997
+ children: props.children
10998
+ });
10999
+ });
11000
+ const $7dc8075008cdffc1$export$287f8fcc69caf433 = /*#__PURE__*/ (0, $3Sbms$forwardRef)((_, forwardedRef)=>{
11001
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
11002
+ const [facingMode, setFacingMode] = (0, $3Sbms$useState)("user");
11003
+ (0, $3Sbms$useEffect)(()=>{
11004
+ const onLocalVideoChange = (event)=>{
11005
+ if (!event.detail?.camera?.device || !ref.current) return;
11006
+ const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(ref?.current);
11007
+ setFacingMode(newFacingMode);
11008
+ };
11009
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
11010
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
11011
+ return ()=>{
11012
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
11013
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
11014
+ };
11015
+ }, [
11016
+ ref
11017
+ ]);
11018
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11019
+ autoPlay: true,
11020
+ muted: true,
11021
+ playsInline: true,
11022
+ ref: ref,
11023
+ className: (0, $3Sbms$classnames)("w-full h-full object-cover rounded-[inherit]", {
11024
+ "scale-x-[-1]": facingMode === "user"
11025
+ })
11026
+ });
11027
+ });
11028
+
11029
+
11030
+
11031
+ const $7227f0300555e42c$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11032
+ if (!asset) return null;
11033
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11034
+ className: "flex items-center justify-center w-[60px] h-[60px] cursor-pointer relative overflow-hidden",
11035
+ onClick: onClick,
11036
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11037
+ className: "cursor-pointer rounded-[8px] w-[60px] h-[60px] object-cover",
11038
+ src: asset.thumbnailURL || asset.objectUrl,
11039
+ alt: "last shot"
11040
+ })
11041
+ });
11042
+ };
11043
+
11044
+
11045
+
11046
+
11047
+
11048
+
10758
11049
 
10759
11050
 
10760
11051
 
@@ -10762,11 +11053,54 @@ const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwa
10762
11053
 
10763
11054
 
10764
11055
 
11056
+ const $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
11057
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
11058
+ const { buttonProps: buttonProps , isPressed: isPressed } = (0, $3Sbms$useButton)(otherProps, ref);
11059
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
11060
+ const { hoverProps: hoverProps , isHovered: isHovered } = (0, $3Sbms$useHover)({
11061
+ isDisabled: buttonProps.disabled
11062
+ });
11063
+ const isActive = isHovered || isFocusVisible || isPressed;
11064
+ const variantStyle = {
11065
+ primary: (0, $3Sbms$classnames)(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
11066
+ secondary: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
11067
+ basic: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
11068
+ tertiary: (0, $3Sbms$classnames)(isActive ? "bg-tertiarySelected" : "bg-tertiary", "text-mainBlue disabled:opacity-50"),
11069
+ blue: (0, $3Sbms$classnames)(isActive ? "bg-mainBlueSelected" : "bg-mainBlue", "text-white disabled:opacity-50"),
11070
+ custom: ""
11071
+ };
11072
+ const sizeStyle = {
11073
+ large: "py-3 px-4 text-base rounded-lg",
11074
+ medium: "py-[9px] px-3.5 text-base rounded-lg",
11075
+ small: "py-2 px-3 text-sm rounded-lg",
11076
+ extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
11077
+ custom: ""
11078
+ };
11079
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
11080
+ className: (0, $3Sbms$classnames)(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
11081
+ "ring-[3px] ring-cta": isFocusVisible,
11082
+ "cursor-not-allowed": buttonProps.disabled,
11083
+ "w-full": fullWidth
11084
+ }, className),
11085
+ ...buttonProps,
11086
+ ...focusProps,
11087
+ ...hoverProps,
11088
+ form: form,
11089
+ ref: ref,
11090
+ children: children
11091
+ });
11092
+ });
11093
+
11094
+
11095
+
11096
+
11097
+
11098
+
10765
11099
 
10766
11100
 
10767
11101
 
10768
11102
 
10769
- const $91e337bf8187124b$export$a703eb468fcf7e69 = (props)=>{
11103
+ const $08835f3b5a72d418$export$a703eb468fcf7e69 = (props)=>{
10770
11104
  const { state: state , children: children } = props;
10771
11105
  const ref = (0, $3Sbms$useRef)(null);
10772
11106
  const { modalProps: modalProps , underlayProps: underlayProps } = (0, $3Sbms$useModalOverlay)({
@@ -10819,60 +11153,18 @@ const $91e337bf8187124b$export$a703eb468fcf7e69 = (props)=>{
10819
11153
 
10820
11154
 
10821
11155
 
10822
-
10823
-
10824
-
10825
-
10826
-
10827
- const $0590ee3141e14968$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
10828
- const ref = (0, $5a48b7481979330f$export$61dc559f8a0b9bcf)(forwardedRef);
10829
- const { buttonProps: buttonProps , isPressed: isPressed } = (0, $3Sbms$useButton)(otherProps, ref);
10830
- const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
10831
- const { hoverProps: hoverProps , isHovered: isHovered } = (0, $3Sbms$useHover)({
10832
- isDisabled: buttonProps.disabled
10833
- });
10834
- const isActive = isHovered || isFocusVisible || isPressed;
10835
- const variantStyle = {
10836
- primary: (0, $3Sbms$classnames)(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
10837
- secondary: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
10838
- basic: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
10839
- tertiary: (0, $3Sbms$classnames)(isActive ? "bg-tertiarySelected" : "bg-tertiary", "text-mainBlue disabled:opacity-50"),
10840
- custom: ""
10841
- };
10842
- const sizeStyle = {
10843
- large: "py-3 px-4 text-base rounded-lg",
10844
- medium: "py-[9px] px-3.5 text-base rounded-lg",
10845
- small: "py-2 px-3 text-sm rounded-lg",
10846
- extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
10847
- custom: ""
11156
+ function $4381ee6dfabb36f4$export$2b77a92f1a5ad772(props) {
11157
+ const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false , ...otherProps } = props;
11158
+ const viewport = (0, $3Sbms$useViewportSize)();
11159
+ const maxHeight = viewport.height - 64;
11160
+ const modalSize = {
11161
+ small: "max-w-[400px] mx-[20px]",
11162
+ medium: "max-w-[600px]",
11163
+ large: "max-w-[800px]"
10848
11164
  };
10849
- return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10850
- className: (0, $3Sbms$classnames)(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10851
- "ring-[3px] ring-cta": isFocusVisible,
10852
- "cursor-not-allowed": buttonProps.disabled,
10853
- "w-full": fullWidth
10854
- }, className),
10855
- ...buttonProps,
10856
- ...focusProps,
10857
- ...hoverProps,
10858
- form: form,
10859
- ref: ref,
10860
- children: children
10861
- });
10862
- });
10863
-
10864
-
10865
- function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10866
- const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false } = props;
10867
- const viewport = (0, $3Sbms$useViewportSize)();
10868
- const maxHeight = viewport.height - 64;
10869
- const modalSize = {
10870
- small: "max-w-[400px] mx-[20px]",
10871
- medium: "max-w-[600px]",
10872
- large: "max-w-[800px]"
10873
- };
10874
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91e337bf8187124b$export$a703eb468fcf7e69), {
11165
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $08835f3b5a72d418$export$a703eb468fcf7e69), {
10875
11166
  state: state,
11167
+ ...otherProps,
10876
11168
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10877
11169
  className: (0, $3Sbms$classnames)("bg-white rounded-[10px] z-[1] overflow-x-auto focus:outline-none", modalSize[size]),
10878
11170
  style: {
@@ -10905,7 +11197,7 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10905
11197
  (primaryAction || secondaryAction) && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10906
11198
  className: (0, $3Sbms$classnames)("flex justify-end gap-2.5", centered ? "justify-center" : "justify-end"),
10907
11199
  children: [
10908
- typeof secondaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11200
+ typeof secondaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
10909
11201
  variant: "secondary",
10910
11202
  onPress: state.close,
10911
11203
  fullWidth: centered,
@@ -10914,7 +11206,7 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10914
11206
  typeof secondaryAction === "function" && secondaryAction({
10915
11207
  close: state.close
10916
11208
  }),
10917
- typeof primaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11209
+ typeof primaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
10918
11210
  onPress: state.close,
10919
11211
  fullWidth: centered,
10920
11212
  children: primaryAction
@@ -10933,7 +11225,70 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10933
11225
 
10934
11226
 
10935
11227
 
10936
- const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
11228
+
11229
+ const $dcecc67f51a66b8d$export$f9d8408fefd786da = ({ state: state , onClose: onClose })=>{
11230
+ const { t: t } = (0, $3Sbms$useTranslation)();
11231
+ const QRCodeRef = (0, $3Sbms$useRef)(null);
11232
+ const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11233
+ const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
11234
+ (0, $3Sbms$useEffect)(()=>{
11235
+ const url = options.sharedURL || window.location.href;
11236
+ $3Sbms$toCanvas(QRCodeRef.current, url, {
11237
+ width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
11238
+ errorCorrectionLevel: "Q",
11239
+ margin: 0
11240
+ });
11241
+ }, [
11242
+ QRCodeContainerWidth,
11243
+ options.sharedURL
11244
+ ]);
11245
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11246
+ centered: true,
11247
+ title: t("recorder.switchToMobileTitle"),
11248
+ description: t("recorder.switchToMobileDescription"),
11249
+ isDismissable: false,
11250
+ state: state,
11251
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11252
+ fullWidth: true,
11253
+ variant: "blue",
11254
+ onPress: ()=>{
11255
+ close();
11256
+ onClose();
11257
+ },
11258
+ children: t("recorder.useDesktopVersion")
11259
+ }),
11260
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11261
+ className: "flex flex-col gap-[20px]",
11262
+ children: [
11263
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11264
+ ref: QRCodeContainerRef,
11265
+ className: "flex flex-1 items-center justify-center relative",
11266
+ children: [
11267
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11268
+ className: "absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",
11269
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {})
11270
+ }),
11271
+ /*#__PURE__*/ (0, $3Sbms$jsx)("canvas", {
11272
+ ref: QRCodeRef
11273
+ })
11274
+ ]
11275
+ }),
11276
+ /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
11277
+ className: "flex items-center justify-center text-xs text-primaryLight text-center",
11278
+ children: t("recorder.scanQRCode")
11279
+ })
11280
+ ]
11281
+ })
11282
+ });
11283
+ };
11284
+
11285
+
11286
+
11287
+
11288
+
11289
+
11290
+
11291
+ const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ({ sideColor: sideColor , mainColor: mainColor })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10937
11292
  width: "20",
10938
11293
  height: "21",
10939
11294
  viewBox: "0 0 20 21",
@@ -10946,15 +11301,15 @@ const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $3Sbms$j
10946
11301
  children: [
10947
11302
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10948
11303
  d: "M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10949
- fill: "#1D1C20"
11304
+ fill: sideColor || "#1D1C20"
10950
11305
  }),
10951
11306
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10952
11307
  d: "M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10953
- fill: "#F12828"
11308
+ fill: mainColor || "#F12828"
10954
11309
  })
10955
11310
  ]
10956
11311
  });
10957
- const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
11312
+ const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ({ sideColor: sideColor , mainColor: mainColor })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10958
11313
  width: "20",
10959
11314
  height: "20",
10960
11315
  viewBox: "0 0 20 20",
@@ -10967,11 +11322,11 @@ const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $3Sbms$j
10967
11322
  children: [
10968
11323
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10969
11324
  d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10970
- fill: "#1D1C20"
11325
+ fill: sideColor || "#1D1C20"
10971
11326
  }),
10972
11327
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10973
11328
  d: "M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",
10974
- fill: "#F12828"
11329
+ fill: mainColor || "#F12828"
10975
11330
  })
10976
11331
  ]
10977
11332
  });
@@ -11001,323 +11356,173 @@ const $444e1dd9fa8f6883$export$dce36e07153365d = ()=>/*#__PURE__*/ (0, $3Sbms$js
11001
11356
 
11002
11357
 
11003
11358
 
11004
- const $96999d2514f71e51$var$Text = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11005
- className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11006
- children: children
11359
+
11360
+ const $d775b8f941514ed9$var$savedPermissions = {
11361
+ audio: false,
11362
+ video: false
11363
+ };
11364
+ const $d775b8f941514ed9$export$d791e41b9a4de1f2 = (constraints)=>{
11365
+ const [media, setMedia] = (0, $3Sbms$useState)();
11366
+ const state = (0, $3Sbms$useMutation)([
11367
+ constraints
11368
+ ], async ()=>{
11369
+ const mediaStream = await navigator.mediaDevices.getUserMedia(constraints);
11370
+ setMedia(mediaStream);
11371
+ if (constraints.audio && !$d775b8f941514ed9$var$savedPermissions.audio) $d775b8f941514ed9$var$savedPermissions.audio = true;
11372
+ if (constraints.video && !$d775b8f941514ed9$var$savedPermissions.video) $d775b8f941514ed9$var$savedPermissions.video = true;
11373
+ return {
11374
+ media: media,
11375
+ savedPermissions: $d775b8f941514ed9$var$savedPermissions
11376
+ };
11377
+ });
11378
+ if (state.data == null) media?.getTracks().forEach((track)=>{
11379
+ track.stop();
11380
+ media?.removeTrack(track);
11007
11381
  });
11008
- const $96999d2514f71e51$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11382
+ return {
11383
+ ...state,
11384
+ savedPermissions: $d775b8f941514ed9$var$savedPermissions
11385
+ };
11386
+ };
11387
+
11388
+
11389
+ const $8fe8c7100159474e$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11009
11390
  className: "text-primary font-medium",
11010
11391
  children: children
11011
11392
  });
11012
- const $96999d2514f71e51$var$InstructionRow = ({ children: children , index: index })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11013
- className: "flex flex-row justify-center gap-[5px]",
11014
- children: [
11015
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11016
- className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
11017
- children: index
11018
- }),
11019
- children
11020
- ]
11021
- });
11022
- const $96999d2514f71e51$export$788cb893d96254c8 = ({ state: state , type: type })=>{
11393
+ const $8fe8c7100159474e$export$788cb893d96254c8 = ({ state: state , mode: mode , ...props })=>{
11023
11394
  const { t: t } = (0, $3Sbms$useTranslation)();
11395
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11396
+ audio: true,
11397
+ video: true
11398
+ });
11024
11399
  const [permissionsState, setPermissionsState] = (0, $3Sbms$useState)("idle");
11025
11400
  (0, $3Sbms$useEffect)(()=>{
11026
11401
  const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11027
- if (deviceState.screenshare.enabled && type === "screen") return setPermissionsState("granted");
11028
- if (deviceState.camera.enabled && type !== "screen") return setPermissionsState("granted");
11402
+ if (deviceState.screenshare.enabled) return setPermissionsState("granted");
11403
+ if (deviceState.camera.enabled) return setPermissionsState("granted");
11029
11404
  setPermissionsState("idle");
11030
11405
  }, [
11031
- type
11406
+ mode
11032
11407
  ]);
11033
- const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11034
- const [isRoomReady, setRoomReady] = (0, $3Sbms$useState)(false);
11035
11408
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11036
11409
  const device = orientation === "landscape" ? "desktop" : "mobile";
11037
11410
  const videoLength = permissionsState === "granted" ? "short" : "full";
11038
- const videoType = type === "photo" ? "photo" : "video";
11039
- const onEnterRoom = ()=>setRoomReady(true);
11040
- const onLeaveRoom = ()=>setRoomReady(false);
11041
11411
  const ref = (0, $3Sbms$useRef)(null);
11042
- const title = (0, $3Sbms$useMemo)(()=>{
11043
- if (permissionsState === "refused") return t("recorder.permissionDeniedTitle");
11044
- if (type === "photo") return t("recorder.photoInstructionsTitle");
11045
- else if (type === "video") return t("recorder.videoInstructionsTitle");
11046
- else return t("recorder.screenShareInstructionsTitle");
11047
- }, [
11048
- permissionsState,
11049
- type,
11050
- t
11051
- ]);
11052
- (0, $3Sbms$useEffect)(()=>{
11053
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
11054
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
11055
- return ()=>{
11056
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
11057
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
11058
- };
11059
- }, []);
11060
- const permissionsInstructionIndex = Number(permissionsState !== "granted");
11061
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11412
+ const title = mode === "photo" ? t("recorder.photoInstructionsTitle") : t("recorder.videoInstructionsTitle");
11413
+ const mediaInstruction = [
11414
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11415
+ i18nKey: "recorder.instructions.allowAccessOnPrompt",
11416
+ children: [
11417
+ "When prompted, ",
11418
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11419
+ children: "allow access"
11420
+ }),
11421
+ " to camera and microphone."
11422
+ ]
11423
+ })
11424
+ ];
11425
+ const instructionPhoto = [
11426
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11427
+ i18nKey: "recorder.instructions.tapPhotoButton",
11428
+ com: true,
11429
+ children: [
11430
+ "Tap the ",
11431
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$dce36e07153365d), {}),
11432
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11433
+ children: " Camera button"
11434
+ }),
11435
+ " to take a photo."
11436
+ ]
11437
+ }),
11438
+ t("recorder.instructions.multiplePhotos"),
11439
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11440
+ i18nKey: "recorder.instructions.reviewAndSendPhotos",
11441
+ children: [
11442
+ "You can review your photo and then ",
11443
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11444
+ children: "send it when you're done."
11445
+ })
11446
+ ]
11447
+ })
11448
+ ];
11449
+ const instructionVideo = [
11450
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11451
+ i18nKey: "recorder.instructions.tapVideoButton",
11452
+ children: [
11453
+ "Tap the ",
11454
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {}),
11455
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11456
+ children: " Record button"
11457
+ }),
11458
+ " to start a recording."
11459
+ ]
11460
+ }),
11461
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11462
+ i18nKey: "recorder.instructions.videoSpeech",
11463
+ children: [
11464
+ "You can ",
11465
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11466
+ children: "speak during"
11467
+ }),
11468
+ " the recording for added detail."
11469
+ ]
11470
+ }),
11471
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11472
+ i18nKey: "recorder.instructions.tapStopVideoButton",
11473
+ children: [
11474
+ "When you're finished, tap the ",
11475
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {}),
11476
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11477
+ children: " Stop button"
11478
+ }),
11479
+ "."
11480
+ ]
11481
+ }),
11482
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11483
+ i18nKey: "recorder.instructions.reviewAndSendVideos",
11484
+ children: [
11485
+ "You can review your video and then ",
11486
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11487
+ children: "send it when you're done"
11488
+ }),
11489
+ "."
11490
+ ]
11491
+ })
11492
+ ];
11493
+ const instructions = [];
11494
+ if (!getUserMediaMutation.savedPermissions.audio) instructions.push(...mediaInstruction);
11495
+ instructions.push(...mode === "photo" ? instructionPhoto : instructionVideo);
11496
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11062
11497
  title: title,
11063
11498
  state: state,
11064
- centered: permissionsState !== "refused",
11499
+ centered: true,
11065
11500
  isDismissable: false,
11066
- primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
11067
- children: permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11068
- fullWidth: true,
11069
- onPress: ()=>window.location.reload(),
11070
- children: t("recorder.allowAccess")
11071
- }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
11072
- children: permissionsState === "granted" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11073
- fullWidth: true,
11074
- onPress: state.close,
11075
- children: t("recorder.okay")
11076
- }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11077
- fullWidth: true,
11078
- isDisabled: permissionsState === "requesting" || isRoomReady === false,
11079
- onPress: async ()=>{
11080
- setPermissionsState("requesting");
11081
- try {
11082
- if (!deviceState.microphone.enabled) {
11083
- const mediaResult = await navigator.mediaDevices.getUserMedia({
11084
- audio: true,
11085
- video: type !== "screen"
11086
- });
11087
- mediaResult.getTracks().forEach((track)=>track.stop());
11088
- }
11089
- if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11090
- if (!deviceState.camera.enabled && type !== "screen") {
11091
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11092
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
11093
- resolution: "vga",
11094
- frameRate: 20,
11095
- facingMode: "environment"
11096
- });
11097
- }
11098
- if (!deviceState.screenshare.enabled && type === "screen") {
11099
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableVideo();
11100
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare({
11101
- audioTransportOption: "mix"
11102
- });
11103
- }
11104
- setPermissionsState("granted");
11105
- state.close();
11106
- } catch (error) {
11107
- console.log("error", error);
11108
- setPermissionsState("refused");
11109
- }
11110
- },
11111
- children: [
11112
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {}),
11113
- type !== "screen" ? t("recorder.allowCamMicAccess") : t("recorder.allowScreenShareAccess")
11114
- ]
11115
- })
11116
- })
11117
- }),
11501
+ ...props,
11118
11502
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11119
11503
  className: "flex flex-col gap-[20px]",
11120
11504
  children: [
11121
11505
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11122
11506
  className: "flex flex-col gap-[10px]",
11123
11507
  ref: ref,
11124
- children: permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11125
- children: t("recorder.permissionDeniedDescription")
11126
- }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11127
- children: [
11128
- permissionsState !== "granted" && /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11129
- index: 1,
11130
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11131
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11132
- i18nKey: "recorder.instructions.allowAccessOnPrompt",
11133
- children: [
11134
- "When prompted, ",
11135
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11136
- children: "allow access"
11137
- }),
11138
- " to camera and microphone."
11139
- ]
11140
- })
11508
+ children: instructions.map((value, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11509
+ className: "flex flex-row justify-center gap-[5px]",
11510
+ children: [
11511
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11512
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
11513
+ children: index + 1
11514
+ }),
11515
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11516
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11517
+ children: value
11141
11518
  })
11142
- }),
11143
- type === "photo" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11144
- children: [
11145
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11146
- index: 1 + permissionsInstructionIndex,
11147
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11148
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11149
- i18nKey: "recorder.instructions.tapPhotoButton",
11150
- com: true,
11151
- children: [
11152
- "Tap the ",
11153
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$dce36e07153365d), {}),
11154
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11155
- children: " Camera button"
11156
- }),
11157
- " to take a photo."
11158
- ]
11159
- })
11160
- })
11161
- }),
11162
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11163
- index: 2 + permissionsInstructionIndex,
11164
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11165
- children: t("recorder.instructions.multiplePhotos")
11166
- })
11167
- }),
11168
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11169
- index: 3 + permissionsInstructionIndex,
11170
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11171
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11172
- i18nKey: "recorder.instructions.reviewAndSendPhotos",
11173
- children: [
11174
- "You can review your photo and then ",
11175
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11176
- children: "send it when you're done."
11177
- })
11178
- ]
11179
- })
11180
- })
11181
- })
11182
- ]
11183
- }),
11184
- type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11185
- children: [
11186
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11187
- index: 1 + permissionsInstructionIndex,
11188
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11189
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11190
- i18nKey: "recorder.instructions.tapVideoButton",
11191
- children: [
11192
- "Tap the ",
11193
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {}),
11194
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11195
- children: " Record button"
11196
- }),
11197
- " to start a recording."
11198
- ]
11199
- })
11200
- })
11201
- }),
11202
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11203
- index: 2 + permissionsInstructionIndex,
11204
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11205
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11206
- i18nKey: "recorder.instructions.videoSpeech",
11207
- children: [
11208
- "You can ",
11209
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11210
- children: "speak during"
11211
- }),
11212
- " the recording for added detail."
11213
- ]
11214
- })
11215
- })
11216
- }),
11217
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11218
- index: 3 + permissionsInstructionIndex,
11219
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11220
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11221
- i18nKey: "recorder.instructions.tapStopVideoButton",
11222
- children: [
11223
- "When you're finished, tap the ",
11224
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {}),
11225
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11226
- children: " Stop button"
11227
- }),
11228
- "."
11229
- ]
11230
- })
11231
- })
11232
- }),
11233
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11234
- index: 4 + permissionsInstructionIndex,
11235
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11236
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11237
- i18nKey: "recorder.instructions.reviewAndSendVideos",
11238
- children: [
11239
- "You can review your video and then ",
11240
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11241
- children: "send it when you're done"
11242
- }),
11243
- "."
11244
- ]
11245
- })
11246
- })
11247
- })
11248
- ]
11249
- }),
11250
- type === "screen" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11251
- children: [
11252
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11253
- index: 1 + permissionsInstructionIndex,
11254
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11255
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11256
- i18nKey: "recorder.instructions.tapScreenShareButton",
11257
- children: [
11258
- "Tap on",
11259
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11260
- children: " Record my screen"
11261
- }),
11262
- " to start a recording."
11263
- ]
11264
- })
11265
- })
11266
- }),
11267
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11268
- index: 2 + permissionsInstructionIndex,
11269
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11270
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11271
- i18nKey: "recorder.instructions.videoSpeech",
11272
- children: [
11273
- "You can ",
11274
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11275
- children: "speak during"
11276
- }),
11277
- " the recording for added detail."
11278
- ]
11279
- })
11280
- })
11281
- }),
11282
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11283
- index: 3 + permissionsInstructionIndex,
11284
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11285
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11286
- i18nKey: "recorder.instructions.tapStopScreenShareButton",
11287
- children: [
11288
- "When you're finished, tap on ",
11289
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11290
- children: "Stop recording"
11291
- }),
11292
- "."
11293
- ]
11294
- })
11295
- })
11296
- }),
11297
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11298
- index: 4 + permissionsInstructionIndex,
11299
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11300
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11301
- i18nKey: "recorder.instructions.reviewAnsSendScreenShare",
11302
- children: [
11303
- "You can review your video and then ",
11304
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11305
- children: "send it when you're done"
11306
- }),
11307
- "."
11308
- ]
11309
- })
11310
- })
11311
- })
11312
- ]
11313
- })
11314
- ]
11315
- })
11519
+ ]
11520
+ }, index))
11316
11521
  }),
11317
- permissionsState !== "refused" && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11522
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11318
11523
  className: "flex items-center justify-center rounded-[8px] overflow-hidden",
11319
11524
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11320
- src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${videoType}-${videoLength}.mp4`,
11525
+ src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${mode}-${videoLength}.mp4`,
11321
11526
  playsInline: true,
11322
11527
  autoPlay: true,
11323
11528
  muted: true,
@@ -11330,108 +11535,192 @@ const $96999d2514f71e51$export$788cb893d96254c8 = ({ state: state , type: type
11330
11535
  };
11331
11536
 
11332
11537
 
11538
+ const $1e6ffcfc059a8789$export$cc010f6d61e5dce8 = (delta)=>{
11539
+ const d = [
11540
+ Math.floor(delta / 60),
11541
+ Math.round(delta % 60)
11542
+ ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
11543
+ return d.join(":");
11544
+ };
11545
+ function $1e6ffcfc059a8789$export$3ae94a2503e890a1(date) {
11546
+ const dateFormat = new Intl.DateTimeFormat("default", {
11547
+ dateStyle: "short"
11548
+ });
11549
+ const timeFormat = new Intl.DateTimeFormat("default", {
11550
+ hour: "numeric",
11551
+ minute: "2-digit"
11552
+ });
11553
+ return `${dateFormat.format(date)} at ${timeFormat.format(date)}`;
11554
+ }
11333
11555
 
11334
11556
 
11335
11557
 
11336
11558
 
11337
11559
 
11338
-
11339
-
11340
-
11341
-
11342
- const $1c8fc500105e5c78$export$f9d8408fefd786da = ({ state: state , setReady: setReady })=>{
11560
+ const $c9e5583d5dd9328d$var$browser = (0, $3Sbms$bowser).parse(window.navigator.userAgent);
11561
+ const $c9e5583d5dd9328d$export$5b8e641151f8011d = ({ recorderState: recorderState })=>{
11343
11562
  const { t: t } = (0, $3Sbms$useTranslation)();
11344
- const QRCodeRef = (0, $3Sbms$useRef)(null);
11345
- const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11346
- const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
11347
- (0, $3Sbms$useEffect)(()=>{
11348
- const url = options.sharedURL || window.location.href;
11349
- $3Sbms$toCanvas(QRCodeRef.current, url, {
11350
- width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
11351
- errorCorrectionLevel: "Q",
11352
- margin: 0
11563
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11564
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11565
+ audio: true,
11566
+ video: true
11567
+ });
11568
+ const [countdownVisible, setCountdownVisible] = (0, $3Sbms$useState)(false);
11569
+ const videoElementRef = (0, $3Sbms$useRef)(null);
11570
+ const isDesktop = $c9e5583d5dd9328d$var$browser.platform.type === "desktop";
11571
+ const instructionModalState = (0, $3Sbms$useOverlayTriggerState)({
11572
+ defaultOpen: !isDesktop
11573
+ });
11574
+ const [isInstructionVideoDisplayed, setInstructionVideoDisplayed] = (0, $3Sbms$useState)(false);
11575
+ const [isInstructionPhotoDisplayed, setInstructionPhotoDisplayed] = (0, $3Sbms$useState)(false);
11576
+ const qrCodeModalState = (0, $3Sbms$useOverlayTriggerState)({
11577
+ defaultOpen: isDesktop
11578
+ });
11579
+ const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
11580
+ const exitStreaming = (0, $3Sbms$useCallback)(()=>{
11581
+ setCountdownVisible(false);
11582
+ }, []);
11583
+ const onPhotoCapture = async (videoElement)=>{
11584
+ const timestamp = Date.now();
11585
+ recorderState.setAssetLoading(true);
11586
+ const image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
11587
+ const { url: url , assetId: assetId } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveCapture(image);
11588
+ recorderState.setAssetLoading(false);
11589
+ recorderState.setAssets([
11590
+ ...recorderState.assets,
11591
+ {
11592
+ type: "photo",
11593
+ timestamp: timestamp,
11594
+ objectUrl: url,
11595
+ assetId: assetId
11596
+ }
11597
+ ]);
11598
+ };
11599
+ const enableMedia = async ()=>{
11600
+ getUserMediaMutation.mutate(undefined, {
11601
+ onError: ()=>{
11602
+ recorderState.permissionBlockedModalState.setOpen(true);
11603
+ },
11604
+ onSettled: ()=>undefined,
11605
+ onSuccess: async ()=>{
11606
+ instructionModalState.close();
11607
+ const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11608
+ getUserMediaMutation.reset();
11609
+ if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11610
+ if (!deviceState.camera.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
11611
+ resolution: "vga",
11612
+ frameRate: 20,
11613
+ facingMode: "environment"
11614
+ });
11615
+ }
11353
11616
  });
11617
+ };
11618
+ (0, $3Sbms$useEffect)(()=>{
11619
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", exitStreaming);
11620
+ return ()=>{
11621
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", exitStreaming);
11622
+ };
11354
11623
  }, [
11355
- QRCodeContainerWidth,
11356
- options.sharedURL
11624
+ exitStreaming
11357
11625
  ]);
11358
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11359
- centered: true,
11360
- title: t("recorder.switchToMobileTitle"),
11361
- description: t("recorder.switchToMobileDescription"),
11362
- isDismissable: false,
11363
- state: state,
11364
- primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11365
- fullWidth: true,
11366
- onPress: ()=>{
11367
- setReady(true);
11368
- state.close();
11369
- },
11370
- children: t("recorder.useDesktopVersion")
11626
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11627
+ className: (0, $3Sbms$classnames)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter", {}),
11628
+ children: [
11629
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8fe8c7100159474e$export$788cb893d96254c8), {
11630
+ state: instructionModalState,
11631
+ mode: recorderState.mode,
11632
+ primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11633
+ fullWidth: true,
11634
+ variant: "blue",
11635
+ isDisabled: !selfPeerId || getUserMediaMutation.isLoading,
11636
+ onPress: ()=>{
11637
+ if (!getUserMediaMutation.savedPermissions.audio) return enableMedia();
11638
+ instructionModalState.close();
11639
+ },
11640
+ children: !getUserMediaMutation?.savedPermissions.audio ? /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11641
+ children: [
11642
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {}),
11643
+ t("recorder.allowCamMicAccess")
11644
+ ]
11645
+ }) : t("recorder.okay")
11646
+ })
11371
11647
  }),
11372
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11373
- className: "flex flex-col gap-[20px]",
11374
- children: [
11375
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11376
- ref: QRCodeContainerRef,
11377
- className: "flex flex-1 items-center justify-center relative",
11648
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dcecc67f51a66b8d$export$f9d8408fefd786da), {
11649
+ state: qrCodeModalState,
11650
+ onClose: instructionModalState.open
11651
+ }),
11652
+ (recorderState.mode === "video" || recorderState.streaming) && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11653
+ className: "text-base text-white text-center font-medium pt-2.5",
11654
+ children: (0, $1e6ffcfc059a8789$export$cc010f6d61e5dce8)(recorderState.timer)
11655
+ }),
11656
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11657
+ className: "flex-1 min-h-0 p-2.5 ",
11658
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11659
+ className: "relative w-full h-full rounded-[10px] ",
11378
11660
  children: [
11379
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11380
- className: "absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",
11381
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {})
11661
+ countdownVisible && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $209863c2c7a7b6c0$export$53819c0e58f98d49), {
11662
+ initialValue: 3,
11663
+ onFinish: ()=>{
11664
+ setCountdownVisible(false);
11665
+ recorderState.setStartRecordTime(Date.now());
11666
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
11667
+ if (videoElementRef.current) recorderState.captureThumbnail(videoElementRef.current);
11668
+ });
11669
+ }
11382
11670
  }),
11383
- /*#__PURE__*/ (0, $3Sbms$jsx)("canvas", {
11384
- ref: QRCodeRef
11671
+ flashAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
11672
+ onAnimationEnd: ()=>{
11673
+ setFlashAnimation(false);
11674
+ recorderState.assetsPopupState.open();
11675
+ }
11676
+ }),
11677
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7dc8075008cdffc1$export$287f8fcc69caf433), {
11678
+ ref: videoElementRef
11385
11679
  })
11386
11680
  ]
11387
- }),
11388
- /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
11389
- className: "flex items-center justify-center text-xs text-primaryLight text-center",
11390
- children: t("recorder.scanQRCode")
11391
11681
  })
11392
- ]
11393
- })
11394
- });
11395
- };
11396
-
11397
-
11398
- function $d48329960b5b412c$export$fc3bf4634b488af8({ mode: mode }) {
11399
- const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11400
- const desktop = orientation === "landscape";
11401
- const [ready, setReady] = (0, $3Sbms$useState)(mode === "screen" || !desktop);
11402
- const [isInstructionsModalOpen, setIsInstructionsModalOpen] = (0, $3Sbms$useState)(ready);
11403
- const modalState = (0, $3Sbms$useOverlayTriggerState)({
11404
- isOpen: isInstructionsModalOpen && ready,
11405
- onOpenChange: setIsInstructionsModalOpen
11406
- });
11407
- (0, $3Sbms$useEffect)(()=>{
11408
- setIsInstructionsModalOpen(true);
11409
- }, [
11410
- ready,
11411
- mode
11412
- ]);
11413
- return {
11414
- mode: mode,
11415
- modalState: modalState,
11416
- ready: ready,
11417
- setReady: setReady
11418
- };
11419
- }
11420
- const $d48329960b5b412c$export$bee10e8ab511933f = ({ state: state })=>{
11421
- const [isSwitchToMobileModalOpen, setIsSwitchToMobileOpen] = (0, $3Sbms$useState)(!state.ready);
11422
- const switchToMobileModalState = (0, $3Sbms$useOverlayTriggerState)({
11423
- isOpen: isSwitchToMobileModalOpen,
11424
- onOpenChange: setIsSwitchToMobileOpen
11425
- });
11426
- return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11427
- children: [
11428
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $96999d2514f71e51$export$788cb893d96254c8), {
11429
- state: state.modalState,
11430
- type: state.mode
11431
11682
  }),
11432
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1c8fc500105e5c78$export$f9d8408fefd786da), {
11433
- state: switchToMobileModalState,
11434
- setReady: state.setReady
11683
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11684
+ className: "flex justify-center px-2.5 pb-2.5 z-10",
11685
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a180b95972399d58$export$11a6fe490bbc4873), {
11686
+ state: recorderState,
11687
+ changeMode: (mode)=>{
11688
+ recorderState.setMode(mode);
11689
+ if (mode === "photo" && !isInstructionPhotoDisplayed) {
11690
+ setInstructionPhotoDisplayed(true);
11691
+ instructionModalState.open();
11692
+ }
11693
+ if (mode === "video" && !isInstructionVideoDisplayed) {
11694
+ setInstructionVideoDisplayed(true);
11695
+ instructionModalState.open();
11696
+ }
11697
+ },
11698
+ thumbnail: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7227f0300555e42c$export$1cd1efc78cb52ca5), {
11699
+ asset: recorderState.assets[recorderState.assets.length - 1],
11700
+ onClick: recorderState.assetsPopupState.open
11701
+ }),
11702
+ onSwitch: ()=>{
11703
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
11704
+ },
11705
+ onCapturePress: ()=>{
11706
+ if (recorderState.mode === "photo" && videoElementRef.current) {
11707
+ onPhotoCapture(videoElementRef.current);
11708
+ setFlashAnimation(true);
11709
+ }
11710
+ if (recorderState.mode !== "photo" && !recorderState.streaming) {
11711
+ recorderState.setStreaming(true);
11712
+ setCountdownVisible(true);
11713
+ }
11714
+ if (recorderState.mode !== "photo" && recorderState.streaming) {
11715
+ exitStreaming();
11716
+ if (recorderState.startRecordTime) {
11717
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
11718
+ recorderState.setAssetLoading(true);
11719
+ recorderState.assetsPopupState.open();
11720
+ }
11721
+ }
11722
+ }
11723
+ })
11435
11724
  })
11436
11725
  ]
11437
11726
  });
@@ -11441,128 +11730,232 @@ const $d48329960b5b412c$export$bee10e8ab511933f = ({ state: state })=>{
11441
11730
 
11442
11731
 
11443
11732
 
11444
- const $39932392769664d0$export$4e594bceac139abd = (props)=>{
11733
+
11734
+
11735
+
11736
+
11737
+
11738
+
11739
+
11740
+
11741
+
11742
+ const $ad3ba5899eb05ecf$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11743
+ className: "text-white font-medium",
11744
+ children: children
11745
+ });
11746
+ const $ad3ba5899eb05ecf$export$f361d4ae234b90f4 = ()=>{
11445
11747
  const { t: t } = (0, $3Sbms$useTranslation)();
11446
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11447
- className: (0, $3Sbms$classnames)("flex rounded-full h-[40px] p-[10px] border-2 border-white text-white justify-center items-center align-middle", "font-semibold", "cursor-pointer", {
11448
- "bg-[#f12828]": !props.state.streaming
11748
+ const instructions = [
11749
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11750
+ i18nKey: "recorder.instructions.tapVideoButton",
11751
+ children: [
11752
+ "Tap the ",
11753
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {
11754
+ sideColor: "#FFFFFF",
11755
+ mainColor: "#E5484D"
11756
+ }),
11757
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11758
+ children: " Record button"
11759
+ }),
11760
+ " to start a recording."
11761
+ ]
11449
11762
  }),
11450
- onClick: ()=>props.onCapturePress(),
11451
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11452
- children: props.state.streaming ? t("recorder.stopScreenShareButton") : t("recorder.startScreenShareButton")
11763
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Trans), {
11764
+ i18nKey: "recorder.instructions.screenShareInstruction"
11765
+ }),
11766
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11767
+ i18nKey: "recorder.instructions.videoSpeech",
11768
+ children: [
11769
+ "You can ",
11770
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11771
+ children: "speak during"
11772
+ }),
11773
+ " the recording for added detail."
11774
+ ]
11775
+ }),
11776
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11777
+ i18nKey: "recorder.instructions.tapStopVideoButton",
11778
+ children: [
11779
+ "When you're finished, tap the ",
11780
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {
11781
+ sideColor: "#FFFFFF",
11782
+ mainColor: "#E5484D"
11783
+ }),
11784
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11785
+ children: " Stop button"
11786
+ }),
11787
+ "."
11788
+ ]
11789
+ }),
11790
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11791
+ i18nKey: "recorder.instructions.reviewAndSendVideos",
11792
+ children: [
11793
+ "You can review your video and then ",
11794
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11795
+ children: "send it when you're done"
11796
+ }),
11797
+ "."
11798
+ ]
11453
11799
  })
11454
- });
11455
- };
11456
- const $39932392769664d0$export$f9da3144ae2525a3 = (props)=>{
11457
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11458
- className: (0, $3Sbms$classnames)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),
11459
- onClick: ()=>props.onCapturePress(),
11460
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11461
- className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
11462
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11463
- className: (0, $3Sbms$classnames)("w-full h-full transition-[transform,border-radius] duration-300", props.state.mode === "photo" ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
11800
+ ];
11801
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11802
+ className: "flex flex-row gap-[20px] w-full justify-between px-[60px]",
11803
+ children: [
11804
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11805
+ className: "flex flex-col gap-[10px] w-[50%] items-start justify-center",
11806
+ children: [
11807
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11808
+ className: " text-white font-semibold text-lg pb-[20px]",
11809
+ children: t("recorder.screenTitle")
11810
+ }),
11811
+ instructions.map((value, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11812
+ className: "flex flex-row items-center justify-center gap-[20px]",
11813
+ children: [
11814
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11815
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-[#171717] text-white",
11816
+ children: index + 1
11817
+ }),
11818
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11819
+ className: "w-full text-base text-white font-normal leading-[20px]",
11820
+ children: value
11821
+ })
11822
+ ]
11823
+ }, index))
11824
+ ]
11825
+ }),
11826
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11827
+ className: "flex items-center justify-center overflow-hidden w-[50%] box-border",
11828
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11829
+ src: `${"https://stream-assets.snapcall.io"}/animations/desktop-assist-onboarding-screen.mp4`,
11830
+ playsInline: true,
11831
+ autoPlay: true,
11832
+ muted: true,
11833
+ loop: true,
11834
+ className: "object-fit border-[white] border-[2px] rounded-[8px]"
11835
+ })
11464
11836
  })
11465
- })
11837
+ ]
11466
11838
  });
11467
11839
  };
11468
11840
 
11469
11841
 
11470
- function $a94f21ef9007b90a$export$bd7b6af6aa16550c({ state: state = "photo" }) {
11471
- const [currentMode, setMode] = (0, $3Sbms$useState)(state);
11472
- const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
11473
- return {
11474
- mode: currentMode,
11475
- setMode: (mode)=>{
11476
- setMode(mode);
11477
- },
11478
- streaming: streaming,
11479
- setStreaming: setStreaming
11480
- };
11481
- }
11482
- const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11842
+ const $a3830e399ecc7fc4$export$2d78fbe400238869 = ({ recorderState: recorderState })=>{
11843
+ const videoElementRef = (0, $3Sbms$useRef)(null);
11483
11844
  const { t: t } = (0, $3Sbms$useTranslation)();
11484
- const setupModalsState = (0, $d48329960b5b412c$export$fc3bf4634b488af8)({
11485
- mode: props.state.mode
11845
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11846
+ audio: true
11486
11847
  });
11848
+ const [state, setState] = (0, $3Sbms$useState)("base");
11849
+ (0, $3Sbms$useEffect)(()=>{
11850
+ if (recorderState.mode !== "video") recorderState.setMode("video");
11851
+ }, [
11852
+ recorderState
11853
+ ]);
11854
+ const screenshareDisabled = (0, $3Sbms$useCallback)(()=>{
11855
+ recorderState.assetsPopupState.setOpen(true);
11856
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
11857
+ setState("base");
11858
+ }, [
11859
+ recorderState
11860
+ ]);
11861
+ (0, $3Sbms$useEffect)(()=>{
11862
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareDisabled", screenshareDisabled);
11863
+ return ()=>{
11864
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareDisabled", screenshareDisabled);
11865
+ };
11866
+ }, [
11867
+ screenshareDisabled
11868
+ ]);
11869
+ (0, $3Sbms$useEffect)(()=>{
11870
+ const onStopRecord = ()=>{
11871
+ recorderState.assetsPopupState.setOpen(true);
11872
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11873
+ setState("base");
11874
+ };
11875
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
11876
+ return ()=>{
11877
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
11878
+ };
11879
+ }, [
11880
+ recorderState.assetsPopupState
11881
+ ]);
11487
11882
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11488
- className: "flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",
11883
+ className: "w-full h-full bg-black flex flex-col items-center justify-center py-[125px]",
11489
11884
  children: [
11490
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d48329960b5b412c$export$bee10e8ab511933f), {
11491
- state: setupModalsState
11492
- }),
11493
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11494
- className: "flex flex-1 flex-row px-[10px] w-full",
11885
+ state !== "live" && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11886
+ className: "relative bg-cover box-border rounded-[8px] w-full h-full max-w-[1116px] bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] flex flex-col items-center justify-center ",
11495
11887
  children: [
11888
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ad3ba5899eb05ecf$export$f361d4ae234b90f4), {}),
11496
11889
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11497
- className: "flex flex-row flex-auto items-center gap-[10px]",
11890
+ className: "absolute w-[486px] bottom-[-85px] left-[calc(50%-243px)] flex flex-col gap-[7px] items-center justify-center",
11498
11891
  children: [
11499
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a1ac29d50bdaa837$export$3741e4ac43f04ca2), {}),
11500
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11501
- className: " text-white text-base font-medium",
11502
- children: "SnapCall"
11503
- })
11504
- ]
11505
- }),
11506
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11507
- className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
11508
- children: [
11509
- props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11510
- children: [
11511
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11512
- onPress: ()=>{
11513
- if (!props.state.streaming) {
11514
- props.state.setMode("photo");
11515
- setupModalsState.modalState.open();
11516
- }
11892
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$4e594bceac139abd), {
11893
+ state: state,
11894
+ onCapturePress: ()=>{
11895
+ setState("request");
11896
+ recorderState.setStreaming(true);
11897
+ getUserMediaMutation.mutate(undefined, {
11898
+ onError: ()=>{
11899
+ recorderState.permissionBlockedModalState.setOpen(true);
11517
11900
  },
11518
- isSelected: props.state.mode === "photo",
11519
- children: t("misc.photo")
11520
- }),
11521
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11522
- onPress: ()=>{
11523
- if (!props.state.streaming) {
11524
- props.state.setMode("video");
11525
- setupModalsState.modalState.open();
11901
+ onSuccess: async ()=>{
11902
+ try {
11903
+ const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11904
+ getUserMediaMutation.reset();
11905
+ if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11906
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare({
11907
+ audioTransportOption: "mix"
11908
+ });
11909
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
11910
+ setTimeout(()=>{
11911
+ if (videoElementRef.current) recorderState.captureThumbnail(videoElementRef.current);
11912
+ }, 1000);
11913
+ });
11914
+ setState("live");
11915
+ recorderState.setStartRecordTime(Date.now());
11916
+ } catch (err) {
11917
+ console.log(err);
11918
+ recorderState.permissionBlockedModalState.setOpen(true);
11526
11919
  }
11527
- },
11528
- isSelected: props.state.mode === "video",
11529
- children: t("misc.video")
11530
- })
11531
- ]
11920
+ }
11921
+ });
11922
+ }
11532
11923
  }),
11533
- props.state.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11534
- onPress: ()=>{
11535
- if (!props.state.streaming) {
11536
- props.state.setMode("screen");
11537
- setupModalsState.modalState.open();
11538
- }
11539
- },
11540
- isSelected: props.state.mode === "screen",
11541
- children: t("misc.screen")
11924
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11925
+ className: "text-white text-center font-small text-sm overflow-visible",
11926
+ children: t("recorder.limit")
11542
11927
  })
11543
11928
  ]
11544
11929
  })
11545
11930
  ]
11546
11931
  }),
11547
11932
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11548
- className: "flex flex-row flex-1 items-center justify-between w-full ",
11933
+ className: (0, $3Sbms$classnames)("relative", {
11934
+ "w-0 h-0": state !== "live",
11935
+ "min-w-[200px] max-h-[100%]": state === "live"
11936
+ }),
11549
11937
  children: [
11550
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11551
- className: "w-[60px] h-[60px]",
11552
- children: props.thumbnail
11553
- }),
11554
- props.state.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $39932392769664d0$export$4e594bceac139abd), {
11555
- ...props
11938
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7dc8075008cdffc1$export$8c410456846722ea), {
11939
+ ref: videoElementRef
11556
11940
  }),
11557
- props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $39932392769664d0$export$f9da3144ae2525a3), {
11558
- ...props
11559
- }),
11560
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11561
- onClick: props.onSwitch,
11562
- className: (0, $3Sbms$classnames)("rounded-full w-[56px] h-[56px] flex items-center justify-center", {
11563
- "bg-[#565656] cursor-pointer": props.state.mode !== "screen"
11564
- }),
11565
- children: props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $58d405d56c1abe95$export$aefffb14595958fe), {})
11941
+ state === "live" && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11942
+ className: "absolute w-[86px] h-[86px] bottom-[-65px] left-[calc(50%-43px)]",
11943
+ children: [
11944
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$4e594bceac139abd), {
11945
+ onCapturePress: ()=>{
11946
+ recorderState.setAssetLoading(true);
11947
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11948
+ },
11949
+ state: state
11950
+ }),
11951
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
11952
+ className: "text-white font-small text-sm text-center pt-[14px]",
11953
+ children: [
11954
+ (0, $1e6ffcfc059a8789$export$cc010f6d61e5dce8)(recorderState.timer),
11955
+ " / 05:00"
11956
+ ]
11957
+ })
11958
+ ]
11566
11959
  })
11567
11960
  ]
11568
11961
  })
@@ -11576,6 +11969,34 @@ const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11576
11969
 
11577
11970
 
11578
11971
 
11972
+ const $99a415196205cb06$export$c31ece446899894 = ({ state: state })=>{
11973
+ const { t: t } = (0, $3Sbms$useTranslation)();
11974
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11975
+ title: t("recorder.permissionDeniedTitle"),
11976
+ state: state,
11977
+ centered: false,
11978
+ isDismissable: false,
11979
+ primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11980
+ variant: "blue",
11981
+ fullWidth: true,
11982
+ onPress: ()=>window.location.reload(),
11983
+ children: t("recorder.allowAccess")
11984
+ }),
11985
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11986
+ className: "flex flex-col gap-[20px]",
11987
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11988
+ className: "flex flex-col gap-[10px]",
11989
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11990
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11991
+ children: t("recorder.permissionDeniedDescription")
11992
+ })
11993
+ })
11994
+ })
11995
+ });
11996
+ };
11997
+
11998
+
11999
+
11579
12000
 
11580
12001
 
11581
12002
 
@@ -11583,7 +12004,12 @@ const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11583
12004
 
11584
12005
 
11585
12006
 
11586
- function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
12007
+
12008
+
12009
+
12010
+
12011
+
12012
+ function $7f25a3e9cee224b0$export$4589ed81930b555c(props) {
11587
12013
  const { children: children , state: state } = props;
11588
12014
  const ref = (0, $3Sbms$react).useRef(null);
11589
12015
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
@@ -11591,7 +12017,7 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11591
12017
  const [exited, setExited] = (0, $3Sbms$useState)(!state.isOpen);
11592
12018
  const viewport = (0, $3Sbms$useViewportSize)();
11593
12019
  const maxHeight = viewport.height - 64;
11594
- const desktop = orientation === "landscape";
12020
+ const [desktop] = (0, $3Sbms$useState)(orientation === "landscape");
11595
12021
  // Don't render anything if the modal is not open and we're not animating out.
11596
12022
  if (!(state.isOpen || !exited)) return null;
11597
12023
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Overlay1), {
@@ -11610,7 +12036,7 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11610
12036
  exit: "opacity-0 transition ease-out"
11611
12037
  },
11612
12038
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11613
- className: (0, $3Sbms$classnames)("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end"),
12039
+ className: (0, $3Sbms$classnames)("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end h-full"),
11614
12040
  ...underlayProps,
11615
12041
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11616
12042
  in: state.isOpen,
@@ -11652,49 +12078,6 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11652
12078
 
11653
12079
 
11654
12080
 
11655
- const $4425c0dfad3f82bb$export$480db61f4dcd7727 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11656
- width: "12",
11657
- height: "15",
11658
- viewBox: "0 0 12 15",
11659
- fill: "none",
11660
- xmlns: "http://www.w3.org/2000/svg",
11661
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
11662
- d: "M11.103 5.747 2.677.272A1.614 1.614 0 0 0 1.773 0a1.62 1.62 0 0 0-.9.288 1.886 1.886 0 0 0-.64.733A2.235 2.235 0 0 0 0 2.025v10.95c0 .352.08.699.233 1.004.154.305.375.558.64.733.273.186.584.285.9.288.317.003.63-.091.904-.272l8.426-5.475c.272-.173.498-.427.656-.736.158-.308.241-.66.241-1.017a2.24 2.24 0 0 0-.24-1.017 1.884 1.884 0 0 0-.657-.736Z",
11663
- fill: "#fff"
11664
- })
11665
- });
11666
-
11667
-
11668
- const $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11669
- if (!asset) return null;
11670
- return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11671
- className: "flex items-center justify-center w-[60px] h-[60px] rounded-[8px] cursor-pointer bg-white relative overflow-hidden",
11672
- onClick: onClick,
11673
- children: [
11674
- asset?.type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11675
- className: "cursor-pointer bg-white",
11676
- src: asset.objectUrl,
11677
- alt: "last shot"
11678
- }),
11679
- asset?.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11680
- children: [
11681
- /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11682
- src: asset.objectUrl,
11683
- className: "min-w-[100%] min-h-[100%] object-cover"
11684
- }),
11685
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11686
- className: "absolute left-0 top-0 flex items-center justify-center w-[60px] h-[60px] bg-primary opacity-50",
11687
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4425c0dfad3f82bb$export$480db61f4dcd7727), {})
11688
- })
11689
- ]
11690
- })
11691
- ]
11692
- });
11693
- };
11694
-
11695
-
11696
-
11697
-
11698
12081
  const $a879d6bc7f43b0c5$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11699
12082
  width: "18",
11700
12083
  height: "19",
@@ -11711,40 +12094,30 @@ const $a879d6bc7f43b0c5$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $3Sbms$j
11711
12094
 
11712
12095
 
11713
12096
 
11714
- const $a4b1c68ef470f35c$export$f56b3b5841ad32ae = ({ asset: asset , state: state })=>{
11715
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91e337bf8187124b$export$a703eb468fcf7e69), {
12097
+ const $c22caa553a50352e$export$f56b3b5841ad32ae = ({ asset: asset , state: state })=>{
12098
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $08835f3b5a72d418$export$a703eb468fcf7e69), {
11716
12099
  state: state,
11717
12100
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11718
- className: "flex flex-col items-center w-screen h-screen p-[15px] gap-[10px]",
12101
+ className: "flex flex-col items-center justify-center w-screen h-screen p-[15px] gap-[10px]",
11719
12102
  children: [
11720
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11721
- className: "flex items-center max-w-[400px] w-full h-full",
11722
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11723
- className: "min-w-full rounded-[10px] overflow-hidden",
11724
- children: [
11725
- asset.type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11726
- src: asset.objectUrl,
11727
- alt: `Asset-${asset.assetId}`,
11728
- className: "object-fill"
11729
- }),
11730
- asset.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11731
- src: asset.objectUrl,
11732
- playsInline: true,
11733
- autoPlay: true,
11734
- controls: true
11735
- })
11736
- ]
11737
- })
12103
+ asset.type === "photo" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
12104
+ src: asset.objectUrl,
12105
+ alt: `Asset-${asset.assetId}`,
12106
+ className: "flex-1 object-cover rounded-[10px] max-h-[90%] max-w-[90%] mb-[9px]"
12107
+ }),
12108
+ asset.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12109
+ src: asset.objectUrl,
12110
+ playsInline: true,
12111
+ autoPlay: true,
12112
+ controls: true,
12113
+ className: "flex-1 rounded-[10px] min-w-full max-h-[90%] max-w-[90%] pb-[9px]"
11738
12114
  }),
11739
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11740
- className: "max-w-[135px] w-1/3",
11741
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11742
- onPress: state.close,
11743
- variant: "tertiary",
11744
- size: "large",
11745
- fullWidth: true,
11746
- children: "Close"
11747
- })
12115
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12116
+ onPress: state.close,
12117
+ variant: "tertiary",
12118
+ size: "large",
12119
+ className: "w-[135px]",
12120
+ children: "Close"
11748
12121
  })
11749
12122
  ]
11750
12123
  })
@@ -11752,20 +12125,23 @@ const $a4b1c68ef470f35c$export$f56b3b5841ad32ae = ({ asset: asset , state: state
11752
12125
  };
11753
12126
 
11754
12127
 
11755
- const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
12128
+
12129
+ const $fb723e1b00f53002$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
11756
12130
  const { t: t } = (0, $3Sbms$useTranslation)();
11757
12131
  const confirmRemovalModalState = (0, $3Sbms$useOverlayTriggerState)({});
11758
12132
  const previewAssetModalProps = (0, $3Sbms$useOverlayTriggerState)({});
11759
12133
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11760
- className: "flex flex-row justify-between items-center",
12134
+ className: "flex flex-row justify-between items-center ",
11761
12135
  children: [
11762
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
12136
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11763
12137
  title: t("recorder.confirmRemovalTitle"),
11764
12138
  state: confirmRemovalModalState,
11765
12139
  description: t("recorder.confirmRemovalDescription"),
11766
- primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
12140
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12141
+ fullWidth: true,
12142
+ variant: "blue",
11767
12143
  onPress: async ()=>{
11768
- await removeAsset(asset);
12144
+ await removeAsset?.(asset);
11769
12145
  close();
11770
12146
  },
11771
12147
  children: [
@@ -11773,16 +12149,20 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11773
12149
  t("misc.confirm")
11774
12150
  ]
11775
12151
  }),
11776
- secondaryAction: t("misc.cancel")
12152
+ secondaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12153
+ fullWidth: true,
12154
+ variant: "tertiary",
12155
+ children: t("misc.cancel")
12156
+ })
11777
12157
  }),
11778
12158
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11779
- className: "flex flex-row gap-[10px] items-center",
12159
+ className: "flex flex-row gap-[10px] items-center justify-between",
11780
12160
  children: [
11781
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a4b1c68ef470f35c$export$f56b3b5841ad32ae), {
12161
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c22caa553a50352e$export$f56b3b5841ad32ae), {
11782
12162
  state: previewAssetModalProps,
11783
12163
  asset: asset
11784
12164
  }),
11785
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12165
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7227f0300555e42c$export$1cd1efc78cb52ca5), {
11786
12166
  asset: asset,
11787
12167
  onClick: previewAssetModalProps.open
11788
12168
  }),
@@ -11792,17 +12172,17 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11792
12172
  hyphens: "manual"
11793
12173
  },
11794
12174
  children: [
11795
- asset.type === "picture" ? t("misc.photo") : t("misc.video"),
12175
+ asset.type === "photo" ? t("misc.photo") : t("misc.video"),
11796
12176
  " ",
11797
12177
  index + 1,
11798
12178
  " \xb7",
11799
12179
  " ",
11800
- (0, $92672d57809ea9d3$export$3ae94a2503e890a1)(new Date(asset.timestamp))
12180
+ (0, $1e6ffcfc059a8789$export$3ae94a2503e890a1)(new Date(asset.timestamp))
11801
12181
  ]
11802
12182
  })
11803
12183
  ]
11804
12184
  }),
11805
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12185
+ removeAsset && /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11806
12186
  className: "text-xs font-bold underline cursor-pointer ml-[10px]",
11807
12187
  onClick: confirmRemovalModalState.open,
11808
12188
  children: t("misc.remove")
@@ -11814,7 +12194,7 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11814
12194
 
11815
12195
 
11816
12196
 
11817
- const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12197
+ const $6749624e70bad8a6$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11818
12198
  className: "w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",
11819
12199
  children: [
11820
12200
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
@@ -11822,7 +12202,7 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11822
12202
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$reactcontentloader), {
11823
12203
  width: 360,
11824
12204
  height: 93,
11825
- foregroundColor: "#EBEBEB",
12205
+ foregroundColor: "#C7DEFF",
11826
12206
  children: [
11827
12207
  /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11828
12208
  x: 0,
@@ -11852,11 +12232,11 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11852
12232
  })
11853
12233
  }),
11854
12234
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11855
- className: "flex items-center justify-center w-full h-[40px] rounded-[8px] border border-primaryLight mt-[10px]",
12235
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#F7F7F7] mt-[10px]",
11856
12236
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11857
12237
  width: 120,
11858
12238
  height: 14,
11859
- foregroundColor: "#EBEBEB",
12239
+ foregroundColor: "#C7DEFF",
11860
12240
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11861
12241
  x: 0,
11862
12242
  y: 0,
@@ -11868,11 +12248,11 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11868
12248
  })
11869
12249
  }),
11870
12250
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11871
- className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-primary mt-[10px]",
12251
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#C7DEFF] mt-[10px]",
11872
12252
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11873
12253
  width: 120,
11874
12254
  height: 14,
11875
- foregroundColor: "#EBEBEB",
12255
+ foregroundColor: "#C7DEFF",
11876
12256
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11877
12257
  x: 0,
11878
12258
  y: 0,
@@ -11887,35 +12267,28 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11887
12267
  });
11888
12268
 
11889
12269
 
11890
- const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading })=>{
12270
+ const $ec9697affdd50464$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading , recorderState: recorderState })=>{
11891
12271
  const { t: t } = (0, $3Sbms$useTranslation)();
11892
- const ref = (0, $3Sbms$useRef)(null);
11893
- const [assetKind, setAssetKind] = (0, $3Sbms$useState)(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11894
12272
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11895
- const desktop = orientation === "landscape";
11896
- (0, $3Sbms$useEffect)(()=>{
11897
- if (assets.length < 1) return;
11898
- setAssetKind(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11899
- }, [
11900
- assets
11901
- ]);
11902
- return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11903
- children: [
11904
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11905
- in: state.isOpen,
11906
- appear: true,
11907
- timeout: {
11908
- enter: 0,
11909
- exit: 300
11910
- },
11911
- classNames: {
11912
- enter: "opacity-0",
11913
- enterDone: "opacity-90 transition ease-in",
11914
- exit: "opacity-0 transition ease-out"
11915
- },
11916
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11917
- className: (0, $3Sbms$classnames)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
11918
- children: loading && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12273
+ const [desktop] = (0, $3Sbms$useState)(orientation === "landscape");
12274
+ const mode = recorderState.mode;
12275
+ const assetTitle = mode === "photo" ? t("misc.photo") : t("misc.video");
12276
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12277
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
12278
+ in: state.isOpen,
12279
+ timeout: {
12280
+ enter: 0,
12281
+ exit: 300
12282
+ },
12283
+ classNames: {
12284
+ enter: "opacity-0",
12285
+ enterDone: "opacity-90 transition ease-in",
12286
+ exit: "opacity-0 transition ease-out"
12287
+ },
12288
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12289
+ className: (0, $3Sbms$classnames)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
12290
+ children: [
12291
+ loading && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11919
12292
  className: (0, $3Sbms$classnames)("flex mt-[50px] h-fit opacity-1", desktop ? "flex-row items-center w-[450px]" : "flex-col items-center text-center w-[320px]"),
11920
12293
  children: [
11921
12294
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
@@ -11926,74 +12299,75 @@ const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: sta
11926
12299
  className: "text-sm text-white",
11927
12300
  children: [
11928
12301
  t("recorder.elementBeingProcessed", {
11929
- type: loading === "picture" ? t("misc.photo").toLocaleLowerCase() : t("misc.video").toLocaleLowerCase()
12302
+ type: assetTitle.toLocaleLowerCase()
11930
12303
  }),
11931
- loading === "video" && t("recorder.waitVideo")
12304
+ " ",
12305
+ mode === "video" && t("recorder.waitVideo")
11932
12306
  ]
11933
12307
  })
11934
12308
  ]
11935
- })
11936
- })
11937
- }),
11938
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $38cdd553fb158eaa$export$4589ed81930b555c), {
11939
- state: {
11940
- ...state,
11941
- close: loading ? ()=>{} : state.close
11942
- },
11943
- children: loading ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7436fc0a14c16764$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11944
- ref: ref,
11945
- className: "flex flex-col w-screen max-w-[400px] text-primary",
11946
- children: [
11947
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11948
- className: "flex flex-row justify-between p-[12px]",
11949
- children: [
11950
- /*#__PURE__*/ (0, $3Sbms$jsx)("h1", {
11951
- className: "text-lg first-letter:capitalize",
11952
- children: t("recorder.elementCaptureSuccess", {
11953
- type: t(`misc.${assetKind}`)
11954
- })
11955
- }),
11956
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11957
- className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
11958
- onClick: state.close,
11959
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
11960
- color: "#565656"
11961
- })
11962
- })
11963
- ]
11964
- }),
11965
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11966
- className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
12309
+ }),
12310
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7f25a3e9cee224b0$export$4589ed81930b555c), {
12311
+ state: {
12312
+ ...state,
12313
+ close: loading ? ()=>{} : state.close
12314
+ },
12315
+ children: loading ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6749624e70bad8a6$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12316
+ className: "flex flex-col max-w-[400px] text-primary",
11967
12317
  children: [
11968
- assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $77fb06ba253d6f7c$export$c9169049516d8bcf), {
11969
- asset: asset,
11970
- index: index,
11971
- removeAsset: removeAsset
11972
- }, asset.assetId)),
11973
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11974
- variant: "secondary",
11975
- onPress: state.close,
11976
- children: t("recorder.takeNewElement", {
11977
- type: t(`misc.${assetKind}`).toLocaleLowerCase()
11978
- })
12318
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12319
+ className: "flex flex-row justify-between p-[12px]",
12320
+ children: [
12321
+ /*#__PURE__*/ (0, $3Sbms$jsx)("h1", {
12322
+ className: "text-lg first-letter:capitalize",
12323
+ children: t("recorder.elementCaptureSuccess", {
12324
+ type: assetTitle
12325
+ })
12326
+ }),
12327
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12328
+ className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
12329
+ onClick: state.close,
12330
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
12331
+ color: "#565656"
12332
+ })
12333
+ })
12334
+ ]
11979
12335
  }),
11980
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11981
- onPress: ()=>{
11982
- onSendAssets();
11983
- state.close();
11984
- },
11985
- children: assets.length > 1 ? t("recorder.sendElements", {
11986
- count: assets.length
11987
- }) : t("recorder.sendElement", {
11988
- type: t(`misc.${assetKind}`).toLocaleLowerCase()
11989
- })
12336
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12337
+ className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
12338
+ children: [
12339
+ assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fb723e1b00f53002$export$c9169049516d8bcf), {
12340
+ asset: asset,
12341
+ index: index,
12342
+ removeAsset: removeAsset
12343
+ }, asset.assetId)),
12344
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12345
+ variant: "tertiary",
12346
+ onPress: state.close,
12347
+ children: t("recorder.takeNewElement", {
12348
+ type: assetTitle.toLocaleLowerCase()
12349
+ })
12350
+ }),
12351
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12352
+ variant: "blue",
12353
+ onPress: ()=>{
12354
+ onSendAssets();
12355
+ state.close();
12356
+ },
12357
+ children: assets.length > 1 ? t("recorder.sendElements", {
12358
+ count: assets.length
12359
+ }) : t("recorder.sendElement", {
12360
+ type: assetTitle.toLocaleLowerCase()
12361
+ })
12362
+ })
12363
+ ]
11990
12364
  })
11991
12365
  ]
11992
12366
  })
11993
- ]
11994
- })
12367
+ })
12368
+ ]
11995
12369
  })
11996
- ]
12370
+ })
11997
12371
  });
11998
12372
  };
11999
12373
 
@@ -12002,118 +12376,35 @@ const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: sta
12002
12376
 
12003
12377
 
12004
12378
 
12005
-
12006
- const $db82628e5503d51b$export$53819c0e58f98d49 = (props)=>{
12007
- const [countdown, setCountdown] = (0, $3Sbms$useState)(props.initialValue);
12008
- (0, $3Sbms$useEffect)(()=>{
12009
- if (countdown === undefined) return;
12010
- const t = setTimeout(()=>{
12011
- if (countdown === 1) props.onFinish();
12012
- setCountdown(countdown - 1);
12013
- }, 1000);
12014
- return ()=>clearTimeout(t);
12015
- }, [
12016
- countdown,
12017
- props
12018
- ]);
12019
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12020
- className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
12021
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12022
- className: "text-white/80 text-[112px] font-medium",
12023
- children: countdown
12024
- })
12379
+ const $a8756e233448261f$export$3646917cb6200e2e = ({ state: state , assets: assets })=>{
12380
+ const { t: t } = (0, $3Sbms$useTranslation)();
12381
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
12382
+ title: t("recorder.submissionTitle"),
12383
+ state: state,
12384
+ isDismissable: false,
12385
+ children: [
12386
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12387
+ className: "text-base text-primaryLight",
12388
+ children: t("recorder.submissionDescription")
12389
+ }),
12390
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12391
+ className: "flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",
12392
+ children: assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fb723e1b00f53002$export$c9169049516d8bcf), {
12393
+ asset: asset,
12394
+ index: index,
12395
+ removeAsset: undefined
12396
+ }, asset.assetId))
12397
+ })
12398
+ ]
12025
12399
  });
12026
12400
  };
12027
12401
 
12028
12402
 
12029
-
12030
- const $92672d57809ea9d3$var$timerText = (delta)=>{
12031
- const d = [
12032
- Math.floor(delta / 60),
12033
- Math.round(delta % 60)
12034
- ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
12035
- return d.join(":");
12036
- };
12037
- const $92672d57809ea9d3$var$dateFormat = new Intl.DateTimeFormat("default", {
12038
- dateStyle: "short"
12039
- });
12040
- const $92672d57809ea9d3$var$timeFormat = new Intl.DateTimeFormat("default", {
12041
- hour: "numeric",
12042
- minute: "2-digit"
12043
- });
12044
- function $92672d57809ea9d3$export$3ae94a2503e890a1(date) {
12045
- return `${$92672d57809ea9d3$var$dateFormat.format(date)} at ${$92672d57809ea9d3$var$timeFormat.format(date)}`;
12046
- }
12047
- const $92672d57809ea9d3$export$336a011955157f9a = ()=>{
12048
- const { t: t } = (0, $3Sbms$useTranslation)();
12403
+ const $b76354b532370976$export$336a011955157f9a = ()=>{
12049
12404
  const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
12050
- const [startRecordTime, setStartRecordTime] = (0, $3Sbms$useState)(undefined);
12051
- const [timer, setTimer] = (0, $3Sbms$useState)(0);
12052
- const [countdownVisible, setCountdownVisible] = (0, $3Sbms$useState)(false);
12053
- const videoElementRef = (0, $3Sbms$useRef)(null);
12054
- const [assets, setAssets] = (0, $3Sbms$useState)([]);
12055
- const [assetLoading, setAssetLoading] = (0, $3Sbms$useState)(null);
12056
- const [isAssetsPopupStateOpen, setIsAssetsPopupStateOpen] = (0, $3Sbms$useState)(false);
12057
- const [facingMode, setFacingMode] = (0, $3Sbms$useState)("user");
12058
- const assetsPopupState = (0, $3Sbms$useOverlayTriggerState)({
12059
- isOpen: isAssetsPopupStateOpen,
12060
- onOpenChange: setIsAssetsPopupStateOpen
12061
- });
12062
- const sendAssetsModalState = (0, $3Sbms$useOverlayTriggerState)({});
12063
- const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
12064
- const menuBarState = (0, $a94f21ef9007b90a$export$bd7b6af6aa16550c)({
12065
- state: options?.recorder?.defaultState || "photo"
12066
- });
12067
- const exitStreaming = (0, $3Sbms$useCallback)(()=>{
12068
- menuBarState.setStreaming(false);
12069
- setStartRecordTime(undefined);
12070
- setCountdownVisible(false);
12071
- setTimer(0);
12072
- }, [
12073
- menuBarState
12074
- ]);
12075
- const onLocalVideoChange = (event)=>{
12076
- if (!event.detail?.camera?.device || !videoElementRef.current) return;
12077
- const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(videoElementRef?.current);
12078
- setFacingMode(newFacingMode);
12079
- };
12080
- const onScreenshareEnabled = (event)=>{
12081
- if (!videoElementRef.current) return;
12082
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalScreenshare(videoElementRef.current);
12083
- };
12084
- const onStopRecord = (0, $3Sbms$useCallback)((event)=>{
12085
- const { url: url , assetId: assetId } = event.detail;
12086
- exitStreaming();
12087
- setAssetLoading(null);
12088
- setAssets([
12089
- ...assets,
12090
- {
12091
- type: "video",
12092
- timestamp: Date.now(),
12093
- objectUrl: url,
12094
- assetId: assetId
12095
- }
12096
- ]);
12097
- }, [
12098
- assets,
12099
- exitStreaming
12100
- ]);
12101
- const onPhotoCapture = async (videoElement)=>{
12102
- const timestamp = Date.now();
12103
- setAssetLoading("picture");
12104
- const image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
12105
- const { url: url , assetId: assetId } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveCapture(image);
12106
- setAssetLoading(null);
12107
- setAssets([
12108
- ...assets,
12109
- {
12110
- type: "picture",
12111
- timestamp: timestamp,
12112
- objectUrl: url,
12113
- assetId: assetId
12114
- }
12115
- ]);
12116
- };
12405
+ const submitAssetsModalState = (0, $3Sbms$useOverlayTriggerState)({});
12406
+ const permissionBlockedModalState = (0, $3Sbms$useOverlayTriggerState)({});
12407
+ const [thumbnailURL, setLastThumbnailURL] = (0, $3Sbms$useState)(undefined);
12117
12408
  const captureThumbnail = async (videoElement)=>{
12118
12409
  let image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined, {
12119
12410
  addPlayWatermark: true
@@ -12121,173 +12412,83 @@ const $92672d57809ea9d3$export$336a011955157f9a = ()=>{
12121
12412
  if (!image) image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement, {
12122
12413
  addPlayWatermark: true
12123
12414
  });
12124
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveThumbnail(image);
12415
+ const { url: url } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveThumbnail(image);
12416
+ setLastThumbnailURL(url);
12125
12417
  };
12418
+ const recorderState = (0, $448b01a7ea61a08a$export$c74cd098b7a410cb)({
12419
+ mode: options?.recorder?.defaultMode || "photo",
12420
+ requestedMedia: options?.recorder?.defaultMedia || "camera",
12421
+ permissionBlockedModalState: permissionBlockedModalState,
12422
+ captureThumbnail: captureThumbnail
12423
+ });
12126
12424
  const removeAsset = (0, $3Sbms$useCallback)(async (asset)=>{
12127
12425
  if (!asset.assetId) return;
12128
12426
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).deleteCapture(asset.assetId);
12129
- const newAssets = assets.filter((item)=>item.assetId !== asset.assetId);
12130
- setAssets(newAssets);
12131
- if (newAssets.length < 1) setIsAssetsPopupStateOpen(false);
12427
+ const newAssets = recorderState.assets.filter((item)=>item.assetId !== asset.assetId);
12428
+ recorderState.setAssets(newAssets);
12429
+ if (newAssets.length < 1) recorderState.assetsPopupState.close();
12132
12430
  }, [
12133
- assets
12431
+ recorderState
12134
12432
  ]);
12135
- (0, $3Sbms$useEffect)(()=>{
12136
- if (startRecordTime === undefined) return;
12137
- const interval = setInterval(()=>{
12138
- const delta = (Date.now() - startRecordTime) / 1000;
12139
- setTimer(delta);
12140
- }, 1000);
12141
- return ()=>clearInterval(interval);
12433
+ const exitStreaming = (0, $3Sbms$useCallback)(()=>{
12434
+ recorderState.setStreaming(false);
12435
+ recorderState.setStartRecordTime(undefined);
12436
+ }, [
12437
+ recorderState
12438
+ ]);
12439
+ const onStopRecord = (0, $3Sbms$useCallback)((event)=>{
12440
+ const { url: url , assetId: assetId } = event.detail;
12441
+ exitStreaming();
12442
+ recorderState.setAssetLoading(false);
12443
+ recorderState.setAssets([
12444
+ ...recorderState.assets,
12445
+ {
12446
+ type: "video",
12447
+ timestamp: Date.now(),
12448
+ objectUrl: url,
12449
+ assetId: assetId,
12450
+ thumbnailURL: thumbnailURL
12451
+ }
12452
+ ]);
12142
12453
  }, [
12143
- startRecordTime
12454
+ exitStreaming,
12455
+ recorderState,
12456
+ thumbnailURL
12144
12457
  ]);
12145
12458
  (0, $3Sbms$useEffect)(()=>{
12146
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
12147
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreenshareEnabled);
12148
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
12149
12459
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
12150
12460
  return ()=>{
12151
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
12152
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreenshareEnabled);
12153
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
12154
12461
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
12155
12462
  };
12156
12463
  }, [
12157
12464
  onStopRecord
12158
12465
  ]);
12159
12466
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12160
- className: (0, $3Sbms$classnames)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter", {
12161
- "bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] bg-cover": menuBarState.mode === "screen"
12162
- }),
12467
+ className: "w-full h-full ",
12163
12468
  children: [
12164
- (menuBarState.mode === "video" || menuBarState.mode === "screen" && menuBarState.streaming) && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12165
- className: "text-base text-white text-center font-medium pt-2.5",
12166
- children: $92672d57809ea9d3$var$timerText(timer)
12469
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $99a415196205cb06$export$c31ece446899894), {
12470
+ state: permissionBlockedModalState
12167
12471
  }),
12168
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12169
- className: "flex-1 min-h-0 p-2.5 ",
12170
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12171
- className: "relative w-full h-full rounded-[10px] ",
12172
- children: [
12173
- countdownVisible && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $db82628e5503d51b$export$53819c0e58f98d49), {
12174
- initialValue: 3,
12175
- onFinish: ()=>{
12176
- setCountdownVisible(false);
12177
- setStartRecordTime(Date.now());
12178
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
12179
- if (videoElementRef.current) captureThumbnail(videoElementRef.current);
12180
- });
12181
- }
12182
- }),
12183
- flashAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
12184
- onAnimationEnd: ()=>{
12185
- setFlashAnimation(false);
12186
- assetsPopupState.open();
12187
- }
12188
- }),
12189
- menuBarState.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12190
- className: "object-fit h-full",
12191
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12192
- autoPlay: true,
12193
- muted: true,
12194
- playsInline: true,
12195
- ref: videoElementRef,
12196
- className: (0, $3Sbms$classnames)("w-full h-full rounded-[inherit]", {
12197
- "scale-x-[-1]": facingMode === "user" && menuBarState.mode !== "screen",
12198
- "max-w-[screen]": menuBarState.mode === "screen"
12199
- })
12200
- })
12201
- }),
12202
- menuBarState.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12203
- autoPlay: true,
12204
- muted: true,
12205
- playsInline: true,
12206
- ref: videoElementRef,
12207
- className: (0, $3Sbms$classnames)("w-full h-full object-cover rounded-[inherit]", {
12208
- "scale-x-[-1]": facingMode === "user"
12209
- })
12210
- })
12211
- ]
12212
- })
12472
+ recorderState.requestedMedia === "camera" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c9e5583d5dd9328d$export$5b8e641151f8011d), {
12473
+ recorderState: recorderState
12213
12474
  }),
12214
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12215
- className: "flex justify-center px-2.5 pb-2.5 z-10",
12216
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a94f21ef9007b90a$export$11a6fe490bbc4873), {
12217
- state: menuBarState,
12218
- thumbnail: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12219
- asset: assets[assets.length - 1],
12220
- onClick: assetsPopupState.open
12221
- }),
12222
- onSwitch: ()=>{
12223
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
12224
- },
12225
- onCapturePress: ()=>{
12226
- if (menuBarState.mode === "photo" && videoElementRef.current) {
12227
- onPhotoCapture(videoElementRef.current);
12228
- setFlashAnimation(true);
12229
- }
12230
- if (menuBarState.mode !== "photo" && !menuBarState.streaming) {
12231
- menuBarState.setStreaming(true);
12232
- setTimer(0);
12233
- setCountdownVisible(true);
12234
- }
12235
- if (menuBarState.mode !== "photo" && menuBarState.streaming) {
12236
- exitStreaming();
12237
- if (startRecordTime) {
12238
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
12239
- setAssetLoading("video");
12240
- assetsPopupState.open();
12241
- }
12242
- }
12243
- }
12244
- })
12475
+ recorderState.requestedMedia === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a3830e399ecc7fc4$export$2d78fbe400238869), {
12476
+ recorderState: recorderState
12245
12477
  }),
12246
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d4d374dc7955cc18$export$5c334f209b1aa661), {
12247
- assets: assets,
12248
- state: assetsPopupState,
12478
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ec9697affdd50464$export$5c334f209b1aa661), {
12479
+ assets: recorderState.assets,
12480
+ state: recorderState.assetsPopupState,
12249
12481
  onSendAssets: ()=>{
12250
12482
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).release();
12251
- sendAssetsModalState.open();
12483
+ submitAssetsModalState.open();
12252
12484
  },
12253
12485
  removeAsset: removeAsset,
12254
- loading: assetLoading
12486
+ loading: recorderState.assetLoading,
12487
+ recorderState: recorderState
12255
12488
  }),
12256
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
12257
- title: t("recorder.submissionTitle"),
12258
- state: sendAssetsModalState,
12259
- isDismissable: false,
12260
- children: [
12261
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12262
- className: "text-base text-primaryLight",
12263
- children: t("recorder.submissionDescription")
12264
- }),
12265
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12266
- className: "flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",
12267
- children: assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12268
- className: "flex flex-row items-center gap-[10px]",
12269
- children: [
12270
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12271
- asset: asset
12272
- }),
12273
- /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
12274
- className: "text-sm",
12275
- style: {
12276
- hyphens: "manual"
12277
- },
12278
- children: [
12279
- asset.type === "picture" ? "Photo" : "Video",
12280
- " ",
12281
- index + 1,
12282
- " \xb7",
12283
- " ",
12284
- $92672d57809ea9d3$export$3ae94a2503e890a1(new Date(asset.timestamp))
12285
- ]
12286
- })
12287
- ]
12288
- }))
12289
- })
12290
- ]
12489
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a8756e233448261f$export$3646917cb6200e2e), {
12490
+ state: submitAssetsModalState,
12491
+ assets: recorderState.assets
12291
12492
  })
12292
12493
  ]
12293
12494
  });
@@ -12360,15 +12561,17 @@ const $91d20ee7d2ade85c$export$669f6ea7d267feaf = ()=>{
12360
12561
  };
12361
12562
 
12362
12563
 
12564
+
12363
12565
  const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
12364
12566
  const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
12567
+ const $26ed036cbc17809a$var$queryClient = new (0, $3Sbms$QueryClient)();
12365
12568
  let $26ed036cbc17809a$var$timestampCriticalError = -1;
12366
12569
  const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12367
12570
  const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
12368
12571
  const streamUIContainerRef = (0, $3Sbms$useRef)(null);
12369
12572
  const videosContainerRef = (0, $3Sbms$useRef)(null);
12370
12573
  const remoteTilesContainerRef = (0, $3Sbms$useRef)(null);
12371
- const [streamState, setStreamState] = (0, $3Sbms$useState)(options.recorder?.enabled ? "recorder" : "streaming");
12574
+ const [streamState, setStreamState] = (0, $3Sbms$useState)(options.recorder?.enabled ? "recorder" : "loading");
12372
12575
  const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $3Sbms$useState)(false);
12373
12576
  const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $3Sbms$useState)(false);
12374
12577
  const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
@@ -12379,7 +12582,6 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12379
12582
  const [profile, setProfile] = (0, $3Sbms$useState)({});
12380
12583
  const [muted, setMuted] = (0, $3Sbms$useState)(true);
12381
12584
  const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
12382
- const [isLoading, setLoading] = (0, $3Sbms$useState)(!options.recorder?.enabled);
12383
12585
  const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
12384
12586
  const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
12385
12587
  const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
@@ -12527,7 +12729,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12527
12729
  setBlockedDevicesPopupOpen(true);
12528
12730
  console.error("User interaction trigger failed", userInteractionError);
12529
12731
  } finally{
12530
- setLoading(false);
12732
+ setStreamState("streaming");
12531
12733
  }
12532
12734
  };
12533
12735
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
@@ -12537,73 +12739,76 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12537
12739
  }, [
12538
12740
  options
12539
12741
  ]);
12540
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
12541
- value: {
12542
- plan: plan,
12543
- permissions: permissions,
12544
- selfPeerId: selfPeerId,
12545
- streamUIContainerRef: streamUIContainerRef,
12546
- videosContainerRef: videosContainerRef,
12547
- remoteTilesContainerRef: remoteTilesContainerRef,
12548
- streamState: streamState,
12549
- setStreamState: setStreamState,
12550
- isQuickConnectPopupVisible: isQuickConnectPopupVisible,
12551
- setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible,
12552
- isSettingsMenuVisible: isSettingsMenuVisible,
12553
- setIsSettingsMenuVisible: setIsSettingsMenuVisible,
12554
- isYoutubePopupVisible: isYoutubePopupVisible,
12555
- setIsYoutubePopupVisible: setIsYoutubePopupVisible,
12556
- isLinksharePopupVisible: isLinksharePopupVisible,
12557
- setIsLinksharePopupVisible: setIsLinksharePopupVisible,
12558
- isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible,
12559
- setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible,
12560
- isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen,
12561
- setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen,
12562
- theme: theme,
12563
- setTheme: setTheme,
12564
- language: language,
12565
- setLanguage: setLanguage,
12566
- options: options,
12567
- profile: profile,
12568
- muted: muted,
12569
- streaming: streaming,
12570
- screensharing: screensharing,
12571
- isAgent: isAgent,
12572
- userInteractionTriggered: userInteractionTriggered,
12573
- orientation: orientation
12574
- },
12575
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$ThemeProvider), {
12576
- theme: styledTheme,
12577
- children: [
12578
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4fb4815baa04b470$export$20f257fc407da7a3), {}),
12579
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d6008ea114507578$export$2e2bcd8739ae039), {}),
12580
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4fb4815baa04b470$export$914ddf2021ea8ee6), {
12581
- ref: streamUIContainerRef,
12582
- children: [
12583
- isLoading && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91d20ee7d2ade85c$export$669f6ea7d267feaf), {}),
12584
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
12585
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
12586
- isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
12587
- close: ()=>{
12588
- setUserInteractionTriggered(true);
12589
- setBlockedDevicesPopupOpen(false);
12590
- }
12591
- }),
12592
- streamState === "recorder" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $92672d57809ea9d3$export$336a011955157f9a), {}),
12593
- streamState === "streaming" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12594
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
12595
- children: [
12596
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f235befa4cdc42d6$export$2e2bcd8739ae039), {}),
12597
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $cdab47bb8796991e$export$2e2bcd8739ae039), {}),
12598
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $69a9c49ece80e773$export$2e2bcd8739ae039), {}),
12599
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $01986a58bfba8001$export$2e2bcd8739ae039), {})
12600
- ]
12601
- })
12602
- }),
12603
- (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
12604
- ]
12605
- })
12606
- ]
12742
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$QueryClientProvider), {
12743
+ client: $26ed036cbc17809a$var$queryClient,
12744
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
12745
+ value: {
12746
+ plan: plan,
12747
+ permissions: permissions,
12748
+ selfPeerId: selfPeerId,
12749
+ streamUIContainerRef: streamUIContainerRef,
12750
+ videosContainerRef: videosContainerRef,
12751
+ remoteTilesContainerRef: remoteTilesContainerRef,
12752
+ streamState: streamState,
12753
+ setStreamState: setStreamState,
12754
+ isQuickConnectPopupVisible: isQuickConnectPopupVisible,
12755
+ setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible,
12756
+ isSettingsMenuVisible: isSettingsMenuVisible,
12757
+ setIsSettingsMenuVisible: setIsSettingsMenuVisible,
12758
+ isYoutubePopupVisible: isYoutubePopupVisible,
12759
+ setIsYoutubePopupVisible: setIsYoutubePopupVisible,
12760
+ isLinksharePopupVisible: isLinksharePopupVisible,
12761
+ setIsLinksharePopupVisible: setIsLinksharePopupVisible,
12762
+ isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible,
12763
+ setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible,
12764
+ isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen,
12765
+ setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen,
12766
+ theme: theme,
12767
+ setTheme: setTheme,
12768
+ language: language,
12769
+ setLanguage: setLanguage,
12770
+ options: options,
12771
+ profile: profile,
12772
+ muted: muted,
12773
+ streaming: streaming,
12774
+ screensharing: screensharing,
12775
+ isAgent: isAgent,
12776
+ userInteractionTriggered: userInteractionTriggered,
12777
+ orientation: orientation
12778
+ },
12779
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$ThemeProvider), {
12780
+ theme: styledTheme,
12781
+ children: [
12782
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4fb4815baa04b470$export$20f257fc407da7a3), {}),
12783
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d6008ea114507578$export$2e2bcd8739ae039), {}),
12784
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4fb4815baa04b470$export$914ddf2021ea8ee6), {
12785
+ ref: streamUIContainerRef,
12786
+ children: [
12787
+ streamState === "loading" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91d20ee7d2ade85c$export$669f6ea7d267feaf), {}),
12788
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
12789
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
12790
+ isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
12791
+ close: ()=>{
12792
+ setUserInteractionTriggered(true);
12793
+ setBlockedDevicesPopupOpen(false);
12794
+ }
12795
+ }),
12796
+ streamState === "recorder" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b76354b532370976$export$336a011955157f9a), {}),
12797
+ (streamState === "streaming" || streamState === "loading") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12798
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
12799
+ children: [
12800
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f235befa4cdc42d6$export$2e2bcd8739ae039), {}),
12801
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $cdab47bb8796991e$export$2e2bcd8739ae039), {}),
12802
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $69a9c49ece80e773$export$2e2bcd8739ae039), {}),
12803
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $01986a58bfba8001$export$2e2bcd8739ae039), {})
12804
+ ]
12805
+ })
12806
+ }),
12807
+ (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
12808
+ ]
12809
+ })
12810
+ ]
12811
+ })
12607
12812
  })
12608
12813
  });
12609
12814
  };
@@ -13036,7 +13241,7 @@ var $f8d57e3d223f5089$export$2e2bcd8739ae039 = $f8d57e3d223f5089$var$GreetingVie
13036
13241
 
13037
13242
 
13038
13243
  var $1e2747ca72d0ab49$exports = {};
13039
- $1e2747ca72d0ab49$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.top-0 {\n top: 0;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.h-1\\/3 {\n height: 33.3333%;\n}\n\n.max-h-\\[inherit\\] {\n max-height: inherit;\n}\n\n.max-h-\\[70px\\] {\n max-height: 70px;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.min-h-\\[100\\%\\] {\n min-height: 100%;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-1\\/3 {\n width: 33.3333%;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[450px\\] {\n width: 450px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.min-w-full, .min-w-\\[100\\%\\] {\n min-width: 100%;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[135px\\] {\n max-width: 135px;\n}\n\n.max-w-\\[500px\\] {\n max-width: 500px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.max-w-\\[screen\\] {\n max-width: screen;\n}\n\n.max-w-\\[70px\\] {\n max-width: 70px;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-secondaryVLight {\n --tw-border-opacity: 1;\n border-color: rgb(235 235 235 / var(--tw-border-opacity));\n}\n\n.border-primaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(86 86 86 / var(--tw-border-opacity));\n}\n\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-tertiarySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(216 216 216 / var(--tw-bg-opacity));\n}\n\n.bg-tertiary {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#000\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\] {\n background-image: url(\"https://cdn.snapcall.io/img/assist/gradient-bg.jpg\");\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.object-fill {\n object-fit: fill;\n}\n\n.p-\\[15px\\] {\n padding: 15px;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[10px\\] {\n padding: 10px;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.align-middle {\n vertical-align: middle;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-semibold {\n font-weight: 600;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-mainBlue {\n --tw-text-opacity: 1;\n color: rgb(0 106 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-50 {\n opacity: .5;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n.disabled\\:opacity-50:disabled {\n opacity: .5;\n}\n\n";
13244
+ $1e2747ca72d0ab49$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.bottom-\\[-85px\\] {\n bottom: -85px;\n}\n\n.left-\\[calc\\(50\\%-243px\\)\\] {\n left: calc(50% - 243px);\n}\n\n.bottom-\\[-65px\\] {\n bottom: -65px;\n}\n\n.left-\\[calc\\(50\\%-43px\\)\\] {\n left: calc(50% - 43px);\n}\n\n.top-0 {\n top: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.mb-\\[9px\\] {\n margin-bottom: 9px;\n}\n\n.box-border {\n box-sizing: border-box;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-0 {\n height: 0;\n}\n\n.h-\\[86px\\] {\n height: 86px;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[64px\\] {\n height: 64px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[70px\\] {\n height: 70px;\n}\n\n.h-\\[62px\\] {\n height: 62px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-1\\/3 {\n height: 33.3333%;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.max-h-\\[100\\%\\] {\n max-height: 100%;\n}\n\n.max-h-\\[inherit\\] {\n max-height: inherit;\n}\n\n.max-h-\\[70px\\] {\n max-height: 70px;\n}\n\n.max-h-\\[90\\%\\] {\n max-height: 90%;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-\\[486px\\] {\n width: 486px;\n}\n\n.w-0 {\n width: 0;\n}\n\n.w-\\[86px\\] {\n width: 86px;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[64px\\] {\n width: 64px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[70px\\] {\n width: 70px;\n}\n\n.w-\\[62px\\] {\n width: 62px;\n}\n\n.w-\\[50\\%\\] {\n width: 50%;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-1\\/3 {\n width: 33.3333%;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[450px\\] {\n width: 450px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.w-\\[135px\\] {\n width: 135px;\n}\n\n.min-w-\\[200px\\] {\n min-width: 200px;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.min-w-full {\n min-width: 100%;\n}\n\n.max-w-\\[1116px\\] {\n max-width: 1116px;\n}\n\n.max-w-\\[500px\\] {\n max-width: 500px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.max-w-\\[100\\%\\] {\n max-width: 100%;\n}\n\n.max-w-\\[70px\\] {\n max-width: 70px;\n}\n\n.max-w-\\[90\\%\\] {\n max-width: 90%;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: 1s linear infinite spin;\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-start {\n align-items: flex-start;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[7px\\] {\n gap: 7px;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-visible {\n overflow: visible;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-\\[7px\\] {\n border-width: 7px;\n}\n\n.border-\\[4px\\] {\n border-width: 4px;\n}\n\n.border-\\[3px\\] {\n border-width: 3px;\n}\n\n.border-\\[2px\\] {\n border-width: 2px;\n}\n\n.border-b-\\[7px\\] {\n border-bottom-width: 7px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#E5484D\\] {\n --tw-border-opacity: 1;\n border-color: rgb(229 72 77 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#FFFFF\\] {\n border-color: #FFFFF;\n}\n\n.border-\\[white\\] {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-secondaryVLight {\n --tw-border-opacity: 1;\n border-color: rgb(235 235 235 / var(--tw-border-opacity));\n}\n\n.border-b-\\[\\#E5484D\\] {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(229 72 77 / var(--tw-border-opacity));\n}\n\n.bg-\\[\\#000\\], .bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-tertiarySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(216 216 216 / var(--tw-bg-opacity));\n}\n\n.bg-tertiary {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-mainBlueSelected {\n --tw-bg-opacity: 1;\n background-color: rgb(0 90 218 / var(--tw-bg-opacity));\n}\n\n.bg-mainBlue {\n --tw-bg-opacity: 1;\n background-color: rgb(0 106 255 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#E5484D\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 72 77 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#171717\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#F7F7F7\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(247 247 247 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#C7DEFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(199 222 255 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\] {\n background-image: url(\"https://cdn.snapcall.io/img/assist/gradient-bg.jpg\");\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.p-\\[15px\\] {\n padding: 15px;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.py-\\[125px\\] {\n padding-top: 125px;\n padding-bottom: 125px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[60px\\] {\n padding-left: 60px;\n padding-right: 60px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pt-\\[14px\\] {\n padding-top: 14px;\n}\n\n.pb-\\[20px\\] {\n padding-bottom: 20px;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.pb-\\[9px\\] {\n padding-bottom: 9px;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-semibold {\n font-weight: 600;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-mainBlue {\n --tw-text-opacity: 1;\n color: rgb(0 106 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n.disabled\\:opacity-50:disabled {\n opacity: .5;\n}\n\n";
13040
13245
 
13041
13246
 
13042
13247
  var $e02c50a47b475960$exports = {};
@@ -13046,7 +13251,8 @@ $e02c50a47b475960$exports = "*, :before, :after {\n box-sizing: border-box;\n
13046
13251
  const $24075a5d702d64b3$var$defaultOptions = {
13047
13252
  recorder: {
13048
13253
  enabled: false,
13049
- defaultState: "photo"
13254
+ defaultMode: "photo",
13255
+ defaultMedia: "camera"
13050
13256
  },
13051
13257
  sharedURL: window.location.href,
13052
13258
  showMenuButton: true,
@@ -13076,7 +13282,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
13076
13282
  init: ({ element: element , ...options })=>{
13077
13283
  if (typeof options.recorder === "boolean") options.recorder = {
13078
13284
  enabled: options.recorder,
13079
- defaultState: "photo"
13285
+ defaultMode: "photo",
13286
+ defaultMedia: "camera"
13080
13287
  };
13081
13288
  if (element?.nodeType !== window.Node.ELEMENT_NODE) throw new Error('The "element" property must be a valid element!');
13082
13289
  const mergedOptions = (0, $365e765f9890497b$export$6969335ea1e4e77c)($24075a5d702d64b3$var$defaultOptions, options);
@@ -13109,12 +13316,14 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
13109
13316
  ]
13110
13317
  }));
13111
13318
  if (mergedOptions.tracking) (0, $3Sbms$hotjarbrowser).init(3111933, 6);
13319
+ (0, $35b37252690084e8$export$1cbfb36c1655a9a)(rootElement, element);
13112
13320
  },
13113
13321
  initGreeting: (element, onGreetingDone)=>{
13114
13322
  const rootElement = (0, $3Sbms$createRoot)(element);
13115
13323
  rootElement.render(/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f8d57e3d223f5089$export$2e2bcd8739ae039), {
13116
13324
  onGreetingDone: onGreetingDone
13117
13325
  }));
13326
+ (0, $35b37252690084e8$export$1cbfb36c1655a9a)(rootElement, element);
13118
13327
  },
13119
13328
  setExtraSettingsOptions: (extraOptions)=>{
13120
13329
  const event = new CustomEvent("streamUISetExtraSettingsOptions", {