"use strict";(self.webpackChunk_jupyter_shared_docprovider_extension=self.webpackChunk_jupyter_shared_docprovider_extension||[]).push([[612],{4612:(e,r,o)=>{o.r(r),o.d(r,{default:()=>b});var t=o(7460),i=o(7909),a=o(2200),n=o(7313),l=o(4614),s=o(2678),d=o(2697),c=o(5190),p=o(1937);const u={id:"@jupyter/docprovider-extension:drive",description:"The default collaborative drive provider",provides:c.ICollaborativeDrive,requires:[n.IDefaultFileBrowser],optional:[s.ITranslator],activate:(e,r,o)=>{const t=(o=null!=o?o:s.nullTranslator).load("jupyter-shared-drive");return new p.SharedDrive(e.serviceManager.user,r,t,null,"Shared")}},h={id:"@jupyter/shared-docprovider-extension:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[c.ICollaborativeDrive],optional:[],activate:(e,r)=>{r.sharedModelFactory.registerDocumentFactory("file",(()=>new d.YFile))}},v={id:"@jupyter/shared-docprovider-extension:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[c.ICollaborativeDrive],optional:[l.ISettingRegistry],activate:(e,r,o)=>{let t=!0;o&&o.load("@jupyterlab/notebook-extension:tracker").then((e=>{const r=e=>{var r;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;t=null===(r=!o)||void 0===r||r};r(e),e.changed.connect((e=>r(e)))})),r.sharedModelFactory.registerDocumentFactory("notebook",(()=>new d.YNotebook({disableDocumentWideUndoRedo:t})))}},y={id:"jupyter-shared-drive:sharedFileBrowser",description:"The shared file browser factory provider",autoStart:!0,requires:[c.ICollaborativeDrive,n.IFileBrowserFactory],optional:[i.IRouter,i.JupyterFrontEnd.ITreeResolver,i.ILabShell,s.ITranslator],activate:async(e,r,o,i,n,l,d)=>{const{createFileBrowser:c}=o,p=(d=null!=d?d:s.nullTranslator).load("jupyter-shared-drive");e.serviceManager.contents.addDrive(r);const u=c("jp-shared-contents-browser",{driveName:r.name,restore:!1});u.title.caption=p.__("Shared Drive"),u.title.icon=t.listIcon;const h=new a.ToolbarButton({icon:t.fileIcon,onClick:async()=>{const e=prompt("Please enter the path of the file to import:");null!==e&&await r.importFile(e)},tooltip:"Import File"}),v=new a.ToolbarButton({icon:t.refreshIcon,onClick:async()=>{u.model.refresh()},tooltip:"Refresh File Browser"});u.toolbar.insertItem(0,"refresh",v),u.toolbar.insertItem(1,"import",h),e.shell.add(u,"left")}},b=[u,h,v,y]}}]);