1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1333],{61333:(e,t,o)=>{o.d(t,{nK:()=>T,fJ:()=>N,C$:()=>W,Iw:()=>x});var n=o(9829),s=function(e){return e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.ERROR="error",e}({});class i{constructor(e,t,o){this.workflowId=e,this.config=t,this.socket=null,this.latencyCheckInterval=null,this.lastPingTime=0,this.pongHandler=e=>{if(e.timestamp===this.lastPingTime){let e=Date.now()-this.lastPingTime;this._status.latency=e}},this.eventBus=o,this._status={state:s.DISCONNECTED,reconnectAttempts:0}}get status(){return{...this._status}}async connect(){var e;if(null==(e=this.socket)?void 0:e.connected)return void console.warn(`[WS Connection] Already connected to workflow ${this.workflowId}`);this._status.state=s.CONNECTING;try{this.socket=(0,n.io)(this.config.url,{path:this.config.path||"/socket.io",auth:this.config.auth,reconnection:this.config.reconnection??!0,reconnectionAttempts:this.config.reconnectionAttempts??10,reconnectionDelay:this.config.reconnectionDelay??2e3,reconnectionDelayMax:this.config.reconnectionDelayMax??3e4,randomizationFactor:.5,transports:this.config.transports||["websocket"],timeout:this.config.timeout||2e4,upgrade:!1,forceNew:!1,autoConnect:!0}),this.setupEventForwarding(),this.setupConnectionHandlers(),this.startLatencyCheck()}catch(e){throw this._status.state=s.ERROR,this._status.error=e,e}}disconnect(){var e;this.socket&&(this.eventBus.emit("_connection",{type:"disconnected",workflowId:this.workflowId,reason:"manual_disconnect"}),this.socket.emit("leave_workflow",{workflow_id:this.workflowId}),this.stopLatencyCheck(),this.socket.off("connect"),this.socket.off("disconnect"),this.socket.off("connect_error"),this.socket.off("error"),this.socket.off("pong"),this.socket.off("auth_error"),this.socket.off("auth_success"),this.socket.offAny(),(null==(e=this.socket.io)?void 0:e.engine)&&(this.socket.io.engine.off("error"),this.socket.io.engine.off("packet")),this.socket.io&&(this.socket.io.off("reconnect_attempt"),this.socket.io.off("reconnect"),this.socket.io.off("reconnect_failed")),this.socket.disconnect(),this.socket=null,this._status.state=s.DISCONNECTED,this._status.disconnectedAt=new Date)}emit(e,t){var o;if(!(null==(o=this.socket)?void 0:o.connected))return void console.warn(`[WS Connection] Cannot emit ${e}: not connected`);this.socket.emit(e,t)}isConnected(){var e;return(null==(e=this.socket)?void 0:e.connected)||!1}getLatency(){return this._status.latency??null}setupEventForwarding(){this.socket&&this.socket.onAny((e,t)=>{var o;let n={...t,_meta:{...null==t?void 0:t._meta,workflowId:this.workflowId,receivedAt:new Date().toISOString(),socketId:null==(o=this.socket)?void 0:o.id}};this.eventBus.emit(e,n)})}setupConnectionHandlers(){this.socket&&(this.socket.on("connect",()=>{this._status.state=s.CONNECTED,this._status.connectedAt=new Date,this._status.reconnectAttempts=0,this._status.error=void 0,this.socket.emit("join_workflow",{workflow_id:this.workflowId}),this.eventBus.emit("_connection",{type:"connected",workflowId:this.workflowId})}),this.socket.on("disconnect",e=>{this._status.state=s.DISCONNECTED,this._status.disconnectedAt=new Date,this.eventBus.emit("_connection",{type:"disconnected",workflowId:this.workflowId,reason:e})}),this.socket.on("connect_error",e=>{this._status.state=s.ERROR;let t=null==e?void 0:e.data,o=(null==t?void 0:t.message)||(null==e?void 0:e.message)||"Unknown connection error",n=(null==t?void 0:t.reason)||"unknown";this._status.error=Error(o),console.error(`[WS Connection] Connection error for workflow ${this.workflowId}:`,{message:o,reason:n,timestamp:null==t?void 0:t.timestamp,originalError:e,errorData:t}),this.eventBus.emit("_connection",{type:"error",workflowId:this.workflowId,error:o,reason:n})}),this.socket.on("error",e=>{console.error(`[WS Connection] Socket ERROR packet for workflow ${this.workflowId}:`,e),console.error("[WS Connection] Error message:",e.message),this.eventBus.emit("_connection",{type:"socket_error",workflowId:this.workflowId,error:e.message||"Unknown socket error"})}),this.socket.io.engine.on("error",e=>{console.error(`[WS Engine] Engine-level error for workflow ${this.workflowId}:`,e)}),this.socket.io.engine.on("packet",e=>{}),this.socket.io.on("reconnect_attempt",e=>{this._status.state=s.RECONNECTING,this._status.reconnectAttempts=e,this.eventBus.emit("_connection",{type:"reconnecting",workflowId:this.workflowId,attempt:e})}),this.socket.io.on("reconnect",e=>{this._status.state=s.CONNECTED,this._status.reconnectAttempts=0,this.socket.emit("join_workflow",{workflow_id:this.workflowId}),this.eventBus.emit("_connection",{type:"reconnected",workflowId:this.workflowId,attempt:e})}),this.socket.io.on("reconnect_failed",()=>{this._status.state=s.ERROR,this._status.error=Error("Reconnection failed"),console.error(`[WS Connection] Reconnection failed for workflow ${this.workflowId}`),this.eventBus.emit("_connection",{type:"reconnect_failed",workflowId:this.workflowId})}),this.socket.on("auth_error",e=>{console.error(`[WS Connection] Auth error for workflow ${this.workflowId}:`,e),this._status.state=s.ERROR,this._status.error=Error(e.message||"Authentication failed"),this.eventBus.emit("_connection",{type:"auth_error",workflowId:this.workflowId,error:e.message,reason:e.reason}),this.disconnect()}),this.socket.on("auth_success",e=>{this.eventBus.emit("_connection",{type:"auth_success",workflowId:this.workflowId,userId:e.user_id})}))}startLatencyCheck(){var e;this.stopLatencyCheck(),null==(e=this.socket)||e.on("pong",this.pongHandler),this.latencyCheckInterval=setInterval(()=>{var e;(null==(e=this.socket)?void 0:e.connected)&&(this.lastPingTime=Date.now(),this.socket.emit("ping",{timestamp:this.lastPingTime}))},1e4)}stopLatencyCheck(){var e;this.latencyCheckInterval&&(clearInterval(this.latencyCheckInterval),this.latencyCheckInterval=null),null==(e=this.socket)||e.off("pong",this.pongHandler)}getConnectionQuality(){let e=this._status.latency;return null==e?"unknown":e<100?"good":e<300?"fair":"poor"}}
1class r{constructor(e,t,o={maxConnections:10,debug:!1}){this.config=e,this.eventBus=t,this.options=o,this.connections=new Map,this.stats={activeConnections:0,totalCreated:0,totalCleaned:0,averageLifetime:0,estimatedMemoryUsage:0}}async getConnection(e){let t=this.connections.get(e);return t?t.isConnected()||await t.connect():(this.connections.size>=this.options.maxConnections&&this.removeOldestConnection(),t=new i(e,this.config,this.eventBus),await t.connect(),this.connections.set(e,t),this.stats.totalCreated++,this.stats.activeConnections=this.connections.size,this.options.debug&&(console.log(`[Connection Pool] Created connection for workflow ${e}`),console.log(`[Connection Pool] Active connections: ${this.connections.size}/${this.options.maxConnections}`))),t}removeConnection(e){let t=this.connections.get(e);t&&(t.disconnect(),this.connections.delete(e),this.stats.totalCleaned++,this.stats.activeConnections=this.connections.size,this.options.debug&&(console.log(`[Connection Pool] Removed connection for workflow ${e}`),console.log(`[Connection Pool] Active connections: ${this.connections.size}`)))}hasConnection(e){return this.connections.has(e)}getExistingConnection(e){return this.connections.get(e)}getActiveWorkflows(){return Array.from(this.connections.keys())}getStats(){return this.stats.estimatedMemoryUsage=50*this.connections.size*1024,{...this.stats}}cleanup(){for(let[e,t]of this.connections.entries())t.disconnect();this.connections.clear(),this.stats.activeConnections=0,this.options.debug&&console.log("[Connection Pool] Cleaned up all connections")}removeOldestConnection(){let e=this.connections.keys().next().value;void 0!==e&&(this.options.debug&&console.log(`[Connection Pool] Removing oldest connection for workflow ${e}`),this.removeConnection(e))}}var c=o(99762);c.Ikc({id:c.aig().int(),type:c.bzn(),name:c.YjP(),url:c.YjP(),size_bytes:c.bzn(),file_metadata:c.g1P(c.bzn()).optional()}),c.Ikc({event:c.YjP(),timestamp:c.YjP().datetime().optional()});let a=c.Ikc({workflow_id:c.aig().int(),node_id:c.YjP(),plugin_name:c.YjP(),status:c.bzn(),result:c.g1P(c.bzn()).optional(),artifacts:c.YOg(c.bzn()).optional()}),l=c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:a}),d=c.Ikc({workflow_id:c.aig().int(),node_id:c.YjP(),plugin_name:c.YjP(),error:c.YjP(),error_details:c.bzn()}),u=c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:d}),h=c.Ikc({workflow_id:c.aig().int(),node_id:c.YjP(),plugin_name:c.YjP()}),f=c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:h}),w=c.Ikc({workflow_id:c.aig().int(),run_id:c.YjP(),status:c.bzn(),results:c.g1P(c.bzn()).optional(),nodes_completed:c.bzn(),nodes_failed:c.bzn(),total_credits:c.bzn()}),k=c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:w}),g=c.Ikc({workflow_id:c.aig().int(),run_id:c.YjP(),current_step:c.aig().int(),total_steps:c.aig().int(),progress:c.aig()}),y=c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:g}),v=c.Ikc({workflow_id:c.aig().int(),execution_id:c.YjP(),run_id:c.YjP(),total_nodes:c.aig().int(),user_id:c.bzn()}),m={workflow_execution_start:c.Ikc({event:c.bzn(),timestamp:c.YjP().datetime().optional(),data:v}),workflow_execution_progress:y,workflow_execution_complete:k,node_execution_start:f,node_execution_complete:l,node_execution_error:u};class p{constructor(e=!1){this.debug=!1,this.debug=e||!1}validate(e,t){let o=m[e];
1if(!o)return this.debug&&!e.startsWith("_")&&console.warn(`[EventValidator] No schema defined for event: ${e}`),{success:!0,data:t};try{let n=o.parse(t);return this.debug&&console.log(`[EventValidator] â
Valid ${e}`,n),{success:!0,data:n}}catch(n){if(n instanceof c.GaX)return console.error(`[EventValidator] â Invalid ${e}:`,n.errors),this.debug&&(console.error("[EventValidator] Received data:",t),console.error("[EventValidator] Expected schema:",o.describe())),{success:!1,error:n};return console.error(`[EventValidator] Unexpected validation error for ${e}:`,n),{success:!1,error:new c.GaX([{code:"custom",path:[],message:"Unexpected validation error"}])}}}registerSchema(e,t){m[e]=t,this.debug&&console.log(`[EventValidator] Registered schema for ${e}`)}getRegisteredEvents(){return Object.keys(m)}hasSchema(e){return e in m}}var _=o(69113);let C={workflow:{invalidates:e=>[_.Pq.workflows.detail(e).queryKey,_.Pq.workflows.list().queryKey,_.Pq.workflows.stats(e).queryKey,_.Pq.workflows.analysis(e).queryKey],updates:(e,t)=>[{key:_.Pq.workflows.detail(e).queryKey,updater:e=>e?{...e,...t}:e}]},artifact:{invalidates:(e,t,o)=>{let n=[_.Pq.artifacts.detail(e).queryKey,_.Pq.artifacts.my().queryKey];return t&&o&&n.push(_.Pq.artifacts.byNode(t,o).queryKey),o&&n.push(_.Pq.workflows.detail(o).queryKey),n},addToNode:(e,t,o)=>[{key:_.Pq.artifacts.byNode(e,t).queryKey,updater:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e,o]}}]},nodeExecution:{invalidates:(e,t)=>[_.Pq.workflows.stats(t).queryKey,_.Pq.workflows.detail(t).queryKey],updateProgress:(e,t,o)=>[]},plugin:{invalidates:()=>[_.Pq.plugins.list().queryKey]},credits:{invalidates:e=>{let t=[_.Pq.credits.balance().queryKey];return e&&t.push(_.Pq.workflows.stats(e).queryKey),t}}};function b(e,t){for(var o=arguments.length,n=Array(o>2?o-2:0),s=2;s<o;s++)n[s-2]=arguments[s];let i=C[t];if(!i)return void console.warn(`No relationship defined for entity: ${t}`);i.invalidates(...n).forEach(t=>{e.invalidateQueries({queryKey:t})})}class E{constructor(e,t=!1){this.queryClient=e,this.debug=!1,this.debug=t||!1}syncWorkflowProgress(e){let{workflow_id:t,progress:o}=e.data;this.debug&&console.log(`[QuerySync] Progress update: workflow ${t} â ${o}%`)}syncNodeComplete(e){let{workflow_id:t,node_id:o,status:n,result:s,artifacts:i}=e.data;this.debug&&console.log(`[QuerySync] Node complete: ${o} in workflow ${t}`),b(this.queryClient,"nodeExecution",o,t),b(this.queryClient,"workflow",t),i&&i.length>0&&b(this.queryClient,"artifacts",o,t),this.queryClient.invalidateQueries({queryKey:["credits"]})}syncWorkflowComplete(e){let{workflow_id:t,status:o,run_id:n}=e.data;this.debug&&console.log(`[QuerySync] Workflow complete: ${t} â ${o}`),b(this.queryClient,"workflow",t),this.queryClient.invalidateQueries({queryKey:["executions"]}),this.queryClient.invalidateQueries({queryKey:["credits"]}),this.queryClient.invalidateQueries({queryKey:["artifacts"]})}syncArtifactCreated(e){let{artifact_id:t,node_id:o,workflow_id:n}=e.data;this.debug&&console.log(`[QuerySync] Artifact created: ${t} in node ${o}`),b(this.queryClient,"artifacts",o,n),b(this.queryClient,"workflow",n)}syncNodeStart(e){let{workflow_id:t,node_id:o}=e.data;this.debug&&console.log(`[QuerySync] Node start: ${o} in workflow ${t}`),b(this.queryClient,"nodeExecution",o,t),b(this.queryClient,"workflow",t)}syncNodeError(e){let{workflow_id:t,node_id:o}=e.data;this.debug&&console.log(`[QuerySync] Node error: ${o} in workflow ${t}`),b(this.queryClient,"nodeExecution",o,t),b(this.queryClient,"workflow",t)}syncWorkflowError(e){let{workflow_id:t}=e.data;this.debug&&console.log(`[QuerySync] Workflow error: ${t}`),b(this.queryClient,"workflow",t),this.queryClient.invalidateQueries({queryKey:["executions"]})}}var I=o(95155),P=o(12115),$=o(36489);class S{constructor(e=!1){this.listeners=new Map,this.history=[],this.historyMaxSize=100,this.debug=!1,this.debug=e||!1}emit(e,t){let o=this.listeners.get(e);if(!o||0===o.size){this.debug&&!e.startsWith("_")&&console.log(`[EventBus] No listeners for event: ${e}`);return}this.debug&&console.log(`[EventBus] Emitting ${e} to ${o.size} listeners`,t),this.addToHistory({event:e,timestamp:new Date,dataSize:JSON.stringify(t).length,listenersNotified:o.size});let n=0;for(let s of o)try{let o=s(t);o instanceof Promise&&o.catch(t=>{console.error(`[EventBus] Async handler error for ${e}:`,t)}),n++}catch(t){console.error(`[EventBus] Handler error for ${e}:`,t)}this.debug&&console.log(`[EventBus] Notified ${n}/${o.size} handlers for ${e}`)}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),this.debug&&console.log(`[EventBus] Subscribed to ${e} (${this.listeners.get(e).size} total listeners)`),{unsubscribe:()=>this.off(e,t)}}off(e,t){let o=this.listeners.get(e);o&&(o.delete(t)&&this.debug&&console.log(`[EventBus] Unsubscribed from ${e} (${o.size} remaining listeners)`),0===o.size&&this.listeners.delete(e))}removeAllListeners(e){e?(this.listeners.delete(e),this.debug&&console.log(`[EventBus] Removed all listeners for ${e}`)):(this.listeners.clear(),this.debug&&console.log("[EventBus] Removed all listeners for all events"))}listenerCount(e){var t;return(null==(t=this.listeners.get(e))?void 0:t.size)||0}getEventNames(){return Array.from(this.listeners.keys())}getHistory(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.history.slice(-e)}clearHistory(){this.history=[]}getStats(){let e={};for(let[t,o]of this.listeners.entries())e[t]=o.size;return{totalEvents:this.listeners.size,totalListeners:Array.from(this.listeners.values()).reduce((e,t)=>
1e+t.size,0),eventBreakdown:e}}addToHistory(e){this.history.push(e),this.history.length>this.historyMaxSize&&(this.history=this.history.slice(-this.historyMaxSize))}}let q=(0,P.createContext)(null);function N(e){let{children:t,config:o,poolOptions:n,debug:s=!1}=e,{data:i,status:c}=(0,$.useSession)(),a=(0,P.useRef)(null),l=(0,P.useRef)(null),d=(0,P.useRef)(null),[u,h]=(0,P.useState)(!1);a.current||(a.current=new S(s)),l.current||(l.current=new p(s));let f=(0,P.useMemo)(()=>{let e,t="wss://api.zephly.ai",n="/socket.io";if(/^https?:\/\//.test(t))try{let o=new URL(t),s="https:"===o.protocol?"wss:":"ws:";e=`${s}//${o.host}`,o.pathname&&"/"!==o.pathname&&(n=`${o.pathname}/socket.io`)}catch{e=t}else/^wss?:\/\//.test(t)?e=t:t&&(e=void 0,n=t);return{url:e,path:n,auth:(null==i?void 0:i.accessToken)?{token:i.accessToken}:void 0,reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3,reconnectionDelayMax:5e3,transports:["websocket","polling"],timeout:2e4,...o}},[null==i?void 0:i.accessToken,o]);(0,P.useEffect)(()=>"authenticated"===c&&(null==i?void 0:i.accessToken)?(d.current||(d.current=new r(f,a.current,{maxConnections:10,debug:s,...n}),s&&console.log("[WebSocketProvider] Connection pool initialized"),h(!0)),()=>{d.current&&(d.current.cleanup(),d.current=null,h(!1))}):void h(!1),[c,null==i?void 0:i.accessToken,f,n,s]);let w={connectionPool:d.current,eventBus:a.current,eventValidator:l.current,isReady:"authenticated"===c&&u};return(0,I.jsx)(q.Provider,{value:w,children:t})}function x(){let e=(0,P.useContext)(q);if(!e)throw Error("useWebSocketContext must be used within WebSocketProvider");return e}var z=o(99776),R=o(18720);function T(e){let{children:t,debug:o=!1}=e,{eventBus:n,isReady:s}=x(),i=(0,z.useQueryClient)(),r=(0,P.useMemo)(()=>new E(i,o),[i,o]),c=(0,P.useMemo)(()=>({updateProgress:(e,t)=>{},saveToLocalStorage:(e,t,o)=>{let n=`workflow_execution_${e}`;try{localStorage.setItem(n,JSON.stringify({runId:t,...o}))}catch(e){console.error("[SyncProvider] Failed to save to localStorage:",e)}},clearFromLocalStorage:e=>{let t=`workflow_execution_${e}`;try{localStorage.removeItem(t)}catch(e){console.error("[SyncProvider] Failed to clear localStorage:",e)}},showToast:(e,t)=>{switch(t){case"success":R.oR.success(e);break;case"error":R.oR.error(e);break;case"warning":R.oR.warning(e);break;default:R.oR.info(e)}},refreshCredits:()=>{i.invalidateQueries({queryKey:["credits"]})},invalidateCache:function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n]}}),[i]);return(0,P.useEffect)(()=>{if(!s)return;let e=n.on("workflow_execution_start",e=>{let{workflow_id:t,run_id:o,total_nodes:n}=e.data;c.saveToLocalStorage(t,o,{status:"running",startedAt:new Date().toISOString(),totalNodes:n,runId:o}),c.showToast(`Workflow execution started (${n} nodes)`,"info"),c.updateProgress(t,0),r.syncWorkflowProgress(e)}),t=n.on("workflow_execution_progress",e=>{let{workflow_id:t,progress:o,current_step:n,total_steps:s}=e.data;c.updateProgress(t,o),c.saveToLocalStorage(t,e.data.run_id,{status:"running",progress:o,currentStep:n,totalSteps:s,lastUpdate:new Date().toISOString()}),r.syncWorkflowProgress(e)}),i=n.on("workflow_execution_complete",e=>{let{workflow_id:t,status:o,nodes_completed:n,nodes_failed:s,total_credits:i}=e.data;c.clearFromLocalStorage(t),c.updateProgress(t,100),c.refreshCredits(),c.invalidateCache("workflow",t),c.invalidateCache("executions",t),c.invalidateCache("credits"),"completed"===o?c.showToast(`Workflow completed successfully! ${n} nodes succeeded. Credits used: ${i}`,"success"):"failed"===o?c.showToast(`Workflow failed. ${s} nodes failed out of ${n+s} total.`,"error"):"cancelled"===o&&c.showToast("Workflow was cancelled.","warning"),r.syncWorkflowComplete(e)}),a=n.on("workflow_execution_error",e=>{let{workflow_id:t,error:o,error_details:n}=e.data;c.clearFromLocalStorage(t),c.invalidateCache("workflow",t),c.showToast(`Workflow error: ${o}`,"error"),console.error("[Workflow Error]",{workflowId:t,error:o,details:n}),r.syncWorkflowError(e)}),l=n.on("node_execution_start",e=>{let{workflow_id:t,node_id:o,plugin_name:n}=e.data;
1c.showToast(`Node ${o} (${n}) started`,"info"),c.invalidateCache("nodeExecution",o,t),r.syncNodeStart(e)}),d=n.on("node_execution_complete",e=>{let{workflow_id:t,node_id:o,plugin_name:n,status:s,artifacts:i}=e.data;if("completed"===s){let e=i&&i.length>0?` (${i.length} artifact${i.length>1?"s":""})`:"";c.showToast(`Node ${o} (${n}) completed${e}`,"success")}c.invalidateCache("nodeExecution",o,t),c.invalidateCache("workflow",t),i&&i.length>0&&c.invalidateCache("artifacts",o,t),c.refreshCredits(),r.syncNodeComplete(e)}),u=n.on("node_execution_error",e=>{let{workflow_id:t,node_id:o,plugin_name:n,error:s,error_details:i}=e.data;c.showToast(`Node ${o} (${n}) failed: ${s}`,"error"),c.invalidateCache("nodeExecution",o,t),c.invalidateCache("workflow",t),console.error("[Node Error]",{workflowId:t,nodeId:o,plugin:n,error:s,details:i}),r.syncNodeError(e)}),h=n.on("artifact_created",e=>{r.syncArtifactCreated(e)});return o&&console.log("[SyncProvider] Subscribed to all WebSocket events"),()=>{e.unsubscribe(),t.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),d.unsubscribe(),u.unsubscribe(),h.unsubscribe(),o&&console.log("[SyncProvider] Unsubscribed from all WebSocket events")}},[s,n,r,c,o]),(0,I.jsx)(I.Fragment,{children:t})}function W(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{eventBus:o,isReady:n}=x();(0,P.useEffect)(()=>{if(!n||!t)return;let s=Object.entries(e).map(e=>{let[t,n]=e;return o.on(t,n)});return()=>{s.forEach(e=>e.unsubscribe())}},[e,t,n,o])}}}]);
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.