{"version":3,"file":"js/application.js","mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACRA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAoBA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AAAA;AAAA;AACA;;;;;;;;;;;;;;;;AClZA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;;;;;;;;;;;;;;;;ACpEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AChCA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACvBA;AACA;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AADA;AAEA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAwDA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAVA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAFA;AAAA;AAAA;AAjBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AA5CA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAEA;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AAAA;AAAA;AAiBA;AAKA;AACA;AAOA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;AChFA","sources":["webpack://video_greets/./app/frontend/channels/ sync _channel\\.js$","webpack://video_greets/./app/frontend/channels/index.js","webpack://video_greets/./app/frontend/js/bootstrap_js_files.js","webpack://video_greets/./app/frontend/js/file_upload.js","webpack://video_greets/./app/frontend/js/live_chat.js","webpack://video_greets/./app/frontend/js/utils/getUserOS.js","webpack://video_greets/./app/frontend/packs/application.js","webpack://video_greets/./app/frontend/shopify_app/flash_messages.js","webpack://video_greets/./app/frontend/shopify_app/index.js","webpack://video_greets/./app/frontend/shopify_app/shopify_app.js","webpack://video_greets/./app/frontend/packs/application.scss?405b"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = \"./app/frontend/channels sync recursive _channel\\\\.js$\";\nmodule.exports = webpackEmptyContext;","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","// inside app/frontend/js/bootstrap_js_files.js \n\nimport 'bootstrap/js/src/alert' \nimport 'bootstrap/js/src/button' \n// import 'bootstrap/js/src/carousel' \nimport 'bootstrap/js/src/collapse' \nimport 'bootstrap/js/src/dropdown' \nimport 'bootstrap/js/src/modal' \n// import 'bootstrap/js/src/popover' \n// import 'bootstrap/js/src/scrollspy' \nimport 'bootstrap/js/src/tab' \n// import 'bootstrap/js/src/toast' \n// import 'bootstrap/js/src/tooltip'\n","// app/frontend/fileUpload.js\nimport Uppy from '@uppy/core'\nimport Dashboard from '@uppy/dashboard'\nimport Informer from '@uppy/informer'\nimport AwsS3 from '@uppy/aws-s3'\nimport AwsS3Multipart from '@uppy/aws-s3-multipart'\nimport Webcam from '@uppy/webcam'\nimport Audio from '@uppy/audio'\n\nimport { getOperatingSystem } from './utils/getUserOS';\n\nfunction fileUpload(fileInput,greetLocale) {\n const hiddenInput = document.querySelector('.upload-data'),\n formGroup = fileInput.parentNode;\n\n // remove our file input in favour of Uppy's\n formGroup.removeChild(fileInput);\n\n const os = getOperatingSystem();\n let plugins = null\n if (os == 'Desktop/Laptop') {\n plugins = ['Webcam','Audio']\n } else if (os == 'Android') {\n plugins = ['Audio']\n }\n\n const t = {\n en: {\n d: {\n heading: \"Drag and drop files here or choose one of the following options to record or upload your message:\",\n browse: \"SELECT FROM COMPUTER\",\n myDevice: \"Upload\",\n done: \"Cancel\",\n cancel: \"Cancel\",\n record: \"Record\",\n success: \"Uploaded the video successfully\",\n allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.',\n allowAccessTitle: 'Please allow access to your camera',\n allowAudioAccessDescription: 'In order to record audio, please allow microphone access for this site.',\n allowAudioAccessTitle: 'Please allow access to your microphone',\n import: 'Import',\n importFrom: 'Import from %{name}',\n startRecording: 'Begin video recording',\n stopRecording: 'Stop video recording',\n submitRecordedFile: 'Submit recorded file'\n },\n m: {\n heading: \"\",\n browse: \"CAMERA OR LIBRARY\",\n myDevice: \"Camera or Library\"\n }\n },\n es: {\n d: {\n heading: \"Arrastre y suelte archivos aquí o elija una de las siguientes opciones para grabar o cargar su mensaje:\",\n browse: \"SELECCIONAR DESDE LA COMPUTADORA\",\n myDevice: \"Subir\",\n done: \"Cancelar\",\n cancel: 'Cancelar',\n record: \"Record\",\n success: \"Subí el video con éxito\",\n allowAccessDescription: 'Para tomar fotos o grabar video con tu cámara, por favor permite a este sitio el acceso a la cámara.',\n allowAccessTitle: 'Por favor permite el acceso a tu cámara',\n authenticateWith: 'Conectar a %{pluginName}',\n authenticateWithTitle: 'Por favor autentícate con %{pluginName} para seleccionar archivos',\n import: 'Importar',\n importFrom: 'Importar desde %{name}',\n startRecording: 'Comenzar la grabación de video',\n stopRecording: 'Detener la grabación de video',\n submitRecordedFile: 'Enviar archivo grabado'\n },\n m: {\n heading: \"\",\n browse: \"CÁMARA O BIBLIOTECA\",\n myDevice: \"Cámara o Archivos\"\n }\n },\n fr: {\n d: {\n heading: \"Faites glisser et déposez des fichiers ici ou choisissez l'une des options suivantes pour enregistrer ou télécharger votre message:\",\n browse: \"SÉLECTIONNER DE L'ORDINATEUR\",\n myDevice: \"Télécharger\",\n done: \"Annuler\",\n cancel: 'Annuler',\n record: \"Record\",\n success: \"Téléversé la vidéo avec succès\",\n allowAccessDescription: 'Pour prendre des photos ou enregistrer une vidéo avec votre caméra, veuillez autoriser l\\'accès à votre caméra pour ce site.',\n allowAccessTitle: 'Veuillez autoriser l\\'accès à votre caméra',\n authAborted: 'Authentification interrompue',\n authenticateWith: 'Se connecter à %{pluginName}',\n authenticateWithTitle: 'Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers',\n import: 'Importer',\n importFrom: 'Importer de %{name}',\n smile: 'Souriez !',\n startRecording: 'Commencer l\\'enregistrement vidéo',\n stopRecording: 'Arrêter l\\'enregistrement vidéo',\n submitRecordedFile: 'Envoyer la vidéo enregistrée'\n },\n m: {\n heading: \"\",\n browse: \"CAMÉRA OU BIBLIOTHÈQUE\",\n myDevice: \"Appareil photo ou Fichiers\"\n }\n },\n de: {\n d: {\n heading: \"Ziehen Sie Dateien hierher und legen Sie sie dort ab oder wählen Sie eine der folgenden Optionen, um Ihre Nachricht aufzuzeichnen oder hochzuladen:\",\n browse: \"VOM COMPUTER AUSWÄHLEN\",\n myDevice: \"Hochladen\",\n done: \"Absagen\",\n cancel: \"Absagen\",\n record: \"Aufzeichnung\",\n success: \"Video erfolgreich hochgeladen\",\n allowAccessDescription: 'Um Fotos oder Videos mit Ihrer Kamera aufzunehmen, erlauben Sie bitte den Kamerazugriff für diese Website.',\n allowAccessTitle: 'Bitte erlauben Sie den Zugriff auf Ihre Kamera',\n allowAudioAccessDescription: 'Um Audio aufzunehmen, erlauben Sie bitte den Mikrofonzugriff für diese Seite.',\n allowAudioAccessTitle: 'Bitte erlauben Sie den Zugriff auf Ihr Mikrofon',\n import: 'Importieren',\n importFrom: 'Importieren von %{name}',\n startRecording: 'Beginnen Sie mit der Videoaufnahme',\n stopRecording: 'Stoppen Sie die Videoaufnahme',\n submitRecordedFile: 'Aufgenommene Datei senden'\n },\n m: {\n heading: \"\",\n browse: \"KAMERA ODER BIBLIOTHEK\",\n myDevice: \"Kamera oder Dateien\"\n }\n },\n it: {\n d: {\n heading: \"Trascina e rilascia i file qui o scegli una delle seguenti opzioni per registrare o caricare il tuo messaggio:\",\n browse: \"SELEZIONA DA COMPUTER\",\n myDevice: \"Carica\",\n done: \"Annulla\",\n cancel: \"Annulla\",\n record: \"Registra\",\n success: \"Caricato il video con successo\",\n allowAccessDescription: \"Per scattare foto o registrare video con la tua fotocamera, permetti l'accesso alla fotocamera per questo sito.\",\n allowAccessTitle: \"Per favore, permetti l'accesso alla tua fotocamera\",\n allowAudioAccessDescription: \"Per registrare audio, permetti l'accesso al microfono per questo sito.\",\n allowAudioAccessTitle: \"Per favore, permetti l'accesso al tuo microfono\",\n import: \"Importa\",\n importFrom: \"Importa da %{name}\",\n startRecording: \"Inizia registrazione video\",\n stopRecording: \"Interrompi registrazione video\",\n submitRecordedFile: \"Invia file registrato\"\n },\n m: {\n heading: \"\",\n browse: \"FOTOCAMERA O LIBRERIA\",\n myDevice: \"Fotocamera o Libreria\",\n }\n },\n ro: {\n d: {\n heading: \"Trageți și plasați fișiere aici sau alegeți una dintre următoarele opțiuni pentru a vă înregistra sau încărca mesajul:\",\n browse: \"SELECTARE DE LA COMPUTER\",\n myDevice: \"Încărcați\",\n done: \"Anulare\",\n cancel: \"Anulare\",\n record: \"Record\",\n success: \"Videoclipul a fost încărcat cu succes\",\n allowAccessDescription: 'Pentru a face fotografii sau a înregistra videoclipuri cu camera dvs., vă rugăm să permiteți accesul camerei pentru acest site.',\n allowAccessTitle: 'Vă rugăm să permiteți accesul la camera dvs',\n allowAudioAccessDescription: 'Pentru a înregistra audio, vă rugăm să permiteți accesul la microfon pentru acest site.',\n allowAudioAccessTitle: 'Vă rugăm să permiteți accesul la microfon',\n import: 'Import',\n importFrom: 'Importat din %{name}',\n startRecording: 'Începeți înregistrarea video',\n stopRecording: 'Opriți înregistrarea video',\n submitRecordedFile: 'Trimiteți fișierul înregistrat'\n },\n m: {\n heading: \"\",\n browse: \"CAMERA SAU BIBLIOTECA\",\n myDevice: \"Cameră sau Fișiere\"\n }\n },\n pt: {\n d: {\n heading: \"Arraste e solte arquivos aqui ou escolha uma das seguintes opções para gravar ou carregar sua mensagem:\",\n browse: \"SELECIONE DO COMPUTADOR\",\n myDevice: \"Envio\",\n done: \"Cancelar\",\n cancel: \"Cancelar\",\n record: \"Registro\",\n success: \"Carregado o vídeo com sucesso\",\n allowAccessDescription: 'Para tirar fotos ou gravar vídeos com sua câmera, permita o acesso da câmera a este site.',\n allowAccessTitle: 'Por favor, permita o acesso à sua câmera',\n allowAudioAccessDescription: 'Para gravar áudio, permita o acesso ao microfone para este site.',\n allowAudioAccessTitle: 'Por favor, permita o acesso ao seu microfone',\n import: 'Importar',\n importFrom: 'Importado de %{name}',\n startRecording: 'Iniciar a gravação de vídeo',\n stopRecording: 'parar a gravação de vídeo',\n submitRecordedFile: 'Enviar arquivo gravado'\n },\n m: { \n heading: \"\",\n browse: \"CÂMERA OU BIBLIOTECA\",\n myDevice: \"Câmera ou arquivos\"\n }\n },\n nb: {\n d: {\n heading: \"Dra og slipp filer her eller velg en av følgende alternativer for å spille inn eller laste opp meldingen din:\",\n browse: \"VELG FRA DATAMASKIN\",\n myDevice: \"Last opp\",\n done: \"Avbryt\",\n cancel: \"Avbryt\",\n record: \"Spill inn\",\n success: \"Videoen ble lastet opp vellykket\",\n allowAccessDescription: 'For å ta bilder eller spille inn video med kameraet ditt, må du gi tilgang til kameraet for dette nettstedet.',\n allowAccessTitle: 'Vennligst gi tilgang til kameraet ditt',\n allowAudioAccessDescription: 'For å spille inn lyd, må du gi tilgang til mikrofonen for dette nettstedet.',\n allowAudioAccessTitle: 'Vennligst gi tilgang til mikrofonen din',\n import: 'Importer',\n importFrom: 'Importer fra %{name}',\n startRecording: 'Start videoopptak',\n stopRecording: 'Stopp videoopptak',\n submitRecordedFile: 'Send inn opptaksfil'\n },\n m: {\n heading: \"\",\n browse: \"KAMERA ELLER BIBLIOTEK\",\n myDevice: \"Kamera eller bibliotek\"\n } \n },\n nn: {\n d: {\n heading: \"Dra og slepp filer her eller velg eitt av følgjande alternativ for å spela inn eller lasta opp bodet ditt:\",\n browse: \"VEL FRÅ DATAMASKIN\",\n myDevice: \"Last opp\",\n done: \"Avbryt\",\n cancel: \"Avbryt\",\n record: \"Spela inn\",\n success: \"Videoen vart lasta opp lukkeleg\",\n allowAccessDescription: 'For å ta bilete eller spela inn video med kameraet ditt, må du gi tilgang til kameraet for denne nettstaden.',\n allowAccessTitle: 'Ver venleg og gi tilgang til kameraet ditt',\n allowAudioAccessDescription: 'For å spela inn lyd, må du gi tilgang til mikrofonen for denne nettstaden.',\n allowAudioAccessTitle: 'Ver venleg og gi tilgang til mikrofonen din',\n import: 'Importer',\n importFrom: 'Importer frå %{name}',\n startRecording: 'Start videoopptak',\n stopRecording: 'Stopp videoopptak',\n submitRecordedFile: 'Send inn opptaksfila'\n },\n m: {\n heading: \"\",\n browse: \"KAMERA ELLER BIBLIOTEK\",\n myDevice: \"Kamera eller bibliotek\"\n } \n },\n no: {\n d: {\n heading: \"Dra og slipp filer her eller velg en av følgende alternativer for å spille inn eller laste opp meldingen din:\",\n browse: \"VELG FRA DATAMASKIN\",\n myDevice: \"Last opp\",\n done: \"Avbryt\",\n cancel: \"Avbryt\",\n record: \"Spill inn\",\n success: \"Videoen ble lastet opp vellykket\",\n allowAccessDescription: 'For å ta bilder eller spille inn video med kameraet ditt, må du gi tilgang til kameraet for dette nettstedet.',\n allowAccessTitle: 'Vennligst gi tilgang til kameraet ditt',\n allowAudioAccessDescription: 'For å spille inn lyd, må du gi tilgang til mikrofonen for dette nettstedet.',\n allowAudioAccessTitle: 'Vennligst gi tilgang til mikrofonen din',\n import: 'Importer',\n importFrom: 'Importer fra %{name}',\n startRecording: 'Start videoopptak',\n stopRecording: 'Stopp videoopptak',\n submitRecordedFile: 'Send inn opptaksfil'\n },\n m: {\n heading: \"\",\n browse: \"KAMERA ELLER BIBLIOTEK\",\n myDevice: \"Kamera eller bibliotek\"\n }\n },\n };\n\n // Get text block or default to english\n const text = t[greetLocale] ? t[greetLocale] : t['en'];\n\n const uppy = new Uppy({\n autoProceed: true,\n restrictions: {\n allowedFileTypes: fileInput.accept.split(','),\n maxNumberOfFiles: 1\n },\n locale: {\n strings: {\n myDevice: os == 'Desktop/Laptop' ? text.d.myDevice : text.m.myDevice,\n done: text.d.done,\n cancel: text.d.cancel,\n // Used as the label for the link that opens the system file selection dialog.\n browse: os == 'Desktop/Laptop' ? text.d.browse : text.m.browse,\n // Text to show on the droppable area.\n dropPasteBoth: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteFiles: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteFolders: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteBoth: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteImportFiles: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteImportFolders: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteImportBoth: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropHint: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropHereOr: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPaste: os == 'Desktop/Laptop' ? text.d.heading : '%{browse}',\n dropPasteImport: os == 'Desktop/Laptop' ? text.d.heading :'%{browse}',\n\n allowAccessDescription: text.d.allowAccessDescription,\n allowAccessTitle: text.d.allowAccessTitle,\n allowAudioAccessDescription: text.d.allowAudioAccessDescription,\n allowAudioAccessTitle: text.d.allowAudioAccessTitle,\n import: text.d.import,\n importFrom: text.d.importFrom,\n startRecording: text.d.startRecording,\n stopRecording: text.d.stopRecording,\n submitRecordedFile: text.d.submitRecordedFile,\n }, \n },\n })\n .use(Dashboard, {\n plugins: plugins,\n inline: true,\n target: formGroup,\n showProgressDetails: true,\n proudlyDisplayPoweredByUppy: false,\n browserBackButtonClose: false,\n doneButtonHandler: null,\n theme: 'auto',\n })\n .use(Informer, {\n target: formGroup,\n })\n \n\n // Use Webcam for desktop\n if(os == 'Desktop/Laptop'){\n uppy.use(Webcam, { \n target: Dashboard,\n modes: [\n 'video-audio',\n ],\n mirror: true,\n videoConstraints: {\n facingMode: \"user\",\n width: { min: 720, ideal: 1280, max: 1920 },\n height: { min: 480, ideal: 800, max: 1080 },\n },\n showRecordingLength: true,\n showVideoSourceDropdown: true,\n preferredVideoMimeType: 'video/mp4',\n title: text.d.record\n })\n }\n // Use Audio for desktop or android\n // if(os == 'Desktop/Laptop' || os == 'Android'){\n uppy.use(Audio, {\n target: Dashboard,\n showAudioSourceDropdown: true,\n })\n // }\n\n if (fileInput.dataset.uploadServer == 's3') {\n uppy.use(AwsS3, {\n companionUrl: '/', // will call Shrine's presign endpoint mounted on `/s3/params`\n });\n } else if (fileInput.dataset.uploadServer == 's3_multipart') {\n uppy.use(AwsS3Multipart, {\n companionUrl: '/' // will call uppy-s3_multipart endpoint mounted on `/s3/multipart`\n });\n }\n\n uppy.on('upload-success', (file, response) => {\n\n let id;\n if (fileInput.dataset.uploadServer == 's3') {\n id = file.meta['key'].match(/^uploads\\/(.+)/)[1]; // object key without prefix\n } else if (fileInput.dataset.uploadServer == 's3_multipart') {\n id = response.uploadURL.match(/\\/uploads\\/([^\\?]+)/)[1]; // object key without prefix\n }\n\n // construct uploaded file data in the format that Shrine expects\n const uploadedFileData = {\n id, // object key without prefix\n storage: 'uploads',\n uploadURL: response.uploadURL,\n metadata: {\n size: file.size,\n filename: file.name,\n mime_type: file.type,\n }\n };\n \n hiddenInput.value = JSON.stringify(uploadedFileData);\n\n document.getElementById('uppy-widget-form').submit();\n\n })\n\n formGroup.onsubmit = () => uppy.info(text.d.success);\n}\n\nexport { fileUpload };\n","const LiveChat = (shop) => {\n window.__lc = window.__lc || {};\n window.__lc.license = 11930697;\n window.__lc.chat_between_groups = false; // this will create a new chat session between sites vidday, videogreet, helloworld\n ;(function (n, t, c) {\n function i(n) {\n return e._h ? e._h.apply(null, n) : e._q.push(n)\n }\n var e = {\n _q: [],\n _h: null,\n _v: '2.0',\n on: function () {\n i(['on', c.call(arguments)])\n },\n once: function () {\n i(['once', c.call(arguments)])\n },\n off: function () {\n i(['off', c.call(arguments)])\n },\n get: function () {\n if (!e._h) throw new Error(\"[LiveChatWidget] You can't use getters before load.\")\n return i(['get', c.call(arguments)])\n },\n call: function () {\n i(['call', c.call(arguments)])\n },\n init: function () {\n var n = t.createElement('script')\n ;(n.async = !0),\n (n.type = 'text/javascript'),\n (n.src = 'https://cdn.livechatinc.com/tracking.js'),\n t.head.appendChild(n)\n },\n }\n !n.__lc.asyncInit && e.init(), (n.LiveChatWidget = n.LiveChatWidget || e)\n })(window, document, [].slice);\n\n const initLiveChat = () => {\n function checkWidget() {\n if(window.LC_API?.is_loaded() === false) {\n window.setTimeout(checkWidget, 1000);\n } else {\n LiveChatWidget.on(\"ready\",()=>{\n $('#chat-widget-container').data('turbolinks','permanent');\n // var data = $('#chat-data').data();\n // var variables = {\n // \"VideoGreet - id\": shop.id,\n // \"VideoGreet - Email\": shop.email,\n // \"VideoGreet - Name\": shop.shop_name,\n // \"VideoGreet - Domain\": shop.shopify_domain,\n // }\n // LiveChatWidget.call('update_session_variables', variables);\n // Hide Live chat on viewing page\n if(document.location.href.indexOf('edit') > -1 || document.location.href.indexOf('get_started') > -1){\n LiveChatWidget.call('minimize');\n } else {\n LiveChatWidget.call('hide');\n } \n });\n }\n }\n checkWidget();\n\t};\n \n initLiveChat();\n\n};\n\nexport { LiveChat };","export function getOperatingSystem() {\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\n \n if (/windows phone/i.test(userAgent)) {\n return 'Windows Phone';\n }\n \n if (/android/i.test(userAgent)) {\n return 'Android';\n }\n \n if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {\n return 'iOS';\n }\n \n return 'Desktop/Laptop';\n}","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\nimport \"jquery\";\nimport $ from \"expose-loader?exposes=$,jQuery!jquery\"\nimport \"shopify_app\";\n\nimport '../js/bootstrap_js_files.js';\nimport { fileUpload } from '../js/file_upload';\nimport { LiveChat } from '../js/live_chat';\n\nimport Rails from '@rails/ujs';\nimport Turbolinks from 'turbolinks';\nimport * as ActiveStorage from '@rails/activestorage';\nimport 'channels';\nimport I18n from 'i18n-js';\nwindow.I18n = I18n;\n\nRails.start();\nActiveStorage.start();\nTurbolinks.start();\nLiveChat();\n\n// Use 'DOMContentLoaded' event if not using Turbolinks\ndocument.addEventListener('turbolinks:load', () => {\n var locale = $('body').data('locale');\n I18n.locale = locale;\n document.querySelectorAll('#uppy-widget-form input[type=file]').forEach(fileInput => {\n fileUpload(fileInput,locale);\n });\n});","var eventName = typeof(Turbolinks) !== 'undefined' ? 'turbolinks:load' : 'DOMContentLoaded';\n\nif (!document.documentElement.hasAttribute(\"data-turbolinks-preview\") && document.getElementById(\"shopify-app-init\") != null) {\n document.addEventListener(eventName, function flash() {\n var flashData = JSON.parse(document.getElementById('shopify-app-flash').dataset.flash);\n\n var Toast = window['app-bridge'].actions.Toast;\n\n if (flashData.notice) {\n Toast.create(app, {\n message: flashData.notice,\n duration: 5000,\n }).dispatch(Toast.Action.SHOW);\n }\n\n if (flashData.error) {\n Toast.create(app, {\n message: flashData.error,\n duration: 5000,\n isError: true,\n }).dispatch(Toast.Action.SHOW);\n }\n });\n}\n","require('./shopify_app')\nrequire('./flash_messages')\n","import { getSessionToken } from \"@shopify/app-bridge-utils\";\n\nconst SESSION_TOKEN_REFRESH_INTERVAL = 2000; // Request a new token every 2s\n\ndocument.addEventListener(\"turbolinks:request-start\", function (event) {\n var xhr = event.data.xhr;\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + window.sessionToken);\n});\n\ndocument.addEventListener(\"turbolinks:render\", function () {\n $(\"form, a[data-method=delete]\").on(\"ajax:beforeSend\", function (event) {\n const xhr = event.detail[0];\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + window.sessionToken);\n });\n});\n\ndocument.addEventListener(\"DOMContentLoaded\", async () => {\n\n if (document.getElementById(\"shopify-app-init\") == null) {\n return null;\n }\n const data = document.getElementById(\"shopify-app-init\").dataset;\n const AppBridge = window[\"app-bridge\"];\n const { TitleBar, History, Redirect } = AppBridge.actions;\n const createApp = AppBridge.default;\n \n // Create app instance in window\n window.app = createApp({\n apiKey: data.apiKey,\n host: data.host,\n forceRedirect: true,\n });\n\n // Title Bar\n TitleBar.create(app, {\n title: data.page,\n });\n // Browser history\n const history = History.create(app);\n // Browser redirect\n // const redirect = Redirect.create(app);\n\n document.addEventListener(\"turbolinks:load\", function (event) {\n console.log(\"TURBO:\",event.data.url,location.origin);\n history.dispatch(History.Action.PUSH, event.data.url.replace(location.origin,''));\n redirectThroughTurbolinks();\n });\n\n // Helper functions\n function redirectThroughTurbolinks(isInitialRedirect = false) {\n var data = document.getElementById(\"shopify-app-init\").dataset;\n var validLoadPath = data && data.loadPath;\n var shouldRedirect = false;\n switch(isInitialRedirect) {\n case true:\n shouldRedirect = validLoadPath;\n break;\n case false:\n shouldRedirect = validLoadPath && data.loadPath !== '/home'; // Replace with the app's home_path\n break;\n }\n if (shouldRedirect) Turbolinks.visit(data.loadPath);\n }\n\n // Wait for a session token before trying to load an authenticated page\n await retrieveToken(app);\n async function retrieveToken(app) {\n window.sessionToken = await getSessionToken(app);\n }\n\n // Keep retrieving a session token periodically\n keepRetrievingToken(app);\n function keepRetrievingToken(app) {\n setInterval(() => {\n retrieveToken(app);\n }, SESSION_TOKEN_REFRESH_INTERVAL);\n }\n\n // Redirect to the requested page when DOM loads\n var isInitialRedirect = true;\n redirectThroughTurbolinks(isInitialRedirect);\n});","// extracted by mini-css-extract-plugin\nexport {};"],"names":[],"sourceRoot":""}