1import{D as o,U as c,H as m}from"./OperationQueueKzEpmh-u.js";import{f as p}from"./chunkReloadRecoveryrjuMb-b8.js";import"./item-name.utilsBH3paGZr.js";import"./dexie2jmnBxhj.js";import"./item.typesx7Q7rrX9.js";import"./content.typesyje91KzF.js";import"./constantsDW26WJ6H.js";import"./extraction.pure.utilsDQPW8yIh.js";import"./url.utils3SlYVg-c.js";import"./vue-runtimeBHGad_ZB.js";import"./cjs-helpersC4iS2aBk.js";import"./bootstrap-vue-nextDXY4qsO1.js";const l=[];async function u(t){return await Promise.all(t.map(async e=>{var i;if(!((i=e.frame)!=null&&i.encryptedFrame))return{...e,frame:null};try{const s=await c.instance.getUserRequestContext(e.userId),r=await m.instance.decryptData(s,e.frame.encryptedFrame);return{...e,frame:{frameId:e.frame.frameId,capturedAt:e.frame.capturedAt,kind:e.frame.kind,width:e.frame.width,height:e.frame.height,dataUrl:String((r==null?void 0:r.dataUrl)||""),url:String((r==null?void 0:r.url)||""),title:String((r==null?void 0:r.title)||""),tabs:Array.isArray(r==null?void 0:r.tabs)?r.tabs.map(n=>({title:String((n==null?void 0:n.title)||""),url:String((n==null?void 0:n.url)||""),active:(n==null?void 0:n.active)===!0})):[],captureError:String((r==null?void 0:r.captureError)||"")}}}catch(s){return p("[LIVE_VIEW] frame decrypt failed",{clientId:e.clientId,errorMessage:(s==null?void 0:s.message)||String(s)}),{...e,frame:null,frameError:"This frame could not be decrypted"}}}))}l.push({path:"/liveView/start",handler:async(t,e)=>{const i=Array.isArray(e==null?void 0:e.userIds)?e.userIds.filter(Boolean):[];if(!i.length)throw new Error("At least one child is required");const s=await o("/user/liveView/start",{userIds:i,cadenceMs:e==null?void 0:e.cadenceMs,clientId:e==null?void 0:e.clientId},{deduplicate:!1});return{session:s.session,devices:await u(s.devices||[])}}});l.push({path:"/liveView/latest",handler:async(t,e)=>{const i=String((e==null?void 0:e.sessionId)||"").trim();if(!i)throw new Error("Session is required");const s=await o("/user/liveView/latest",{sessionId:i,clientId:e==null?void 0:e.clientId,cadenceMs:e==null?void 0:e.cadenceMs},{deduplicate:!1});return{session:s.session,devices:await u(s.devices||[])}}});l.push({path:"/liveView/stop",handler:async(t,e)=>{const i=String((e==null?void 0:e.sessionId)||"").trim();return i?await o("/user/liveView/stop",{sessionId:i},{deduplicate:!1}):{stopped:!0}}});export{l 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.