1import{h as m,a as h,C as u,u as v,n as R}from"./index.8c7e38b2.js";import{R as f}from"./RecordBrowserCommon.3eec3760.js";import{a as y}from"./RecordUiComponents.c89d5211.js";import{R as g}from"./RecordUiUploadProgress.18c97ae2.js";import{I as E}from"./IFrameMouseHandlingMixin.aaea66e2.js";import"./berrycast-sdk-web-ui.esm.0068facc.js";import"./LiveUploader.bf11faeb.js";import"./RecordCountDownOptions.ad021e9c.js";import"./RecorderStateWriter.fe0efcfd.js";import"./datetime.520a7f7e.js";import"./Uploader.40a9e67f.js";import"./ConversationService.d4157193.js";import"./RecordService.d2b853f6.js";import"./FileType.6d1211ee.js";import"./UserService.ade6986e.js";import"./CustomBrandColorsMixin.2e348c6e.js";import"./ProfilPictureMediaStreamService.ad1c2804.js";import"./ScreenStreamer.c5ebfc07.js";import"./ImageService.126d86d7.js";import"./ManualUploader.7ede9c28.js";import"./Dismiss.690da8cd.js";import"./IconRecordPause.f1fbbbde.js";import"./IconDrag.00871709.js";import"./RecordUiRequestVideo.f4fec655.js";import"./UiDivider.968a26bb.js";import"./ClipboardService.de5b04f5.js";import"./UiFieldFile.a6d65da9.js";import"./UiTab.347ec1d9.js";import"./TheUserAvatar.d244fd5a.js";var P=Object.defineProperty,U=Object.getOwnPropertyDescriptor,_=(e,r,t,s)=>{for(var i=s>1?void 0:s?U(r,t):r,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(s?o(r,t,i):o(i))||i);return s&&i&&P(r,t,i),i};let c=class extends m(f,E){constructor(){super(...arguments),this.createdConversationUuid=null,this.hasReportedUpload=!1,this.showVideoPlayerModal=!1,this.videoPlayerActions=null}async created(){var e,r,t;this.conversationName=(e=this.$route.query.conversationName)!=null?e:null,this.conversationUuid=(r=this.$route.query.conversationUuid)!=null?r:null,this.apiKey=(t=this.$route.query.publicApiKey)!=null?t:null,this.skipCanRecordCheck=this.skipCanRecordCheck||!!this.apiKey,this.$on("after:initializeRecorder",()=>this.forwardRecorderEvent()),this.$on("after:initialize",()=>this.forwardUploaderEvent()),this.$on("recordingSettings:recordingType:changed",()=>{this.sendRecordEvent({eventName:"recordingType:change",data:{recordingType:this.recordingSettings.recordingType}})}),this.forwardRecorderEvent(),this.videoPlayerActions=[{label:this.$i18n.t("PageRecordEmbed.videoPlayerActions.recordAgain"),variant:"text",onClick:async()=>{this.discardPreviousTake(),await this.initializeRecorder(),this.showVideoPlayerModal=!1,this.$nextTick(()=>this.applyRecordBrandColors())}},{label:this.$i18n.t("PageRecordEmbed.videoPlayerActions.submit"),variant:"secondary",onClick:()=>this.submitToMaster()}]}getUIElementList(){var e,r,t;return[...(r=(e=this.$refs.recordUiComponents)==null?void 0:e.getUIElementList())!=null?r:[],(t=this.$refs.videoPlayerModal)==null?void 0:t.$el]}forwardRecorderEvent(){var e,r,t,s,i,a,o,n,d,l;(e=this.recorder)==null||e.on("cancel",()=>this.sendRecordEvent({eventName:"cancel"})),(r=this.recorder)==null||r.on("start",()=>this.sendRecordEvent({eventName:"start"})),(t=this.recorder)==null||t.on("restart",()=>this.sendRecordEvent({eventName:"restart"})),(s=this.recorder)==null||s.on("resume",()=>this.sendRecordEvent({eventName:"resume"})),(i=this.recorder)==null||i.on("pause",()=>this.sendRecordEvent({eventName:"pause"})),(a=this.recorder)==null||a.on("stop",()=>this.sendRecordEvent({eventName:"stop"})),(o=this.recorder)==null||o.cameraStreamer.on("hide",()=>this.sendRecordEvent({eventName:"camera:hide"})),(n=this.recorder)==null||n.cameraStreamer.on("show",()=>this.sendRecordEvent({eventName:"camera:show"})),(d=this.recorder)==null||d.microphoneStreamer.on("mute",()=>this.sendRecordEvent({eventName:"microphone:mute"})),(l=this.recorder)==null||l.microphoneStreamer.on("unmute",()=>this.sendRecordEvent({eventName:"microphone:unmute"}))}forwardUploaderEvent(){var r,t,s,i,a;(r=this.uploader)==null||r.on("error:upload",()=>this.sendRecordEvent({eventName:"error:upload"})),(t=this.uploader)==null||t.on("error:process",()=>this.sendRecordEvent({eventName:"error:process"}));let e;(s=this.uploader)==null||s.on("progress",o=>{this.sendRecordEvent({eventName:"progress",data:o.data})}),(i=this.uploader)==null||i.on("message:linked",o=>e=o.data),(a=this.uploader)==null||a.on("uploaded",async o=>{var n;if((n=this.recordingSettings)!=null&&n.reviewWindow)this.createdConversationUuid=o.data.conversationUuid,this.showVideoPlayerModal=!0,this.applyRecordBrandColors(!0);else{this.createdConversationUuid=o.data.conversationUuid,this.showVideoPlayerModal=!0,this.applyRecordBrandColors(!0),this.hasReportedUpload=!0;const d=e!=null?e:await h.conversations.fetch({uuid:o.data.conversationUuid});this.sendRecordEvent({eventName:"uploaded",data:d})}})}discardPreviousTake(){var e;
1this.hasReportedUpload||(e=this.uploader)==null||e.discard().catch(()=>{}),this.createdConversationUuid=null,this.hasReportedUpload=!1}async submitToMaster(){this.showVideoPlayerModal=!1,this.hasReportedUpload=!0;const e=await h.conversations.fetch({uuid:this.createdConversationUuid});this.sendRecordEvent({eventName:"uploaded",data:e})}sendRecordEvent(e){var r;(r=window.parent)==null||r.postMessage({eventName:"berrycast:record-event",data:e},"*")}};c=_([u({components:{RecordUiComponents:y,RecordUiUploadProgress:g,VideoPlayerModal:()=>v(()=>import("./VideoPlayerModal.04f845cf.js"),["assets/VideoPlayerModal.04f845cf.js","assets/index.8c7e38b2.js","assets/index.55499072.css","assets/ConversationVideoPlayer.53ac652c.js","assets/ConversationVideoPlayer.14443a30.css","assets/CustomBrandColorsMixin.2e348c6e.js","assets/ConversationHelper.0f695325.js","assets/ConversationService.d4157193.js","assets/datetime.520a7f7e.js","assets/TimeHelper.9422cdcd.js"])}})],c);var w=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"record-ui w-full min-h-screen flex flex-col"},[e.showRecordComponents?t("RecordUiComponents",{ref:"recordUiComponents"}):e._e(),e.isUploading&&e.recordingSettings&&e.recordingSettings.uploadProgressWindow.enable?t("RecordUiUploadProgress",{attrs:{uploader:e.uploader}}):e._e(),e.showVideoPlayerModal?t("VideoPlayerModal",{ref:"videoPlayerModal",attrs:{conversationUuid:e.createdConversationUuid,actions:e.videoPlayerActions}}):e._e()],1)},C=[];const p={};var N=R(c,w,C,!1,M,null,null,null);function M(e){for(let r in p)this[r]=p[r]}var oe=function(){return N.exports}();export{oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.