1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14614],{48887:(e,t,r)=>{function n(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t-e<.1?"Invalid trim window: the out-point must be at least ".concat("0.10"," s after the in-point. Adjust the trim handles and try again."):null:"Invalid trim window: choose valid in and out points before saving."}async function a(e){let{storagePath:t,videoUrl:r,workspaceId:a,cropRect:o,videoWidth:i,videoHeight:l,speed:s,muted:d,trimStart:u,trimEnd:c,videoDuration:p,signal:h}=e,g=t||void 0,m=r||void 0,f=null!=c?c:p,b=n(u,f);if(b)throw Error(b);if(o&&i>0&&l>0){var v;let e=await fetch("/api/scratchbox/crop-video",{method:"POST",headers:{"Content-Type":"application/json"},signal:h,body:JSON.stringify({storagePath:g,url:g?void 0:m,workspaceId:a,cropX:Math.round(o.x*i),cropY:Math.round(o.y*l),cropWidth:Math.round(o.w*i),cropHeight:Math.round(o.h*l)})}),t=await e.json().catch(()=>({})),r=null==(v=t.data)?void 0:v.video;if(!e.ok||!(null==r?void 0:r.storagePath))throw Error(t.error||"Crop failed (".concat(e.status,")"));g=r.storagePath,r.url&&(m=r.url)}if(1!==s){let e=await fetch("/api/scratchbox/slowmo-video",{method:"POST",headers:{"Content-Type":"application/json"},signal:h,body:JSON.stringify({storagePath:g,videoUrl:g?void 0:m,mode:s>1?"speedup":"slowdown",speedFactor:s,workspaceId:a})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Speed change failed (".concat(e.status,")"));t.storagePath&&(g=t.storagePath),t.videoUrl&&(m=t.videoUrl)}let x=u>0||p>0&&f<p;if(x||d){let e=await fetch("/api/scratchbox/trim-video",{method:"POST",headers:{"Content-Type":"application/json"},signal:h,body:JSON.stringify({storagePath:g,videoUrl:g?void 0:m,workspaceId:a,save:!0,...x?{trimStart:u,trimEnd:f}:{},...d?{stripAudio:!0}:{}})}),t=await e.json().catch(()=>({}));if(!e.ok||!t.storagePath)throw Error(t.error||"Trim/mute failed (".concat(e.status,")"));g=t.storagePath,t.url&&(m=t.url)}return{storagePath:g,url:m}}r.d(t,{Bg:()=>a,YO:()=>n})},63380:(e,t,r)=>{r.d(t,{E:()=>o});var n=r(1521),a=r(90293);function o(e){let{duration:t,fps:r,onTrimChange:o,minGapSec:i=.1,videoRef:l,onDragStart:s,onDragEnd:d}=e,[u,c]=(0,n.useState)(null),p=(0,n.useRef)(null),h=(0,n.useRef)(null),g=(0,n.useRef)(null),m=(0,n.useRef)(r),f=(0,n.useRef)(o),b=(0,n.useRef)(t),v=(0,n.useRef)(i),x=(0,n.useRef)(l),y=(0,n.useRef)(s),w=(0,n.useRef)(d);return m.current=r,f.current=o,b.current=t,v.current=i,x.current=l,y.current=s,w.current=d,(0,n.useEffect)(()=>()=>{var e,t;null==(e=g.current)||e.call(g),null==(t=h.current)||t.call(h)},[]),{startDrag:(0,n.useCallback)((e,t)=>{var r,n,o,i,l;e.stopPropagation(),e.preventDefault(),null==(r=g.current)||r.call(g),g.current=null,null==(n=h.current)||n.call(h),h.current=null;let s=t.edge,d=null==(o=x.current)?void 0:o.current,u=!!d&&!d.paused;if(u&&d)try{d.pause()}catch(e){}null==(i=y.current)||i.call(y),g.current=()=>{var e,t;if(g.current=null,u){let e=null==(t=x.current)?void 0:t.current;if(e)try{e.play()}catch(e){}}null==(e=w.current)||e.call(w)},p.current={edge:s,initialMouseX:e.clientX,initialValue:t.initialValue,otherValue:t.otherValue,maxDuration:null!=(l=t.maxDuration)?l:b.current,fps:"fps"in t?t.fps:void 0,getNewValue:t.getNewValue};let j=e=>{var t,r;let n=p.current;if(!n)return;let o=n.getNewValue(e,n.initialMouseX,n.initialValue),i=void 0!==n.fps?n.fps:m.current,l=null!=i?i:30,s=Math.max(v.current,1/l);if("start"===n.edge){let e=(0,a.r1)(o,0,Math.max(0,n.otherValue-s),i);f.current(e,n.otherValue);let r=null==(t=x.current)?void 0:t.current;if(r)try{r.currentTime=e}catch(e){}}else{let e=(0,a.r1)(o,Math.min(n.otherValue+s,n.maxDuration),n.maxDuration,i);f.current(n.otherValue,e);let t=null==(r=x.current)?void 0:r.current;if(t)try{t.currentTime=e}catch(e){}}},E=e.currentTarget,P=e.pointerId;try{E.setPointerCapture(P)}catch(e){}let k=e=>{var t,r;null==(t=g.current)||t.call(g),null==(r=h.current)||r.call(h),h.current=null;try{E.releasePointerCapture(e.pointerId)}catch(e){}p.current=null,c(null)};E.addEventListener("pointermove",j),E.addEventListener("pointerup",k),E.addEventListener("pointercancel",k),h.current=()=>{E.removeEventListener("pointermove",j),E.removeEventListener("pointerup",k),E.removeEventListener("pointercancel",k)},c(s)},[]),activeDrag:u}}},65068:(e,t,r)=>{r.d(t,{SQ:()=>s,_2:()=>d,rI:()=>i,ty:()=>l});var n=r(73365);r(1521);var a=r(76590),o=r(85568);function i(e){let{...t}=e;return(0,n.jsx)(a.bL,{"data-slot":"dropdown-menu",...t})}function l(e){let{...t}=e;return(0,n.jsx)(a.l9,{"data-slot":"dropdown-menu-trigger",...t})}function s(e){let{className:t,sideOffset:r=4,...i}=e;return(0,n.jsx)(a.ZL,{children:(0,n.jsx)(a.UC,{"data-slot":"dropdown-menu-content",sideOffset:r,className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...i})})}function d(e){let{className:t,inset:r,variant:i="default",...l}=e;return(0,n.jsx)(a.q7,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":i,className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l})}},82704:(e,t,r)=>{r.d(t,{I:()=>p});var n=r(73365),a=r(1521),o=r(65068),i=r(48794),l=r(86866),s=r(19260),d=r(90293),u=r(63380);let c=[.25,.5,1,1.5,2];function p(e){let{videoRef:t,videoSrc:r,duration:p,trimStart:g=0,trimEnd:m,fps:f,currentTime:b,onTrimChange:v,onSave:x,onSpeedChange:y,isSpeedProcessing:w,isMuted:j=!1,onMuteChange:E,onSplit:P,variant:k="floating",hasTrimPoints:C=!1,mediaLoadError:S=!1,onRetryMedia:z,retryKey:I=0}=e,R=(0,a.useRef)(null),[L,M]=(0,a.useState)(0),{frames:D,error:N}=function(e,t,r,n){let[o,i]=(0,a.useState)([]),[l,s]=(0,a.useState)(!1),d=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(i([]),s(!1),!e||!t)return;let n=!1,a=document.createElement("video");d.current=a,a.muted=!0,a.playsInline=!0,a.preload="auto",a.crossOrigin="anonymous",a.src=e;let o=e=>new Promise(t=>{let r=()=>{a.removeEventListener("seeked",n),a.removeEventListener("error",o)},n=()=>{r();try{let e=document.createElement("canvas"),r=(a.videoWidth||16)/(a.videoHeight||9);e.height=44,e.width=Math.max(1,Math.round(44*r));let n=e.getContext("2d");if(!n)return t(null);n.drawImage(a,0,0,e.width,e.height),t(e.toDataURL("image/jpeg",.55))}catch(e){t(null)}},o=()=>{r(),t(null)};a.addEventListener("seeked",n),a.addEventListener("error",o,{once:!0});try{a.currentTime=e}catch(e){r(),t(null)}});return(async()=>{if(await new Promise(e=>{if(a.readyState>=1&&isFinite(a.duration)&&a.duration>0)e();else{let t=()=>{n(),e()},r=()=>{n(),e()},n=()=>{a.removeEventListener("loadedmetadata",t),a.removeEventListener("error",r)};a.addEventListener("loadedmetadata",t,{once:!0}),a.addEventListener("error",r,{once:!0})}}),n)return;if(a.error||a.readyState<1||!isFinite(a.duration)||a.duration<=0){n||s(!0);return}let e=isFinite(a.duration)&&a.duration>0?a.duration:t,l=[];for(let t=0;t<10;t++){if(n)return;let a=e*(t+.5)/r,s=await o(a);s&&l.push(s),n||i([...l])}})().catch(()=>{n||s(!0)}),()=>{n=!0;let e=d.current;if(e){try{e.pause(),e.removeAttribute("src"),e.load()}catch(e){}d.current=null}}},[e,t,r,n]),{frames:o,error:l}}(r,p,10,L+I),[T,V]=(0,a.useState)(!1),X=null!=m?m:p,F=f&&f>0?f:30;(0,a.useEffect)(()=>{let e=t.current;if(!e)return;let r=()=>V(!0),n=()=>V(!1);return e.addEventListener("error",r),e.addEventListener("loadedmetadata",n),e.addEventListener("loadeddata",n),e.error&&V(!0),()=>{e.removeEventListener("error",r),e.removeEventListener("loadedmetadata",n),e.removeEventListener("loadeddata",n)}},[t,r,I]);let _=S||T||N,O=(0,a.useCallback)(()=>{V(!1),M(e=>e+1);try{var e;null==(e=t.current)||e.load()}catch(e){}null==z||z()},[z,t]),U=(0,a.useCallback)(()=>{},[]),{startDrag:A,activeDrag:W}=(0,u.E)({duration:p,fps:f,onTrimChange:null!=v?v:U,videoRef:t}),[B,G]=(0,a.useState)(null),H=(0,a.useCallback)(e=>{var t;let r=null==(t=R.current)?void 0:t.getBoundingClientRect();r&&A(e,{edge:"start",initialValue:g,otherValue:X,maxDuration:p,getNewValue:e=>(e.clientX-r.left)/r.width*p})},[A,g,X,p]),J=(0,a.useCallback)(e=>{var t;let r=null==(t=R.current)?void 0:t.getBoundingClientRect();r&&A(e,{edge:"end",initialValue:X,otherValue:g,maxDuration:p,getNewValue:e=>(e.clientX-r.left)/r.width*p})},[A,X,g,p]),[q,Q]=(0,a.useState)(!1),Y=(0,a.useRef)(!1),Z=(0,a.useRef)(!1),K=(0,a.useCallback)(e=>{var r;let n=null==(r=R.current)?void 0:r.getBoundingClientRect();if(!n||!t.current)return;
1let a=Math.max(0,Math.min(p,(e-n.left)/n.width*p));try{t.current.currentTime=a}catch(e){}},[p,t]),$=(0,a.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId);let r=t.current;if(r&&!r.paused){Z.current=!0;try{r.pause()}catch(e){}}else Z.current=!1;Y.current=!0,Q(!0),K(e.clientX)},[K,t]),ee=(0,a.useCallback)(e=>{Y.current&&K(e.clientX)},[K]),et=(0,a.useCallback)(e=>{if(e.currentTarget.releasePointerCapture(e.pointerId),Y.current=!1,Q(!1),Z.current){Z.current=!1;try{var r;null==(r=t.current)||r.play()}catch(e){}}},[t]),[er,en]=(0,a.useState)(j);(0,a.useEffect)(()=>{en(j)},[j]);let ea=(0,a.useCallback)(e=>{e.stopPropagation();let r=!er;en(r),t.current&&(t.current.muted=r),null==E||E(r)},[er,t,E]),eo=p>0?g/p*100:0,ei=p>0?X/p*100:100,el=p>0?Math.max(0,Math.min(100,(null!=b?b:0)/p*100)):0,es="floating"===k,ed="scrub"===k,eu=28*!!es;return(0,n.jsxs)("div",{ref:R,className:"select-none",style:{position:es?"absolute":"relative",pointerEvents:"none",...es?{inset:0,zIndex:12}:{width:"100%",height:44+16*!ed}},children:[_&&(0,n.jsxs)("div",{role:"alert",style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"4px 8px",background:"rgba(15,15,20,0.94)",color:"rgba(255,255,255,0.78)",fontSize:11,pointerEvents:"auto",zIndex:40},children:[(0,n.jsx)("span",{children:"Couldn't load video preview."}),(0,n.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),O()},onPointerDown:e=>e.stopPropagation(),style:{...h,background:"rgba(249,115,22,0.2)",borderColor:"rgba(249,115,22,0.5)",color:"#ffedd5",fontWeight:700,whiteSpace:"nowrap"},children:"Retry"})]}),!_&&(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",bottom:eu,left:0,right:0,height:44,display:"flex",overflow:"hidden",borderRadius:3,pointerEvents:"none"},children:D.length>0?D.map((e,t)=>(0,n.jsx)("img",{src:e,alt:"",draggable:!1,style:{flex:1,height:"100%",objectFit:"cover",minWidth:0,display:"block"}},t)):Array.from({length:10}).map((e,t)=>(0,n.jsx)("div",{style:{flex:1,height:"100%",background:t%2==0?"rgba(255,255,255,0.05)":"rgba(255,255,255,0.09)"}},t))}),!_&&ed&&(0,n.jsx)("div",{title:"Click or drag to scrub",style:{position:"absolute",inset:0,cursor:"col-resize",pointerEvents:"auto",zIndex:24},onPointerDown:$,onPointerMove:ee,onPointerUp:et,onPointerCancel:et}),!_&&es&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",left:0,top:0,bottom:0,width:"".concat(eo,"%"),background:"rgba(0,0,0,0.45)",pointerEvents:"none"}}),(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",right:0,top:0,bottom:0,width:"".concat(100-ei,"%"),background:"rgba(0,0,0,0.45)",pointerEvents:"none"}}),(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",left:"".concat(eo,"%"),width:"".concat(ei-eo,"%"),top:0,bottom:0,border:"2px solid rgba(59,130,246,0.85)",borderRadius:2,pointerEvents:"none"}})]}),!_&&!ed&&(0,n.jsxs)("div",{title:"Drag to set trim-in point",style:{position:"absolute",left:"".concat(eo,"%"),top:0,bottom:0,width:32,transform:"translateX(-50%)",cursor:"ew-resize",pointerEvents:"auto",display:"flex",alignItems:"stretch",zIndex:20},onPointerDown:H,onPointerEnter:()=>G("start"),onPointerLeave:()=>G(e=>"start"===e?null:e),children:[(0,n.jsx)("input",{"data-trim-handle":"start","aria-label":"Trim start",type:"range",min:0,max:p,step:1/F,value:g,onChange:e=>{let r=Math.max(0,Math.min(X-.1,Number(e.target.value)));null==v||v(r,X);try{t.current&&(t.current.currentTime=r)}catch(e){}},style:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"ew-resize",zIndex:22}}),"start"===W&&(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",...es?{bottom:"100%",marginBottom:4}:{top:4},left:"50%",transform:"translateX(-50%)",padding:"2px 6px",borderRadius:4,background:"rgba(15,23,42,0.92)",color:"rgba(199,224,255,1)",fontSize:11,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",pointerEvents:"none",zIndex:30},children:(0,d.Gn)(g,f)}),(0,n.jsx)("div",{style:{margin:"auto",width:"start"===W?8:"start"===B?7:6,height:"100%",minHeight:32,background:"start"===W?"rgba(99,179,255,1)":"start"===B?"rgba(79,155,255,0.97)":"rgba(59,130,246,0.9)",borderRadius:3,boxShadow:"start"===W?"0 0 0 2px rgba(99,179,255,0.4)":"none",transition:W?"none":"width 0.1s, background 0.1s, box-shadow 0.1s"}})]}),!ed&&(0,n.jsxs)("div",{title:"Drag to set trim-out point",style:{position:"absolute",left:"".concat(ei,"%"),top:0,bottom:0,width:32,transform:"translateX(-50%)",cursor:"ew-resize",pointerEvents:"auto",display:"flex",alignItems:"stretch",zIndex:20},onPointerDown:J,onPointerEnter:()=>G("end"),onPointerLeave:()=>G(e=>"end"===e?null:e),children:[(0,n.jsx)("input",{"data-trim-handle":"end","aria-label":"Trim end",type:"range",min:0,max:p,step:1/F,value:X,onChange:e=>{let r=Math.max(g+.1,Math.min(p,Number(e.target.value)));null==v||v(g,r);try{t.current&&(t.current.currentTime=r)}catch(e){}},style:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"ew-resize",zIndex:22}}),"end"===W&&(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",...es?{bottom:"100%",marginBottom:4}:{top:4},left:"50%",transform:"translateX(-50%)",padding:"2px 6px",borderRadius:4,background:"rgba(15,23,42,0.92)",color:"rgba(199,224,255,1)",fontSize:11,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",pointerEvents:"none",zIndex:30},children:(0,d.Gn)(X,f)}),(0,n.jsx)("div",{style:{margin:"auto",width:"end"===W?8:"end"===B?7:6,height:"100%",minHeight:32,background:"end"===W?"rgba(99,179,255,1)":"end"===B?"rgba(79,155,255,0.97)":"rgba(59,130,246,0.9)",borderRadius:3,boxShadow:"end"===W?"0 0 0 2px rgba(99,179,255,0.4)":"none",transition:W?"none":"width 0.1s, background 0.1s, box-shadow 0.1s"}})]}),!_&&(0,n.jsx)("div",{title:"Drag to scrub",style:{position:"absolute",bottom:eu,left:"".concat(el,"%"),transform:"translateX(-50%)",width:22,height:44,cursor:"col-resize",pointerEvents:ed?"none":"auto",zIndex:25,display:"flex",alignItems:"center",justifyContent:"center"},onPointerDown:$,onPointerMove:ee,onPointerUp:et,onPointerCancel:et,onPointerEnter:()=>G("playhead"),onPointerLeave:()=>G(e=>"playhead"===e?null:e),children:(0,n.jsx)("div",{style:{width:q?3:"playhead"===B?2.5:2,height:"100%",background:q?"rgba(255,255,255,1)":"playhead"===B?"rgba(255,255,255,0.97)":"rgba(255,255,255,0.9)",borderRadius:1,boxShadow:q?"0 0 6px rgba(255,255,255,0.5)":"0 0 4px rgba(0,0,0,0.7)",transition:q?"none":"width 0.1s, box-shadow 0.1s"}})}),!_&&P&&(()=>{let e=(0,d.qD)(f),t=X>0?X:p,r=null==b||p<=0||b-g<e||t-b<e;return(0,n.jsx)("div",{style:{position:"absolute",bottom:eu+44+2,left:"".concat(el,"%"),transform:"translateX(-50%)",pointerEvents:"auto",zIndex:32},children:(0,n.jsx)("button",{type:"button",disabled:r,onClick:e=>{e.stopPropagation(),r||null==b||P(b)},onPointerDown:e=>e.stopPropagation(),title:r?"Move playhead away from the trim edges to split":"Split video at playhead",style:{...h,background:r?"rgba(0,0,0,0.3)":"rgba(245,158,11,0.85)",border:"1px solid ".concat(r?"rgba(255,255,255,0.08)":"rgba(245,158,11,0.5)"),opacity:r?.45:1,padding:"2px 4px",cursor:r?"default":"pointer"},children:(0,n.jsx)(i.A,{size:10})})})})(),!_&&(0,n.jsxs)("div",{style:{position:"absolute",top:es?6:-28,right:6,display:"flex",alignItems:"center",gap:4,pointerEvents:"auto",zIndex:30},children:[E&&(0,n.jsx)("button",{type:"button",onClick:ea,onPointerDown:e=>e.stopPropagation(),title:er?"Unmute clip":"Mute clip (no re-encode until save)",style:h,children:er?(0,n.jsx)(l.A,{size:10}):(0,n.jsx)(s.A,{size:10})}),y&&(0,n.jsxs)(o.rI,{children:[(0,n.jsx)(o.ty,{asChild:!0,children:(0,n.jsx)("button",{type:"button",onPointerDown:e=>e.stopPropagation(),title:"Speed preset â re-encodes the clip at a new rate",disabled:w,style:{...h,fontWeight:700,minWidth:28},children:w?"â¦":"1\xd7"})}),(0,n.jsx)(o.SQ,{side:"bottom",align:"end",className:"z-[9999]",children:c.map(e=>(0,n.jsxs)(o._2,{onClick:()=>y(e),disabled:w,children:[e,"\xd7",e<1&&(0,n.jsx)("span",{className:"ml-2 text-[10px] text-neutral-400",children:"slow"}),e>1&&(0,n.jsx)("span",{className:"ml-2 text-[10px] text-neutral-400",children:"fast"})]},e))})]}),C&&!!x&&(0,n.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),x()},onPointerDown:e=>e.stopPropagation(),title:"Save trim points to this card",style:{...h,background:"rgba(59,130,246,0.9)",border:"1px solid rgba(59,130,246,0.5)",fontWeight:700,paddingLeft:8,paddingRight:8},children:"Save trim"})]}
1),!_&&!ed&&(0,n.jsxs)("div",{"aria-label":"Trim window",style:{position:"absolute",bottom:es?eu-16:eu-2,left:"50%",transform:"translateX(-50%)",background:C?"rgba(0,0,0,0.65)":"rgba(0,0,0,0.35)",color:C?"#fff":"rgba(255,255,255,0.45)",fontSize:9,fontFamily:"ui-monospace, monospace",padding:"1px 6px",borderRadius:4,pointerEvents:"none",whiteSpace:"nowrap",transition:"opacity 0.15s"},children:[(0,d.Gn)(g,f)," â ",(0,d.Gn)(X,f)," ",(0,n.jsxs)("span",{style:{opacity:.7},children:["(",(0,d.Gn)(Math.max(0,X-g),f),")"]})]}),!_&&q&&null!=b&&p>0&&(0,n.jsx)("div",{"aria-hidden":!0,style:{position:"absolute",bottom:eu+44+3,left:"".concat(el,"%"),transform:"translateX(-50%)",background:"rgba(0,0,0,0.75)",color:"#fff",fontSize:9,fontFamily:"ui-monospace, monospace",padding:"1px 5px",borderRadius:4,pointerEvents:"none",whiteSpace:"nowrap",zIndex:32},children:(0,d.Gn)(b,f)})]})}let h={padding:"2px 6px",borderRadius:5,background:"rgba(0,0,0,0.62)",border:"1px solid rgba(255,255,255,0.15)",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:3,fontSize:10,lineHeight:"16px"}}}]);
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.