notebook 7.2.3__py3-none-any.whl → 7.3.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +6 -0
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/1226.bundle.js +1 -0
- notebook/static/131.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1601.bundle.js +1 -0
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1750.bundle.js +1 -0
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1884.bundle.js +386 -0
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -1
- notebook/static/{6593.bundle.js → 2756.bundle.js} +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3187.bundle.js +1 -1
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3420.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/374.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4045.bundle.js +1 -0
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/{7674.bundle.js → 4427.bundle.js} +1 -1
- notebook/static/4434.bundle.js +1 -0
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/5018.bundle.js +1 -0
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/5254.bundle.js +1 -1
- notebook/static/5261.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/545.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5712.bundle.js +1 -0
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/6164.bundle.js +1 -0
- notebook/static/62.bundle.js +1 -1
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6281.bundle.js +1 -1
- notebook/static/6318.bundle.js +1 -0
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6619.bundle.js +1 -0
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -1
- notebook/static/677.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/6898.bundle.js +1 -0
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7259.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7450.bundle.js +1 -1
- notebook/static/7506.bundle.js +703 -0
- notebook/static/7543.bundle.js +1 -1
- notebook/static/755.bundle.js +1 -1
- notebook/static/7579.bundle.js +1 -0
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7995.bundle.js +1 -1
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8054.bundle.js +1 -0
- notebook/static/8471.bundle.js +1 -1
- notebook/static/85.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8647.bundle.js +1 -0
- notebook/static/8723.bundle.js +1 -0
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/9092.bundle.js +1 -0
- notebook/static/9136.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9734.bundle.js +1 -0
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9906.bundle.js +1 -0
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +107 -107
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +4 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +9 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.0e9bcd74ae36ad68f70e.js → notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6d49b092e49dc147dc54.js +1 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/646.57a345a80ce9f0e64830.js +1 -0
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.768a77db06802599fa5d.js → notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7bcc163b9139ecb2b25b.js +1 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9381fdb35e72f41d8af1.js +1 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/METADATA +4 -3
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/RECORD +197 -185
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/WHEEL +1 -1
- notebook/static/1718.bundle.js +0 -1
- notebook/static/2955.bundle.js +0 -1
- notebook/static/5263.bundle.js +0 -1
- notebook/static/6743.bundle.js +0 -1
- notebook/static/7866.bundle.js +0 -1
- notebook/static/8787.bundle.js +0 -1
- notebook/static/8896.bundle.js +0 -6025
- notebook/static/9799.bundle.js +0 -1
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/804.2cd86c0d29e544a308c0.js +0 -1
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8cdb5c12db85ac589ef4.js +0 -1
- /notebook/static/{8896.bundle.js.LICENSE.txt → 7506.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/entry_points.txt +0 -0
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/licenses/LICENSE +0 -0
notebook/static/5912.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var a,r=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var a,r=t(94535),o=t(72703),i=t(98726),s=t(99246),c=t(94101),l=t(1101),d=t(89150),m=t(67439),h=t(70858),u=t(95291),g=t(63485);!function(e){e.copy="terminal:copy",e.createNew="terminal:create-new",e.open="terminal:open",e.refresh="terminal:refresh",e.increaseFont="terminal:increase-font",e.decreaseFont="terminal:decrease-font",e.paste="terminal:paste",e.setTheme="terminal:set-theme",e.shutdown="terminal:shut-down"}(a||(a={}));const _={activate:function(e,n,t,r,i,s,c,d,h){const p=t.load("jupyterlab"),{serviceManager:f,commands:y}=e,T=p.__("Terminal"),b=new o.WidgetTracker({namespace:"terminal"});if(!f.terminals.isAvailable())return console.warn("Disabling terminals plugin because they are not available on the server"),b;s&&s.restore(b,{command:a.createNew,args:e=>({name:e.content.session.name}),name:e=>e.content.session.name});const v={};function I(e){Object.keys(e.composite).forEach((n=>{v[n]=e.composite[n]}))}function C(){b.forEach((e=>function(e){const n=e.content;n&&Object.keys(v).forEach((e=>{n.setOption(e,v[e])}))}(e)))}if(n.load(_.id).then((e=>{I(e),C(),e.changed.connect((()=>{I(e),C()}))})).catch(w.showErrorMessage),null==d||d.themeChanged.connect(((e,n)=>{b.forEach((e=>{const n=e.content;"inherit"===n.getOption("theme")&&n.setOption("theme","inherit")}))})),function(e,n,t,r,i){var s;const c=r.load("jupyterlab"),{commands:d,serviceManager:h}=e,g=()=>null!==n.currentWidget&&n.currentWidget===e.shell.currentWidget;d.addCommand(a.createNew,{label:e=>e.isPalette?c.__("New Terminal"):c.__("Terminal"),caption:c.__("Start a new terminal session"),icon:e=>e.isPalette?void 0:u.terminalIcon,execute:async t=>{const a=t.name,s=t.cwd,c=s?h.contents.localPath(s):void 0;let d;d=a?(await l.TerminalAPI.listRunning()).map((e=>e.name)).includes(a)?h.terminals.connectTo({model:{name:a}}):await h.terminals.startNew({name:a,cwd:c}):await h.terminals.startNew({cwd:c});const g=new m.Terminal(d,i,r);g.title.icon=u.terminalIcon,g.title.label="...";const _=new o.MainAreaWidget({content:g,reveal:g.ready});return e.shell.add(_,"main",{type:"Terminal"}),n.add(_),e.shell.activateById(_.id),_}}),d.addCommand(a.open,{label:c.__("Open a terminal by its `name`."),execute:t=>{const r=t.name,o=n.find((e=>e.content.session.name===r||!1));if(!o)return d.execute(a.createNew,{name:r});e.shell.activateById(o.id)}}),d.addCommand(a.refresh,{label:c.__("Refresh Terminal"),caption:c.__("Refresh the current terminal session"),execute:async()=>{const t=n.currentWidget;if(t){e.shell.activateById(t.id);try{await t.content.refresh(),t&&t.content.activate()}catch(e){w.showErrorMessage(e)}}},icon:e=>e.isPalette?void 0:u.refreshIcon.bindprops({stylesheet:"menuItem"}),isEnabled:g}),d.addCommand(a.copy,{execute:()=>{var e;const t=null===(e=n.currentWidget)||void 0===e?void 0:e.content;if(!t)return;const a=t.getSelection();a&&o.Clipboard.copyToSystem(a)},isEnabled:()=>{var e;if(!g())return!1;const t=null===(e=n.currentWidget)||void 0===e?void 0:e.content;return!!t&&t.hasSelection()},icon:u.copyIcon.bindprops({stylesheet:"menuItem"}),label:c.__("Copy")}),d.addCommand(a.paste,{execute:async()=>{var e;const t=null===(e=n.currentWidget)||void 0===e?void 0:e.content;if(!t)return;const a=window.navigator.clipboard,r=await a.readText();r&&t.paste(r)},isEnabled:()=>{var e;return Boolean(g()&&(null===(e=n.currentWidget)||void 0===e?void 0:e.content))},icon:u.pasteIcon.bindprops({stylesheet:"menuItem"}),label:c.__("Paste")}),d.addCommand(a.shutdown,{label:c.__("Shutdown Terminal"),execute:()=>{const e=n.currentWidget;if(e)return e.content.session.shutdown()},isEnabled:g}),d.addCommand(a.increaseFont,{label:c.__("Increase Terminal Font Size"),execute:async()=>{const{fontSize:e}=i;if(e&&e<72)try{await t.set(_.id,"fontSize",e+1)}catch(e){w.showErrorMessage(e)}}}),d.addCommand(a.decreaseFont,{label:c.__("Decrease Terminal Font Size"),execute:async()=>{const{fontSize:e}=i;if(e&&e>9)try{await t.set(_.id,"fontSize",e-1)}catch(e){w.showErrorMessage(e)}}});const p={inherit:c.__("Inherit"),light:c.__("Light"),dark:c.__("Dark")};d.addCommand(a.setTheme,{label:e=>{if(void 0===e.theme)return c.__("Set terminal theme to the provided `theme`.");const n=e.theme,t=n in p?p[n]:c.__(n[0].toUpperCase()+n.slice(1));return e.isPalette?c.__("Use Terminal Theme: %1",t):t},caption:c.__("Set the terminal theme"),isToggled:e=>{const{theme:n}=i;return e.theme===n},execute:async e=>{const n=e.theme;try{await t.set(_.id,"theme",n),d.notifyCommandChanged(a.setTheme)}catch(e){console.log(e),w.showErrorMessage(e)}}});const f=[a.refresh,a.copy,a.paste,a.shutdown],y=()=>{f.forEach((e=>d.notifyCommandChanged(e)))};n.currentChanged.connect(y),null===(s=e.shell.currentChanged)||void 0===s||s.connect(y)}(e,b,n,t,v),c){const e=new g.Menu({commands:y});e.title.label=p._p("menu","Terminal Theme"),e.addItem({command:a.setTheme,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"light",displayName:p.__("Light"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!1}}),c.settingsMenu.addGroup([{command:a.increaseFont},{command:a.decreaseFont},{type:"submenu",submenu:e}],40),c.fileMenu.newMenu.addItem({command:a.createNew,rank:20}),c.fileMenu.closeAndCleaners.add({id:a.shutdown,isEnabled:e=>null!==b.currentWidget&&b.has(e)})}return r&&([a.createNew,a.refresh,a.increaseFont,a.decreaseFont].forEach((e=>{r.addItem({command:e,category:T,args:{isPalette:!0}})})),r.addItem({command:a.setTheme,category:T,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"light",displayName:p.__("Light"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!0}})),i&&i.add({command:a.createNew,category:p.__("Other"),rank:0}),h&&function(e,n,t){const a=t.load("jupyterlab"),r=n.serviceManager.terminals;class o{constructor(e){this._model=e}open(){n.commands.execute("terminal:open",{name:this._model.name})}icon(){return u.terminalIcon}label(){return`terminals/${this._model.name}`}shutdown(){return r.shutdown(this._model.name)}}e.add({name:a.__("Terminals"),running:()=>Array.from(r.running()).map((e=>new o(e))),shutdownAll:()=>r.shutdownAll(),refreshRunning:()=>r.refreshRunning(),runningChanged:r.runningChanged,shutdownLabel:a.__("Shut Down"),shutdownAllLabel:a.__("Shut Down All"),shutdownAllConfirmationText:a.__("Are you sure you want to permanently shut down all running terminals?")})}(h,e,t),b},id:"@jupyterlab/terminal-extension:plugin",description:"Adds terminal and provides its tracker.",provides:m.ITerminalTracker,requires:[d.ISettingRegistry,h.ITranslator],optional:[o.ICommandPalette,i.ILauncher,r.ILayoutRestorer,s.IMainMenu,o.IThemeManager,c.IRunningSessionManagers],autoStart:!0},p=_;var w;!function(e){e.showErrorMessage=function(e){console.error(`Failed to configure ${_.id}: ${e.message}`)}}(w||(w={}))}}]);
|
notebook/static/5921.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>l,TableOfContentsItem:()=>_,TableOfContentsModel:()=>u,TableOfContentsPanel:()=>T,TableOfContentsRegistry:()=>w,TableOfContentsTracker:()=>x,TableOfContentsTree:()=>v,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>C});var s={};n.r(s),n.d(s,{getHeadingId:()=>N,getHeadings:()=>P,isMarkdown:()=>q});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>H,addPrefix:()=>E,clearNumbering:()=>M,filterHeadings:()=>y,getHTMLHeadings:()=>k,getPrefix:()=>O,isHTML:()=>A});var a=n(64145);class l{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},l=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});l.activityStopped.connect(i);const r=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(r),s.ready.then((()=>{r(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{l.activityStopped.disconnect(i),s.pathChanged.disconnect(r)})),n}}var r=n(14576),o=n(20998),c=n(81997);const h=new o.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new o.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class u extends r.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!this._areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit()),t&&this._activeHeadingChanged.emit(this._activeHeading)}setConfiguration(e){const t={...this._configuration,...e};o.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}isHeadingEqual(e,t){return e.level===t.level&&e.text===t.text&&e.prefix===t.prefix}_areHeadingsEqual(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(!this.isHeadingEqual(e[n],t[n]))return!1;return!0}return!1}}var p,f=n(63485),m=n(78156);class _ extends m.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return m.createElement("li",{className:"jp-tocItem"},m.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},m.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?m.createElement(r.caretRightIcon.react,{tag:"span",width:"20px"}):m.createElement(r.caretDownIcon.react,{tag:"span",width:"20px"})),m.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&m.createElement("ol",null,e))}}class v extends m.PureComponent{render(){const{documentType:e}=this.props;return m.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[m.createElement(_,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class C extends r.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?m.createElement(v,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):m.createElement("div",{className:"jp-TableOfContents-placeholder"},m.createElement("div",{className:"jp-TableOfContents-placeholderContent"},m.createElement("h3",null,this._placeholderHeadline),m.createElement("p",null,this._placeholderText)))}}class T extends r.SidePanel{constructor(e){super({content:new f.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new p.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new C({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends f.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(p||(p={}));var b=n(2549);class w{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new b.DisposableDelegate((()=>{this._generators.delete(t)}))}}class x{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const H="numbering-entry";function y(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const l=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=O(e,a,i,s);a=e,l.push({...t,prefix:n})}}return l}function A(e){return"text/html"===e}function k(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function E(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${H}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${H}`)){s=e,S(e,n);break}}else S(s,n);return s}function O(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:l}=s;let r="";if(l){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?r=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(r=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return r}function S(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${H}">${t}</span>`)}function M(e){null==e||e.querySelectorAll(`span.${H}`).forEach((e=>{e.remove()}))}var j=n(20005),R=n(1323);async function N(e,t,n,s){try{const i=document.createElement("div");await(0,R.renderMarkdown)({markdownParser:e,host:i,source:t,trusted:!1,sanitizer:null!=s?s:new j.Sanitizer,shouldTypeset:!1,resolver:null,linkHandler:null,latexTypesetter:null});const a=i.querySelector(`h${n}`);return a?a.id:null}catch(e){console.error("Failed to parse a heading.",e)}return null}function P(e){const t=e.split("\n"),n=new Array;let s,i,a=0,l=0;if("---"===t[l])for(let e=l+1;e<t.length;e++)if("---"===t[e]){l=e+1;break}for(;l<t.length;l++){const e=t[l];if(""===e)continue;if(e.startsWith("```")||e.startsWith("~~~")){const t=I(e);if(0===t)continue;if(0===a){i=e.charAt(0),s=!s,a=t;continue}i===e.charAt(0)&&t>=a&&(s=!s,a=0,i="")}if(s)continue;const r=$(e,t[l+1]);r&&n.push({...r,line:l})}return n}function I(e){let t;return t=e.startsWith("`")?e.match(/^(`{3,})/):e.match(/^(~{3,})/),t?t[0].length:0}const D=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function q(e){return D.includes(e)}function $(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:L(n[2]),level:n[1].length,raw:e,skip:U.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:L(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:U.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:U.test(n[0]),raw:e}:null)}function L(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const U=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>l,TableOfContentsItem:()=>_,TableOfContentsModel:()=>u,TableOfContentsPanel:()=>T,TableOfContentsRegistry:()=>w,TableOfContentsTracker:()=>x,TableOfContentsTree:()=>v,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>C});var s={};n.r(s),n.d(s,{getHeadingId:()=>N,getHeadings:()=>P,isMarkdown:()=>D});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>H,addPrefix:()=>E,clearNumbering:()=>M,filterHeadings:()=>y,getHTMLHeadings:()=>k,getPrefix:()=>O,isHTML:()=>A});var a=n(65848);class l{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},l=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});l.activityStopped.connect(i);const r=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(r),s.ready.then((()=>{r(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{l.activityStopped.disconnect(i),s.pathChanged.disconnect(r)})),n}}var r=n(95291),o=n(20998),c=n(81997);const h=new o.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new o.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class u extends r.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!this._areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit()),t&&this._activeHeadingChanged.emit(this._activeHeading)}setConfiguration(e){const t={...this._configuration,...e};o.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}isHeadingEqual(e,t){return e.level===t.level&&e.text===t.text&&e.prefix===t.prefix}_areHeadingsEqual(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(!this.isHeadingEqual(e[n],t[n]))return!1;return!0}return!1}}var p,f=n(63485),m=n(78156);class _ extends m.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return m.createElement("li",{className:"jp-tocItem"},m.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},m.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?m.createElement(r.caretRightIcon.react,{tag:"span",width:"20px"}):m.createElement(r.caretDownIcon.react,{tag:"span",width:"20px"})),m.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&m.createElement("ol",null,e))}}class v extends m.PureComponent{render(){const{documentType:e}=this.props;return m.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[m.createElement(_,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class C extends r.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?m.createElement(v,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):m.createElement("div",{className:"jp-TableOfContents-placeholder"},m.createElement("div",{className:"jp-TableOfContents-placeholderContent"},m.createElement("h3",null,this._placeholderHeadline),m.createElement("p",null,this._placeholderText)))}}class T extends r.SidePanel{constructor(e){super({content:new f.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new p.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new C({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends f.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(p||(p={}));var b=n(2549);class w{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new b.DisposableDelegate((()=>{this._generators.delete(t)}))}}class x{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const H="numbering-entry";function y(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const l=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=O(e,a,i,s);a=e,l.push({...t,prefix:n})}}return l}function A(e){return"text/html"===e}function k(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function E(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${H}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${H}`)){s=e,S(e,n);break}}else S(s,n);return s}function O(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:l}=s;let r="";if(l){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?r=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(r=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return r}function S(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${H}">${t}</span>`)}function M(e){null==e||e.querySelectorAll(`span.${H}`).forEach((e=>{e.remove()}))}var j=n(72703),R=n(62514);async function N(e,t,n,s){try{const i=document.createElement("div");await(0,R.renderMarkdown)({markdownParser:e,host:i,source:t,trusted:!1,sanitizer:null!=s?s:new j.Sanitizer,shouldTypeset:!1,resolver:null,linkHandler:null,latexTypesetter:null});const a=i.querySelector(`h${n}`);return a?a.id:null}catch(e){console.error("Failed to parse a heading.",e)}return null}function P(e){const t=e.split("\n"),n=new Array;let s,i=0;if("---"===t[i])for(let e=i+1;e<t.length;e++)if("---"===t[e]){i=e+1;break}for(;i<t.length;i++){const e=t[i];if(""===e)continue;if(e.startsWith("```")&&(s=!s),s)continue;const a=q(e,t[i+1]);a&&n.push({...a,line:i})}return n}const I=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function D(e){return I.includes(e)}function q(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:$(n[2]),level:n[1].length,raw:e,skip:L.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:$(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:L.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:L.test(n[0]),raw:e}:null)}function $(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const L=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
notebook/static/6017.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(14850),s=t(89945),n=t(54509);class c extends n.SearchProvider{constructor(){super(...arguments),this.isReadOnly=!0}static createNew(e,r){return new c(e)}static isApplicable(e){return e instanceof s.DocumentWidget&&e.content instanceof i.CSVViewer}clearHighlight(){return Promise.resolve()}highlightNext(e){return this.widget.content.searchService.find(this._query),Promise.resolve(void 0)}highlightPrevious(e){return this.widget.content.searchService.find(this._query,!0),Promise.resolve(void 0)}replaceCurrentMatch(e,r){return Promise.resolve(!1)}replaceAllMatches(e){return Promise.resolve(!1)}startQuery(e){return this._query=e,this.widget.content.searchService.find(e),Promise.resolve()}endQuery(){return this.widget.content.searchService.clear(),Promise.resolve()}}}}]);
|
notebook/static/6139.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var n,a=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var n,a=o(94535),i=o(72703),r=o(84617),c=o(70858);!function(e){e.resetImage="imageviewer:reset-image",e.zoomIn="imageviewer:zoom-in",e.zoomOut="imageviewer:zoom-out",e.flipHorizontal="imageviewer:flip-horizontal",e.flipVertical="imageviewer:flip-vertical",e.rotateClockwise="imageviewer:rotate-clockwise",e.rotateCounterclockwise="imageviewer:rotate-counterclockwise",e.invertColors="imageviewer:invert-colors"}(n||(n={}));const l=["png","gif","jpeg","bmp","ico","tiff"],d="Image",s="Image (Text)",m=["svg","xbm"],u=new RegExp(`[.](${m.join("|")})$`),g={activate:function(e,t,o,a){const c=t.load("jupyterlab");function g(t,o){var n,a;o.context.pathChanged.connect((()=>{v.save(o)})),v.add(o);const i=e.docRegistry.getFileTypesForPath(o.context.path);i.length>0&&(o.title.icon=i[0].icon,o.title.iconClass=null!==(n=i[0].iconClass)&&void 0!==n?n:"",o.title.iconLabel=null!==(a=i[0].iconLabel)&&void 0!==a?a:"")}[new r.ImageViewerFactory({name:d,label:c.__("Image"),modelName:"base64",fileTypes:[...l,...m],defaultFor:l,readOnly:!0}),new r.ImageViewerFactory({name:s,label:c.__("Image (Text)"),modelName:"text",fileTypes:m,defaultFor:m,readOnly:!0})].forEach((t=>{e.docRegistry.addWidgetFactory(t),t.widgetCreated.connect(g)}));const v=new i.WidgetTracker({namespace:"image-widget"});if(a&&a.restore(v,{command:"docmanager:open",args:e=>({path:e.context.path,factory:u.test(e.context.path)?s:d}),name:e=>e.context.path}),function(e,t,o){var a;const i=o.load("jupyterlab"),{commands:r,shell:c}=e;function l(){return null!==t.currentWidget&&t.currentWidget===c.currentWidget}r.addCommand(n.zoomIn,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale+.5:2*o.scale)},label:i.__("Zoom In"),isEnabled:l}),r.addCommand(n.zoomOut,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale-.5:o.scale/2)},label:i.__("Zoom Out"),isEnabled:l}),r.addCommand(n.resetImage,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=1,o.colorinversion=0,o.resetRotationFlip())},label:i.__("Reset Image"),isEnabled:l}),r.addCommand(n.rotateClockwise,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateClockwise()},label:i.__("Rotate Clockwise"),isEnabled:l}),r.addCommand(n.rotateCounterclockwise,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateCounterclockwise()},label:i.__("Rotate Counterclockwise"),isEnabled:l}),r.addCommand(n.flipHorizontal,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipHorizontal()},label:i.__("Flip image horizontally"),isEnabled:l}),r.addCommand(n.flipVertical,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipVertical()},label:i.__("Flip image vertically"),isEnabled:l}),r.addCommand(n.invertColors,{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.colorinversion+=1,o.colorinversion%=2)},label:i.__("Invert Colors"),isEnabled:l});const d=()=>{Object.values(n).forEach((e=>r.notifyCommandChanged(e)))};t.currentChanged.connect(d),null===(a=c.currentChanged)||void 0===a||a.connect(d)}(e,v,t),o){const e=c.__("Image Viewer");[n.zoomIn,n.zoomOut,n.resetImage,n.rotateClockwise,n.rotateCounterclockwise,n.flipHorizontal,n.flipVertical,n.invertColors].forEach((t=>{o.addItem({command:t,category:e})}))}return v},description:"Adds image viewer and provide its tracker.",id:"@jupyterlab/imageviewer-extension:plugin",provides:r.IImageTracker,requires:[c.ITranslator],optional:[i.ICommandPalette,a.ILayoutRestorer],autoStart:!0}}}]);
|