PageSourceSearch

https://emprendeaprendiendo.com/_next/static/immutable/chunks/0ilh3vm37pqh1.js

js emprendeaprendiendo.com collected 2026-09-24 18:15:00 UTC 40,394 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510914,e=>{"use strict";e.s(["default",0,function(t,r){return(n,a)=>(function(t,r,n,a){let l="SharedWorker"===t.name,i=e.b,o=[n.map(t=>e.h("string"==typeof t?t:t.path,i)).reverse(),e.X],s=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];for(let e=0;e<s.length;e++)o.push(globalThis[s[e]]);let c=new URL(e.h(r,i),location.origin),u=JSON.stringify(o);return l?c.searchParams.set("params",u):c.hash="#params="+encodeURIComponent(u),new t(c,a?{...a,type:void 0}:void 0)})(n,t,r,a)}])},463605,e=>{e.v(e.r(510914).default("static/immutable/chunks/turbopack-worker-16g0xxeppwj0k.js",["static/immutable/chunks/1z-69i8zuz9i4.js","static/immutable/chunks/turbopack-0ibpdro4_gz-w.js"]))},132144,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(399847),a=e.i(762368),l=e.i(518515),i=e.i(564346),o=e.i(632781),s=e.i(920589),s=s;let c=(0,e.i(456420).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var u=e.i(395925),d=e.i(929272),m=e.i(725981),f=e.i(263676),p=e.i(948148),b=e.i(50715);function g(e){return e instanceof b.BlobUploadError?e:new b.BlobUploadError("request_failed",!0)}let h=e=>new Promise(t=>setTimeout(t,e)),x=()=>"u"<typeof navigator||!1!==navigator.onLine;async function v(e,t){let r=new AbortController,n=setTimeout(()=>r.abort(),45e3);try{let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:r.signal}),a=await n.json();if(!n.ok){let e="string"==typeof a.error&&/^[a-z0-9_]{1,64}$/.test(a.error)?a.error:`request_http_${n.status}`;throw new b.BlobUploadError(e,408===n.status||429===n.status||n.status>=500||"recording_busy"===e)}return a}catch(e){throw g(e)}finally{clearTimeout(n)}}async function w(e){let t=e.blob.type.split(";",1)[0].trim().toLowerCase(),r={recordingId:e.recordingId,fileName:e.fileName,fileSize:e.blob.size,mimeType:t,durationMs:e.durationMs},n=async t=>{for(let n=0;;n++)try{return await v("/api/admin/assets/recording-backup-init",{...r,failure:t})}catch(r){let t=g(r);if(e.onFailure?.(t,"init"),n>0||!t.retryable||!x())throw t;await h(1500)}},a=await n();if(a.asset)return a.asset;let l=async(t,r)=>(e.onFailure?.(t,r),n({version:a.version,phase:r,code:t.code,elapsedMs:t.elapsedMs,loadedBytes:t.loadedBytes,online:x()}));if(!a.backupReady)for(let t=0;t<2;t++)try{if(!a.uploadUrl)throw new b.BlobUploadError("upload_url_missing",!1);await (0,b.putBlob)(a.uploadUrl,e.blob,a.contentType,t=>e.onProgress(Math.min(88,Math.round(.88*t))));break}catch(i){let e=g(i),r=await l(e,"put");if(r.asset)return r.asset;if(r.backupReady){a=r;break}if(t>0||!e.retryable||!x())throw e;if(await h(1500),(a=await n()).asset)return a.asset;if(a.backupReady)break}e.onProgress(90);for(let r=0;;r++)try{let r=await v("/api/admin/assets/recording-ingest",{storageKey:a.storageKey,fileName:e.fileName,mimeType:t,durationMs:e.durationMs});return e.onProgress(100),r.asset}catch(n){let e=g(n),t=await l(e,"ingest");if(t.asset)return t.asset;if(r>0||!t.backupReady||!e.retryable||!x())throw e;await h(1500)}}var y=e.i(454463),j=e.i(880809),k=e.i(941501),N=e.i(301382);let S="recordings",E="chunks",P="by-recording";function C(e){return new Promise((t,r)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>r(e.error??Error("idb_request_failed"))})}function T(e){return new Promise((t,r)=>{e.oncomplete=()=>t(),e.onabort=()=>r(e.error??Error("idb_aborted")),e.onerror=()=>r(e.error??Error("idb_failed"))})}async function M(){if("u"<typeof indexedDB)throw Error("indexeddb_unavailable");let e=indexedDB.open("clonify-recordings",1);return e.onupgradeneeded=()=>{let t=e.result;t.objectStoreNames.contains(S)||t.createObjectStore(S,{keyPath:"id"}),t.objectStoreNames.contains(E)||t.createObjectStore(E,{keyPath:["recordingId","index"]}).createIndex(P,"recordingId",{unique:!1})},C(e)}async function R(e,t){let r=e.transaction(S,"readonly"),n=T(r),[a]=await Promise.all([C(r.objectStore(S).get(t)),n]);return a??null}async function L(e){"u">typeof navigator&&navigator.storage?.persist&&await navigator.storage.persist().catch(()=>!1),await $(e.id).catch(()=>{});
1let t=Date.now(),r={id:e.id,ownerSignature:e.ownerSignature,mode:e.mode,mimeType:e.mimeType,createdAt:t,updatedAt:t,durationMs:null,chunkCount:0,completed:!1},n=await M();try{let e=n.transaction(S,"readwrite"),t=T(e);return e.objectStore(S).put(r),await t,r}finally{n.close()}}async function z(e,t,r){let n=await M();try{let a=await R(n,e);if(null===a)throw Error("recording_not_found");let l={...a,updatedAt:Date.now(),chunkCount:Math.max(a.chunkCount,t+1)},i=n.transaction([S,E],"readwrite"),o=T(i);i.objectStore(E).put({recordingId:e,index:t,blob:r}),i.objectStore(S).put(l),await o}finally{n.close()}}async function D(e,t){let r=await M();try{let n=await R(r,e);if(null===n)return;let a=r.transaction(S,"readwrite"),l=T(a);a.objectStore(S).put({...n,updatedAt:Date.now(),durationMs:Math.max(0,Math.floor(t)),completed:!0}),await l}finally{r.close()}}async function _(e,t){let r=await M();try{let n=await R(r,e);if(null===n||n.ownerSignature!==t)return null;let a=r.transaction(E,"readonly"),l=T(a),[i]=await Promise.all([C(a.objectStore(E).index(P).getAll(e)),l]);if(i.sort((e,t)=>e.index-t.index),0===i.length)return null;return{meta:n,blob:new Blob(i.map(e=>e.blob),{type:n.mimeType})}}finally{r.close()}}async function I(e){let t=await M();try{let r=t.transaction(S,"readonly"),n=T(r),[a]=await Promise.all([C(r.objectStore(S).getAll()),n]),l=Date.now()-6048e5,i=a.filter(e=>e.updatedAt<l);return await Promise.all(i.map(e=>$(e.id).catch(()=>{}))),a.filter(t=>t.ownerSignature===e&&t.updatedAt>=l&&t.chunkCount>0).sort((e,t)=>t.updatedAt-e.updatedAt)}finally{t.close()}}async function $(e){let t=await M();try{let r=t.transaction([S,E],"readwrite"),n=T(r);r.objectStore(S).delete(e);let a=r.objectStore(E).index(P).openKeyCursor(IDBKeyRange.only(e));a.onsuccess=()=>{let e=a.result;null!==e&&(r.objectStore(E).delete(e.primaryKey),e.continue())},await n}finally{t.close()}}function A({onClose:e,dialogRef:r,labelledBy:n,children:a}){return(0,t.jsxs)("div",{ref:r,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,t.jsx)("div",{onClick:e,className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),(0,t.jsx)("div",{"data-testid":"record-media-panel",className:"relative w-full max-w-4xl max-h-[92vh] overflow-y-auto overflow-x-hidden flex flex-col bg-[var(--bg)] border border-[var(--border)] rounded-[var(--radius-lg)] shadow-[var(--shadow-lg)] animate-[fadeInScale_180ms_ease-out]",children:a})]})}function U({active:e,disabled:r,onClick:n,icon:a,label:l}){return(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":e,disabled:r,onClick:n,className:"-mb-px border-b-2 px-2 py-2 text-sm inline-flex items-center gap-1.5 transition-colors "+(e?"border-[var(--accent)] text-[var(--fg)] font-medium":"border-transparent text-[var(--fg-muted)] hover:text-[var(--fg)]")+(r?" opacity-50 cursor-not-allowed":""),children:[a,(0,t.jsx)("span",{children:l})]})}function B({active:e,disabled:r,onClick:n,label:a}){return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":e,disabled:r,onClick:n,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs border transition-colors "+(e?"bg-[var(--fg)] text-[var(--bg)] border-[var(--fg)]":"bg-[var(--surface)] text-[var(--fg-muted)] border-[var(--border)] hover:text-[var(--fg)] hover:border-[var(--border-strong)]")+(r?" opacity-50 cursor-not-allowed":""),children:a})}function O({enabled:e,disabled:r,onChange:n,labels:a}){return(0,t.jsxs)("button",{type:"button",role:"switch","aria-checked":e,disabled:r,onClick:()=>n(!e),className:"inline-flex items-center gap-2 text-xs text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors w-fit disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"w-8 h-4 rounded-full relative transition-colors "+(e?"bg-[var(--accent)]":"bg-[var(--bg-muted)]"),children:(0,t.jsx)("span",{className:"absolute top-0.5 w-3 h-3 rounded-full bg-white transition-[left] "+(e?"left-4":"left-0.5")})}),(0,t.jsx)(s.default,{size:12}),(0,t.jsx)("span",{children:e?a.micToggleDisable:a.micToggleEnable})]})}function W({mode:e,hint:r}){let n="audio"===e?s.default:l.Camera;return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 min-h-[320px] rounded-[var(--radius-lg)] border border-dashed border-[var(--border)] bg-[var(--bg-subtle)]/40",children:[(0,t.jsx)(n,{size:56,className:"text-[var(--fg-muted)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)] max-w-xs text-center",children:r})]})}function F({stream:e,pos:n,sizePct:a,onPosChange:l,onSizeChange:i,draggable:o,showControls:s,containerRef:c,hintLabel:u,sizeLabel:d,sizeMinPct:m,sizeMaxPct:f}){let p=(0,r.useRef)(null),[b,g]=(0,r.useState)({w:0,h:0});(0,r.useEffect)(()=>{null!==p.current&&(p.current.srcObject=e,p.current.play().catch(()=>{}))},[e]),(0,r.useEffect)(()=>
1{let e=c.current;if(null===e)return;function t(){if(null===e)return;let t=e.getBoundingClientRect();g({w:t.width,h:t.height})}t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[c]);let{w:h,h:x}=b,v=Math.min(h,x)*a,w=v/2,y=h*n.xPct,j=x*n.yPct,k=x-(j+w)>=40,N=j-w>=32;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",width:`${v}px`,aspectRatio:"1 / 1",left:`${100*n.xPct}%`,top:`${100*n.yPct}%`,transform:"translate(-50%, -50%)"},onPointerDown:function(e){if(!o)return;e.preventDefault();let t=c.current;if(null===t)return;let r=t.getBoundingClientRect();function n(e){let t=(e.clientX-r.left)/r.width,n=(e.clientY-r.top)/r.height,i=Math.min(r.width,r.height)*a/2,o=i/r.width,s=i/r.height;l({xPct:Math.max(o,Math.min(1-o,t)),yPct:Math.max(s,Math.min(1-s,n))})}function i(){window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",i)}e.currentTarget.setPointerCapture(e.pointerId),window.addEventListener("pointermove",n),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",i)},className:"rounded-full overflow-hidden border-2 border-white shadow-[0_0_0_2px_rgba(0,0,0,0.4),0_8px_24px_rgba(0,0,0,0.4)] select-none "+(o?"cursor-grab active:cursor-grabbing":"cursor-default"),children:(0,t.jsx)("video",{ref:p,playsInline:!0,autoPlay:!0,muted:!0,className:"w-full h-full object-cover pointer-events-none"})}),s&&o&&h>0?(0,t.jsx)("div",{style:{position:"absolute",left:`${y}px`,top:N?`${j-w-8}px`:`${j+w+8}px`,transform:N?"translate(-50%, -100%)":"translate(-50%, 0)",pointerEvents:"none"},className:"px-2 py-1 rounded-full bg-black/75 backdrop-blur-sm text-white text-xs whitespace-nowrap",children:u}):null,s&&h>0?(0,t.jsxs)("div",{style:{position:"absolute",left:`${y}px`,top:k?`${j+w+8}px`:`${j-w-8}px`,transform:k?"translate(-50%, 0)":"translate(-50%, -100%)"},className:"inline-flex items-center gap-2 px-2.5 py-1 rounded-full bg-black/75 backdrop-blur-sm text-white text-xs",children:[(0,t.jsx)("span",{className:"opacity-80",children:d}),(0,t.jsx)("input",{type:"range",min:Math.round(100*m),max:Math.round(100*f),value:Math.round(100*a),onChange:e=>(function(e){if(i(e),h<=0||x<=0)return;let t=Math.min(h,x)*e/2,r=t/h,a=t/x,o={xPct:Math.max(r,Math.min(1-r,n.xPct)),yPct:Math.max(a,Math.min(1-a,n.yPct))};(o.xPct!==n.xPct||o.yPct!==n.yPct)&&l(o)})(Number(e.target.value)/100),"aria-label":d,onPointerDown:e=>e.stopPropagation(),className:"w-20 accent-[var(--accent)]"})]}):null]})}async function q(e,t,r,n,a,l){let i=e.type||"application/octet-stream";return i.startsWith("video/")?K(e,t,r,n,a,l):X(e,t,i,r)}async function K(e,t,r,n,a,l){let i=await w({blob:e,fileName:t,recordingId:a,durationMs:l,onProgress:r,onFailure:(e,t)=>(0,y.reportClientError)(Error(e.code),{boundary:`recording-upload-${t}`,kind:e.retryable?"network":"app"})});if(null!==n)try{let e=await fetch(`/api/admin/assets/${i.id}/thumbnail`,{method:"POST",headers:{"Content-Type":n.type||"image/jpeg"},body:n,signal:AbortSignal.timeout(15e3)});if(!e.ok){let t=await e.text().catch(()=>"");console.warn(`[recording] thumbnail upload failed: ${e.status} ${t.slice(0,200)}`)}}catch(e){console.warn("[recording] thumbnail upload error:",e)}else console.warn("[recording] no client-generated thumbnail — tile will use Bunny default");return r(100),i}async function X(e,t,r,n){n(0);let a=new File([e],t,{type:r}),l=await (0,N.startStorageUpload)(a,{folderId:null},{onProgress:n}),i=await fetch(`/api/admin/assets/${l}`);if(!i.ok)throw Error(`asset ${i.status}`);let o=await i.json();return n(100),o.asset}function V(){let e=new Date,t=e=>e.toString().padStart(2,"0");return`${e.getFullYear()}${t(e.getMonth()+1)}${t(e.getDate())}-${t(e.getHours())}${t(e.getMinutes())}${t(e.getSeconds())}`}function H(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint8Array(16));e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t=Array.from(e,e=>e.toString(16).padStart(2,"0"));return`${t.slice(0,4).join("")}-${t.slice(4,6).join("")}-${t.slice(6,8).join("")}-${t.slice(8,10).join("")}-${t.slice(10).join("")}`}async function Y(){let e=await fetch("/api/me/session-signature",{cache:"no-store"});if(!e.ok)return null;let t=await e.json();return"string"==typeof t.signature&&"anon"!==t.signature?t.signature:null}function J(e){return e.startsWith("video/webm")?"webm":e.startsWith("video/mp4")?"mp4":e.startsWith("audio/webm")?"webm":e.startsWith("audio/mp4")?"m4a":e.startsWith("audio/mpeg")?"mp3":"bin"}e.s(["RecordMediaModal",0,function({initialMode:g="audio",lockMode:h=!1,onClose:x,onUploaded:v,labels:w}){let N=(0,p.useTranslations)("AdminBiblioteca.record"),S=(0,r.useRef)(!1),E=(0,r.useId)(),P=(0,r.useRef)(null),C=(0,r.useRef)(null),[T,M]=(0,r.useState)(g),[R,K]=(0,r.useState)("withCamera"),[X,Q]=(0,r.useState)({xPct:.13,yPct:.85}),[G,Z]=(0,r.useState)(.18),[ee,et]=(0,r.useState)(!0),[er,en]=(0,r.useState)("idle"),[ea,el]=(0,r.useState)(0),[ei,eo]=(0,r.useState)(null),[es,ec]=(0,r.useState)(null),[eu,ed]=(0,r.useState)(null),[em,ef]=(0,r.useState)(null),ep=(0,r.useRef)(null),[eb,eg]=(0,r.useState)(null),eh=(0,r.useRef)(null),ex=(0,r.useRef)(0),[ev,ew]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(null),ek=(0,r.useRef)(null),eN=(0,r.useRef)(null),eS=(0,r.useRef)(null),eE=(0,r.useRef)(null),eP=(0,r.useRef)(0),eC=(0,r.useRef)(new Map),eT=(0,r.useRef)(null),eM=(0,r.useRef)([]),eR=(0,r.useRef)(Promise.resolve()),eL=(0,r.useRef)(0),ez=(0,r.useRef)(!1),eD=(0,r.useRef)(null),e_=(0,r.useRef)(null),eI=(0,r.useRef)(null),e$=(0,r.useRef)(new Set),[eA,eU]=(0,r.useState)(null),[eB,eO]=(0,r.useState)(null),[eW,eF]=(0,r.useState)(null),eq=(0,r.useRef)(null),eK=(0,r.useRef)(null),eX=(0,r.useRef)(null),eV=(0,r.useRef)(null),eH=(0,r.useRef)(null),eY=(0,r.useRef)(null),eJ=(0,r.useRef)(X),eQ=(0,r.useRef)(G),eG=(0,r.useRef)(null),eZ=(0,r.useRef)(null),e0=(0,r.useRef)(null),e1=(0,r.useRef)(null),e2="uploading"===er;(0,r.useEffect)(()=>{let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=window.requestAnimationFrame(()=>{C.current?.focus({preventScroll:!0})});function r(e){let t;if("Tab"!==e.key)return;let r=(t=P.current)?Array.from(t.querySelectorAll('button:not([disabled]),input
1:not([disabled]),select:not([disabled]),textarea:not([disabled]),a[href],[tabindex]:not([tabindex="-1"])')).filter(e=>e.getClientRects().length>0):[];if(0===r.length){e.preventDefault(),P.current?.focus({preventScroll:!0});return}let n=r[0],a=r[r.length-1],l=document.activeElement;e.shiftKey&&(l===n||!P.current?.contains(l))?(e.preventDefault(),a.focus()):e.shiftKey||l!==a&&P.current?.contains(l)||(e.preventDefault(),n.focus())}return document.addEventListener("keydown",r),()=>{window.cancelAnimationFrame(t),document.removeEventListener("keydown",r),e?.isConnected&&e.focus({preventScroll:!0})}},[]);let e4=(0,r.useMemo)(()=>!("u"<typeof MediaRecorder)&&!!navigator.mediaDevices,[]);function e5(e){ek.current=e,ew(e)}function e3(){for(let e of(ek.current?.getTracks().forEach(e=>e.stop()),eN.current?.getTracks().forEach(e=>e.stop()),eS.current?.getTracks().forEach(e=>e.stop()),ek.current=null,eN.current=null,ew(null),ej(null),eS.current=null,e$.current))e.close().catch(()=>{});e$.current.clear(),e8(),null!==eq.current&&(eq.current.srcObject=null),null!==e0.current&&(e0.current.srcObject=null,e0.current=null),null!==e1.current&&(e1.current.srcObject=null,e1.current=null),null!==eH.current&&(eH.current=null),null!==eY.current&&(window.clearInterval(eY.current),eY.current=null)}function e8(){let e=eE.current;for(let t of(eE.current=null,null!==e&&(e.postMessage({type:"stop"}),e.terminate()),eC.current.values()))t(null);eC.current.clear()}function e6(){let e=eD.current;eD.current=null,null!==e&&($(e).catch(()=>{}),ed(t=>t?.id===e?null:t)),eU(null),eF(null),null!==eB&&(URL.revokeObjectURL(eB),eO(null)),eM.current=[],eR.current=Promise.resolve(),eL.current=0,ez.current=!1,el(0),ec(null)}async function e9(){if(null!==eu)try{let e=e_.current??await Y();if(null===e)return;e_.current=e;let t=await _(eu.id,e);if(null===t||0===t.blob.size)return;let r=URL.createObjectURL(t.blob);eD.current=t.meta.id,M(t.meta.mode),eU(t.blob),eO(r),el(Math.max(1,Math.round((t.meta.durationMs??t.meta.updatedAt-t.meta.createdAt)/1e3))),en("review"),ec(null)}catch(e){ec(e instanceof Error?e.message:String(e))}}async function e7(){null!==eu&&(await $(eu.id).catch(()=>{}),ed(null))}async function te(){return"recording"!==er&&"review"!==er||await (0,k.confirm)({title:w.confirmDiscardTitle,body:w.confirmDiscardBody,confirmLabel:w.confirmDiscardYes,cancelLabel:w.confirmDiscardNo,tone:"danger"})}async function tt(){e2||await te()&&tr()}function tr(){ex.current+=1,eh.current=null,eg(null),to(),null!==eG.current&&(window.clearTimeout(eG.current),eG.current=null),e3(),e6(),eT.current?.state==="recording"&&eT.current.stop(),x()}async function tn(e){null!==eh.current||"recording"===er||"uploading"===er||T===e||await te()&&(e3(),e6(),M(e),en("idle"),ec(null))}async function ta(){if(null!==eh.current)return;let e=++ex.current;eh.current="preview",eg("preview"),ec(null);try{if("audio"===T){let t=await navigator.mediaDevices.getUserMedia({audio:!0});if(e!==ex.current)return void t.getTracks().forEach(e=>e.stop());e5(t),en("preview");return}if("webcam"===T){let t=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1920},height:{ideal:1080}},audio:!0});if(e!==ex.current)return void t.getTracks().forEach(e=>e.stop());e5(t),en("preview");return}if("screen"===T){let t=await navigator.mediaDevices.getDisplayMedia({video:{frameRate:{ideal:30}},audio:!0});if(e!==ex.current)return void t.getTracks().forEach(e=>e.stop());if(eN.current=t,ej(t),t.getVideoTracks()[0]?.addEventListener("ended",()=>{e===ex.current&&(eT.current?.state==="recording"?td():(to(),e3(),en("idle")))}),"withCamera"===R)try{let t=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:640}},audio:ee});if(e!==ex.current)return void t.getTracks().forEach(e=>e.stop());e5(t)}catch{if(e!==ex.current)return;e5(null),K("only")}else if(ee)try{let t=await navigator.mediaDevices.getUserMedia({audio:!0});if(e!==ex.current)return void t.getTracks().forEach(e=>e.stop());e5(t)}catch{if(e!==ex.current)return;e5(null)}en("preview");return}}catch(r){if(e!==ex.current)return;let t=r instanceof Error?r.message:String(r);r instanceof DOMException&&("NotAllowedError"===r.name||"SecurityError"===r.name)||/permission|denied|notallowederror/i.test(t)?en("permissionDenied"):(ec(w.captureUnavailableLabel),en("idle"))}finally{e===ex.current&&(eh.current=null,eg(null))}}function tl(e,t){let r=[...e,...t];if(0===r.length)return null;if(1===r.length)return r[0];try{let e=new AudioContext;e$.current.add(e);let t=e.createMediaStreamDestination();
1for(let n of r)e.createMediaStreamSource(new MediaStream([n])).connect(t);return t.stream.getAudioTracks()[0]??r[0]}catch{return r[0]}}async function ti(){let t,r=eN.current,n=ek.current,a=r?.getVideoTracks()[0]??null,l=n?.getVideoTracks()[0]??null;if(null===r||null===n||null===a||null===l||"u"<typeof Worker)return!1;e8();try{t=e.r(463605)(Worker,{type:"module",name:"clonify-screen-compositor"})}catch{return!1}eE.current=t;let i=!1,o=null,s=null,c=new Promise((e,t)=>{o=e,s=t}),u=window.setTimeout(()=>{s?.(Error("background_compositor_timeout"))},5e3);function d(e){i?eT.current?.state==="recording"&&(ec(w.recordingInterruptedLabel),td()):s?.(Error(e))}t.onmessage=e=>{let t=e.data;if("ready"===t.type){i=!0,window.clearTimeout(u),o?.(t.track);return}if("snapshot"===t.type){let e=eC.current.get(t.requestId);eC.current.delete(t.requestId),e?.(t.blob);return}if("ended"===t.type){eT.current?.state==="recording"&&td();return}d(t.message)},t.onerror=e=>{e.preventDefault(),d(e.message||"background_compositor_failed")};let m=a.clone(),f=l.clone(),p=a.getSettings();try{t.postMessage({type:"start",screenTrack:m,cameraTrack:f,width:Number(p.width)||1920,height:Number(p.height)||1080,xPct:eJ.current.xPct,yPct:eJ.current.yPct,sizePct:eQ.current},[m,f])}catch{return m.stop(),f.stop(),window.clearTimeout(u),e8(),!1}try{let e=await c;if(eE.current!==t)return e.stop(),!1;let a=new MediaStream([e]),l=tl(r.getAudioTracks(),n.getAudioTracks());return null!==l&&a.addTrack(l),eS.current=a,!0}catch{return window.clearTimeout(u),e8(),!1}}function to(){null!==ep.current&&(window.clearInterval(ep.current),ep.current=null),ef(null)}async function ts(){if(null!==eh.current)return;let e=++ex.current;eh.current="recording",eg("recording");try{await tc(e)}catch{e8(),e===ex.current&&ec(w.captureUnavailableLabel)}finally{e===ex.current&&(eh.current=null,eg(null))}}async function tc(e){let t;if(ec(null),eM.current=[],eR.current=Promise.resolve(),eL.current=0,"screen"===T&&"withCamera"===R){let t=await ti();if(e!==ex.current)return void e8();t||function(){if(null===ey)return;let e=ey.getVideoTracks()[0]?.getSettings()??{},t=Number(e.width)||1920,r=Number(e.height)||1080,n=document.createElement("canvas");n.width=t,n.height=r,eH.current=n;let a=n.getContext("2d");if(null===a)return;let l=document.createElement("video");l.srcObject=ey,l.muted=!0,l.play().catch(()=>{}),e0.current=l;let i=null;function o(){if(null!==eH.current){try{a.drawImage(l,0,0,t,r)}catch{}if(null!==i){let e=Math.round(Math.min(t,r)*eQ.current),n=Math.round(t*eJ.current.xPct),l=Math.round(r*eJ.current.yPct),o=n-e/2,s=l-e/2;o=Math.max(0,Math.min(o,t-e)),s=Math.max(0,Math.min(s,r-e)),a.save(),a.shadowColor="rgba(0,0,0,0.4)",a.shadowBlur=24,a.beginPath(),a.arc(o+e/2,s+e/2,e/2,0,2*Math.PI),a.closePath(),a.fillStyle="#000",a.fill(),a.restore(),a.save(),a.beginPath(),a.arc(o+e/2,s+e/2,e/2,0,2*Math.PI),a.closePath(),a.clip();try{let t=i.videoWidth||640,r=i.videoHeight||480,n=Math.max(e/t,e/r),l=t*n,c=r*n,u=o+(e-l)/2,d=s+(e-c)/2;a.drawImage(i,u,d,l,c)}catch{}a.restore()}}}null!==ev&&ev.getVideoTracks().length>0&&((i=document.createElement("video")).srcObject=ev,i.muted=!0,i.play().catch(()=>{}),e1.current=i),o(),eY.current=window.setInterval(o,1e3/30);let s=n.captureStream(30),c=tl(ey.getAudioTracks(),ev?.getAudioTracks()??[]);null!==c&&s.addTrack(c),eS.current=s}()}let r=function(){if("audio"===T||"webcam"===T)return ev;if("only"===R){if(null===ey)return null;let e=[...ey.getVideoTracks()],t=tl(ey.getAudioTracks(),ev?.getAudioTracks()??[]);return null!==t&&e.push(t),new MediaStream(e)}return eS.current}();if(null===r)return void ec(w.captureUnavailableLabel);let n="audio"!==T,a=function(e){for(let t of e?['video/mp4;codecs="avc1.42E01E,mp4a.40.2"',"video/mp4","video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm"]:["audio/webm;codecs=opus","audio/webm","audio/mp4"])if(MediaRecorder.isTypeSupported(t))return t}(n);try{t=new MediaRecorder(r,{mimeType:a,videoBitsPerSecond:n?5e6:void 0,audioBitsPerSecond:128e3})}catch(e){ec(e instanceof Error?e.message:String(e));return}let l=H();eD.current=l;try{let e=e_.current??await Y();if(null===e)throw Error("recovery_scope_unavailable");e_.current=e,await L({id:l,ownerSignature:e,mode:T,mimeType:t.mimeType||a||"video/webm"}),ez.current=!0}catch{ez.current=!1}if(e!==ex.current){eD.current=null,ez.current=!1,await $(l).catch(()=>{});return}t.ondataavailable=e=>{if(!e.data||0===e.data.size)return;let t=e.data,r=eL.current++;eR.current=eR.current.then(async()=>
1{if(ez.current)try{await z(l,r,t);return}catch{ez.current=!1;let e=e_.current,t=await _(l,e??"").catch(()=>null);eM.current=t?[t.blob]:[]}eM.current.push(t)})},t.onstop=async()=>{let e=t.mimeType||"video/webm";null!==eI.current&&(window.clearInterval(eI.current),eI.current=null);let r=eZ.current?Date.now()-eZ.current:0;eZ.current=null,await eR.current;let n=null;if(ez.current){await D(l,r).catch(()=>{});let e=await _(l,e_.current??"").catch(()=>null);n=e?.blob??null,null!==e&&ed(e.meta)}else eM.current.length>0&&(n=new Blob(eM.current,{type:e}));if(null===n||0===n.size){ec(w.uploadErrorLabel),en("idle");return}console.log("[recording] finalized blob:",{size:n.size,type:n.type,chunks:eL.current,recoverable:ez.current});let a=URL.createObjectURL(n);eU(n),eO(a),en("review")},eT.current=t;try{t.start(5e3)}catch(e){eT.current=null,eD.current=null,ez.current=!1,await $(l).catch(()=>{}),e3(),en("idle"),ec(e instanceof Error?e.message:String(e));return}eZ.current=Date.now(),en("recording"),el(0),null!==eI.current&&window.clearInterval(eI.current),eI.current=window.setInterval(()=>{el(e=>e+1)},1e3),n&&(null!==eG.current&&window.clearTimeout(eG.current),eG.current=window.setTimeout(()=>{tu().then(e=>{null!==e&&eF(e)})},2e3))}async function tu(){if("screen"===T&&"withCamera"===R&&null!==eE.current){let e=await function(){let e=eE.current;if(null===e)return Promise.resolve(null);let t=++eP.current;return new Promise(r=>{let n=window.setTimeout(()=>{eC.current.delete(t),r(null)},2e3);eC.current.set(t,e=>{window.clearTimeout(n),r(e)}),e.postMessage({type:"snapshot",requestId:t})})}();if(null!==e)return e}if("screen"===T&&"withCamera"===R&&null!==eH.current){let e=eH.current;return new Promise(t=>{e.toBlob(e=>t(e),"image/jpeg",.85)})}let e=eq.current;if(null===e||e.readyState<2)return null;let t=document.createElement("canvas");t.width=e.videoWidth||1280,t.height=e.videoHeight||720;let r=t.getContext("2d");if(null===r)return null;try{r.drawImage(e,0,0,t.width,t.height)}catch{return null}return new Promise(e=>{t.toBlob(t=>e(t),"image/jpeg",.85)})}function td(){null!==eG.current&&(window.clearTimeout(eG.current),eG.current=null,tu().then(e=>{null!==e&&eF(e)})),eT.current?.state==="recording"&&eT.current.stop(),e3()}async function tm(){if(null!==eA&&!S.current){S.current=!0,ec(null),en("uploading"),eo(0);try{let e=J(eA.type),t="audio"===T?`audio-${V()}.${e}`:`recording-${V()}.${e}`,r=eD.current??H();eD.current=r;let n=await q(eA,t,e=>eo(e),eW,r,1e3*ea);v(n),e3(),e6(),x()}catch(t){let e=t instanceof b.BlobUploadError?t.code:"recording_upload_failed";(0,y.reportClientError)(Error(e),{boundary:"recording-upload"}),j.toast.show({tone:"error",message:w.uploadErrorLabel}),ec(N("storage_exhausted"===e?"uploadQuotaError":"uploadRetryError")),en("review"),eo(null)}finally{S.current=!1}}}function tf(e){let t=Math.floor(e/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return`${t}:${r}`}(0,r.useEffect)(()=>{eJ.current=X,eQ.current=G,eE.current?.postMessage({type:"layout",xPct:X.xPct,yPct:X.yPct,sizePct:G})},[X,G]),(0,r.useEffect)(()=>{let e=!1;return Y().then(async t=>{if(e||null===t)return;e_.current=t;let r=await I(t);e||ed(r.find(e=>!h||e.mode===g)??null)}).catch(()=>{}),()=>{e=!0}},[g,h]),(0,r.useEffect)(()=>{let e=document.body.style.overflow,t=document.createElement("style");function r(e){"Escape"!==e.key||e2||(e.preventDefault(),e.stopPropagation(),tt())}return t.textContent="#clonify-host,#clonify-bubble,#clonify-activity-toast{display:none!important}",document.head.appendChild(t),document.body.style.overflow="hidden",window.addEventListener("keydown",r),()=>{document.body.style.overflow=e,t.remove(),window.removeEventListener("keydown",r)}},[e2]),(0,r.useEffect)(()=>()=>{e3(),null!==eB&&URL.revokeObjectURL(eB),null!==eI.current&&window.clearInterval(eI.current),null!==eY.current&&window.clearInterval(eY.current),null!==ep.current&&window.clearInterval(ep.current),null!==eG.current&&window.clearTimeout(eG.current)},[]),(0,r.useEffect)(()=>{let e=eq.current;if(null===e)return;let t="webcam"===T?ev:"screen"===T?ey:null;if(null===t){null!==e.srcObject&&(e.srcObject=null);return}e.srcObject!==t&&(e.srcObject=t,e.muted=!0,e.play().catch(()=>{}))},[T,er,ev,ey]);let tp="webcam"===T||"screen"===T;return e4?(0,t.jsxs)(A,{onClose:e2?()=>{}:()=>void tt(),dialogRef:P,labelledBy:E,children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-4 px-6 py-4 border-b border-[var(--border)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 min-w-0",children:[(0,t.jsx)("h2",{id:E,className:"text-base font-semibold text-[var(--fg)] truncate",children:w.title}),(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:w.subtitle})]}),(0,t.jsx)("button",{ref:C,type:"button",onClick:()=>void tt(),disabled:e2,"aria-label":w.closeLabel,className:"flex items-center justify-center w-8 h-8 rounded text-[var(--fg-muted)] hover:text-[var(--fg)] hover:bg-[var(--bg-subtle)] transition-colors disabled:opacity-50 flex-shrink-0",children:(0,t.jsx)(f.X,{size:16})})]}),h?null:(0,t.jsxs)("div",{className:"flex items-center justify-around ga
1p-0 px-1 pt-3 border-b border-[var(--border)]",role:"tablist",children:[(0,t.jsx)(U,{active:"audio"===T,disabled:"recording"===er||"uploading"===er||null!==eb,onClick:()=>void tn("audio"),icon:(0,t.jsx)(s.default,{size:14}),label:w.tabAudio}),(0,t.jsx)(U,{active:"webcam"===T,disabled:"recording"===er||"uploading"===er||null!==eb,onClick:()=>void tn("webcam"),icon:(0,t.jsx)(l.Camera,{size:14}),label:w.tabWebcam}),(0,t.jsx)(U,{active:"screen"===T,disabled:"recording"===er||"uploading"===er||null!==eb,onClick:()=>void tn("screen"),icon:(0,t.jsx)(c,{size:14}),label:w.tabScreen})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-6 py-5 min-h-[400px]",children:["idle"===er&&null!==eu?(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 rounded-[var(--radius-md)] border border-[var(--accent)]/35 bg-[var(--accent)]/8 p-4",children:[(0,t.jsx)(n.AlertCircle,{size:20,className:"text-[var(--accent)] flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-[var(--fg)]",children:w.recoveryTitle}),(0,t.jsx)("p",{className:"text-xs text-[var(--fg-muted)]",children:w.recoveryBody})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsx)("button",{type:"button",onClick:()=>void e7(),className:"px-3 py-1.5 rounded-[var(--radius)] text-xs text-[var(--fg-muted)] hover:bg-[var(--bg-subtle)]",children:w.recoveryDiscard}),(0,t.jsxs)("button",{type:"button",onClick:()=>void e9(),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-[var(--radius)] bg-[var(--accent)] text-[var(--accent-fg)] text-xs font-medium",children:[(0,t.jsx)(u.RotateCcw,{size:13}),w.recoveryAction]})]})]}):null,"idle"===er&&"screen"!==T?(0,t.jsx)(W,{mode:T,hint:w.permissionPrompt}):null,"screen"===T&&"idle"===er?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{role:"radiogroup",className:"flex items-center gap-2",children:[(0,t.jsx)(B,{active:"withCamera"===R,disabled:null!==eb,onClick:()=>K("withCamera"),label:w.variantScreenWithCamera}),(0,t.jsx)(B,{active:"only"===R,disabled:null!==eb,onClick:()=>K("only"),label:w.variantScreenOnly})]}),(0,t.jsx)(O,{enabled:ee,disabled:null!==eb,onChange:et,labels:w})]}):null,"permissionDenied"===er?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[(0,t.jsx)(n.AlertCircle,{size:28,className:"text-[var(--danger)]"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-[var(--fg)]",children:w.permissionDeniedTitle}),(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)] max-w-md",children:w.permissionDeniedBody})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{en("idle"),ta()},className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] text-sm text-[var(--fg)] hover:bg-[var(--bg-subtle)] transition-colors",children:w.permissionRetry})]}):null,("preview"===er||"recording"===er)&&tp?(0,t.jsxs)("div",{ref:eK,className:"relative aspect-video rounded-[var(--radius-lg)] overflow-hidden bg-black",children:[(0,t.jsx)("video",{ref:eq,playsInline:!0,autoPlay:!0,muted:!0,className:"w-full h-full object-contain"}),"recording"===er?(0,t.jsxs)("div",{className:"absolute top-3 left-3 inline-flex items-center gap-1.5 px-2 py-1 rounded-full bg-[var(--danger)] text-white text-xs font-medium",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse","aria-hidden":!0}),(0,t.jsx)("span",{children:tf(ea)})]}):null,null!==em?(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-black/60 backdrop-blur-sm",children:[(0,t.jsx)("span",{className:"text-[120px] leading-none font-bold text-white tabular-nums animate-[fadeInScale_220ms_ease-out]",children:em},em),(0,t.jsx)("span",{className:"text-white text-sm opacity-90 max-w-md text-center px-4",children:w.countdownHint})]}):null,"screen"===T&&"withCamera"===R&&null!==ev&&ev.getVideoTracks().length>0?(0,t.jsx)(F,{stream:ev,pos:X,sizePct:G,onPosChange:Q,onSizeChange:Z,draggable:!0,showControls:"preview"===er||"recording"===er,containerRef:eK,hintLabel:w.bubbleHint,sizeLabel:w.bubbleSizeLabel,sizeMinPct:.08,sizeMaxPct:.32}):null]}):null,("preview"===er||"recording"===er)&&"audio"===T?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-5 min-h-[360px] rounded-[var(--radius-lg)] bg-gradient-to-b from-[var(--bg-subtle)] to-[var(--bg-muted)] border border-[var(--border)]",children:[(0,t.jsx)(s.default,{size:72,className:"recording"===er?"text-[var(--danger)] animate-pulse":"text-[var(--accent)]"}),"recording"===er?(0,t.jsx)("span",{className:"text-5xl font-mono text-[var(--fg)] tabular-nums",children:tf(ea)}):(0,t.jsx)("span",{className:"text-sm text-[var(--fg-muted)] max-w-xs text-center",children:w.permissionPrompt})]}):null,"review"===er&&null!==eB?(0,t.jsx)("div",{children:tp?(0,t.jsx)("video",{ref:eX,src:eB,controls:!0,className:"w-full max-h-[60vh] rounded-[var(--radius-lg)] bg-black"}):(0,t.jsx)("audio",{ref:eV,src:eB,controls:!0,className:"w-full"})}):null,"uploading"===er?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Loader2,{size:14,className:"animate-spin text-[var(--fg-muted)]"}),(0,t.jsxs)("span",{className:"text-sm text-[var(--fg-muted)]",children:[(ei??0)<90?w.protectingLabel:w.uploadingLabel,null!==ei?` \xb7 ${ei}%`:""]})]}),(0,t.jsx)("div",{className:"h-1 rounded-full bg-[var(--bg-muted)] overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-[var(--accent)] transition-[width] duration-200 ease-out",style:{width:`${ei??0}%`}})})]}):null,null!==es&&"permissionDenied"!==er?(0,t.jsx)("p",{role:"alert",className:"text-sm text-[var(--danger)]",children:es}):null]}),(0,t.jsxs)("footer",{className:"review"===er?"flex items-center justify-center px-6 pt-0 pb-6":"flex flex-col items-stretch gap-3 px-6 py-4 border-t border-[var(--border)] sm:flex-row sm:items-center sm:justify-between",children:["review"!==er?(0,t.jsx)("div",{className:"text-xs text-[var(--fg-muted)]",children:"idle"===er?w.permissionPrompt:null}):null,(0,t.jsxs)("div",{className:"review"===er?"flex w-full flex-col items-stretch justify-center gap-2 sm:w-auto 
1sm:flex-row sm:flex-wrap sm:items-center sm:gap-3":"flex w-full items-center gap-2 sm:w-auto",children:["idle"===er?(0,t.jsxs)("button",{type:"button",onClick:()=>void ta(),disabled:null!==eb,"aria-busy":"preview"===eb,className:"inline-flex w-full items-center justify-center gap-1.5 px-4 py-2 rounded-[var(--radius)] bg-[var(--accent)] text-[var(--accent-fg)] text-sm font-medium hover:opacity-90 transition-opacity disabled:opacity-60 disabled:cursor-wait sm:w-auto",children:["preview"===eb?(0,t.jsx)(o.Loader2,{size:14,className:"animate-spin"}):(0,t.jsx)(i.Circle,{size:14,fill:"currentColor"}),(0,t.jsx)("span",{children:"preview"===eb?w.preparingLabel:w.startLabel})]}):null,"preview"===er&&null===em?(0,t.jsxs)("button",{type:"button",onClick:()=>{"screen"===T?(to(),ef(3),ep.current=window.setInterval(()=>{ef(e=>null===e?null:e<=1?(null!==ep.current&&(window.clearInterval(ep.current),ep.current=null),ts(),null):e-1)},1e3)):ts()},disabled:null!==eb,"aria-busy":"recording"===eb,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-[var(--radius)] bg-[var(--danger)] text-white text-sm font-medium hover:opacity-90 transition-opacity disabled:opacity-60 disabled:cursor-wait",children:["recording"===eb?(0,t.jsx)(o.Loader2,{size:14,className:"animate-spin"}):(0,t.jsx)(i.Circle,{size:14,fill:"currentColor"}),(0,t.jsx)("span",{children:"recording"===eb?w.preparingLabel:w.startLabel})]}):null,null!==em?(0,t.jsxs)("button",{type:"button",onClick:to,className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] text-sm text-[var(--fg)] hover:bg-[var(--bg-subtle)] transition-colors",children:[(0,t.jsx)(f.X,{size:14}),(0,t.jsx)("span",{children:w.countdownCancel})]}):null,"recording"===er?(0,t.jsxs)("button",{type:"button",onClick:td,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-[var(--radius)] bg-[var(--fg)] text-[var(--bg)] text-sm font-medium hover:opacity-90 transition-opacity",children:[(0,t.jsx)(d.Square,{size:14,fill:"currentColor"}),(0,t.jsx)("span",{children:w.stopLabel})]}):null,"review"===er?(0,t.jsxs)(t.Fragment,{children:[null!==eB?(0,t.jsxs)("a",{href:eB,download:`recording-${eD.current??V()}.${J(eA?.type??"")}`,className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] px-4 py-2.5 text-sm text-[var(--fg)] transition-colors hover:bg-[var(--bg-subtle)]",children:[(0,t.jsx)(a.Download,{size:16}),(0,t.jsx)("span",{children:N("downloadRecording")})]}):null,(0,t.jsxs)("button",{type:"button",onClick:tr,className:"inline-flex min-h-10 min-w-[120px] items-center justify-center gap-2 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] px-4 py-2.5 text-sm text-[var(--danger)] transition-colors hover:bg-[var(--bg-subtle)]",children:[(0,t.jsx)(f.X,{size:16}),(0,t.jsx)("span",{children:w.discardLabel})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>{e6(),en("idle")},className:"inline-flex min-h-10 min-w-[132px] items-center justify-center gap-2 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] px-4 py-2.5 text-sm text-[var(--fg)] transition-colors hover:bg-[var(--bg-subtle)]",children:[(0,t.jsx)(u.RotateCcw,{size:16}),(0,t.jsx)("span",{children:w.redoLabel})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>void tm(),className:"inline-flex min-h-10 min-w-[168px] items-center justify-center gap-2 rounded-[var(--radius)] bg-[var(--accent)] px-5 py-2.5 text-sm font-medium text-[var(--accent-fg)] transition-opacity hover:opacity-90",children:[(0,t.jsx)(m.Upload,{size:16}),(0,t.jsx)("span",{children:w.uploadLabel})]})]}):null]})]})]}):(0,t.jsx)(A,{onClose:x,dialogRef:P,labelledBy:E,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-6",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{id:E,className:"text-base font-semibold text-[var(--fg)]",children:w.noBrowserSupportTitle}),(0,t.jsx)("button",{ref:C,type:"button",onClick:x,"aria-label":w.closeLabel,className:"w-8 h-8 rounded grid place-items-center text-[var(--fg-muted)] hover:text-[var(--fg)] hover:bg-[var(--bg-subtle)]",children:(0,t.jsx)(f.X,{size:16})})]}),(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:w.noBrowserSupportBody})]})})}],132144)}]);

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.