notebook 7.5.0a3__py3-none-any.whl → 7.5.0b0__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/static/{1650.1c20617c1064f011e9cf.js → 1650.0639a1ecc09e1967b98a.js} +4 -4
- notebook/static/{1650.1c20617c1064f011e9cf.js.map → 1650.0639a1ecc09e1967b98a.js.map} +1 -1
- notebook/static/{1684.9e14c8fde7b5c2a1e804.js → 1684.ddea5a98d3e5c7a2d766.js} +5 -5
- notebook/static/{1684.9e14c8fde7b5c2a1e804.js.map → 1684.ddea5a98d3e5c7a2d766.js.map} +1 -1
- notebook/static/{6330.8d1d0dd1fbce32029783.js → 2755.174636f4594b13074ee1.js} +2 -2
- notebook/static/{6330.8d1d0dd1fbce32029783.js.map → 2755.174636f4594b13074ee1.js.map} +1 -1
- notebook/static/{3146.128b7076cb7dcae5c2b1.js → 3146.27e042b4ffc90ddd0583.js} +3 -3
- notebook/static/{3146.128b7076cb7dcae5c2b1.js.map → 3146.27e042b4ffc90ddd0583.js.map} +1 -1
- notebook/static/{3768.d1b5496b60230e739af3.js → 3768.018bda823b05290265da.js} +19 -19
- notebook/static/{7302.9c33833c600513b786b7.js.map → 3768.018bda823b05290265da.js.map} +1 -1
- notebook/static/{4382.a86512e1c78e4630c7f1.js → 4382.80dd015e69164cafe39a.js} +3 -3
- notebook/static/{4382.a86512e1c78e4630c7f1.js.map → 4382.80dd015e69164cafe39a.js.map} +1 -1
- notebook/static/{4645.f7402ce87d1c3118459e.js → 4645.5464810408d3f5a40db1.js} +5 -5
- notebook/static/{4645.f7402ce87d1c3118459e.js.map → 4645.5464810408d3f5a40db1.js.map} +1 -1
- notebook/static/{4837.059a42e9726ebfdd7757.js → 4837.5c3ee4ce0bf1bc03628a.js} +3 -3
- notebook/static/{4837.059a42e9726ebfdd7757.js.map → 4837.5c3ee4ce0bf1bc03628a.js.map} +1 -1
- notebook/static/{5135.65d91b3fb2627c71d977.js → 5135.0714348d8c88f18b7316.js} +11 -11
- notebook/static/{5135.65d91b3fb2627c71d977.js.map → 5135.0714348d8c88f18b7316.js.map} +1 -1
- notebook/static/{5573.376762f27640a1bbb19b.js → 5573.8f9c21fe6dc9c281ffa6.js} +17 -17
- notebook/static/{5573.376762f27640a1bbb19b.js.map → 5573.8f9c21fe6dc9c281ffa6.js.map} +1 -1
- notebook/static/{5601.f05757530b29b91ba632.js → 5601.72a27257e17a85b6ddb9.js} +5 -5
- notebook/static/{5601.f05757530b29b91ba632.js.map → 5601.72a27257e17a85b6ddb9.js.map} +1 -1
- notebook/static/{6345.dae9ed90a4730b2395e4.js → 6345.0aaa32908554ec9d9a57.js} +5 -5
- notebook/static/{6345.dae9ed90a4730b2395e4.js.map → 6345.0aaa32908554ec9d9a57.js.map} +1 -1
- notebook/static/{7302.9c33833c600513b786b7.js → 7302.bd34311fd4b17f4ef111.js} +19 -19
- notebook/static/{3768.d1b5496b60230e739af3.js.map → 7302.bd34311fd4b17f4ef111.js.map} +1 -1
- notebook/static/{7906.2cbe7ca1a1c2dd88d711.js → 7906.6d53fc208b95642ac413.js} +3 -3
- notebook/static/{7906.2cbe7ca1a1c2dd88d711.js.map → 7906.6d53fc208b95642ac413.js.map} +1 -1
- notebook/static/{8579.49309b85f9ea2b40be26.js → 8579.2d5ca9a7e59650b99814.js} +13 -13
- notebook/static/{8579.49309b85f9ea2b40be26.js.map → 8579.2d5ca9a7e59650b99814.js.map} +1 -1
- notebook/static/{8781.4eec0073705de68f6387.js → 8781.0f688ed8f01d2a5f2eea.js} +66 -64
- notebook/static/8781.0f688ed8f01d2a5f2eea.js.map +1 -0
- notebook/static/{8875.1a777cd6fe9ba7804f56.js → 8875.11242381caf56431f174.js} +4 -4
- notebook/static/{8875.1a777cd6fe9ba7804f56.js.map → 8875.11242381caf56431f174.js.map} +1 -1
- notebook/static/{9068.96837f13e2c817c47671.js → 9068.87c7e9ee6d234f105e47.js} +3 -3
- notebook/static/{9068.96837f13e2c817c47671.js.map → 9068.87c7e9ee6d234f105e47.js.map} +1 -1
- notebook/static/{9380.49773ed9e541d9daa2f0.js → 9380.5482d198e94a457a4c5e.js} +5 -5
- notebook/static/{9380.49773ed9e541d9daa2f0.js.map → 9380.5482d198e94a457a4c5e.js.map} +1 -1
- notebook/static/main.94a810982ab32a351589.js +1201 -0
- notebook/static/main.94a810982ab32a351589.js.map +1 -0
- notebook/static/{notebook_core.14986f19f78c2e935d01.js → notebook_core.2af2e7bf7a2e015b1d0c.js} +2140 -1461
- notebook/static/{notebook_core.14986f19f78c2e935d01.js.map → notebook_core.2af2e7bf7a2e015b1d0c.js.map} +1 -1
- notebook/static/third-party-licenses.json +105 -105
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +1 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.5.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.ff959098695753d26074.js +1 -0
- notebook-7.5.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/74.a988dc339f627dd01013.js +1 -0
- notebook-7.5.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.844843140389d97f407a.js +1 -0
- notebook-7.5.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.1257c2dbcfda653213ad.js +1 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.5.0a3.dist-info → notebook-7.5.0b0.dist-info}/METADATA +2 -2
- {notebook-7.5.0a3.dist-info → notebook-7.5.0b0.dist-info}/RECORD +89 -89
- notebook/static/8781.4eec0073705de68f6387.js.map +0 -1
- notebook/static/main.e1da91eb61b1e569c9b8.js +0 -1201
- notebook/static/main.e1da91eb61b1e569c9b8.js.map +0 -1
- notebook-7.5.0a3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.b54f9239e85e06cd7c70.js +0 -1
- notebook-7.5.0a3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/789.80522be137dc6c371203.js +0 -1
- notebook-7.5.0a3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.2c2e5ab0daf617adc497.js +0 -1
- notebook-7.5.0a3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9fa1faadbc49e2024a4a.js +0 -1
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shortcuts.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.5.0a3.data → notebook-7.5.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.5.0a3.dist-info → notebook-7.5.0b0.dist-info}/WHEEL +0 -0
- {notebook-7.5.0a3.dist-info → notebook-7.5.0b0.dist-info}/entry_points.txt +0 -0
- {notebook-7.5.0a3.dist-info → notebook-7.5.0b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5135.65d91b3fb2627c71d977.js?v=65d91b3fb2627c71d977","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACsD;AACH;AACH;AACL;AACmB;AAC9D;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gCAAK;AAC/B,QAAQ,wCAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,sBAAsB,2BAAQ;AAC9B,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mCAAM;AACtC,kCAAkC,mCAAM;AACxC;AACA;AACA;AACA;AACA,gCAAgC,uCAAY;AAC5C;AACA;AACA,QAAQ,qCAAS;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iCAAM,GAAG,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAAQ;AACvB;AACA;AACA;AACA;AACA;AACA,eAAe,2BAAQ;AACvB;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qBAAqB;AACpD;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;;;ACvU3B;AACA;AACyD;AAChB;AAC2B;AACzB;AAC6B;AACR;AACR;AACxD;AACA;AACA;AACO,2BAA2B,oBAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,iCAAM;AACzC;AACA;AACA,2BAA2B,wCAAc;AACzC,mCAAmC,mCAAM;AACzC,qCAAqC,8BAAe;AACpD;AACA;AACA,+BAA+B,YAAY;AAC3C,gCAAgC,YAAY;AAC5C,gCAAgC,gBAAgB;AAChD,iCAAiC,gBAAgB;AACjD,yBAAyB,gCAAK;AAC9B,mDAAmD,gCAAK;AACxD,qDAAqD,gCAAK;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iCAAM;AACrC;AACA,kCAAkC,iCAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oCAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oCAAS;AAC1C;AACA;AACA,SAAS;AACT,QAAQ,oCAAS;AACjB,QAAQ,oCAAS;AACjB,QAAQ,oCAAS;AACjB,gCAAgC,gCAAK,GAAG,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qCAAU;AAC1C;AACA;AACA;AACA,QAAQ,qCAAU;AAClB,8BAA8B,uCAAW;AACzC;AACA,SAAS;AACT;AACA;AACA;AACA,gCAAgC,qCAAU;AAC1C;AACA;AACA,QAAQ,oCAAS;AACjB,QAAQ,qCAAU;AAClB,QAAQ,qCAAU;AAClB,QAAQ,qCAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAO;AACvB,gEAAgE,SAAS;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,wCAAc;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,KAAK;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,aAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,iCAAM;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,aAAO,KAAK,aAAO,KAAK;;;AC9a3B;AACA;AACuE;AACV;AACuB;AACrB;AACZ;AACP;AACJ;AACxC;AACA;AACA;AACO,0BAA0B,yBAAe;AAChD;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW,aAAa,IAAI;AACxD;AACA,gBAAgB,6EAA6E,aAAa,IAAI;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAAS;AACnC;AACA;AACA;AACA,6BAA6B,kCAAU;AACvC,qBAAqB,oBAAU;AAC/B,8BAA8B,uBAAS;AACvC,YAAY,WAAO;AACnB,SAAS;AACT;AACA,6CAA6C,gCAAkB;AAC/D;AACA,iCAAiC,iDAAuB;AACxD;AACA;AACA;AACA;AACA,iCAAiC,oBAAU;AAC3C;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA,uBAAuB,GAAG,oBAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kCAAU;AAChC,0BAA0B,kCAAU;AACpC,qBAAqB,kCAAU;AAC/B,wBAAwB,kCAAU;AAClC,0BAA0B,kCAAU;AACpC,wBAAwB,kCAAU;AAClC,qBAAqB,kCAAU;AAC/B,8BAA8B,kCAAU;AACxC,yBAAyB,kCAAU;AACnC,2BAA2B,kCAAU;AACrC,yBAAyB,kCAAU;AACnC,+BAA+B,kCAAU;AACzC,aAAa;AACb;AACA,6BAA6B,kCAAU;AACvC,yBAAyB,kCAAU;AACnC,wBAAwB,kCAAU;AAClC,2BAA2B,kCAAU;AACrC,wBAAwB,kCAAU;AAClC,8BAA8B,kCAAU;AACxC,4BAA4B,kCAAU;AACtC,4BAA4B,kCAAU;AACtC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAI,WAAO;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,WAAO,KAAK,WAAO,KAAK;;;AChK3B;AACA;AAC+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D,4BAA4B,8BAAM,cAAc,8BAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACO;;;ACnBmC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO,gCAAgC,oBAAK;;;ACP5C;AACA;AACsB;AACE;AACO;AACF;AACJ","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/panelhandler.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/shell.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/app.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/pathopener.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/tokens.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/index.js"],"sourcesContent":["// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { closeIcon } from '@jupyterlab/ui-components';\nimport { ArrayExt, find } from '@lumino/algorithm';\nimport { MessageLoop } from '@lumino/messaging';\nimport { Signal } from '@lumino/signaling';\nimport { Panel, StackedPanel, Widget } from '@lumino/widgets';\n/**\n * A class which manages a panel and sorts its widgets by rank.\n */\nexport class PanelHandler {\n constructor() {\n /**\n * A message hook for child remove messages on the panel handler.\n */\n this._panelChildHook = (handler, msg) => {\n switch (msg.type) {\n case 'child-removed':\n {\n const widget = msg.child;\n ArrayExt.removeFirstWhere(this._items, (v) => v.widget === widget);\n }\n break;\n default:\n break;\n }\n return true;\n };\n this._items = new Array();\n this._panel = new Panel();\n MessageLoop.installMessageHook(this._panel, this._panelChildHook);\n }\n /**\n * Get the panel managed by the handler.\n */\n get panel() {\n return this._panel;\n }\n /**\n * Add a widget to the panel.\n *\n * If the widget is already added, it will be moved.\n */\n addWidget(widget, rank) {\n widget.parent = null;\n const item = { widget, rank };\n const index = ArrayExt.upperBound(this._items, item, Private.itemCmp);\n ArrayExt.insert(this._items, index, item);\n this._panel.insertWidget(index, widget);\n }\n}\n/**\n * A class which manages a side panel that can show at most one widget at a time.\n */\nexport class SidePanelHandler extends PanelHandler {\n /**\n * Construct a new side panel handler.\n */\n constructor(area) {\n super();\n this._isHiddenByUser = false;\n this._widgetAdded = new Signal(this);\n this._widgetRemoved = new Signal(this);\n this._area = area;\n this._panel.hide();\n this._currentWidget = null;\n this._lastCurrentWidget = null;\n this._widgetPanel = new StackedPanel();\n this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved, this);\n this._closeButton = document.createElement('button');\n closeIcon.element({\n container: this._closeButton,\n height: '16px',\n width: 'auto',\n });\n this._closeButton.onclick = () => {\n this.collapse();\n this.hide();\n };\n this._closeButton.className = 'jp-Button jp-SidePanel-collapse';\n this._closeButton.title = 'Collapse side panel';\n const icon = new Widget({ node: this._closeButton });\n this._panel.addWidget(icon);\n this._panel.addWidget(this._widgetPanel);\n }\n /**\n * Get the current widget in the sidebar panel.\n */\n get currentWidget() {\n return (this._currentWidget ||\n this._lastCurrentWidget ||\n (this._items.length > 0 ? this._items[0].widget : null));\n }\n /**\n * Get the area of the side panel\n */\n get area() {\n return this._area;\n }\n /**\n * Whether the panel is visible\n */\n get isVisible() {\n return this._panel.isVisible;\n }\n /**\n * Get the stacked panel managed by the handler\n */\n get panel() {\n return this._panel;\n }\n /**\n * Get the widgets list.\n */\n get widgets() {\n return this._items.map((obj) => obj.widget);\n }\n /**\n * Signal fired when a widget is added to the panel\n */\n get widgetAdded() {\n return this._widgetAdded;\n }\n /**\n * Signal fired when a widget is removed from the panel\n */\n get widgetRemoved() {\n return this._widgetRemoved;\n }\n /**\n * Get the close button element.\n */\n get closeButton() {\n return this._closeButton;\n }\n /**\n * Expand the sidebar.\n *\n * #### Notes\n * This will open the most recently used widget, or the first widget\n * if there is no most recently used.\n */\n expand(id) {\n if (id) {\n if (this._currentWidget && this._currentWidget.id === id) {\n this.collapse();\n this.hide();\n }\n else {\n this.collapse();\n this.hide();\n this.activate(id);\n this.show();\n }\n }\n else if (this.currentWidget) {\n this._currentWidget = this.currentWidget;\n this.activate(this._currentWidget.id);\n this.show();\n }\n }\n /**\n * Activate a widget residing in the stacked panel by ID.\n *\n * @param id - The widget's unique ID.\n */\n activate(id) {\n const widget = this._findWidgetByID(id);\n if (widget) {\n this._currentWidget = widget;\n widget.show();\n widget.activate();\n }\n }\n /**\n * Test whether the sidebar has the given widget by id.\n */\n has(id) {\n return this._findWidgetByID(id) !== null;\n }\n /**\n * Collapse the sidebar so no items are expanded.\n */\n collapse() {\n var _a;\n (_a = this._currentWidget) === null || _a === void 0 ? void 0 : _a.hide();\n this._currentWidget = null;\n }\n /**\n * Add a widget and its title to the stacked panel.\n *\n * If the widget is already added, it will be moved.\n */\n addWidget(widget, rank) {\n widget.parent = null;\n widget.hide();\n const item = { widget, rank };\n const index = this._findInsertIndex(item);\n ArrayExt.insert(this._items, index, item);\n this._widgetPanel.insertWidget(index, widget);\n this._refreshVisibility();\n this._widgetAdded.emit(widget);\n }\n /**\n * Hide the side panel\n */\n hide() {\n this._isHiddenByUser = true;\n this._refreshVisibility();\n }\n /**\n * Show the side panel\n */\n show() {\n this._isHiddenByUser = false;\n this._refreshVisibility();\n }\n /**\n * Find the insertion index for a rank item.\n */\n _findInsertIndex(item) {\n return ArrayExt.upperBound(this._items, item, Private.itemCmp);\n }\n /**\n * Find the index of the item with the given widget, or `-1`.\n */\n _findWidgetIndex(widget) {\n return ArrayExt.findFirstIndex(this._items, (i) => i.widget === widget);\n }\n /**\n * Find the widget with the given id, or `null`.\n */\n _findWidgetByID(id) {\n const item = find(this._items, (value) => value.widget.id === id);\n return item ? item.widget : null;\n }\n /**\n * Refresh the visibility of the stacked panel.\n */\n _refreshVisibility() {\n this._panel.setHidden(this._isHiddenByUser);\n }\n /*\n * Handle the `widgetRemoved` signal from the panel.\n */\n _onWidgetRemoved(sender, widget) {\n if (widget === this._lastCurrentWidget) {\n this._lastCurrentWidget = null;\n }\n ArrayExt.removeAt(this._items, this._findWidgetIndex(widget));\n this._refreshVisibility();\n this._widgetRemoved.emit(widget);\n }\n}\n/**\n * A class to manages the palette entries associated to the side panels.\n */\nexport class SidePanelPalette {\n /**\n * Construct a new side panel palette.\n */\n constructor(options) {\n this._items = [];\n this._commandPalette = options.commandPalette;\n this._command = options.command;\n }\n /**\n * Get a command palette item from the widget id and the area.\n */\n getItem(widget, area) {\n const itemList = this._items;\n for (let i = 0; i < itemList.length; i++) {\n const item = itemList[i];\n if (item.widgetId === widget.id && item.area === area) {\n return item;\n }\n }\n return null;\n }\n /**\n * Add an item to the command palette.\n */\n addItem(widget, area) {\n // Check if the item does not already exist.\n if (this.getItem(widget, area)) {\n return;\n }\n // Add a new item in command palette.\n const disposableDelegate = this._commandPalette.addItem({\n command: this._command,\n category: 'View',\n args: {\n side: area,\n title: `Show ${widget.title.caption}`,\n id: widget.id,\n },\n });\n // Keep the disposableDelegate object to be able to dispose of the item if the widget\n // is remove from the side panel.\n this._items.push({\n widgetId: widget.id,\n area: area,\n disposable: disposableDelegate,\n });\n }\n /**\n * Remove an item from the command palette.\n */\n removeItem(widget, area) {\n const item = this.getItem(widget, area);\n if (item) {\n item.disposable.dispose();\n }\n }\n}\n/**\n * A namespace for private module data.\n */\nvar Private;\n(function (Private) {\n /**\n * A less-than comparison function for side bar rank items.\n */\n function itemCmp(first, second) {\n return first.rank - second.rank;\n }\n Private.itemCmp = itemCmp;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { nullTranslator } from '@jupyterlab/translation';\nimport { find } from '@lumino/algorithm';\nimport { JSONExt, PromiseDelegate, Token } from '@lumino/coreutils';\nimport { Signal } from '@lumino/signaling';\nimport { BoxLayout, Panel, SplitPanel, Widget, } from '@lumino/widgets';\nimport { PanelHandler, SidePanelHandler } from './panelhandler';\nimport { TabPanelSvg } from '@jupyterlab/ui-components';\n/**\n * The Jupyter Notebook application shell token.\n */\nexport const INotebookShell = new Token('@jupyter-notebook/application:INotebookShell');\n/**\n * The default rank for ranked panels.\n */\nconst DEFAULT_RANK = 900;\n/**\n * The application shell.\n */\nexport class NotebookShell extends Widget {\n constructor() {\n super();\n this._translator = nullTranslator;\n this._currentChanged = new Signal(this);\n this._mainWidgetLoaded = new PromiseDelegate();\n this.id = 'main';\n this._userLayout = {};\n this._topHandler = new PanelHandler();\n this._menuHandler = new PanelHandler();\n this._leftHandler = new SidePanelHandler('left');\n this._rightHandler = new SidePanelHandler('right');\n this._main = new Panel();\n const topWrapper = (this._topWrapper = new Panel());\n const menuWrapper = (this._menuWrapper = new Panel());\n this._topHandler.panel.id = 'top-panel';\n this._topHandler.panel.node.setAttribute('role', 'banner');\n this._menuHandler.panel.id = 'menu-panel';\n this._menuHandler.panel.node.setAttribute('role', 'navigation');\n this._main.id = 'main-panel';\n this._main.node.setAttribute('role', 'main');\n this._spacer_top = new Widget();\n this._spacer_top.id = 'spacer-widget-top';\n this._spacer_bottom = new Widget();\n this._spacer_bottom.id = 'spacer-widget-bottom';\n // create wrappers around the top and menu areas\n topWrapper.id = 'top-panel-wrapper';\n topWrapper.addWidget(this._topHandler.panel);\n menuWrapper.id = 'menu-panel-wrapper';\n menuWrapper.addWidget(this._menuHandler.panel);\n const rootLayout = new BoxLayout();\n const leftHandler = this._leftHandler;\n const rightHandler = this._rightHandler;\n leftHandler.panel.id = 'jp-left-stack';\n leftHandler.panel.node.setAttribute('role', 'complementary');\n rightHandler.panel.id = 'jp-right-stack';\n rightHandler.panel.node.setAttribute('role', 'complementary');\n // Hide the side panels by default.\n leftHandler.hide();\n rightHandler.hide();\n const middleLayout = new BoxLayout({\n spacing: 0,\n direction: 'top-to-bottom',\n });\n BoxLayout.setStretch(this._topWrapper, 0);\n BoxLayout.setStretch(this._menuWrapper, 0);\n BoxLayout.setStretch(this._main, 1);\n const middlePanel = new Panel({ layout: middleLayout });\n middlePanel.addWidget(this._topWrapper);\n middlePanel.addWidget(this._menuWrapper);\n middlePanel.addWidget(this._spacer_top);\n middlePanel.addWidget(this._main);\n middlePanel.addWidget(this._spacer_bottom);\n middlePanel.layout = middleLayout;\n const vsplitPanel = new SplitPanel();\n vsplitPanel.id = 'jp-main-vsplit-panel';\n vsplitPanel.spacing = 1;\n vsplitPanel.orientation = 'vertical';\n SplitPanel.setStretch(vsplitPanel, 1);\n const downPanel = new TabPanelSvg({\n tabsMovable: true,\n });\n this._downPanel = downPanel;\n this._downPanel.id = 'jp-down-stack';\n // TODO: Consider storing this as an attribute this._hsplitPanel if saving/restoring layout needed\n const hsplitPanel = new SplitPanel();\n hsplitPanel.id = 'main-split-panel';\n hsplitPanel.spacing = 1;\n BoxLayout.setStretch(hsplitPanel, 1);\n SplitPanel.setStretch(leftHandler.panel, 0);\n SplitPanel.setStretch(rightHandler.panel, 0);\n SplitPanel.setStretch(middlePanel, 1);\n hsplitPanel.addWidget(leftHandler.panel);\n hsplitPanel.addWidget(middlePanel);\n hsplitPanel.addWidget(rightHandler.panel);\n // Use relative sizing to set the width of the side panels.\n // This will still respect the min-size of children widget in the stacked\n // panel.\n hsplitPanel.setRelativeSizes([1, 2.5, 1]);\n vsplitPanel.addWidget(hsplitPanel);\n vsplitPanel.addWidget(downPanel);\n rootLayout.spacing = 0;\n rootLayout.addWidget(vsplitPanel);\n // initially hiding the down panel\n this._downPanel.hide();\n // Connect down panel change listeners\n this._downPanel.tabBar.tabMoved.connect(this._onTabPanelChanged, this);\n this._downPanel.stackedPanel.widgetRemoved.connect(this._onTabPanelChanged, this);\n this.layout = rootLayout;\n // Added Skip to Main Link\n const skipLinkWidgetHandler = (this._skipLinkWidgetHandler =\n new Private.SkipLinkWidgetHandler(this));\n this.add(skipLinkWidgetHandler.skipLinkWidget, 'top', { rank: 0 });\n this._skipLinkWidgetHandler.show();\n }\n /**\n * A signal emitted when the current widget changes.\n */\n get currentChanged() {\n return this._currentChanged;\n }\n /**\n * The current widget in the shell's main area.\n */\n get currentWidget() {\n var _a;\n return (_a = this._main.widgets[0]) !== null && _a !== void 0 ? _a : null;\n }\n /**\n * Get the top area wrapper panel\n */\n get top() {\n return this._topWrapper;\n }\n /**\n * Get the menu area wrapper panel\n */\n get menu() {\n return this._menuWrapper;\n }\n /**\n * Get the left area handler\n */\n get leftHandler() {\n return this._leftHandler;\n }\n /**\n * Get the right area handler\n */\n get rightHandler() {\n return this._rightHandler;\n }\n /**\n * Is the left sidebar visible?\n */\n get leftCollapsed() {\n return !(this._leftHandler.isVisible && this._leftHandler.panel.isVisible);\n }\n /**\n * Is the right sidebar visible?\n */\n get rightCollapsed() {\n return !(this._rightHandler.isVisible && this._rightHandler.panel.isVisible);\n }\n /**\n * Promise that resolves when the main widget is loaded\n */\n get restored() {\n return this._mainWidgetLoaded.promise;\n }\n /**\n * Getter and setter for the translator.\n */\n get translator() {\n var _a;\n return (_a = this._translator) !== null && _a !== void 0 ? _a : nullTranslator;\n }\n set translator(value) {\n if (value !== this._translator) {\n this._translator = value;\n const trans = value.load('notebook');\n this._leftHandler.closeButton.title = trans.__('Collapse %1 side panel', this._leftHandler.area);\n this._rightHandler.closeButton.title = trans.__('Collapse %1 side panel', this._rightHandler.area);\n }\n }\n /**\n * User custom shell layout.\n */\n get userLayout() {\n return JSONExt.deepCopy(this._userLayout);\n }\n /**\n * Activate a widget in its area.\n */\n activateById(id) {\n // Search all areas that can have widgets for this widget, starting with main.\n for (const area of ['main', 'top', 'left', 'right', 'menu', 'down']) {\n const widget = find(this.widgets(area), (w) => w.id === id);\n if (widget) {\n if (area === 'left') {\n this.expandLeft(id);\n }\n else if (area === 'right') {\n this.expandRight(id);\n }\n else if (area === 'down') {\n this._downPanel.show();\n widget.activate();\n }\n else {\n widget.activate();\n }\n }\n }\n }\n /**\n * Add a widget to the application shell.\n *\n * @param widget - The widget being added.\n *\n * @param area - Optional region in the shell into which the widget should\n * be added.\n *\n * @param options - Optional open options.\n *\n */\n add(widget, area, options) {\n var _a, _b;\n let userPosition;\n if ((options === null || options === void 0 ? void 0 : options.type) && this._userLayout[options.type]) {\n userPosition = this._userLayout[options.type];\n }\n else {\n userPosition = this._userLayout[widget.id];\n }\n area = (_a = userPosition === null || userPosition === void 0 ? void 0 : userPosition.area) !== null && _a !== void 0 ? _a : area;\n options =\n options || (userPosition === null || userPosition === void 0 ? void 0 : userPosition.options)\n ? {\n ...options,\n ...userPosition === null || userPosition === void 0 ? void 0 : userPosition.options,\n }\n : undefined;\n const rank = (_b = options === null || options === void 0 ? void 0 : options.rank) !== null && _b !== void 0 ? _b : DEFAULT_RANK;\n switch (area) {\n case 'top':\n return this._topHandler.addWidget(widget, rank);\n case 'menu':\n return this._menuHandler.addWidget(widget, rank);\n case 'main':\n case undefined: {\n if (this._main.widgets.length > 0) {\n // do not add the widget if there is already one\n return;\n }\n const previousWidget = this.currentWidget;\n this._main.addWidget(widget);\n this._main.update();\n this._currentChanged.emit({\n newValue: widget,\n oldValue: previousWidget,\n });\n this._mainWidgetLoaded.resolve();\n break;\n }\n case 'left':\n return this._leftHandler.addWidget(widget, rank);\n case 'right':\n return this._rightHandler.addWidget(widget, rank);\n case 'down':\n return this._downPanel.addWidget(widget);\n default:\n console.warn(`Cannot add widget to area: ${area}`);\n }\n }\n /**\n * Collapse the top area and the spacer to make the view more compact.\n */\n collapseTop() {\n this._topWrapper.setHidden(true);\n this._spacer_top.setHidden(true);\n }\n /**\n * Expand the top area to show the header and the spacer.\n */\n expandTop() {\n this._topWrapper.setHidden(false);\n this._spacer_top.setHidden(false);\n }\n /**\n * Return the list of widgets for the given area.\n *\n * @param area The area\n */\n *widgets(area) {\n switch (area !== null && area !== void 0 ? area : 'main') {\n case 'top':\n yield* this._topHandler.panel.widgets;\n return;\n case 'menu':\n yield* this._menuHandler.panel.widgets;\n return;\n case 'main':\n yield* this._main.widgets;\n return;\n case 'left':\n yield* this._leftHandler.widgets;\n return;\n case 'right':\n yield* this._rightHandler.widgets;\n return;\n case 'down':\n yield* this._downPanel.widgets;\n return;\n default:\n console.error(`This shell has no area called \"${area}\"`);\n return;\n }\n }\n /**\n * Expand the left panel to show the sidebar with its widget.\n */\n expandLeft(id) {\n this._leftHandler.panel.show();\n this._leftHandler.expand(id); // Show the current widget, if any\n }\n /**\n * Collapse the left panel\n */\n collapseLeft() {\n this._leftHandler.collapse();\n this._leftHandler.panel.hide();\n }\n /**\n * Expand the right panel to show the sidebar with its widget.\n */\n expandRight(id) {\n this._rightHandler.panel.show();\n this._rightHandler.expand(id); // Show the current widget, if any\n }\n /**\n * Collapse the right panel\n */\n collapseRight() {\n this._rightHandler.collapse();\n this._rightHandler.panel.hide();\n }\n /**\n * Restore the layout state and configuration for the application shell.\n */\n async restoreLayout(configuration) {\n this._userLayout = configuration;\n }\n /**\n * Handle a change on the down panel widgets\n */\n _onTabPanelChanged() {\n if (this._downPanel.stackedPanel.widgets.length === 0) {\n this._downPanel.hide();\n }\n }\n}\nexport var Private;\n(function (Private) {\n class SkipLinkWidgetHandler {\n /**\n * Construct a new skipLink widget handler.\n */\n constructor(shell) {\n this._isDisposed = false;\n const skipLinkWidget = (this._skipLinkWidget = new Widget());\n const skipToMain = document.createElement('a');\n skipToMain.href = '#first-cell';\n skipToMain.tabIndex = 1;\n skipToMain.text = 'Skip to Main';\n skipToMain.className = 'skip-link';\n skipToMain.addEventListener('click', this);\n skipLinkWidget.addClass('jp-skiplink');\n skipLinkWidget.id = 'jp-skiplink';\n skipLinkWidget.node.appendChild(skipToMain);\n }\n handleEvent(event) {\n switch (event.type) {\n case 'click':\n this._focusMain();\n break;\n }\n }\n _focusMain() {\n const input = document.querySelector('#main-panel .jp-InputArea-editor');\n input.tabIndex = 1;\n input.focus();\n }\n /**\n * Get the input element managed by the handler.\n */\n get skipLinkWidget() {\n return this._skipLinkWidget;\n }\n /**\n * Dispose of the handler and the resources it holds.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._skipLinkWidget.node.removeEventListener('click', this);\n this._skipLinkWidget.dispose();\n }\n /**\n * Hide the skipLink widget.\n */\n hide() {\n this._skipLinkWidget.hide();\n }\n /**\n * Show the skipLink widget.\n */\n show() {\n this._skipLinkWidget.show();\n }\n /**\n * Test whether the handler has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n }\n Private.SkipLinkWidgetHandler = SkipLinkWidgetHandler;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { JupyterLab, JupyterFrontEnd, } from '@jupyterlab/application';\nimport { Base64ModelFactory } from '@jupyterlab/docregistry';\nimport { createRendermimePlugins } from '@jupyterlab/application/lib/mimerenderers';\nimport { LabStatus } from '@jupyterlab/application/lib/status';\nimport { PageConfig } from '@jupyterlab/coreutils';\nimport { Throttler } from '@lumino/polling';\nimport { NotebookShell } from './shell';\n/**\n * App is the main application class. It is instantiated once and shared.\n */\nexport class NotebookApp extends JupyterFrontEnd {\n /**\n * Construct a new NotebookApp object.\n *\n * @param options The instantiation options for an application.\n */\n constructor(options = { shell: new NotebookShell() }) {\n var _a, _b;\n super({ ...options, shell: (_a = options.shell) !== null && _a !== void 0 ? _a : new NotebookShell() });\n /**\n * The name of the application.\n */\n this.name = 'Jupyter Notebook';\n /**\n * A namespace/prefix plugins may use to denote their provenance.\n */\n this.namespace = this.name;\n /**\n * The application busy and dirty status signals and flags.\n */\n this.status = new LabStatus(this);\n /**\n * The version of the application.\n */\n this.version = (_b = PageConfig.getOption('appVersion')) !== null && _b !== void 0 ? _b : 'unknown';\n this._info = JupyterLab.defaultInfo;\n this._formatter = new Throttler(() => {\n Private.setFormat(this);\n }, 250);\n // Add initial model factory.\n this.docRegistry.addModelFactory(new Base64ModelFactory());\n if (options.mimeExtensions) {\n for (const plugin of createRendermimePlugins(options.mimeExtensions)) {\n this.registerPlugin(plugin);\n }\n }\n // Create an IInfo dictionary from the options to override the defaults.\n const info = Object.keys(JupyterLab.defaultInfo).reduce((acc, val) => {\n if (val in options) {\n acc[val] = JSON.parse(JSON.stringify(options[val]));\n }\n return acc;\n }, {});\n // Populate application info.\n this._info = { ...JupyterLab.defaultInfo, ...info };\n this.restored = this.shell.restored;\n this.restored.then(() => this._formatter.invoke());\n }\n /**\n * The NotebookApp application information dictionary.\n */\n get info() {\n return this._info;\n }\n /**\n * The JupyterLab application paths dictionary.\n */\n get paths() {\n return {\n urls: {\n base: PageConfig.getOption('baseUrl'),\n notFound: PageConfig.getOption('notFoundUrl'),\n app: PageConfig.getOption('appUrl'),\n static: PageConfig.getOption('staticUrl'),\n settings: PageConfig.getOption('settingsUrl'),\n themes: PageConfig.getOption('themesUrl'),\n doc: PageConfig.getOption('docUrl'),\n translations: PageConfig.getOption('translationsApiUrl'),\n hubHost: PageConfig.getOption('hubHost') || undefined,\n hubPrefix: PageConfig.getOption('hubPrefix') || undefined,\n hubUser: PageConfig.getOption('hubUser') || undefined,\n hubServerName: PageConfig.getOption('hubServerName') || undefined,\n },\n directories: {\n appSettings: PageConfig.getOption('appSettingsDir'),\n schemas: PageConfig.getOption('schemasDir'),\n static: PageConfig.getOption('staticDir'),\n templates: PageConfig.getOption('templatesDir'),\n themes: PageConfig.getOption('themesDir'),\n userSettings: PageConfig.getOption('userSettingsDir'),\n serverRoot: PageConfig.getOption('serverRoot'),\n workspaces: PageConfig.getOption('workspacesDir'),\n },\n };\n }\n /**\n * Handle the DOM events for the application.\n *\n * @param event - The DOM event sent to the application.\n */\n handleEvent(event) {\n super.handleEvent(event);\n if (event.type === 'resize') {\n void this._formatter.invoke();\n }\n }\n /**\n * Register plugins from a plugin module.\n *\n * @param mod - The plugin module to register.\n */\n registerPluginModule(mod) {\n let data = mod.default;\n // Handle commonjs exports.\n if (!Object.prototype.hasOwnProperty.call(mod, '__esModule')) {\n data = mod;\n }\n if (!Array.isArray(data)) {\n data = [data];\n }\n data.forEach((item) => {\n try {\n this.registerPlugin(item);\n }\n catch (error) {\n console.error(error);\n }\n });\n }\n /**\n * Register the plugins from multiple plugin modules.\n *\n * @param mods - The plugin modules to register.\n */\n registerPluginModules(mods) {\n mods.forEach((mod) => {\n this.registerPluginModule(mod);\n });\n }\n}\n/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n /**\n * Media query for mobile devices.\n */\n const MOBILE_QUERY = 'only screen and (max-width: 760px)';\n /**\n * Sets the `format` of a Jupyter front-end application.\n *\n * @param app The front-end application whose format is set.\n */\n function setFormat(app) {\n app.format = window.matchMedia(MOBILE_QUERY).matches ? 'mobile' : 'desktop';\n }\n Private.setFormat = setFormat;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { URLExt } from '@jupyterlab/coreutils';\n/**\n * A class to open paths in new browser tabs in the Notebook application.\n */\nclass DefaultNotebookPathOpener {\n /**\n * Open a path in a new browser tab.\n */\n open(options) {\n const { prefix, path, searchParams, target, features } = options;\n const url = new URL(URLExt.join(prefix, URLExt.encodeParts(path !== null && path !== void 0 ? path : '')), window.location.origin);\n if (searchParams) {\n url.search = searchParams.toString();\n }\n return window.open(url, target, features);\n }\n}\nexport const defaultNotebookPathOpener = new DefaultNotebookPathOpener();\n","import { Token } from '@lumino/coreutils';\n/**\n * The INotebookPathOpener token.\n * The main purpose of this token is to allow other extensions or downstream applications\n * to override the default behavior of opening a notebook in a new tab.\n * It also allows passing the path as a URL search parameter, or other options to the window.open call.\n */\nexport const INotebookPathOpener = new Token('@jupyter-notebook/application:INotebookPathOpener');\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nexport * from './app';\nexport * from './shell';\nexport * from './panelhandler';\nexport * from './pathopener';\nexport * from './tokens';\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"5135.0714348d8c88f18b7316.js?v=0714348d8c88f18b7316","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACsD;AACH;AACH;AACL;AACmB;AAC9D;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gCAAK;AAC/B,QAAQ,wCAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,sBAAsB,2BAAQ;AAC9B,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mCAAM;AACtC,kCAAkC,mCAAM;AACxC;AACA;AACA;AACA;AACA,gCAAgC,uCAAY;AAC5C;AACA;AACA,QAAQ,qCAAS;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iCAAM,GAAG,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAAQ;AACvB;AACA;AACA;AACA;AACA;AACA,eAAe,2BAAQ;AACvB;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,2BAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qBAAqB;AACpD;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;;;ACvU3B;AACA;AACyD;AAChB;AAC2B;AACzB;AAC6B;AACR;AACR;AACxD;AACA;AACA;AACO,2BAA2B,oBAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,iCAAM;AACzC;AACA;AACA,2BAA2B,wCAAc;AACzC,mCAAmC,mCAAM;AACzC,qCAAqC,8BAAe;AACpD;AACA;AACA,+BAA+B,YAAY;AAC3C,gCAAgC,YAAY;AAC5C,gCAAgC,gBAAgB;AAChD,iCAAiC,gBAAgB;AACjD,yBAAyB,gCAAK;AAC9B,mDAAmD,gCAAK;AACxD,qDAAqD,gCAAK;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iCAAM;AACrC;AACA,kCAAkC,iCAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oCAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oCAAS;AAC1C;AACA;AACA,SAAS;AACT,QAAQ,oCAAS;AACjB,QAAQ,oCAAS;AACjB,QAAQ,oCAAS;AACjB,gCAAgC,gCAAK,GAAG,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qCAAU;AAC1C;AACA;AACA;AACA,QAAQ,qCAAU;AAClB,8BAA8B,uCAAW;AACzC;AACA,SAAS;AACT;AACA;AACA;AACA,gCAAgC,qCAAU;AAC1C;AACA;AACA,QAAQ,oCAAS;AACjB,QAAQ,qCAAU;AAClB,QAAQ,qCAAU;AAClB,QAAQ,qCAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAO;AACvB,gEAAgE,SAAS;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,wCAAc;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,KAAK;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,aAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,iCAAM;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,aAAO,KAAK,aAAO,KAAK;;;AC9a3B;AACA;AACuE;AACV;AACuB;AACrB;AACZ;AACP;AACJ;AACxC;AACA;AACA;AACO,0BAA0B,yBAAe;AAChD;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW,aAAa,IAAI;AACxD;AACA,gBAAgB,6EAA6E,aAAa,IAAI;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAAS;AACnC;AACA;AACA;AACA,6BAA6B,kCAAU;AACvC,qBAAqB,oBAAU;AAC/B,8BAA8B,uBAAS;AACvC,YAAY,WAAO;AACnB,SAAS;AACT;AACA,6CAA6C,gCAAkB;AAC/D;AACA,iCAAiC,iDAAuB;AACxD;AACA;AACA;AACA;AACA,iCAAiC,oBAAU;AAC3C;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA,uBAAuB,GAAG,oBAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kCAAU;AAChC,0BAA0B,kCAAU;AACpC,qBAAqB,kCAAU;AAC/B,wBAAwB,kCAAU;AAClC,0BAA0B,kCAAU;AACpC,wBAAwB,kCAAU;AAClC,qBAAqB,kCAAU;AAC/B,8BAA8B,kCAAU;AACxC,yBAAyB,kCAAU;AACnC,2BAA2B,kCAAU;AACrC,yBAAyB,kCAAU;AACnC,+BAA+B,kCAAU;AACzC,aAAa;AACb;AACA,6BAA6B,kCAAU;AACvC,yBAAyB,kCAAU;AACnC,wBAAwB,kCAAU;AAClC,2BAA2B,kCAAU;AACrC,wBAAwB,kCAAU;AAClC,8BAA8B,kCAAU;AACxC,4BAA4B,kCAAU;AACtC,4BAA4B,kCAAU;AACtC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAI,WAAO;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,WAAO,KAAK,WAAO,KAAK;;;AChK3B;AACA;AAC+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D,4BAA4B,8BAAM,cAAc,8BAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACO;;;ACnBmC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO,gCAAgC,oBAAK;;;ACP5C;AACA;AACsB;AACE;AACO;AACF;AACJ","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/panelhandler.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/shell.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/app.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/pathopener.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/tokens.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/index.js"],"sourcesContent":["// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { closeIcon } from '@jupyterlab/ui-components';\nimport { ArrayExt, find } from '@lumino/algorithm';\nimport { MessageLoop } from '@lumino/messaging';\nimport { Signal } from '@lumino/signaling';\nimport { Panel, StackedPanel, Widget } from '@lumino/widgets';\n/**\n * A class which manages a panel and sorts its widgets by rank.\n */\nexport class PanelHandler {\n constructor() {\n /**\n * A message hook for child remove messages on the panel handler.\n */\n this._panelChildHook = (handler, msg) => {\n switch (msg.type) {\n case 'child-removed':\n {\n const widget = msg.child;\n ArrayExt.removeFirstWhere(this._items, (v) => v.widget === widget);\n }\n break;\n default:\n break;\n }\n return true;\n };\n this._items = new Array();\n this._panel = new Panel();\n MessageLoop.installMessageHook(this._panel, this._panelChildHook);\n }\n /**\n * Get the panel managed by the handler.\n */\n get panel() {\n return this._panel;\n }\n /**\n * Add a widget to the panel.\n *\n * If the widget is already added, it will be moved.\n */\n addWidget(widget, rank) {\n widget.parent = null;\n const item = { widget, rank };\n const index = ArrayExt.upperBound(this._items, item, Private.itemCmp);\n ArrayExt.insert(this._items, index, item);\n this._panel.insertWidget(index, widget);\n }\n}\n/**\n * A class which manages a side panel that can show at most one widget at a time.\n */\nexport class SidePanelHandler extends PanelHandler {\n /**\n * Construct a new side panel handler.\n */\n constructor(area) {\n super();\n this._isHiddenByUser = false;\n this._widgetAdded = new Signal(this);\n this._widgetRemoved = new Signal(this);\n this._area = area;\n this._panel.hide();\n this._currentWidget = null;\n this._lastCurrentWidget = null;\n this._widgetPanel = new StackedPanel();\n this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved, this);\n this._closeButton = document.createElement('button');\n closeIcon.element({\n container: this._closeButton,\n height: '16px',\n width: 'auto',\n });\n this._closeButton.onclick = () => {\n this.collapse();\n this.hide();\n };\n this._closeButton.className = 'jp-Button jp-SidePanel-collapse';\n this._closeButton.title = 'Collapse side panel';\n const icon = new Widget({ node: this._closeButton });\n this._panel.addWidget(icon);\n this._panel.addWidget(this._widgetPanel);\n }\n /**\n * Get the current widget in the sidebar panel.\n */\n get currentWidget() {\n return (this._currentWidget ||\n this._lastCurrentWidget ||\n (this._items.length > 0 ? this._items[0].widget : null));\n }\n /**\n * Get the area of the side panel\n */\n get area() {\n return this._area;\n }\n /**\n * Whether the panel is visible\n */\n get isVisible() {\n return this._panel.isVisible;\n }\n /**\n * Get the stacked panel managed by the handler\n */\n get panel() {\n return this._panel;\n }\n /**\n * Get the widgets list.\n */\n get widgets() {\n return this._items.map((obj) => obj.widget);\n }\n /**\n * Signal fired when a widget is added to the panel\n */\n get widgetAdded() {\n return this._widgetAdded;\n }\n /**\n * Signal fired when a widget is removed from the panel\n */\n get widgetRemoved() {\n return this._widgetRemoved;\n }\n /**\n * Get the close button element.\n */\n get closeButton() {\n return this._closeButton;\n }\n /**\n * Expand the sidebar.\n *\n * #### Notes\n * This will open the most recently used widget, or the first widget\n * if there is no most recently used.\n */\n expand(id) {\n if (id) {\n if (this._currentWidget && this._currentWidget.id === id) {\n this.collapse();\n this.hide();\n }\n else {\n this.collapse();\n this.hide();\n this.activate(id);\n this.show();\n }\n }\n else if (this.currentWidget) {\n this._currentWidget = this.currentWidget;\n this.activate(this._currentWidget.id);\n this.show();\n }\n }\n /**\n * Activate a widget residing in the stacked panel by ID.\n *\n * @param id - The widget's unique ID.\n */\n activate(id) {\n const widget = this._findWidgetByID(id);\n if (widget) {\n this._currentWidget = widget;\n widget.show();\n widget.activate();\n }\n }\n /**\n * Test whether the sidebar has the given widget by id.\n */\n has(id) {\n return this._findWidgetByID(id) !== null;\n }\n /**\n * Collapse the sidebar so no items are expanded.\n */\n collapse() {\n var _a;\n (_a = this._currentWidget) === null || _a === void 0 ? void 0 : _a.hide();\n this._currentWidget = null;\n }\n /**\n * Add a widget and its title to the stacked panel.\n *\n * If the widget is already added, it will be moved.\n */\n addWidget(widget, rank) {\n widget.parent = null;\n widget.hide();\n const item = { widget, rank };\n const index = this._findInsertIndex(item);\n ArrayExt.insert(this._items, index, item);\n this._widgetPanel.insertWidget(index, widget);\n this._refreshVisibility();\n this._widgetAdded.emit(widget);\n }\n /**\n * Hide the side panel\n */\n hide() {\n this._isHiddenByUser = true;\n this._refreshVisibility();\n }\n /**\n * Show the side panel\n */\n show() {\n this._isHiddenByUser = false;\n this._refreshVisibility();\n }\n /**\n * Find the insertion index for a rank item.\n */\n _findInsertIndex(item) {\n return ArrayExt.upperBound(this._items, item, Private.itemCmp);\n }\n /**\n * Find the index of the item with the given widget, or `-1`.\n */\n _findWidgetIndex(widget) {\n return ArrayExt.findFirstIndex(this._items, (i) => i.widget === widget);\n }\n /**\n * Find the widget with the given id, or `null`.\n */\n _findWidgetByID(id) {\n const item = find(this._items, (value) => value.widget.id === id);\n return item ? item.widget : null;\n }\n /**\n * Refresh the visibility of the stacked panel.\n */\n _refreshVisibility() {\n this._panel.setHidden(this._isHiddenByUser);\n }\n /*\n * Handle the `widgetRemoved` signal from the panel.\n */\n _onWidgetRemoved(sender, widget) {\n if (widget === this._lastCurrentWidget) {\n this._lastCurrentWidget = null;\n }\n ArrayExt.removeAt(this._items, this._findWidgetIndex(widget));\n this._refreshVisibility();\n this._widgetRemoved.emit(widget);\n }\n}\n/**\n * A class to manages the palette entries associated to the side panels.\n */\nexport class SidePanelPalette {\n /**\n * Construct a new side panel palette.\n */\n constructor(options) {\n this._items = [];\n this._commandPalette = options.commandPalette;\n this._command = options.command;\n }\n /**\n * Get a command palette item from the widget id and the area.\n */\n getItem(widget, area) {\n const itemList = this._items;\n for (let i = 0; i < itemList.length; i++) {\n const item = itemList[i];\n if (item.widgetId === widget.id && item.area === area) {\n return item;\n }\n }\n return null;\n }\n /**\n * Add an item to the command palette.\n */\n addItem(widget, area) {\n // Check if the item does not already exist.\n if (this.getItem(widget, area)) {\n return;\n }\n // Add a new item in command palette.\n const disposableDelegate = this._commandPalette.addItem({\n command: this._command,\n category: 'View',\n args: {\n side: area,\n title: `Show ${widget.title.caption}`,\n id: widget.id,\n },\n });\n // Keep the disposableDelegate object to be able to dispose of the item if the widget\n // is remove from the side panel.\n this._items.push({\n widgetId: widget.id,\n area: area,\n disposable: disposableDelegate,\n });\n }\n /**\n * Remove an item from the command palette.\n */\n removeItem(widget, area) {\n const item = this.getItem(widget, area);\n if (item) {\n item.disposable.dispose();\n }\n }\n}\n/**\n * A namespace for private module data.\n */\nvar Private;\n(function (Private) {\n /**\n * A less-than comparison function for side bar rank items.\n */\n function itemCmp(first, second) {\n return first.rank - second.rank;\n }\n Private.itemCmp = itemCmp;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { nullTranslator } from '@jupyterlab/translation';\nimport { find } from '@lumino/algorithm';\nimport { JSONExt, PromiseDelegate, Token } from '@lumino/coreutils';\nimport { Signal } from '@lumino/signaling';\nimport { BoxLayout, Panel, SplitPanel, Widget, } from '@lumino/widgets';\nimport { PanelHandler, SidePanelHandler } from './panelhandler';\nimport { TabPanelSvg } from '@jupyterlab/ui-components';\n/**\n * The Jupyter Notebook application shell token.\n */\nexport const INotebookShell = new Token('@jupyter-notebook/application:INotebookShell');\n/**\n * The default rank for ranked panels.\n */\nconst DEFAULT_RANK = 900;\n/**\n * The application shell.\n */\nexport class NotebookShell extends Widget {\n constructor() {\n super();\n this._translator = nullTranslator;\n this._currentChanged = new Signal(this);\n this._mainWidgetLoaded = new PromiseDelegate();\n this.id = 'main';\n this._userLayout = {};\n this._topHandler = new PanelHandler();\n this._menuHandler = new PanelHandler();\n this._leftHandler = new SidePanelHandler('left');\n this._rightHandler = new SidePanelHandler('right');\n this._main = new Panel();\n const topWrapper = (this._topWrapper = new Panel());\n const menuWrapper = (this._menuWrapper = new Panel());\n this._topHandler.panel.id = 'top-panel';\n this._topHandler.panel.node.setAttribute('role', 'banner');\n this._menuHandler.panel.id = 'menu-panel';\n this._menuHandler.panel.node.setAttribute('role', 'navigation');\n this._main.id = 'main-panel';\n this._main.node.setAttribute('role', 'main');\n this._spacer_top = new Widget();\n this._spacer_top.id = 'spacer-widget-top';\n this._spacer_bottom = new Widget();\n this._spacer_bottom.id = 'spacer-widget-bottom';\n // create wrappers around the top and menu areas\n topWrapper.id = 'top-panel-wrapper';\n topWrapper.addWidget(this._topHandler.panel);\n menuWrapper.id = 'menu-panel-wrapper';\n menuWrapper.addWidget(this._menuHandler.panel);\n const rootLayout = new BoxLayout();\n const leftHandler = this._leftHandler;\n const rightHandler = this._rightHandler;\n leftHandler.panel.id = 'jp-left-stack';\n leftHandler.panel.node.setAttribute('role', 'complementary');\n rightHandler.panel.id = 'jp-right-stack';\n rightHandler.panel.node.setAttribute('role', 'complementary');\n // Hide the side panels by default.\n leftHandler.hide();\n rightHandler.hide();\n const middleLayout = new BoxLayout({\n spacing: 0,\n direction: 'top-to-bottom',\n });\n BoxLayout.setStretch(this._topWrapper, 0);\n BoxLayout.setStretch(this._menuWrapper, 0);\n BoxLayout.setStretch(this._main, 1);\n const middlePanel = new Panel({ layout: middleLayout });\n middlePanel.addWidget(this._topWrapper);\n middlePanel.addWidget(this._menuWrapper);\n middlePanel.addWidget(this._spacer_top);\n middlePanel.addWidget(this._main);\n middlePanel.addWidget(this._spacer_bottom);\n middlePanel.layout = middleLayout;\n const vsplitPanel = new SplitPanel();\n vsplitPanel.id = 'jp-main-vsplit-panel';\n vsplitPanel.spacing = 1;\n vsplitPanel.orientation = 'vertical';\n SplitPanel.setStretch(vsplitPanel, 1);\n const downPanel = new TabPanelSvg({\n tabsMovable: true,\n });\n this._downPanel = downPanel;\n this._downPanel.id = 'jp-down-stack';\n // TODO: Consider storing this as an attribute this._hsplitPanel if saving/restoring layout needed\n const hsplitPanel = new SplitPanel();\n hsplitPanel.id = 'main-split-panel';\n hsplitPanel.spacing = 1;\n BoxLayout.setStretch(hsplitPanel, 1);\n SplitPanel.setStretch(leftHandler.panel, 0);\n SplitPanel.setStretch(rightHandler.panel, 0);\n SplitPanel.setStretch(middlePanel, 1);\n hsplitPanel.addWidget(leftHandler.panel);\n hsplitPanel.addWidget(middlePanel);\n hsplitPanel.addWidget(rightHandler.panel);\n // Use relative sizing to set the width of the side panels.\n // This will still respect the min-size of children widget in the stacked\n // panel.\n hsplitPanel.setRelativeSizes([1, 2.5, 1]);\n vsplitPanel.addWidget(hsplitPanel);\n vsplitPanel.addWidget(downPanel);\n rootLayout.spacing = 0;\n rootLayout.addWidget(vsplitPanel);\n // initially hiding the down panel\n this._downPanel.hide();\n // Connect down panel change listeners\n this._downPanel.tabBar.tabMoved.connect(this._onTabPanelChanged, this);\n this._downPanel.stackedPanel.widgetRemoved.connect(this._onTabPanelChanged, this);\n this.layout = rootLayout;\n // Added Skip to Main Link\n const skipLinkWidgetHandler = (this._skipLinkWidgetHandler =\n new Private.SkipLinkWidgetHandler(this));\n this.add(skipLinkWidgetHandler.skipLinkWidget, 'top', { rank: 0 });\n this._skipLinkWidgetHandler.show();\n }\n /**\n * A signal emitted when the current widget changes.\n */\n get currentChanged() {\n return this._currentChanged;\n }\n /**\n * The current widget in the shell's main area.\n */\n get currentWidget() {\n var _a;\n return (_a = this._main.widgets[0]) !== null && _a !== void 0 ? _a : null;\n }\n /**\n * Get the top area wrapper panel\n */\n get top() {\n return this._topWrapper;\n }\n /**\n * Get the menu area wrapper panel\n */\n get menu() {\n return this._menuWrapper;\n }\n /**\n * Get the left area handler\n */\n get leftHandler() {\n return this._leftHandler;\n }\n /**\n * Get the right area handler\n */\n get rightHandler() {\n return this._rightHandler;\n }\n /**\n * Is the left sidebar visible?\n */\n get leftCollapsed() {\n return !(this._leftHandler.isVisible && this._leftHandler.panel.isVisible);\n }\n /**\n * Is the right sidebar visible?\n */\n get rightCollapsed() {\n return !(this._rightHandler.isVisible && this._rightHandler.panel.isVisible);\n }\n /**\n * Promise that resolves when the main widget is loaded\n */\n get restored() {\n return this._mainWidgetLoaded.promise;\n }\n /**\n * Getter and setter for the translator.\n */\n get translator() {\n var _a;\n return (_a = this._translator) !== null && _a !== void 0 ? _a : nullTranslator;\n }\n set translator(value) {\n if (value !== this._translator) {\n this._translator = value;\n const trans = value.load('notebook');\n this._leftHandler.closeButton.title = trans.__('Collapse %1 side panel', this._leftHandler.area);\n this._rightHandler.closeButton.title = trans.__('Collapse %1 side panel', this._rightHandler.area);\n }\n }\n /**\n * User custom shell layout.\n */\n get userLayout() {\n return JSONExt.deepCopy(this._userLayout);\n }\n /**\n * Activate a widget in its area.\n */\n activateById(id) {\n // Search all areas that can have widgets for this widget, starting with main.\n for (const area of ['main', 'top', 'left', 'right', 'menu', 'down']) {\n const widget = find(this.widgets(area), (w) => w.id === id);\n if (widget) {\n if (area === 'left') {\n this.expandLeft(id);\n }\n else if (area === 'right') {\n this.expandRight(id);\n }\n else if (area === 'down') {\n this._downPanel.show();\n widget.activate();\n }\n else {\n widget.activate();\n }\n }\n }\n }\n /**\n * Add a widget to the application shell.\n *\n * @param widget - The widget being added.\n *\n * @param area - Optional region in the shell into which the widget should\n * be added.\n *\n * @param options - Optional open options.\n *\n */\n add(widget, area, options) {\n var _a, _b;\n let userPosition;\n if ((options === null || options === void 0 ? void 0 : options.type) && this._userLayout[options.type]) {\n userPosition = this._userLayout[options.type];\n }\n else {\n userPosition = this._userLayout[widget.id];\n }\n area = (_a = userPosition === null || userPosition === void 0 ? void 0 : userPosition.area) !== null && _a !== void 0 ? _a : area;\n options =\n options || (userPosition === null || userPosition === void 0 ? void 0 : userPosition.options)\n ? {\n ...options,\n ...userPosition === null || userPosition === void 0 ? void 0 : userPosition.options,\n }\n : undefined;\n const rank = (_b = options === null || options === void 0 ? void 0 : options.rank) !== null && _b !== void 0 ? _b : DEFAULT_RANK;\n switch (area) {\n case 'top':\n return this._topHandler.addWidget(widget, rank);\n case 'menu':\n return this._menuHandler.addWidget(widget, rank);\n case 'main':\n case undefined: {\n if (this._main.widgets.length > 0) {\n // do not add the widget if there is already one\n return;\n }\n const previousWidget = this.currentWidget;\n this._main.addWidget(widget);\n this._main.update();\n this._currentChanged.emit({\n newValue: widget,\n oldValue: previousWidget,\n });\n this._mainWidgetLoaded.resolve();\n break;\n }\n case 'left':\n return this._leftHandler.addWidget(widget, rank);\n case 'right':\n return this._rightHandler.addWidget(widget, rank);\n case 'down':\n return this._downPanel.addWidget(widget);\n default:\n console.warn(`Cannot add widget to area: ${area}`);\n }\n }\n /**\n * Collapse the top area and the spacer to make the view more compact.\n */\n collapseTop() {\n this._topWrapper.setHidden(true);\n this._spacer_top.setHidden(true);\n }\n /**\n * Expand the top area to show the header and the spacer.\n */\n expandTop() {\n this._topWrapper.setHidden(false);\n this._spacer_top.setHidden(false);\n }\n /**\n * Return the list of widgets for the given area.\n *\n * @param area The area\n */\n *widgets(area) {\n switch (area !== null && area !== void 0 ? area : 'main') {\n case 'top':\n yield* this._topHandler.panel.widgets;\n return;\n case 'menu':\n yield* this._menuHandler.panel.widgets;\n return;\n case 'main':\n yield* this._main.widgets;\n return;\n case 'left':\n yield* this._leftHandler.widgets;\n return;\n case 'right':\n yield* this._rightHandler.widgets;\n return;\n case 'down':\n yield* this._downPanel.widgets;\n return;\n default:\n console.error(`This shell has no area called \"${area}\"`);\n return;\n }\n }\n /**\n * Expand the left panel to show the sidebar with its widget.\n */\n expandLeft(id) {\n this._leftHandler.panel.show();\n this._leftHandler.expand(id); // Show the current widget, if any\n }\n /**\n * Collapse the left panel\n */\n collapseLeft() {\n this._leftHandler.collapse();\n this._leftHandler.panel.hide();\n }\n /**\n * Expand the right panel to show the sidebar with its widget.\n */\n expandRight(id) {\n this._rightHandler.panel.show();\n this._rightHandler.expand(id); // Show the current widget, if any\n }\n /**\n * Collapse the right panel\n */\n collapseRight() {\n this._rightHandler.collapse();\n this._rightHandler.panel.hide();\n }\n /**\n * Restore the layout state and configuration for the application shell.\n */\n async restoreLayout(configuration) {\n this._userLayout = configuration;\n }\n /**\n * Handle a change on the down panel widgets\n */\n _onTabPanelChanged() {\n if (this._downPanel.stackedPanel.widgets.length === 0) {\n this._downPanel.hide();\n }\n }\n}\nexport var Private;\n(function (Private) {\n class SkipLinkWidgetHandler {\n /**\n * Construct a new skipLink widget handler.\n */\n constructor(shell) {\n this._isDisposed = false;\n const skipLinkWidget = (this._skipLinkWidget = new Widget());\n const skipToMain = document.createElement('a');\n skipToMain.href = '#first-cell';\n skipToMain.tabIndex = 1;\n skipToMain.text = 'Skip to Main';\n skipToMain.className = 'skip-link';\n skipToMain.addEventListener('click', this);\n skipLinkWidget.addClass('jp-skiplink');\n skipLinkWidget.id = 'jp-skiplink';\n skipLinkWidget.node.appendChild(skipToMain);\n }\n handleEvent(event) {\n switch (event.type) {\n case 'click':\n this._focusMain();\n break;\n }\n }\n _focusMain() {\n const input = document.querySelector('#main-panel .jp-InputArea-editor');\n input.tabIndex = 1;\n input.focus();\n }\n /**\n * Get the input element managed by the handler.\n */\n get skipLinkWidget() {\n return this._skipLinkWidget;\n }\n /**\n * Dispose of the handler and the resources it holds.\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this._isDisposed = true;\n this._skipLinkWidget.node.removeEventListener('click', this);\n this._skipLinkWidget.dispose();\n }\n /**\n * Hide the skipLink widget.\n */\n hide() {\n this._skipLinkWidget.hide();\n }\n /**\n * Show the skipLink widget.\n */\n show() {\n this._skipLinkWidget.show();\n }\n /**\n * Test whether the handler has been disposed.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n }\n Private.SkipLinkWidgetHandler = SkipLinkWidgetHandler;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { JupyterLab, JupyterFrontEnd, } from '@jupyterlab/application';\nimport { Base64ModelFactory } from '@jupyterlab/docregistry';\nimport { createRendermimePlugins } from '@jupyterlab/application/lib/mimerenderers';\nimport { LabStatus } from '@jupyterlab/application/lib/status';\nimport { PageConfig } from '@jupyterlab/coreutils';\nimport { Throttler } from '@lumino/polling';\nimport { NotebookShell } from './shell';\n/**\n * App is the main application class. It is instantiated once and shared.\n */\nexport class NotebookApp extends JupyterFrontEnd {\n /**\n * Construct a new NotebookApp object.\n *\n * @param options The instantiation options for an application.\n */\n constructor(options = { shell: new NotebookShell() }) {\n var _a, _b;\n super({ ...options, shell: (_a = options.shell) !== null && _a !== void 0 ? _a : new NotebookShell() });\n /**\n * The name of the application.\n */\n this.name = 'Jupyter Notebook';\n /**\n * A namespace/prefix plugins may use to denote their provenance.\n */\n this.namespace = this.name;\n /**\n * The application busy and dirty status signals and flags.\n */\n this.status = new LabStatus(this);\n /**\n * The version of the application.\n */\n this.version = (_b = PageConfig.getOption('appVersion')) !== null && _b !== void 0 ? _b : 'unknown';\n this._info = JupyterLab.defaultInfo;\n this._formatter = new Throttler(() => {\n Private.setFormat(this);\n }, 250);\n // Add initial model factory.\n this.docRegistry.addModelFactory(new Base64ModelFactory());\n if (options.mimeExtensions) {\n for (const plugin of createRendermimePlugins(options.mimeExtensions)) {\n this.registerPlugin(plugin);\n }\n }\n // Create an IInfo dictionary from the options to override the defaults.\n const info = Object.keys(JupyterLab.defaultInfo).reduce((acc, val) => {\n if (val in options) {\n acc[val] = JSON.parse(JSON.stringify(options[val]));\n }\n return acc;\n }, {});\n // Populate application info.\n this._info = { ...JupyterLab.defaultInfo, ...info };\n this.restored = this.shell.restored;\n this.restored.then(() => this._formatter.invoke());\n }\n /**\n * The NotebookApp application information dictionary.\n */\n get info() {\n return this._info;\n }\n /**\n * The JupyterLab application paths dictionary.\n */\n get paths() {\n return {\n urls: {\n base: PageConfig.getOption('baseUrl'),\n notFound: PageConfig.getOption('notFoundUrl'),\n app: PageConfig.getOption('appUrl'),\n static: PageConfig.getOption('staticUrl'),\n settings: PageConfig.getOption('settingsUrl'),\n themes: PageConfig.getOption('themesUrl'),\n doc: PageConfig.getOption('docUrl'),\n translations: PageConfig.getOption('translationsApiUrl'),\n hubHost: PageConfig.getOption('hubHost') || undefined,\n hubPrefix: PageConfig.getOption('hubPrefix') || undefined,\n hubUser: PageConfig.getOption('hubUser') || undefined,\n hubServerName: PageConfig.getOption('hubServerName') || undefined,\n },\n directories: {\n appSettings: PageConfig.getOption('appSettingsDir'),\n schemas: PageConfig.getOption('schemasDir'),\n static: PageConfig.getOption('staticDir'),\n templates: PageConfig.getOption('templatesDir'),\n themes: PageConfig.getOption('themesDir'),\n userSettings: PageConfig.getOption('userSettingsDir'),\n serverRoot: PageConfig.getOption('serverRoot'),\n workspaces: PageConfig.getOption('workspacesDir'),\n },\n };\n }\n /**\n * Handle the DOM events for the application.\n *\n * @param event - The DOM event sent to the application.\n */\n handleEvent(event) {\n super.handleEvent(event);\n if (event.type === 'resize') {\n void this._formatter.invoke();\n }\n }\n /**\n * Register plugins from a plugin module.\n *\n * @param mod - The plugin module to register.\n */\n registerPluginModule(mod) {\n let data = mod.default;\n // Handle commonjs exports.\n if (!Object.prototype.hasOwnProperty.call(mod, '__esModule')) {\n data = mod;\n }\n if (!Array.isArray(data)) {\n data = [data];\n }\n data.forEach((item) => {\n try {\n this.registerPlugin(item);\n }\n catch (error) {\n console.error(error);\n }\n });\n }\n /**\n * Register the plugins from multiple plugin modules.\n *\n * @param mods - The plugin modules to register.\n */\n registerPluginModules(mods) {\n mods.forEach((mod) => {\n this.registerPluginModule(mod);\n });\n }\n}\n/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n /**\n * Media query for mobile devices.\n */\n const MOBILE_QUERY = 'only screen and (max-width: 760px)';\n /**\n * Sets the `format` of a Jupyter front-end application.\n *\n * @param app The front-end application whose format is set.\n */\n function setFormat(app) {\n app.format = window.matchMedia(MOBILE_QUERY).matches ? 'mobile' : 'desktop';\n }\n Private.setFormat = setFormat;\n})(Private || (Private = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { URLExt } from '@jupyterlab/coreutils';\n/**\n * A class to open paths in new browser tabs in the Notebook application.\n */\nclass DefaultNotebookPathOpener {\n /**\n * Open a path in a new browser tab.\n */\n open(options) {\n const { prefix, path, searchParams, target, features } = options;\n const url = new URL(URLExt.join(prefix, URLExt.encodeParts(path !== null && path !== void 0 ? path : '')), window.location.origin);\n if (searchParams) {\n url.search = searchParams.toString();\n }\n return window.open(url, target, features);\n }\n}\nexport const defaultNotebookPathOpener = new DefaultNotebookPathOpener();\n","import { Token } from '@lumino/coreutils';\n/**\n * The INotebookPathOpener token.\n * The main purpose of this token is to allow other extensions or downstream applications\n * to override the default behavior of opening a notebook in a new tab.\n * It also allows passing the path as a URL search parameter, or other options to the window.open call.\n */\nexport const INotebookPathOpener = new Token('@jupyter-notebook/application:INotebookPathOpener');\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nexport * from './app';\nexport * from './shell';\nexport * from './panelhandler';\nexport * from './pathopener';\nexport * from './tokens';\n"],"names":[],"sourceRoot":""}
|
|
@@ -12,22 +12,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12
12
|
"default": () => (/* binding */ lib)
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/apputils@~4.6.0-
|
|
16
|
-
var index_js_ = __webpack_require__(
|
|
17
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/coreutils@~6.5.0-
|
|
18
|
-
var lib_index_js_ = __webpack_require__(
|
|
19
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/docmanager@~4.5.0-
|
|
20
|
-
var docmanager_lib_index_js_ = __webpack_require__(
|
|
21
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/mainmenu@~4.5.0-
|
|
22
|
-
var mainmenu_lib_index_js_ = __webpack_require__(
|
|
23
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/notebook@~4.5.0-
|
|
24
|
-
var notebook_lib_index_js_ = __webpack_require__(
|
|
25
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingregistry@~4.5.0-
|
|
26
|
-
var settingregistry_lib_index_js_ = __webpack_require__(
|
|
27
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/translation@~4.5.0-
|
|
28
|
-
var translation_lib_index_js_ = __webpack_require__(
|
|
29
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyter-notebook/application@~7.5.0-
|
|
30
|
-
var application_lib_index_js_ = __webpack_require__(
|
|
15
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/apputils@~4.6.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/apputils/lib/index.js)
|
|
16
|
+
var index_js_ = __webpack_require__(10498);
|
|
17
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/coreutils@~6.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/coreutils/lib/index.js)
|
|
18
|
+
var lib_index_js_ = __webpack_require__(14286);
|
|
19
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/docmanager@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/docmanager/lib/index.js)
|
|
20
|
+
var docmanager_lib_index_js_ = __webpack_require__(71574);
|
|
21
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/mainmenu@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/mainmenu/lib/index.js)
|
|
22
|
+
var mainmenu_lib_index_js_ = __webpack_require__(68147);
|
|
23
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/notebook@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/notebook/lib/index.js)
|
|
24
|
+
var notebook_lib_index_js_ = __webpack_require__(45368);
|
|
25
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingregistry@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/settingregistry/lib/index.js)
|
|
26
|
+
var settingregistry_lib_index_js_ = __webpack_require__(10378);
|
|
27
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/translation@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/translation/lib/index.js)
|
|
28
|
+
var translation_lib_index_js_ = __webpack_require__(41719);
|
|
29
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyter-notebook/application@~7.5.0-beta.0 (strict) (fallback: ../packages/application/lib/index.js)
|
|
30
|
+
var application_lib_index_js_ = __webpack_require__(9829);
|
|
31
31
|
// EXTERNAL MODULE: consume shared module (default) @lumino/polling@^2.1.4 (strict) (fallback: ../node_modules/@lumino/polling/dist/index.es6.js)
|
|
32
32
|
var index_es6_js_ = __webpack_require__(1492);
|
|
33
33
|
// EXTERNAL MODULE: consume shared module (default) @lumino/widgets@~2.7.1 (singleton) (fallback: ../node_modules/@lumino/widgets/dist/index.es6.js)
|
|
@@ -721,4 +721,4 @@ const plugins = [
|
|
|
721
721
|
/***/ })
|
|
722
722
|
|
|
723
723
|
}]);
|
|
724
|
-
//# sourceMappingURL=5573.
|
|
724
|
+
//# sourceMappingURL=5573.8f9c21fe6dc9c281ffa6.js.map?v=8f9c21fe6dc9c281ffa6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5573.376762f27640a1bbb19b.js?v=376762f27640a1bbb19b","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAmD;AACI;AACJ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA,kCAAkC,4BAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA,cAAc,sCAAe;AAC7B;AACA;AACA,IAAI,6BAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,YAAY,sCAAmB,aAAa,2DAA2D,oBAAoB,IAAI,gBAAgB;AAC/I;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD,eAAe,qBAAW,QAAQ,sCAAmB,kBAAkB,4CAA4C;AACnH;AACA,CAAC,4CAA4C;;;ACtE7C;AACA;AAC0F;AACnB;AACb;AACT;AACuC;AACzB;AACO;AACP;AACxB;AACE;AACI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAgB,EAAE,qCAAW;AAC5C,eAAe,wCAAc,EAAE,gCAAsB,EAAE,8CAAgB;AACvE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,mCAAmC,yBAAM,GAAG,MAAM;AAClD,4BAA4B,kBAAQ;AACpC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kBAAI;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAI;AAC/B;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,6DAA6D,eAAe,IAAI,eAAe;AAC/F;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAS;AACxB,eAAe,qCAAW;AAC1B;AACA,gBAAgB,WAAW;AAC3B,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,iBAAiB;AACtF;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAW;AAC1B;AACA,gBAAgB,WAAW;AAC3B,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAM,MAAM,wBAAU;AAClD;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B,eAAe,yBAAe,EAAE,8CAAgB,EAAE,qCAAW;AAC7D;AACA,mFAAmF,wCAAc;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc;AAC7B,eAAe,gCAAsB;AACrC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yBAAM,GAAG,MAAM;AAClD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc,EAAE,qCAAW;AAC1C;AACA;AACA,2BAA2B,yBAAM;AACjC;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAI,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B,eAAe,8CAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc;AAC7B,eAAe,qCAAc;AAC7B;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B;AACA;AACA,wBAAwB,wBAAU;AAClC,6BAA6B,oBAAM;AACnC,yBAAyB,oBAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc,EAAE,qCAAW;AAC1C;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB,UAAU,sBAAsB;AAC3E;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAe,EAAE,qCAAW,EAAE,qCAAc;AAC3D;AACA,gBAAgB,kBAAkB;AAClC,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,+CAA+C,oCAAa;AAC5D,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAe,OAAO,EAAC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/notebook-extension/lib/trusted.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/notebook-extension/lib/index.js"],"sourcesContent":["import { ReactWidget } from '@jupyterlab/apputils';\nimport { NotebookActions } from '@jupyterlab/notebook';\nimport React, { useEffect, useState } from 'react';\n/**\n * Check if a notebook is trusted\n * @param notebook The notebook to check\n * @returns true if the notebook is trusted, false otherwise\n */\nconst isTrusted = (notebook) => {\n const model = notebook.model;\n if (!model) {\n return false;\n }\n const cells = Array.from(model.cells);\n let total = 0;\n let trusted = 0;\n for (const currentCell of cells) {\n if (currentCell.type !== 'code') {\n continue;\n }\n total++;\n if (currentCell.trusted) {\n trusted++;\n }\n }\n return trusted === total;\n};\n/**\n * A React component to display the Trusted badge in the menu bar.\n * @param notebook The Notebook\n * @param translator The Translation service\n */\nconst TrustedButton = ({ notebook, translator, }) => {\n const trans = translator.load('notebook');\n const [trusted, setTrusted] = useState(isTrusted(notebook));\n const checkTrust = () => {\n const v = isTrusted(notebook);\n setTrusted(v);\n };\n const trust = async () => {\n await NotebookActions.trust(notebook, translator);\n checkTrust();\n };\n useEffect(() => {\n notebook.modelContentChanged.connect(checkTrust);\n notebook.activeCellChanged.connect(checkTrust);\n checkTrust();\n return () => {\n notebook.modelContentChanged.disconnect(checkTrust);\n notebook.activeCellChanged.disconnect(checkTrust);\n };\n });\n return (React.createElement(\"button\", { className: 'jp-NotebookTrustedStatus', style: !trusted ? { cursor: 'pointer' } : { cursor: 'help' }, onClick: () => !trusted && trust(), title: trusted\n ? trans.__('JavaScript enabled for notebook display')\n : trans.__('JavaScript disabled for notebook display') }, trusted ? trans.__('Trusted') : trans.__('Not Trusted')));\n};\n/**\n * A namespace for TrustedComponent static methods.\n */\nexport var TrustedComponent;\n(function (TrustedComponent) {\n /**\n * Create a new TrustedComponent\n *\n * @param notebook The notebook\n * @param translator The translator\n */\n TrustedComponent.create = ({ notebook, translator, }) => {\n return ReactWidget.create(React.createElement(TrustedButton, { notebook: notebook, translator: translator }));\n };\n})(TrustedComponent || (TrustedComponent = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { DOMUtils, IToolbarWidgetRegistry, ICommandPalette, } from '@jupyterlab/apputils';\nimport { PageConfig, Text, Time, URLExt } from '@jupyterlab/coreutils';\nimport { IDocumentManager } from '@jupyterlab/docmanager';\nimport { IMainMenu } from '@jupyterlab/mainmenu';\nimport { NotebookPanel, INotebookTracker, INotebookTools, } from '@jupyterlab/notebook';\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { ITranslator, nullTranslator } from '@jupyterlab/translation';\nimport { INotebookShell } from '@jupyter-notebook/application';\nimport { Poll } from '@lumino/polling';\nimport { Widget } from '@lumino/widgets';\nimport { TrustedComponent } from './trusted';\n/**\n * The class for kernel status errors.\n */\nconst KERNEL_STATUS_ERROR_CLASS = 'jp-NotebookKernelStatus-error';\n/**\n * The class for kernel status warnings.\n */\nconst KERNEL_STATUS_WARN_CLASS = 'jp-NotebookKernelStatus-warn';\n/**\n * The class for kernel status infos.\n */\nconst KERNEL_STATUS_INFO_CLASS = 'jp-NotebookKernelStatus-info';\n/**\n * The class to fade out the kernel status.\n */\nconst KERNEL_STATUS_FADE_OUT_CLASS = 'jp-NotebookKernelStatus-fade';\n/**\n * The class for scrolled outputs\n */\nconst SCROLLED_OUTPUTS_CLASS = 'jp-mod-outputsScrolled';\n/**\n * The class for the full width notebook\n */\nconst FULL_WIDTH_NOTEBOOK_CLASS = 'jp-mod-fullwidth';\n/**\n * The command IDs used by the notebook plugins.\n */\nvar CommandIDs;\n(function (CommandIDs) {\n /**\n * A command to open right sidebar for Editing Notebook Metadata\n */\n CommandIDs.openEditNotebookMetadata = 'notebook:edit-metadata';\n /**\n * A command to toggle full width of the notebook\n */\n CommandIDs.toggleFullWidth = 'notebook:toggle-full-width';\n})(CommandIDs || (CommandIDs = {}));\n/**\n * A plugin for the checkpoint indicator\n */\nconst checkpoints = {\n id: '@jupyter-notebook/notebook-extension:checkpoints',\n description: 'A plugin for the checkpoint indicator.',\n autoStart: true,\n requires: [IDocumentManager, ITranslator],\n optional: [INotebookShell, IToolbarWidgetRegistry, ISettingRegistry],\n activate: (app, docManager, translator, notebookShell, toolbarRegistry, settingRegistry) => {\n const { shell } = app;\n const trans = translator.load('notebook');\n const node = document.createElement('div');\n if (toolbarRegistry) {\n toolbarRegistry.addFactory('TopBar', 'checkpoint', (toolbar) => {\n const widget = new Widget({ node });\n widget.id = DOMUtils.createDomID();\n widget.addClass('jp-NotebookCheckpoint');\n return widget;\n });\n }\n const getCurrent = () => {\n const current = shell.currentWidget;\n if (!current) {\n return null;\n }\n const context = docManager.contextForWidget(current);\n if (!context) {\n return null;\n }\n return context;\n };\n const updateCheckpointDisplay = async () => {\n const current = getCurrent();\n if (!current) {\n return;\n }\n const checkpoints = await current.listCheckpoints();\n if (!checkpoints || !checkpoints.length) {\n node.textContent = '';\n return;\n }\n const checkpoint = checkpoints[checkpoints.length - 1];\n node.textContent = trans.__('Last Checkpoint: %1', Time.formatHuman(new Date(checkpoint.last_modified)));\n };\n const onSaveState = async (sender, state) => {\n if (state !== 'completed') {\n return;\n }\n // Add a small artificial delay so that the UI can pick up the newly created checkpoint.\n // Since the save state signal is emitted after a file save, but not after a checkpoint has been created.\n setTimeout(() => {\n void updateCheckpointDisplay();\n }, 500);\n };\n const onChange = async () => {\n const context = getCurrent();\n if (!context) {\n return;\n }\n context.saveState.disconnect(onSaveState);\n context.saveState.connect(onSaveState);\n await updateCheckpointDisplay();\n };\n if (notebookShell) {\n notebookShell.currentChanged.connect(onChange);\n }\n let checkpointPollingInterval = 30; // Default 30 seconds\n let poll = null;\n const createPoll = () => {\n if (poll) {\n poll.dispose();\n }\n if (checkpointPollingInterval > 0) {\n poll = new Poll({\n auto: true,\n factory: () => updateCheckpointDisplay(),\n frequency: {\n interval: checkpointPollingInterval * 1000,\n backoff: false,\n },\n standby: 'when-hidden',\n });\n }\n };\n const updateSettings = (settings) => {\n checkpointPollingInterval = settings.get('checkpointPollingInterval')\n .composite;\n createPoll();\n };\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(checkpoints.id);\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n updateSettings(settings);\n settings.changed.connect(updateSettings);\n })\n .catch((reason) => {\n console.error(`Failed to load settings for ${checkpoints.id}: ${reason.message}`);\n // Fall back to creating poll with default settings\n createPoll();\n });\n }\n else {\n // Create poll with default settings\n createPoll();\n }\n },\n};\n/**\n * Add a command to close the browser tab when clicking on \"Close and Shut Down\"\n */\nconst closeTab = {\n id: '@jupyter-notebook/notebook-extension:close-tab',\n description: 'Add a command to close the browser tab when clicking on \"Close and Shut Down\".',\n autoStart: true,\n requires: [IMainMenu],\n optional: [ITranslator],\n activate: (app, menu, translator) => {\n const { commands } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n const id = 'notebook:close-and-halt';\n commands.addCommand(id, {\n label: trans.__('Close and Shut Down Notebook'),\n execute: async () => {\n // Shut the kernel down, without confirmation\n await commands.execute('notebook:shutdown-kernel', { activate: false });\n window.close();\n },\n });\n menu.fileMenu.closeAndCleaners.add({\n id,\n // use a small rank to it takes precedence over the default\n // shut down action for the notebook\n rank: 0,\n });\n },\n};\n/**\n * Add a command to open the tree view from the notebook view\n */\nconst openTreeTab = {\n id: '@jupyter-notebook/notebook-extension:open-tree-tab',\n description: 'Add a command to open a browser tab on the tree view when clicking \"Open...\".',\n autoStart: true,\n optional: [ITranslator],\n activate: (app, translator) => {\n const { commands } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n const id = 'notebook:open-tree-tab';\n commands.addCommand(id, {\n label: trans.__('Open…'),\n execute: async () => {\n const url = URLExt.join(PageConfig.getBaseUrl(), 'tree');\n window.open(url);\n },\n });\n },\n};\n/**\n * A plugin to set the notebook to full width.\n */\nconst fullWidthNotebook = {\n id: '@jupyter-notebook/notebook-extension:full-width-notebook',\n description: 'A plugin to set the notebook to full width.',\n autoStart: true,\n requires: [INotebookTracker],\n optional: [ICommandPalette, ISettingRegistry, ITranslator],\n activate: (app, tracker, palette, settingRegistry, translator) => {\n const trans = (translator !== null && translator !== void 0 ? translator : nullTranslator).load('notebook');\n let fullWidth = false;\n const toggleFullWidth = () => {\n const current = tracker.currentWidget;\n fullWidth = !fullWidth;\n if (!current) {\n return;\n }\n const content = current;\n content.toggleClass(FULL_WIDTH_NOTEBOOK_CLASS, fullWidth);\n };\n let notebookSettings;\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(fullWidthNotebook.id);\n const updateSettings = (settings) => {\n const newFullWidth = settings.get('fullWidthNotebook')\n .composite;\n if (newFullWidth !== fullWidth) {\n toggleFullWidth();\n }\n };\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n notebookSettings = settings;\n updateSettings(settings);\n settings.changed.connect((settings) => {\n updateSettings(settings);\n });\n })\n .catch((reason) => {\n console.error(reason.message);\n });\n }\n app.commands.addCommand(CommandIDs.toggleFullWidth, {\n label: trans.__('Enable Full Width Notebook'),\n execute: () => {\n toggleFullWidth();\n if (notebookSettings) {\n notebookSettings.set('fullWidthNotebook', fullWidth);\n }\n },\n isEnabled: () => tracker.currentWidget !== null,\n isToggled: () => fullWidth,\n });\n if (palette) {\n palette.addItem({\n command: CommandIDs.toggleFullWidth,\n category: 'Notebook Operations',\n });\n }\n },\n};\n/**\n * The kernel logo plugin.\n */\nconst kernelLogo = {\n id: '@jupyter-notebook/notebook-extension:kernel-logo',\n description: 'The kernel logo plugin.',\n autoStart: true,\n requires: [INotebookShell],\n optional: [IToolbarWidgetRegistry],\n activate: (app, shell, toolbarRegistry) => {\n const { serviceManager } = app;\n const node = document.createElement('div');\n const img = document.createElement('img');\n const onChange = async () => {\n var _a, _b, _c, _d, _e;\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n if (!node.hasChildNodes()) {\n node.appendChild(img);\n }\n await current.sessionContext.ready;\n current.sessionContext.kernelChanged.disconnect(onChange);\n current.sessionContext.kernelChanged.connect(onChange);\n const name = (_c = (_b = (_a = current.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '';\n const spec = (_e = (_d = serviceManager.kernelspecs) === null || _d === void 0 ? void 0 : _d.specs) === null || _e === void 0 ? void 0 : _e.kernelspecs[name];\n if (!spec) {\n node.childNodes[0].remove();\n return;\n }\n const kernelIconUrl = spec.resources['logo-64x64'];\n if (!kernelIconUrl) {\n node.childNodes[0].remove();\n return;\n }\n img.src = kernelIconUrl;\n img.title = spec.display_name;\n };\n if (toolbarRegistry) {\n toolbarRegistry.addFactory('TopBar', 'kernelLogo', (toolbar) => {\n const widget = new Widget({ node });\n widget.addClass('jp-NotebookKernelLogo');\n return widget;\n });\n }\n app.started.then(() => {\n shell.currentChanged.connect(onChange);\n });\n },\n};\n/**\n * A plugin to display the kernel status;\n */\nconst kernelStatus = {\n id: '@jupyter-notebook/notebook-extension:kernel-status',\n description: 'A plugin to display the kernel status.',\n autoStart: true,\n requires: [INotebookShell, ITranslator],\n activate: (app, shell, translator) => {\n const trans = translator.load('notebook');\n const widget = new Widget();\n widget.addClass('jp-NotebookKernelStatus');\n app.shell.add(widget, 'menu', { rank: 10010 });\n const removeClasses = () => {\n widget.removeClass(KERNEL_STATUS_ERROR_CLASS);\n widget.removeClass(KERNEL_STATUS_WARN_CLASS);\n widget.removeClass(KERNEL_STATUS_INFO_CLASS);\n widget.removeClass(KERNEL_STATUS_FADE_OUT_CLASS);\n };\n const onStatusChanged = (sessionContext) => {\n const status = sessionContext.kernelDisplayStatus;\n let text = `Kernel ${Text.titleCase(status)}`;\n removeClasses();\n switch (status) {\n case 'busy':\n case 'idle':\n text = '';\n widget.addClass(KERNEL_STATUS_FADE_OUT_CLASS);\n break;\n case 'dead':\n case 'terminating':\n widget.addClass(KERNEL_STATUS_ERROR_CLASS);\n break;\n case 'unknown':\n widget.addClass(KERNEL_STATUS_WARN_CLASS);\n break;\n default:\n widget.addClass(KERNEL_STATUS_INFO_CLASS);\n widget.addClass(KERNEL_STATUS_FADE_OUT_CLASS);\n break;\n }\n widget.node.textContent = trans.__(text);\n };\n const onChange = async () => {\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n const sessionContext = current.sessionContext;\n sessionContext.statusChanged.connect(onStatusChanged);\n };\n shell.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin to enable scrolling for outputs by default.\n * Mimic the logic from the classic notebook, as found here:\n * https://github.com/jupyter/notebook/blob/a9a31c096eeffe1bff4e9164c6a0442e0e13cdb3/notebook/static/notebook/js/outputarea.js#L96-L120\n */\nconst scrollOutput = {\n id: '@jupyter-notebook/notebook-extension:scroll-output',\n description: 'A plugin to enable scrolling for outputs by default.',\n autoStart: true,\n requires: [INotebookTracker],\n optional: [ISettingRegistry],\n activate: async (app, tracker, settingRegistry) => {\n const autoScrollThreshold = 100;\n let autoScrollOutputs = true;\n // decide whether to scroll the output of the cell based on some heuristics\n const autoScroll = (cell) => {\n if (!autoScrollOutputs) {\n // bail if disabled via the settings\n cell.removeClass(SCROLLED_OUTPUTS_CLASS);\n return;\n }\n const { outputArea } = cell;\n // respect cells with an explicit scrolled state\n const scrolled = cell.model.getMetadata('scrolled');\n if (scrolled !== undefined) {\n return;\n }\n const { node } = outputArea;\n const height = node.scrollHeight;\n const fontSize = parseFloat(node.style.fontSize.replace('px', ''));\n const lineHeight = (fontSize || 14) * 1.3;\n // do not set via cell.outputScrolled = true, as this would\n // otherwise synchronize the scrolled state to the notebook metadata\n const scroll = height > lineHeight * autoScrollThreshold;\n cell.toggleClass(SCROLLED_OUTPUTS_CLASS, scroll);\n };\n const handlers = {};\n const setAutoScroll = (cell) => {\n if (cell.model.type === 'code') {\n const codeCell = cell;\n const id = codeCell.model.id;\n autoScroll(codeCell);\n if (handlers[id]) {\n codeCell.outputArea.model.changed.disconnect(handlers[id]);\n }\n handlers[id] = () => autoScroll(codeCell);\n codeCell.outputArea.model.changed.connect(handlers[id]);\n }\n };\n tracker.widgetAdded.connect((sender, notebook) => {\n var _a;\n // when the notebook widget is created, process all the cells\n notebook.sessionContext.ready.then(() => {\n notebook.content.widgets.forEach(setAutoScroll);\n });\n (_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.connect((sender, args) => {\n notebook.content.widgets.forEach(setAutoScroll);\n });\n });\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(scrollOutput.id);\n const updateSettings = (settings) => {\n autoScrollOutputs = settings.get('autoScrollOutputs')\n .composite;\n };\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n updateSettings(settings);\n settings.changed.connect((settings) => {\n updateSettings(settings);\n });\n })\n .catch((reason) => {\n console.error(reason.message);\n });\n }\n },\n};\n/**\n * A plugin to add the NotebookTools to the side panel;\n */\nconst notebookToolsWidget = {\n id: '@jupyter-notebook/notebook-extension:notebook-tools',\n description: 'A plugin to add the NotebookTools to the side panel.',\n autoStart: true,\n requires: [INotebookShell],\n optional: [INotebookTools],\n activate: (app, shell, notebookTools) => {\n const onChange = async () => {\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n // Add the notebook tools in right area.\n if (notebookTools) {\n shell.add(notebookTools, 'right', { type: 'Property Inspector' });\n }\n };\n shell.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin to update the tab icon based on the kernel status.\n */\nconst tabIcon = {\n id: '@jupyter-notebook/notebook-extension:tab-icon',\n description: 'A plugin to update the tab icon based on the kernel status.',\n autoStart: true,\n requires: [INotebookTracker],\n activate: (app, tracker) => {\n // the favicons are provided by Jupyter Server\n const baseURL = PageConfig.getBaseUrl();\n const notebookIcon = URLExt.join(baseURL, 'static/favicons/favicon-notebook.ico');\n const busyIcon = URLExt.join(baseURL, 'static/favicons/favicon-busy-1.ico');\n const updateBrowserFavicon = (status) => {\n const link = document.querySelector(\"link[rel*='icon']\");\n switch (status) {\n case 'busy':\n link.href = busyIcon;\n break;\n case 'idle':\n link.href = notebookIcon;\n break;\n }\n };\n const onChange = async () => {\n const current = tracker.currentWidget;\n const sessionContext = current === null || current === void 0 ? void 0 : current.sessionContext;\n if (!sessionContext) {\n return;\n }\n sessionContext.statusChanged.connect(() => {\n const status = sessionContext.kernelDisplayStatus;\n updateBrowserFavicon(status);\n });\n };\n tracker.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin that adds a Trusted indicator to the menu area\n */\nconst trusted = {\n id: '@jupyter-notebook/notebook-extension:trusted',\n description: 'A plugin that adds a Trusted indicator to the menu area.',\n autoStart: true,\n requires: [INotebookShell, ITranslator],\n activate: (app, notebookShell, translator) => {\n const onChange = async () => {\n const current = notebookShell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n const notebook = current.content;\n await current.context.ready;\n const widget = TrustedComponent.create({ notebook, translator });\n notebookShell.add(widget, 'menu', {\n rank: 11000,\n });\n };\n notebookShell.currentChanged.connect(onChange);\n },\n};\n/**\n * Add a command to open right sidebar for Editing Notebook Metadata when clicking on \"Edit Notebook Metadata\" under Edit menu\n */\nconst editNotebookMetadata = {\n id: '@jupyter-notebook/notebook-extension:edit-notebook-metadata',\n description: 'Add a command to open right sidebar for Editing Notebook Metadata when clicking on \"Edit Notebook Metadata\" under Edit menu',\n autoStart: true,\n optional: [ICommandPalette, ITranslator, INotebookTools],\n activate: (app, palette, translator, notebookTools) => {\n const { commands, shell } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n commands.addCommand(CommandIDs.openEditNotebookMetadata, {\n label: trans.__('Edit Notebook Metadata'),\n execute: async () => {\n const command = 'application:toggle-panel';\n const args = {\n side: 'right',\n title: 'Show Notebook Tools',\n id: 'notebook-tools',\n };\n // Check if Show Notebook Tools (Right Sidebar) is open (expanded)\n if (!commands.isToggled(command, args)) {\n await commands.execute(command, args).then((_) => {\n // For expanding the 'Advanced Tools' section (default: collapsed)\n if (notebookTools) {\n const tools = (notebookTools === null || notebookTools === void 0 ? void 0 : notebookTools.layout).widgets;\n tools.forEach((tool) => {\n if (tool.widget.title.label === trans.__('Advanced Tools') &&\n tool.collapsed) {\n tool.toggle();\n }\n });\n }\n });\n }\n },\n isVisible: () => shell.currentWidget !== null &&\n shell.currentWidget instanceof NotebookPanel,\n });\n if (palette) {\n palette.addItem({\n command: CommandIDs.openEditNotebookMetadata,\n category: 'Notebook Operations',\n });\n }\n },\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [\n checkpoints,\n closeTab,\n openTreeTab,\n editNotebookMetadata,\n fullWidthNotebook,\n kernelLogo,\n kernelStatus,\n notebookToolsWidget,\n scrollOutput,\n tabIcon,\n trusted,\n];\nexport default plugins;\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"5573.8f9c21fe6dc9c281ffa6.js?v=8f9c21fe6dc9c281ffa6","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAmD;AACI;AACJ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA,kCAAkC,4BAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA,cAAc,sCAAe;AAC7B;AACA;AACA,IAAI,6BAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,YAAY,sCAAmB,aAAa,2DAA2D,oBAAoB,IAAI,gBAAgB;AAC/I;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD,eAAe,qBAAW,QAAQ,sCAAmB,kBAAkB,4CAA4C;AACnH;AACA,CAAC,4CAA4C;;;ACtE7C;AACA;AAC0F;AACnB;AACb;AACT;AACuC;AACzB;AACO;AACP;AACxB;AACE;AACI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAgB,EAAE,qCAAW;AAC5C,eAAe,wCAAc,EAAE,gCAAsB,EAAE,8CAAgB;AACvE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,mCAAmC,yBAAM,GAAG,MAAM;AAClD,4BAA4B,kBAAQ;AACpC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kBAAI;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAI;AAC/B;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,6DAA6D,eAAe,IAAI,eAAe;AAC/F;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAS;AACxB,eAAe,qCAAW;AAC1B;AACA,gBAAgB,WAAW;AAC3B,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,iBAAiB;AACtF;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAW;AAC1B;AACA,gBAAgB,WAAW;AAC3B,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAM,MAAM,wBAAU;AAClD;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B,eAAe,yBAAe,EAAE,8CAAgB,EAAE,qCAAW;AAC7D;AACA,mFAAmF,wCAAc;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc;AAC7B,eAAe,gCAAsB;AACrC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yBAAM,GAAG,MAAM;AAClD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc,EAAE,qCAAW;AAC1C;AACA;AACA,2BAA2B,yBAAM;AACjC;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAI,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B,eAAe,8CAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc;AAC7B,eAAe,qCAAc;AAC7B;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAgB;AAC/B;AACA;AACA,wBAAwB,wBAAU;AAClC,6BAA6B,oBAAM;AACnC,yBAAyB,oBAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAc,EAAE,qCAAW;AAC1C;AACA;AACA;AACA,qCAAqC,oCAAa;AAClD;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB,UAAU,sBAAsB;AAC3E;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAe,EAAE,qCAAW,EAAE,qCAAc;AAC3D;AACA,gBAAgB,kBAAkB;AAClC,iFAAiF,wCAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,+CAA+C,oCAAa;AAC5D,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAe,OAAO,EAAC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/notebook-extension/lib/trusted.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/notebook-extension/lib/index.js"],"sourcesContent":["import { ReactWidget } from '@jupyterlab/apputils';\nimport { NotebookActions } from '@jupyterlab/notebook';\nimport React, { useEffect, useState } from 'react';\n/**\n * Check if a notebook is trusted\n * @param notebook The notebook to check\n * @returns true if the notebook is trusted, false otherwise\n */\nconst isTrusted = (notebook) => {\n const model = notebook.model;\n if (!model) {\n return false;\n }\n const cells = Array.from(model.cells);\n let total = 0;\n let trusted = 0;\n for (const currentCell of cells) {\n if (currentCell.type !== 'code') {\n continue;\n }\n total++;\n if (currentCell.trusted) {\n trusted++;\n }\n }\n return trusted === total;\n};\n/**\n * A React component to display the Trusted badge in the menu bar.\n * @param notebook The Notebook\n * @param translator The Translation service\n */\nconst TrustedButton = ({ notebook, translator, }) => {\n const trans = translator.load('notebook');\n const [trusted, setTrusted] = useState(isTrusted(notebook));\n const checkTrust = () => {\n const v = isTrusted(notebook);\n setTrusted(v);\n };\n const trust = async () => {\n await NotebookActions.trust(notebook, translator);\n checkTrust();\n };\n useEffect(() => {\n notebook.modelContentChanged.connect(checkTrust);\n notebook.activeCellChanged.connect(checkTrust);\n checkTrust();\n return () => {\n notebook.modelContentChanged.disconnect(checkTrust);\n notebook.activeCellChanged.disconnect(checkTrust);\n };\n });\n return (React.createElement(\"button\", { className: 'jp-NotebookTrustedStatus', style: !trusted ? { cursor: 'pointer' } : { cursor: 'help' }, onClick: () => !trusted && trust(), title: trusted\n ? trans.__('JavaScript enabled for notebook display')\n : trans.__('JavaScript disabled for notebook display') }, trusted ? trans.__('Trusted') : trans.__('Not Trusted')));\n};\n/**\n * A namespace for TrustedComponent static methods.\n */\nexport var TrustedComponent;\n(function (TrustedComponent) {\n /**\n * Create a new TrustedComponent\n *\n * @param notebook The notebook\n * @param translator The translator\n */\n TrustedComponent.create = ({ notebook, translator, }) => {\n return ReactWidget.create(React.createElement(TrustedButton, { notebook: notebook, translator: translator }));\n };\n})(TrustedComponent || (TrustedComponent = {}));\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { DOMUtils, IToolbarWidgetRegistry, ICommandPalette, } from '@jupyterlab/apputils';\nimport { PageConfig, Text, Time, URLExt } from '@jupyterlab/coreutils';\nimport { IDocumentManager } from '@jupyterlab/docmanager';\nimport { IMainMenu } from '@jupyterlab/mainmenu';\nimport { NotebookPanel, INotebookTracker, INotebookTools, } from '@jupyterlab/notebook';\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { ITranslator, nullTranslator } from '@jupyterlab/translation';\nimport { INotebookShell } from '@jupyter-notebook/application';\nimport { Poll } from '@lumino/polling';\nimport { Widget } from '@lumino/widgets';\nimport { TrustedComponent } from './trusted';\n/**\n * The class for kernel status errors.\n */\nconst KERNEL_STATUS_ERROR_CLASS = 'jp-NotebookKernelStatus-error';\n/**\n * The class for kernel status warnings.\n */\nconst KERNEL_STATUS_WARN_CLASS = 'jp-NotebookKernelStatus-warn';\n/**\n * The class for kernel status infos.\n */\nconst KERNEL_STATUS_INFO_CLASS = 'jp-NotebookKernelStatus-info';\n/**\n * The class to fade out the kernel status.\n */\nconst KERNEL_STATUS_FADE_OUT_CLASS = 'jp-NotebookKernelStatus-fade';\n/**\n * The class for scrolled outputs\n */\nconst SCROLLED_OUTPUTS_CLASS = 'jp-mod-outputsScrolled';\n/**\n * The class for the full width notebook\n */\nconst FULL_WIDTH_NOTEBOOK_CLASS = 'jp-mod-fullwidth';\n/**\n * The command IDs used by the notebook plugins.\n */\nvar CommandIDs;\n(function (CommandIDs) {\n /**\n * A command to open right sidebar for Editing Notebook Metadata\n */\n CommandIDs.openEditNotebookMetadata = 'notebook:edit-metadata';\n /**\n * A command to toggle full width of the notebook\n */\n CommandIDs.toggleFullWidth = 'notebook:toggle-full-width';\n})(CommandIDs || (CommandIDs = {}));\n/**\n * A plugin for the checkpoint indicator\n */\nconst checkpoints = {\n id: '@jupyter-notebook/notebook-extension:checkpoints',\n description: 'A plugin for the checkpoint indicator.',\n autoStart: true,\n requires: [IDocumentManager, ITranslator],\n optional: [INotebookShell, IToolbarWidgetRegistry, ISettingRegistry],\n activate: (app, docManager, translator, notebookShell, toolbarRegistry, settingRegistry) => {\n const { shell } = app;\n const trans = translator.load('notebook');\n const node = document.createElement('div');\n if (toolbarRegistry) {\n toolbarRegistry.addFactory('TopBar', 'checkpoint', (toolbar) => {\n const widget = new Widget({ node });\n widget.id = DOMUtils.createDomID();\n widget.addClass('jp-NotebookCheckpoint');\n return widget;\n });\n }\n const getCurrent = () => {\n const current = shell.currentWidget;\n if (!current) {\n return null;\n }\n const context = docManager.contextForWidget(current);\n if (!context) {\n return null;\n }\n return context;\n };\n const updateCheckpointDisplay = async () => {\n const current = getCurrent();\n if (!current) {\n return;\n }\n const checkpoints = await current.listCheckpoints();\n if (!checkpoints || !checkpoints.length) {\n node.textContent = '';\n return;\n }\n const checkpoint = checkpoints[checkpoints.length - 1];\n node.textContent = trans.__('Last Checkpoint: %1', Time.formatHuman(new Date(checkpoint.last_modified)));\n };\n const onSaveState = async (sender, state) => {\n if (state !== 'completed') {\n return;\n }\n // Add a small artificial delay so that the UI can pick up the newly created checkpoint.\n // Since the save state signal is emitted after a file save, but not after a checkpoint has been created.\n setTimeout(() => {\n void updateCheckpointDisplay();\n }, 500);\n };\n const onChange = async () => {\n const context = getCurrent();\n if (!context) {\n return;\n }\n context.saveState.disconnect(onSaveState);\n context.saveState.connect(onSaveState);\n await updateCheckpointDisplay();\n };\n if (notebookShell) {\n notebookShell.currentChanged.connect(onChange);\n }\n let checkpointPollingInterval = 30; // Default 30 seconds\n let poll = null;\n const createPoll = () => {\n if (poll) {\n poll.dispose();\n }\n if (checkpointPollingInterval > 0) {\n poll = new Poll({\n auto: true,\n factory: () => updateCheckpointDisplay(),\n frequency: {\n interval: checkpointPollingInterval * 1000,\n backoff: false,\n },\n standby: 'when-hidden',\n });\n }\n };\n const updateSettings = (settings) => {\n checkpointPollingInterval = settings.get('checkpointPollingInterval')\n .composite;\n createPoll();\n };\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(checkpoints.id);\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n updateSettings(settings);\n settings.changed.connect(updateSettings);\n })\n .catch((reason) => {\n console.error(`Failed to load settings for ${checkpoints.id}: ${reason.message}`);\n // Fall back to creating poll with default settings\n createPoll();\n });\n }\n else {\n // Create poll with default settings\n createPoll();\n }\n },\n};\n/**\n * Add a command to close the browser tab when clicking on \"Close and Shut Down\"\n */\nconst closeTab = {\n id: '@jupyter-notebook/notebook-extension:close-tab',\n description: 'Add a command to close the browser tab when clicking on \"Close and Shut Down\".',\n autoStart: true,\n requires: [IMainMenu],\n optional: [ITranslator],\n activate: (app, menu, translator) => {\n const { commands } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n const id = 'notebook:close-and-halt';\n commands.addCommand(id, {\n label: trans.__('Close and Shut Down Notebook'),\n execute: async () => {\n // Shut the kernel down, without confirmation\n await commands.execute('notebook:shutdown-kernel', { activate: false });\n window.close();\n },\n });\n menu.fileMenu.closeAndCleaners.add({\n id,\n // use a small rank to it takes precedence over the default\n // shut down action for the notebook\n rank: 0,\n });\n },\n};\n/**\n * Add a command to open the tree view from the notebook view\n */\nconst openTreeTab = {\n id: '@jupyter-notebook/notebook-extension:open-tree-tab',\n description: 'Add a command to open a browser tab on the tree view when clicking \"Open...\".',\n autoStart: true,\n optional: [ITranslator],\n activate: (app, translator) => {\n const { commands } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n const id = 'notebook:open-tree-tab';\n commands.addCommand(id, {\n label: trans.__('Open…'),\n execute: async () => {\n const url = URLExt.join(PageConfig.getBaseUrl(), 'tree');\n window.open(url);\n },\n });\n },\n};\n/**\n * A plugin to set the notebook to full width.\n */\nconst fullWidthNotebook = {\n id: '@jupyter-notebook/notebook-extension:full-width-notebook',\n description: 'A plugin to set the notebook to full width.',\n autoStart: true,\n requires: [INotebookTracker],\n optional: [ICommandPalette, ISettingRegistry, ITranslator],\n activate: (app, tracker, palette, settingRegistry, translator) => {\n const trans = (translator !== null && translator !== void 0 ? translator : nullTranslator).load('notebook');\n let fullWidth = false;\n const toggleFullWidth = () => {\n const current = tracker.currentWidget;\n fullWidth = !fullWidth;\n if (!current) {\n return;\n }\n const content = current;\n content.toggleClass(FULL_WIDTH_NOTEBOOK_CLASS, fullWidth);\n };\n let notebookSettings;\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(fullWidthNotebook.id);\n const updateSettings = (settings) => {\n const newFullWidth = settings.get('fullWidthNotebook')\n .composite;\n if (newFullWidth !== fullWidth) {\n toggleFullWidth();\n }\n };\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n notebookSettings = settings;\n updateSettings(settings);\n settings.changed.connect((settings) => {\n updateSettings(settings);\n });\n })\n .catch((reason) => {\n console.error(reason.message);\n });\n }\n app.commands.addCommand(CommandIDs.toggleFullWidth, {\n label: trans.__('Enable Full Width Notebook'),\n execute: () => {\n toggleFullWidth();\n if (notebookSettings) {\n notebookSettings.set('fullWidthNotebook', fullWidth);\n }\n },\n isEnabled: () => tracker.currentWidget !== null,\n isToggled: () => fullWidth,\n });\n if (palette) {\n palette.addItem({\n command: CommandIDs.toggleFullWidth,\n category: 'Notebook Operations',\n });\n }\n },\n};\n/**\n * The kernel logo plugin.\n */\nconst kernelLogo = {\n id: '@jupyter-notebook/notebook-extension:kernel-logo',\n description: 'The kernel logo plugin.',\n autoStart: true,\n requires: [INotebookShell],\n optional: [IToolbarWidgetRegistry],\n activate: (app, shell, toolbarRegistry) => {\n const { serviceManager } = app;\n const node = document.createElement('div');\n const img = document.createElement('img');\n const onChange = async () => {\n var _a, _b, _c, _d, _e;\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n if (!node.hasChildNodes()) {\n node.appendChild(img);\n }\n await current.sessionContext.ready;\n current.sessionContext.kernelChanged.disconnect(onChange);\n current.sessionContext.kernelChanged.connect(onChange);\n const name = (_c = (_b = (_a = current.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '';\n const spec = (_e = (_d = serviceManager.kernelspecs) === null || _d === void 0 ? void 0 : _d.specs) === null || _e === void 0 ? void 0 : _e.kernelspecs[name];\n if (!spec) {\n node.childNodes[0].remove();\n return;\n }\n const kernelIconUrl = spec.resources['logo-64x64'];\n if (!kernelIconUrl) {\n node.childNodes[0].remove();\n return;\n }\n img.src = kernelIconUrl;\n img.title = spec.display_name;\n };\n if (toolbarRegistry) {\n toolbarRegistry.addFactory('TopBar', 'kernelLogo', (toolbar) => {\n const widget = new Widget({ node });\n widget.addClass('jp-NotebookKernelLogo');\n return widget;\n });\n }\n app.started.then(() => {\n shell.currentChanged.connect(onChange);\n });\n },\n};\n/**\n * A plugin to display the kernel status;\n */\nconst kernelStatus = {\n id: '@jupyter-notebook/notebook-extension:kernel-status',\n description: 'A plugin to display the kernel status.',\n autoStart: true,\n requires: [INotebookShell, ITranslator],\n activate: (app, shell, translator) => {\n const trans = translator.load('notebook');\n const widget = new Widget();\n widget.addClass('jp-NotebookKernelStatus');\n app.shell.add(widget, 'menu', { rank: 10010 });\n const removeClasses = () => {\n widget.removeClass(KERNEL_STATUS_ERROR_CLASS);\n widget.removeClass(KERNEL_STATUS_WARN_CLASS);\n widget.removeClass(KERNEL_STATUS_INFO_CLASS);\n widget.removeClass(KERNEL_STATUS_FADE_OUT_CLASS);\n };\n const onStatusChanged = (sessionContext) => {\n const status = sessionContext.kernelDisplayStatus;\n let text = `Kernel ${Text.titleCase(status)}`;\n removeClasses();\n switch (status) {\n case 'busy':\n case 'idle':\n text = '';\n widget.addClass(KERNEL_STATUS_FADE_OUT_CLASS);\n break;\n case 'dead':\n case 'terminating':\n widget.addClass(KERNEL_STATUS_ERROR_CLASS);\n break;\n case 'unknown':\n widget.addClass(KERNEL_STATUS_WARN_CLASS);\n break;\n default:\n widget.addClass(KERNEL_STATUS_INFO_CLASS);\n widget.addClass(KERNEL_STATUS_FADE_OUT_CLASS);\n break;\n }\n widget.node.textContent = trans.__(text);\n };\n const onChange = async () => {\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n const sessionContext = current.sessionContext;\n sessionContext.statusChanged.connect(onStatusChanged);\n };\n shell.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin to enable scrolling for outputs by default.\n * Mimic the logic from the classic notebook, as found here:\n * https://github.com/jupyter/notebook/blob/a9a31c096eeffe1bff4e9164c6a0442e0e13cdb3/notebook/static/notebook/js/outputarea.js#L96-L120\n */\nconst scrollOutput = {\n id: '@jupyter-notebook/notebook-extension:scroll-output',\n description: 'A plugin to enable scrolling for outputs by default.',\n autoStart: true,\n requires: [INotebookTracker],\n optional: [ISettingRegistry],\n activate: async (app, tracker, settingRegistry) => {\n const autoScrollThreshold = 100;\n let autoScrollOutputs = true;\n // decide whether to scroll the output of the cell based on some heuristics\n const autoScroll = (cell) => {\n if (!autoScrollOutputs) {\n // bail if disabled via the settings\n cell.removeClass(SCROLLED_OUTPUTS_CLASS);\n return;\n }\n const { outputArea } = cell;\n // respect cells with an explicit scrolled state\n const scrolled = cell.model.getMetadata('scrolled');\n if (scrolled !== undefined) {\n return;\n }\n const { node } = outputArea;\n const height = node.scrollHeight;\n const fontSize = parseFloat(node.style.fontSize.replace('px', ''));\n const lineHeight = (fontSize || 14) * 1.3;\n // do not set via cell.outputScrolled = true, as this would\n // otherwise synchronize the scrolled state to the notebook metadata\n const scroll = height > lineHeight * autoScrollThreshold;\n cell.toggleClass(SCROLLED_OUTPUTS_CLASS, scroll);\n };\n const handlers = {};\n const setAutoScroll = (cell) => {\n if (cell.model.type === 'code') {\n const codeCell = cell;\n const id = codeCell.model.id;\n autoScroll(codeCell);\n if (handlers[id]) {\n codeCell.outputArea.model.changed.disconnect(handlers[id]);\n }\n handlers[id] = () => autoScroll(codeCell);\n codeCell.outputArea.model.changed.connect(handlers[id]);\n }\n };\n tracker.widgetAdded.connect((sender, notebook) => {\n var _a;\n // when the notebook widget is created, process all the cells\n notebook.sessionContext.ready.then(() => {\n notebook.content.widgets.forEach(setAutoScroll);\n });\n (_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.connect((sender, args) => {\n notebook.content.widgets.forEach(setAutoScroll);\n });\n });\n if (settingRegistry) {\n const loadSettings = settingRegistry.load(scrollOutput.id);\n const updateSettings = (settings) => {\n autoScrollOutputs = settings.get('autoScrollOutputs')\n .composite;\n };\n Promise.all([loadSettings, app.restored])\n .then(([settings]) => {\n updateSettings(settings);\n settings.changed.connect((settings) => {\n updateSettings(settings);\n });\n })\n .catch((reason) => {\n console.error(reason.message);\n });\n }\n },\n};\n/**\n * A plugin to add the NotebookTools to the side panel;\n */\nconst notebookToolsWidget = {\n id: '@jupyter-notebook/notebook-extension:notebook-tools',\n description: 'A plugin to add the NotebookTools to the side panel.',\n autoStart: true,\n requires: [INotebookShell],\n optional: [INotebookTools],\n activate: (app, shell, notebookTools) => {\n const onChange = async () => {\n const current = shell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n // Add the notebook tools in right area.\n if (notebookTools) {\n shell.add(notebookTools, 'right', { type: 'Property Inspector' });\n }\n };\n shell.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin to update the tab icon based on the kernel status.\n */\nconst tabIcon = {\n id: '@jupyter-notebook/notebook-extension:tab-icon',\n description: 'A plugin to update the tab icon based on the kernel status.',\n autoStart: true,\n requires: [INotebookTracker],\n activate: (app, tracker) => {\n // the favicons are provided by Jupyter Server\n const baseURL = PageConfig.getBaseUrl();\n const notebookIcon = URLExt.join(baseURL, 'static/favicons/favicon-notebook.ico');\n const busyIcon = URLExt.join(baseURL, 'static/favicons/favicon-busy-1.ico');\n const updateBrowserFavicon = (status) => {\n const link = document.querySelector(\"link[rel*='icon']\");\n switch (status) {\n case 'busy':\n link.href = busyIcon;\n break;\n case 'idle':\n link.href = notebookIcon;\n break;\n }\n };\n const onChange = async () => {\n const current = tracker.currentWidget;\n const sessionContext = current === null || current === void 0 ? void 0 : current.sessionContext;\n if (!sessionContext) {\n return;\n }\n sessionContext.statusChanged.connect(() => {\n const status = sessionContext.kernelDisplayStatus;\n updateBrowserFavicon(status);\n });\n };\n tracker.currentChanged.connect(onChange);\n },\n};\n/**\n * A plugin that adds a Trusted indicator to the menu area\n */\nconst trusted = {\n id: '@jupyter-notebook/notebook-extension:trusted',\n description: 'A plugin that adds a Trusted indicator to the menu area.',\n autoStart: true,\n requires: [INotebookShell, ITranslator],\n activate: (app, notebookShell, translator) => {\n const onChange = async () => {\n const current = notebookShell.currentWidget;\n if (!(current instanceof NotebookPanel)) {\n return;\n }\n const notebook = current.content;\n await current.context.ready;\n const widget = TrustedComponent.create({ notebook, translator });\n notebookShell.add(widget, 'menu', {\n rank: 11000,\n });\n };\n notebookShell.currentChanged.connect(onChange);\n },\n};\n/**\n * Add a command to open right sidebar for Editing Notebook Metadata when clicking on \"Edit Notebook Metadata\" under Edit menu\n */\nconst editNotebookMetadata = {\n id: '@jupyter-notebook/notebook-extension:edit-notebook-metadata',\n description: 'Add a command to open right sidebar for Editing Notebook Metadata when clicking on \"Edit Notebook Metadata\" under Edit menu',\n autoStart: true,\n optional: [ICommandPalette, ITranslator, INotebookTools],\n activate: (app, palette, translator, notebookTools) => {\n const { commands, shell } = app;\n translator = translator !== null && translator !== void 0 ? translator : nullTranslator;\n const trans = translator.load('notebook');\n commands.addCommand(CommandIDs.openEditNotebookMetadata, {\n label: trans.__('Edit Notebook Metadata'),\n execute: async () => {\n const command = 'application:toggle-panel';\n const args = {\n side: 'right',\n title: 'Show Notebook Tools',\n id: 'notebook-tools',\n };\n // Check if Show Notebook Tools (Right Sidebar) is open (expanded)\n if (!commands.isToggled(command, args)) {\n await commands.execute(command, args).then((_) => {\n // For expanding the 'Advanced Tools' section (default: collapsed)\n if (notebookTools) {\n const tools = (notebookTools === null || notebookTools === void 0 ? void 0 : notebookTools.layout).widgets;\n tools.forEach((tool) => {\n if (tool.widget.title.label === trans.__('Advanced Tools') &&\n tool.collapsed) {\n tool.toggle();\n }\n });\n }\n });\n }\n },\n isVisible: () => shell.currentWidget !== null &&\n shell.currentWidget instanceof NotebookPanel,\n });\n if (palette) {\n palette.addItem({\n command: CommandIDs.openEditNotebookMetadata,\n category: 'Notebook Operations',\n });\n }\n },\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [\n checkpoints,\n closeTab,\n openTreeTab,\n editNotebookMetadata,\n fullWidthNotebook,\n kernelLogo,\n kernelStatus,\n notebookToolsWidget,\n scrollOutput,\n tabIcon,\n trusted,\n];\nexport default plugins;\n"],"names":[],"sourceRoot":""}
|
|
@@ -8,13 +8,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8
8
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10
10
|
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
11
|
+
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9268);
|
|
12
12
|
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__);
|
|
13
|
-
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
13
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14286);
|
|
14
14
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
15
|
-
/* harmony import */ var _jupyterlab_terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
15
|
+
/* harmony import */ var _jupyterlab_terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34438);
|
|
16
16
|
/* harmony import */ var _jupyterlab_terminal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_terminal__WEBPACK_IMPORTED_MODULE_2__);
|
|
17
|
-
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
17
|
+
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9829);
|
|
18
18
|
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__);
|
|
19
19
|
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56114);
|
|
20
20
|
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__);
|
|
@@ -96,4 +96,4 @@ const plugins = [opener, redirect];
|
|
|
96
96
|
/***/ })
|
|
97
97
|
|
|
98
98
|
}]);
|
|
99
|
-
//# sourceMappingURL=5601.
|
|
99
|
+
//# sourceMappingURL=5601.72a27257e17a85b6ddb9.js.map?v=72a27257e17a85b6ddb9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5601.
|
|
1
|
+
{"version":3,"file":"5601.72a27257e17a85b6ddb9.js?v=72a27257e17a85b6ddb9","mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACmD;AACQ;AACH;AACwC;AACvD;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAO,EAAE,kEAAgB;AACxC;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,oDAAoD,MAAM;AAC1D,aAAa;AACb,SAAS;AACT,0BAA0B,mCAAmC;AAC7D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAgB;AAC/B,eAAe,8EAAmB;AAClC;AACA;AACA,wBAAwB,6DAAU;AAClC,2GAA2G,oFAAyB;AACpI;AACA,2BAA2B,uDAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,yDAAM;AAC9B;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iEAAe,OAAO,EAAC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/terminal-extension/lib/index.js"],"sourcesContent":["// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { IRouter, } from '@jupyterlab/application';\nimport { PageConfig, URLExt } from '@jupyterlab/coreutils';\nimport { ITerminalTracker } from '@jupyterlab/terminal';\nimport { INotebookPathOpener, defaultNotebookPathOpener, } from '@jupyter-notebook/application';\nimport { find } from '@lumino/algorithm';\n/**\n * A plugin to open terminals in a new tab\n */\nconst opener = {\n id: '@jupyter-notebook/terminal-extension:opener',\n description: 'A plugin to open terminals in a new tab.',\n requires: [IRouter, ITerminalTracker],\n autoStart: true,\n activate: (app, router, tracker) => {\n const { commands } = app;\n const terminalPattern = new RegExp('/terminals/(.*)');\n const command = 'router:terminal';\n commands.addCommand(command, {\n execute: (args) => {\n const parsed = args;\n const matches = parsed.path.match(terminalPattern);\n if (!matches) {\n return;\n }\n const [, name] = matches;\n if (!name) {\n return;\n }\n tracker.widgetAdded.connect((send, terminal) => {\n terminal.content.setOption('closeOnExit', false);\n });\n commands.execute('terminal:open', { name });\n },\n });\n router.register({ command, pattern: terminalPattern });\n },\n};\n/**\n * Open terminals in a new tab.\n */\nconst redirect = {\n id: '@jupyter-notebook/terminal-extension:redirect',\n description: 'Open terminals in a new tab.',\n requires: [ITerminalTracker],\n optional: [INotebookPathOpener],\n autoStart: true,\n activate: (app, tracker, notebookPathOpener) => {\n const baseUrl = PageConfig.getBaseUrl();\n const opener = notebookPathOpener !== null && notebookPathOpener !== void 0 ? notebookPathOpener : defaultNotebookPathOpener;\n tracker.widgetAdded.connect((send, terminal) => {\n const widget = find(app.shell.widgets('main'), (w) => w.id === terminal.id);\n if (widget) {\n // bail if the terminal is already added to the main area\n return;\n }\n const name = terminal.content.session.name;\n opener.open({\n prefix: URLExt.join(baseUrl, 'terminals'),\n path: name,\n target: '_blank',\n });\n // dispose the widget since it is not used on this page\n terminal.dispose();\n });\n },\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [opener, redirect];\nexport default plugins;\n"],"names":[],"sourceRoot":""}
|
|
@@ -8,13 +8,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8
8
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10
10
|
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
11
|
+
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9268);
|
|
12
12
|
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__);
|
|
13
|
-
/* harmony import */ var _jupyterlab_console__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
13
|
+
/* harmony import */ var _jupyterlab_console__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51734);
|
|
14
14
|
/* harmony import */ var _jupyterlab_console__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_console__WEBPACK_IMPORTED_MODULE_1__);
|
|
15
|
-
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
15
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14286);
|
|
16
16
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
17
|
-
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
17
|
+
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9829);
|
|
18
18
|
/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_3__);
|
|
19
19
|
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56114);
|
|
20
20
|
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__);
|
|
@@ -95,4 +95,4 @@ const plugins = [opener, redirect];
|
|
|
95
95
|
/***/ })
|
|
96
96
|
|
|
97
97
|
}]);
|
|
98
|
-
//# sourceMappingURL=6345.
|
|
98
|
+
//# sourceMappingURL=6345.0aaa32908554ec9d9a57.js.map?v=0aaa32908554ec9d9a57
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"6345.
|
|
1
|
+
{"version":3,"file":"6345.0aaa32908554ec9d9a57.js?v=0aaa32908554ec9d9a57","mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACmD;AACG;AACK;AACqC;AACvD;AACzC;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAO;AACtB;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,MAAM;AAC3D,aAAa;AACb,SAAS;AACT,0BAA0B,kCAAkC;AAC5D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAe;AAC9B,eAAe,8EAAmB;AAClC;AACA;AACA;AACA,wBAAwB,6DAAU;AAClC,2GAA2G,oFAAyB;AACpI;AACA,oBAAoB,iBAAiB;AACrC;AACA,2BAA2B,uDAAI;AAC/B;AACA;AACA;AACA;AACA;AACA,wBAAwB,yDAAM;AAC9B;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iEAAe,OAAO,EAAC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/console-extension/lib/index.js"],"sourcesContent":["// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { IRouter, } from '@jupyterlab/application';\nimport { IConsoleTracker } from '@jupyterlab/console';\nimport { PageConfig, URLExt } from '@jupyterlab/coreutils';\nimport { INotebookPathOpener, defaultNotebookPathOpener, } from '@jupyter-notebook/application';\nimport { find } from '@lumino/algorithm';\n/**\n * A plugin to open consoles in a new tab\n */\nconst opener = {\n id: '@jupyter-notebook/console-extension:opener',\n requires: [IRouter],\n autoStart: true,\n description: 'A plugin to open consoles in a new tab',\n activate: (app, router) => {\n const { commands } = app;\n const consolePattern = new RegExp('/consoles/(.*)');\n const command = 'router:console';\n commands.addCommand(command, {\n execute: (args) => {\n const parsed = args;\n const matches = parsed.path.match(consolePattern);\n if (!matches) {\n return;\n }\n const [, match] = matches;\n if (!match) {\n return;\n }\n const path = decodeURIComponent(match);\n commands.execute('console:create', { path });\n },\n });\n router.register({ command, pattern: consolePattern });\n },\n};\n/**\n * Open consoles in a new tab.\n */\nconst redirect = {\n id: '@jupyter-notebook/console-extension:redirect',\n requires: [IConsoleTracker],\n optional: [INotebookPathOpener],\n autoStart: true,\n description: 'Open consoles in a new tab',\n activate: (app, tracker, notebookPathOpener) => {\n const baseUrl = PageConfig.getBaseUrl();\n const opener = notebookPathOpener !== null && notebookPathOpener !== void 0 ? notebookPathOpener : defaultNotebookPathOpener;\n tracker.widgetAdded.connect(async (send, console) => {\n const { sessionContext } = console;\n await sessionContext.ready;\n const widget = find(app.shell.widgets('main'), (w) => w.id === console.id);\n if (widget) {\n // bail if the console is already added to the main area\n return;\n }\n opener.open({\n prefix: URLExt.join(baseUrl, 'consoles'),\n path: sessionContext.path,\n target: '_blank',\n });\n // the widget is not needed anymore\n console.dispose();\n });\n },\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [opener, redirect];\nexport default plugins;\n"],"names":[],"sourceRoot":""}
|
|
@@ -12,26 +12,26 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12
12
|
"default": () => (/* binding */ lib)
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/apputils@~4.6.0-
|
|
16
|
-
var index_js_ = __webpack_require__(
|
|
17
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/coreutils@~6.5.0-
|
|
18
|
-
var lib_index_js_ = __webpack_require__(
|
|
19
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/filebrowser@~4.5.0-
|
|
20
|
-
var filebrowser_lib_index_js_ = __webpack_require__(
|
|
21
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingregistry@~4.5.0-
|
|
22
|
-
var settingregistry_lib_index_js_ = __webpack_require__(
|
|
23
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/running@^4.5.0-
|
|
24
|
-
var running_lib_index_js_ = __webpack_require__(
|
|
25
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingeditor@~4.5.0-
|
|
26
|
-
var settingeditor_lib_index_js_ = __webpack_require__(
|
|
27
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/translation@~4.5.0-
|
|
28
|
-
var translation_lib_index_js_ = __webpack_require__(
|
|
29
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/ui-components@~4.5.0-
|
|
30
|
-
var ui_components_lib_index_js_ = __webpack_require__(
|
|
15
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/apputils@~4.6.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/apputils/lib/index.js)
|
|
16
|
+
var index_js_ = __webpack_require__(10498);
|
|
17
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/coreutils@~6.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/coreutils/lib/index.js)
|
|
18
|
+
var lib_index_js_ = __webpack_require__(14286);
|
|
19
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/filebrowser@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/filebrowser/lib/index.js)
|
|
20
|
+
var filebrowser_lib_index_js_ = __webpack_require__(77015);
|
|
21
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingregistry@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/settingregistry/lib/index.js)
|
|
22
|
+
var settingregistry_lib_index_js_ = __webpack_require__(10378);
|
|
23
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/running@^4.5.0-beta.0 (strict) (fallback: ../node_modules/@jupyterlab/running/lib/index.js)
|
|
24
|
+
var running_lib_index_js_ = __webpack_require__(53373);
|
|
25
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/settingeditor@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/settingeditor/lib/index.js)
|
|
26
|
+
var settingeditor_lib_index_js_ = __webpack_require__(68793);
|
|
27
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/translation@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/translation/lib/index.js)
|
|
28
|
+
var translation_lib_index_js_ = __webpack_require__(41719);
|
|
29
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyterlab/ui-components@~4.5.0-beta.0 (singleton) (fallback: ../node_modules/@jupyterlab/ui-components/lib/index.js)
|
|
30
|
+
var ui_components_lib_index_js_ = __webpack_require__(25175);
|
|
31
31
|
// EXTERNAL MODULE: consume shared module (default) @lumino/widgets@~2.7.1 (singleton) (fallback: ../node_modules/@lumino/widgets/dist/index.es6.js)
|
|
32
32
|
var index_es6_js_ = __webpack_require__(60920);
|
|
33
|
-
// EXTERNAL MODULE: consume shared module (default) @jupyter-notebook/tree@~7.5.0-
|
|
34
|
-
var tree_lib_index_js_ = __webpack_require__(
|
|
33
|
+
// EXTERNAL MODULE: consume shared module (default) @jupyter-notebook/tree@~7.5.0-beta.0 (singleton) (fallback: ../packages/tree/lib/index.js)
|
|
34
|
+
var tree_lib_index_js_ = __webpack_require__(73193);
|
|
35
35
|
// EXTERNAL MODULE: consume shared module (default) react@~18.2.0 (singleton) (fallback: ../node_modules/react/index.js)
|
|
36
36
|
var react_index_js_ = __webpack_require__(78156);
|
|
37
37
|
var react_index_js_default = /*#__PURE__*/__webpack_require__.n(react_index_js_);
|
|
@@ -423,4 +423,4 @@ const plugins = [
|
|
|
423
423
|
/***/ })
|
|
424
424
|
|
|
425
425
|
}]);
|
|
426
|
-
//# sourceMappingURL=7302.
|
|
426
|
+
//# sourceMappingURL=7302.bd34311fd4b17f4ef111.js.map?v=bd34311fd4b17f4ef111
|