"use strict";(self.webpackChunkgofigr=self.webpackChunkgofigr||[]).push([[101],{101:(e,o,t)=>{t.r(o),t.d(o,{default:()=>a});var n=t(625);const c=new WeakMap;function l(e){const o=c.get(e),t=function(e){return{url:document.URL,notebook_path:e.context.path,notebook_local_path:e.context.localPath,title:e.title.label,extension_version:"1.3.1"}}(e);o&&o.comm&&o.comm.send(t)}const a={id:"gofigr:plugin",description:"A JupyterLab extension that watches for cell execution",autoStart:!0,requires:[n.INotebookTracker],activate:(e,o)=>{console.log("JupyterLab GoFigr extension active");const t=e=>{c.has(e)||c.set(e,{kernel:null,comm:null}),e.sessionContext.kernelChanged.connect((o,t)=>{console.log(`Kernel started/restarted for notebook at path: ${e.context.path}`);const n=t.newValue;null==n||n.registerCommTarget("gofigr",(o,t)=>{var a,s;console.log("Kernel Comm established. Message: ",t),c.set(e,{comm:o,kernel:n}),console.log(null===(s=null===(a=c.get(e))||void 0===a?void 0:a.comm)||void 0===s?void 0:s.commId),l(e)})}),e.content.stateChanged.connect((o,t)=>{l(e)})};o.forEach(e=>{t(e)}),o.widgetAdded.connect((e,o)=>{t(o)})}}}}]);