"use strict";(self.rspackChunk_JUPYTERLAB_CORE_OUTPUT=self.rspackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[273],{77048(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(73226),i=n(43476),a=n(6082),o=n(63049),s=n(45136);let p=[{id:"@jupyter-notebook/terminal-extension:opener",description:"A plugin to open terminals in a new tab.",requires:[r.IRouter,a.ITerminalTracker],autoStart:!0,activate:(e,t,n)=>{let{commands:r}=e,i=RegExp("/terminals/(.*)"),a="router:terminal";r.addCommand(a,{execute:e=>{let t=e.path.match(i);if(!t)return;let[,a]=t;a&&(n.widgetAdded.connect((e,t)=>{t.content.setOption("closeOnExit",!1)}),r.execute("terminal:open",{name:a}))},describedBy:{args:{type:"object",properties:{path:{type:"string",description:"The routed URL path to handle."}},required:["path"]}}}),t.register({command:a,pattern:i})}},{id:"@jupyter-notebook/terminal-extension:redirect",description:"Open terminals in a new tab.",requires:[a.ITerminalTracker],optional:[o.INotebookPathOpener],autoStart:!0,activate:(e,t,n)=>{let r=i.PageConfig.getBaseUrl(),a=null!=n?n:o.defaultNotebookPathOpener;t.widgetAdded.connect((t,n)=>{if((0,s.find)(e.shell.widgets("main"),e=>e.id===n.id))return;let o=n.content.session.name;a.open({prefix:i.URLExt.join(r,"terminals"),path:o,target:"_blank"}),n.dispose()})}}]}}]);