"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5985,3305],{85985:(e,n,t)=>{t.r(n),t.d(n,{default:()=>l});var a=t(37782);const r=new(t(92233).Token)("@jupyterlab/docmanager:IDocumentManager");var i,d=t(12299),o=t(56956);!function(e){e.handleLink="rendermime:handle-local-link"}(i||(i={}));const l={id:"@jupyterlab/rendermime-extension:plugin",requires:[o.ITranslator],optional:[r,d.ILatexTypesetter,a.ISanitizer],provides:d.IRenderMimeRegistry,activate:function(e,n,t,a,r){const o=n.load("jupyterlab");return t&&e.commands.addCommand(i.handleLink,{label:o.__("Handle Local Link"),execute:e=>{const n=e.path,a=e.id;if(n)return t.services.contents.get(n,{content:!1}).then((()=>{const e=t.registry.defaultRenderedWidgetFactory(n),r=t.openOrReveal(n,e.name);r&&a&&r.setFragment(a)}))}}),new d.RenderMimeRegistry({initialFactories:d.standardRendererFactories,linkHandler:t?{handleLink:(n,t,a)=>{"A"===n.tagName&&n.hasAttribute("download")||e.commandLinker.connectNode(n,i.handleLink,{path:t,id:a})}}:void 0,latexTypesetter:null!=a?a:void 0,translator:n,sanitizer:null!=r?r:void 0})},autoStart:!0}}}]);