"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1684,5601],{95601:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var r=n(20034),a=n(57174),i=n(23249),o=n(20882);const s=[{id:"@jupyter-notebook/terminal-extension:opener",requires:[r.IRouter,i.ITerminalTracker],autoStart:!0,activate:(e,t,n)=>{const{commands:r}=e,a=new RegExp("/terminals/(.*)"),i="router:terminal";r.addCommand(i,{execute:e=>{const t=e.path.match(a);if(!t)return;const[,i]=t;i&&(n.widgetAdded.connect(((e,t)=>{t.content.setOption("closeOnExit",!1)})),r.execute("terminal:open",{name:i}))}}),t.register({command:i,pattern:a})}},{id:"@jupyter-notebook/terminal-extension:redirect",requires:[i.ITerminalTracker],autoStart:!0,activate:(e,t)=>{const n=a.PageConfig.getBaseUrl();t.widgetAdded.connect(((t,r)=>{if((0,o.find)(e.shell.widgets("main"),(e=>e.id===r.id)))return;const a=r.content.session.name;window.open(`${n}terminals/${a}`,"_blank"),r.dispose()}))}}]}}]);