PageSourceSearch

https://stardome.ai/assets/GCRecordingEditModal-CJRXfGfb.js

js stardome.ai collected 2026-10-05 14:49:36 UTC 8,577 bytes, 1 lines download raw bytes

1import{r as n,j as e,aq as _}from"./index-DwnkAUt7.js";import{g as K,a as O,b as Y}from"./GroundControlMain-30FxKkQE.js";import{C as H}from"./check-BwX1zodC.js";import{P as J}from"./opentok-Cq22M1ww.js";import{P as Q,a as Z,V as ee,b as te}from"./volume-x-UYy8DmTA.js";import{T as ne}from"./trash-2-DiwhF-o2.js";import{D as ie}from"./download-C_9TznaJ.js";import"./clock-TGeClkOS.js";import"./credit-card-ujeMnNpb.js";import"./chevron-right-BuYfg5Tr.js";import"./video-ciYnuxCG.js";import"./loader-circle-CR92kh1m.js";import"./external-link-BcBjkrP9.js";import"./rotate-ccw-BmOc-NyZ.js";import"./monitor-BQvxdLeD.js";import"./plus-BIsRoBc5.js";import"./file-text-CnMN2Fib.js";import"./link-2-CSyLhmJe.js";import"./pen-line-nsejPTTo.js";import"./eye-CL7mW_1-.js";import"./useIsNarrow-DAB2-W12.js";import"./Input-Bv6vofBM.js";import"./helpers-DaC_ttu_.js";import"./dollar-sign-aPQ2LMUt.js";import"./circle-alert-DC_kLiqL.js";import"./chevron-left-BmMt8GWx.js";import"./shield-StEpeiq6.js";import"./ErrorModal-CBCq7pAz.js";import"./calendar-days-B_YKzbVn.js";import"./upload-DKPDiodS.js";import"./circle-check-TVwuelxH.js";function _e({recording:r,logId:l,onClose:y,onDeleted:F,onUpdated:N}){const s=n.useRef(null),b=n.useRef(null),[g,x]=n.useState(!1),[o,U]=n.useState(()=>localStorage.getItem("gc_video_muted")==="1"),[j,S]=n.useState(0),[i,B]=n.useState(0),[d,L]=n.useState(null),[$,m]=n.useState(!0),[k,v]=n.useState(null);n.useEffect(()=>{m(!0),v(null),K(l,r.id).then(t=>{L(t),m(!1)}).catch(()=>{v("Could not load video — you may not have access."),m(!1)})},[l,r.id]);const[c,h]=n.useState(r.recording_name??"Screen Recording"),[V,f]=n.useState(!1),[C,R]=n.useState(!1),[X,w]=n.useState(!1),[p,z]=n.useState(!1),[I,D]=n.useState(null);n.useEffect(()=>{s.current&&(s.current.muted=o),localStorage.setItem("gc_video_muted",o?"1":"0")},[o]);const A=n.useCallback(()=>{const t=s.current;!t||!i||(g?t.pause():t.play())},[g,i]);function G(t){const a=s.current,u=b.current;if(!a||!u||!i)return;const M=u.getBoundingClientRect(),T=Math.max(0,Math.min(1,(t.clientX-M.left)/M.width));a.currentTime=T*i,S(T*i)}async function E(){const t=c.trim();if(t){R(!0);try{const a=await O(l,r.id,t);N(a),f(!1)}catch{}finally{R(!1)}}}async function q(){z(!0),D(null);try{await Y(l,r.id),F()}catch{D("Failed to delete recording."),z(!1)}}function P(t){if(!Number.isFinite(t)||t<0)return"0:00";const a=Math.floor(t/60),u=Math.floor(t%60);return`${a}:${String(u).padStart(2,"0")}`}const W=i>0?j/i*100:0;return e.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:1100,display:"flex",alignItems:"center",justifyContent:"center",padding:16},onClick:t=>{t.target===t.currentTarget&&y()},children:e.jsxs("div",{style:{background:"#fff",borderRadius:16,width:"100%",maxWidth:680,boxShadow:"0 8px 40px rgba(0,0,0,0.22)",overflow:"hidden"},onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #f3f4f6"},children:[V?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1},children:[e.jsx("input",{value:c,onChange:t=>h(t.target.value),onKeyDown:t=>{t.key==="Enter"&&E(),t.key==="Escape"&&(h(r.recording_name??"Screen Recording"),f(!1))},autoFocus:!0,style:{flex:1,fontSize:15,fontWeight:600,border:"1px solid #d1d5db",borderRadius:6,padding:"4px 8px",outline:"none"}}),e.jsx("button",{onClick:E,disabled:C,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"5px 10px",borderRadius:6,background:"#2563eb",color:"#fff",border:"none",fontSize:13,fontWeight:600,cursor:"pointer"},children:C?"…":e.jsx(H,{size:14})}),e.jsx("button",{onClick:()=>{h(r.recording_name??"Screen Recording"),f(!1)},style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"5px 8px",borderRadius:6,background:"#f3f4f6",border:"1px solid #e9e9e9",cursor:"pointer"},children:e.jsx(_,{size:14})})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:15,fontWeight:700,color:"#181d27",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c}),e.jsx("button",{onClick:()=>f(!0),title:"Rename",style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",color:"#9ca3af",display:"flex",padding:2},children:e.jsx(J,{size:14})})]}),e.jsx("button",{onClick:y,style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",color:"#9ca3af",display:"flex",padding:4,marginLeft:8},children:e.jsx(_,{size:18})})]}),e.jsx("div",{style:{background:"#000",aspectRatio:"16/9",position:"relative"},children:$?e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#6b7280",fontSize:14,gap:8},children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{animation:"gcSpin 1s linear infinite"},children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),"Loading…",e.jsx("style",{children:"@keyframes gcSpin { to { transform: rotate(360deg); } }"})]}):k?e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#ef4444",fontSize:14,padding:"0 24px",textAlign:"center"},children:k}):d?e.jsx("video",{ref:s,src:d,style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onLoadedMetadata:()=>{const t=s.current;t&&B(Number.isFinite(t.duration)?t.duration:0)},onTimeUpdate:()=>{const t=s.current;t&&S(t.currentTime)},onPlay:()=>x(!0),onPause:()=>x(!1),onEnded:()=>x(!1)}):e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af",fontSize:14},children:"Video not available yet — check back soon"})}),e.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid #f3f4f6"},children:[e.jsxs("div",{ref:b,onClick:G,style:{position:"relative",height:6,background:"#e9e9e9",borderRadius:3,cursor:i?"pointer":"default",marginBottom:10},children:[e.jsx("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:`${W}%`,background:"#2563eb",borderRadius:3}}),i>0&&e.jsx("div",{style:{position:"absolute",top:"50%",left:`${W}%`,transform:"translate(-50%, -50%)",width:12,height:12,borderRadius:"50%",background:"#2563eb",boxShadow:"0 0 0 2px #fff",pointerEvents:"none"}})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[e.jsx("button",{onClick:A,disabled:!i,style:{width:32,height:32,borderRadius:"50%",background:"#2563eb",border:"none",display:"flex",alignItems:"center",justifyContent:"center",cursor:i?"pointer":"not-allowed",opacity:i?1:.4,flexShrink:0},children:g?e.jsx(Q,{size:14,color:"#fff"}):e.jsx(Z,{size:14,color:"#fff"})}),e.jsxs("span",{style:{fontSize:12,fontFamily:"monospace",color:"#6b7280",flex:1,userSelect:"none"},children:[P(j)," / ",P(i)]}),e.jsxs("button",{onClick:()=>U(t=>!t),style:{display:"flex",alignItems:"center",gap:4,padding:"4px 10px",borderRadius:6,background:o?"#fef2f2":"#f3f4f6",border:`1px solid ${o?"#fca5a5":"#e9e9e9"}`,cursor:"pointer",color:o?"#dc2626":"#374151",fontSize:12,fontWeight:600},children:[o?e.jsx(ee,{size:13}):e.jsx(te,{size:13}),o?"Muted":"Audio"]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",gap:10},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:X?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:13,color:"#dc2626",fontWeight:600},children:"Delete this recording?"}),e.jsx("button",{onClick:q,disabled:p,style:{padding:"6px 14px",borderRadius:7,background:"#dc2626",color:"#fff",border:"none",fontSize:13,fontWeight:600,cursor:p?"not-allowed":"pointer",opacity:p?.7:1},children:p?"Deleting…":"Yes, delete"}),e.jsx("button",{onClick:()=>w(!1),style:{padding:"6px 14px",borderRadius:7,background:"#f3f4f6",border:"1px solid #e9e9e9",fontSize:13,cursor:"pointer"},children:"Cancel"}),I&&e.jsx("span",{style:{fontSize:12,color:"#dc2626"},children:I})]}):e.jsxs("button",{onClick:()=>w(!0),style:{display:"flex",alignItems:"center",gap:5,padding:"7px 14px",borderRadius:7,background:"#fef2f2",border:"1px solid #fca5a5",color:"#dc2626",fontSize:13,fontWeight:600,cursor:"pointer"},children:[e.jsx(ne,{size:14}),"Delete"]})}),d&&e.jsxs("a",{href:d,download:c,target:"_blank",rel:"noreferrer",style:{display:"flex",alignItems:"center",gap:5,padding:"7px 14px",borderRadius:7,background:"#2563eb",color:"#fff",textDecoration:"none",fontSize:13,fontWeight:600},children:[e.jsx(ie,{size:14}),"Download"]})]})]})})}export{_e 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.