"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([["273"],{77048(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(42471),i=n(74053),a=n(96837),o=n(30761),p=n(86554);let s=[{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,p.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()})}}]}}]);