"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6720,6541],{66720:(e,t,o)=>{o.r(t),o.d(t,{default:()=>y});var r=o(23450),a=o(10806),n=o(94276),i=o(6513),s=o(67040),l=o(84700),d=o(98836),c=o(14039),u=o(59542),b=o(14662);const w="FileBrowser";var g;!function(e){e.activate="filebrowser:activate"}(g||(g={}));const f={id:"@jupyter-notebook/tree-extension:new",requires:[d.ITranslator],optional:[r.IToolbarWidgetRegistry],autoStart:!0,activate:(e,t,o)=>{const{commands:r}=e,a=t.load("notebook"),n={overflowMenuOptions:{isVisible:!1}},i=new u.MenuBar(n),s=new u.Menu({commands:r});s.title.label=a.__("New"),s.title.icon=c.caretDownIcon,i.addMenu(s),["notebook:create-new","terminal:create-new","console:create","filebrowser:create-new-file","filebrowser:create-new-directory"].forEach((e=>{s.addItem({command:e})})),o&&o.addFactory(w,"new-dropdown",(e=>{const t=new u.MenuBar(n);return t.addMenu(s),t.addClass("jp-DropdownMenu"),t}))}},p={id:"@jupyter-notebook/tree-extension:load-plugins",autoStart:!0,requires:[i.ISettingRegistry],activate(e,t){const{isDisabled:o}=a.PageConfig.Extension,r=t.connector,n=a.PageConfig.getOption("allPlugins");if(!n)return;const i=JSON.parse(n),s=new Set;Object.keys(i).forEach((e=>{const t=i[e];Object.keys(t).forEach((e=>{const o=t[e];"boolean"==typeof o&&o?s.add(e):Array.isArray(o)&&o.forEach((e=>{s.add(e)}))}))})),e.restored.then((async()=>{(await r.list("all")).ids.forEach((async e=>{const[r]=e.split(":");if((s.has(r)||s.has(e))&&!o(e)&&!(e in t.plugins))try{await t.load(e)}catch(t){console.warn(`Settings failed to load for (${e})`,t)}}))}))}},h={id:"@jupyter-notebook/tree-extension:open-file-browser",requires:[b.INotebookTree,n.IDefaultFileBrowser],autoStart:!0,activate:(e,t,o)=>{const{commands:r}=e;r.addCommand(g.activate,{execute:()=>{t.currentWidget=o}})}},m={id:"@jupyter-notebook/tree-extension:widget",requires:[n.IDefaultFileBrowser,d.ITranslator,i.ISettingRegistry,r.IToolbarWidgetRegistry],optional:[s.IRunningSessionManagers,l.ISettingEditorTracker,l.IJSONSettingEditorTracker],autoStart:!0,provides:b.INotebookTree,activate:(e,t,o,a,i,l,d,u)=>{const g=new b.NotebookTreeWidget,f=o.load("notebook");if(t.title.label=f.__("Files"),t.node.setAttribute("role","region"),t.node.setAttribute("aria-label",f.__("File Browser Section")),t.title.icon=c.folderIcon,g.addWidget(t),g.tabBar.addTab(t.title),g.tabsMovable=!1,i.addFactory(w,"uploader",(e=>new n.Uploader({model:e.model,translator:o,label:f.__("Upload")}))),i.addFactory(w,"fileNameSearcher",(e=>{const t=(0,c.FilenameSearcher)({updateFilter:(t,o)=>{e.model.setFilter((e=>t(e.name.toLowerCase())))},useFuzzyFilter:!0,placeholder:f.__("Filter files by name"),forceRefresh:!0});return t.addClass("jp-FileBrowser-filterBox"),t})),(0,r.setToolbar)(t,(0,r.createToolbarFactory)(i,a,w,m.id,o)),l){const e=new s.RunningSessions(l,o);e.id="jp-running-sessions-tree",e.title.label=f.__("Running"),e.title.icon=c.runningIcon,g.addWidget(e),g.tabBar.addTab(e.title)}const p=a.load("@jupyterlab/filebrowser-extension:browser");return Promise.all([p,e.restored]).then((([e])=>{void 0===e.user.showFileCheckboxes&&e.set("showFileCheckboxes",!0),void 0===e.user.showFileSizeColumn&&e.set("showFileSizeColumn",!0)})).catch((e=>{console.error(e.message)})),e.shell.add(g,"main",{rank:100}),[d,u].forEach((e=>{e&&e.widgetAdded.connect(((e,t)=>{g.addWidget(t),g.tabBar.addTab(t.title),g.currentWidget=t}))})),g}},y=[f,p,h,m]}}]);