notebook 7.1.0a0__py3-none-any.whl → 7.1.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +5 -2
- notebook/static/1053.bundle.js +1 -1
- notebook/static/1157.bundle.js +1 -0
- notebook/static/1169.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/131.bundle.js +2 -2
- notebook/static/1326.bundle.js +2 -0
- notebook/static/1337.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -0
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1604.bundle.js +1 -0
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1682.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1835.bundle.js +1 -1
- notebook/static/1895.bundle.js +1 -0
- notebook/static/1950.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2067.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2502.bundle.js +1 -0
- notebook/static/2512.bundle.js +1 -1
- notebook/static/2515.bundle.js +1 -0
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2577.bundle.js +1 -0
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/270.bundle.js +1 -1
- notebook/static/2866.bundle.js +1 -1
- notebook/static/2883.bundle.js +1 -1
- notebook/static/2913.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -0
- notebook/static/3079.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3190.bundle.js +2 -0
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3301.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3642.bundle.js +1 -0
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4058.bundle.js +1 -1
- notebook/static/4131.bundle.js +1 -1
- notebook/static/4166.bundle.js +1 -0
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4271.bundle.js +1 -1
- notebook/static/4291.bundle.js +1 -1
- notebook/static/433.bundle.js +1 -0
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4461.bundle.js +1 -0
- notebook/static/4499.bundle.js +1 -0
- notebook/static/4501.bundle.js +1 -0
- notebook/static/4526.bundle.js +1 -1
- notebook/static/4558.bundle.js +1 -1
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4670.bundle.js +1 -1
- notebook/static/4810.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/4892.bundle.js +1 -0
- notebook/static/5088.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5115.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/514.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5376.bundle.js +1 -0
- notebook/static/5426.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +1 -1
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5874.bundle.js +744 -0
- notebook/static/5874.bundle.js.LICENSE.txt +4 -0
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/5982.bundle.js +1 -0
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6027.bundle.js +1 -1
- notebook/static/6061.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6249.bundle.js +1 -0
- notebook/static/6256.bundle.js +1 -1
- notebook/static/6262.bundle.js +1 -0
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6405.bundle.js +1 -0
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/{4842.bundle.js → 6869.bundle.js} +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6972.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7154.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7333.bundle.js +2 -0
- notebook/static/7339.bundle.js +1 -0
- notebook/static/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7394.bundle.js +1 -1
- notebook/static/7427.bundle.js +1 -1
- notebook/static/7582.bundle.js +1 -1
- notebook/static/{7407.bundle.js → 7590.bundle.js} +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7674.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7811.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7866.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7943.bundle.js +1 -0
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8055.bundle.js +1 -0
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -0
- notebook/static/882.bundle.js +1 -0
- notebook/static/8845.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/8929.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/911.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9239.bundle.js +1 -1
- notebook/static/9250.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9284.bundle.js +1 -0
- notebook/static/9308.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9466.bundle.js +1 -0
- notebook/static/9554.bundle.js +1 -0
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9799.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9987.bundle.js +1 -0
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +177 -111
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
- notebook-7.1.0a1.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +17 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +17 -17
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/50.e41798f78fa32030e149.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.9fa8bfe8da6242a4fc6b.js +1 -0
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.79046a2eb17bde1af38c.js → notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.faa0d74ec3a151a81a90.js +1 -1
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.02d92bfa6cab99929020.js +1 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +4 -4
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/METADATA +2 -2
- notebook-7.1.0a1.dist-info/RECORD +430 -0
- notebook/static/1306.bundle.js +0 -1
- notebook/static/1945.bundle.js +0 -1
- notebook/static/1964.bundle.js +0 -1
- notebook/static/3412.bundle.js +0 -1
- notebook/static/3434.bundle.js +0 -1
- notebook/static/3618.bundle.js +0 -1
- notebook/static/3672.bundle.js +0 -1
- notebook/static/3791.bundle.js +0 -1
- notebook/static/3993.bundle.js +0 -1
- notebook/static/4234.bundle.js +0 -1
- notebook/static/4793.bundle.js +0 -1
- notebook/static/4826.bundle.js +0 -1
- notebook/static/4867.bundle.js +0 -1
- notebook/static/5058.bundle.js +0 -1
- notebook/static/5329.bundle.js +0 -1
- notebook/static/5591.bundle.js +0 -1
- notebook/static/5642.bundle.js +0 -1
- notebook/static/6359.bundle.js +0 -1
- notebook/static/6667.bundle.js +0 -1
- notebook/static/6843.bundle.js +0 -1
- notebook/static/7763.bundle.js +0 -1
- notebook/static/7764.bundle.js +0 -1
- notebook/static/8723.bundle.js +0 -2
- notebook/static/880.bundle.js +0 -1
- notebook/static/8968.bundle.js +0 -1
- notebook/static/9086.bundle.js +0 -1
- notebook/static/9213.bundle.js +0 -2
- notebook/static/9381.bundle.js +0 -1
- notebook/static/9514.bundle.js +0 -1
- notebook/static/9545.bundle.js +0 -1
- notebook/static/973.bundle.js +0 -2
- notebook-7.1.0a0.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -10
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.ffc2f99974c3b184be5a.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/776.c7baadfaddfd4518c935.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/922.0beff4620746e288bd5e.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e73b0142911cf6300a74.js +0 -1
- notebook-7.1.0a0.dist-info/RECORD +0 -427
- /notebook/static/{9213.bundle.js.LICENSE.txt → 1326.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{8723.bundle.js.LICENSE.txt → 3190.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{973.bundle.js.LICENSE.txt → 7333.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/WHEEL +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/entry_points.txt +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/licenses/LICENSE +0 -0
notebook/static/5912.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var a,r=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var a,r=n(976),i=n(78036),o=n(48483),s=n(7420),c=n(80038),l=n(91940),m=n(50727),d=n(55814),h=n(5944),u=n(70798),_=n(31516);!function(e){e.copy="terminal:copy",e.createNew="terminal:create-new",e.open="terminal:open",e.refresh="terminal:refresh",e.increaseFont="terminal:increase-font",e.decreaseFont="terminal:decrease-font",e.paste="terminal:paste",e.setTheme="terminal:set-theme",e.shutdown="terminal:shut-down"}(a||(a={}));const g={activate:function(e,t,n,r,o,s,c,m,h){const p=n.load("jupyterlab"),{serviceManager:y,commands:f}=e,T=p.__("Terminal"),b=new i.WidgetTracker({namespace:"terminal"});if(!y.terminals.isAvailable())return console.warn("Disabling terminals plugin because they are not available on the server"),b;s&&s.restore(b,{command:a.createNew,args:e=>({name:e.content.session.name}),name:e=>e.content.session.name});const v={};function I(e){Object.keys(e.composite).forEach((t=>{v[t]=e.composite[t]}))}function C(){b.forEach((e=>function(e){const t=e.content;t&&Object.keys(v).forEach((e=>{t.setOption(e,v[e])}))}(e)))}if(t.load(g.id).then((e=>{I(e),C(),e.changed.connect((()=>{I(e),C()}))})).catch(w.showErrorMessage),null==m||m.themeChanged.connect(((e,t)=>{b.forEach((e=>{const t=e.content;"inherit"===t.getOption("theme")&&t.setOption("theme","inherit")}))})),function(e,t,n,r,o){const s=r.load("jupyterlab"),{commands:c,serviceManager:m}=e,h=()=>null!==t.currentWidget&&t.currentWidget===e.shell.currentWidget;c.addCommand(a.createNew,{label:e=>e.isPalette?s.__("New Terminal"):s.__("Terminal"),caption:s.__("Start a new terminal session"),icon:e=>e.isPalette?void 0:u.terminalIcon,execute:async n=>{const a=n.name,s=n.cwd,c=s?m.contents.localPath(s):void 0;let h;h=a?(await l.TerminalAPI.listRunning()).map((e=>e.name)).includes(a)?m.terminals.connectTo({model:{name:a}}):await m.terminals.startNew({name:a,cwd:c}):await m.terminals.startNew({cwd:c});const _=new d.Terminal(h,o,r);_.title.icon=u.terminalIcon,_.title.label="...";const g=new i.MainAreaWidget({content:_,reveal:_.ready});return e.shell.add(g,"main",{type:"Terminal"}),t.add(g),e.shell.activateById(g.id),g}}),c.addCommand(a.open,{label:s.__("Open a terminal by its `name`."),execute:n=>{const r=n.name,i=t.find((e=>e.content.session.name===r||!1));if(!i)return c.execute(a.createNew,{name:r});e.shell.activateById(i.id)}}),c.addCommand(a.refresh,{label:s.__("Refresh Terminal"),caption:s.__("Refresh the current terminal session"),execute:async()=>{const n=t.currentWidget;if(n){e.shell.activateById(n.id);try{await n.content.refresh(),n&&n.content.activate()}catch(e){w.showErrorMessage(e)}}},icon:e=>e.isPalette?void 0:u.refreshIcon.bindprops({stylesheet:"menuItem"}),isEnabled:h}),c.addCommand(a.copy,{execute:()=>{var e;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;if(!n)return;const a=n.getSelection();a&&i.Clipboard.copyToSystem(a)},isEnabled:()=>{var e;if(!h())return!1;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;return!!n&&n.hasSelection()},icon:u.copyIcon.bindprops({stylesheet:"menuItem"}),label:s.__("Copy")}),c.addCommand(a.paste,{execute:async()=>{var e;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;if(!n)return;const a=window.navigator.clipboard,r=await a.readText();r&&n.paste(r)},isEnabled:()=>{var e;return Boolean(h()&&(null===(e=t.currentWidget)||void 0===e?void 0:e.content))},icon:u.pasteIcon.bindprops({stylesheet:"menuItem"}),label:s.__("Paste")}),c.addCommand(a.shutdown,{label:s.__("Shutdown Terminal"),execute:()=>{const e=t.currentWidget;if(e)return e.content.session.shutdown()},isEnabled:h}),c.addCommand(a.increaseFont,{label:s.__("Increase Terminal Font Size"),execute:async()=>{const{fontSize:e}=o;if(e&&e<72)try{await n.set(g.id,"fontSize",e+1)}catch(e){w.showErrorMessage(e)}}}),c.addCommand(a.decreaseFont,{label:s.__("Decrease Terminal Font Size"),execute:async()=>{const{fontSize:e}=o;if(e&&e>9)try{await n.set(g.id,"fontSize",e-1)}catch(e){w.showErrorMessage(e)}}});const _={inherit:s.__("Inherit"),light:s.__("Light"),dark:s.__("Dark")};c.addCommand(a.setTheme,{label:e=>{if(void 0===e.theme)return s.__("Set terminal theme to the provided `theme`.");const t=e.theme,n=t in _?_[t]:s.__(t[0].toUpperCase()+t.slice(1));return e.isPalette?s.__("Use Terminal Theme: %1",n):n},caption:s.__("Set the terminal theme"),isToggled:e=>{const{theme:t}=o;return e.theme===t},execute:async e=>{const t=e.theme;try{await n.set(g.id,"theme",t),c.notifyCommandChanged(a.setTheme)}catch(e){console.log(e),w.showErrorMessage(e)}}})}(e,b,t,n,v),c){const e=new _.Menu({commands:f});e.title.label=p._p("menu","Terminal Theme"),e.addItem({command:a.setTheme,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"light",displayName:p.__("Light"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!1}}),c.settingsMenu.addGroup([{command:a.increaseFont},{command:a.decreaseFont},{type:"submenu",submenu:e}],40),c.fileMenu.newMenu.addItem({command:a.createNew,rank:20}),c.fileMenu.closeAndCleaners.add({id:a.shutdown,isEnabled:e=>null!==b.currentWidget&&b.has(e)})}return r&&([a.createNew,a.refresh,a.increaseFont,a.decreaseFont].forEach((e=>{r.addItem({command:e,category:T,args:{isPalette:!0}})})),r.addItem({command:a.setTheme,category:T,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"light",displayName:p.__("Light"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!0}})),o&&o.add({command:a.createNew,category:p.__("Other"),rank:0}),h&&function(e,t,n){const a=n.load("jupyterlab"),r=t.serviceManager.terminals;class i{constructor(e){this._model=e}open(){t.commands.execute("terminal:open",{name:this._model.name})}icon(){return u.terminalIcon}label(){return`terminals/${this._model.name}`}shutdown(){return r.shutdown(this._model.name)}}e.add({name:a.__("Terminals"),running:()=>Array.from(r.running()).map((e=>new i(e))),shutdownAll:()=>r.shutdownAll(),refreshRunning:()=>r.refreshRunning(),runningChanged:r.runningChanged,shutdownLabel:a.__("Shut Down"),shutdownAllLabel:a.__("Shut Down All"),shutdownAllConfirmationText:a.__("Are you sure you want to permanently shut down all running terminals?")})}(h,e,n),b},id:"@jupyterlab/terminal-extension:plugin",description:"Adds terminal and provides its tracker.",provides:d.ITerminalTracker,requires:[m.ISettingRegistry,h.ITranslator],optional:[i.ICommandPalette,o.ILauncher,r.ILayoutRestorer,s.IMainMenu,i.IThemeManager,c.IRunningSessionManagers],autoStart:!0},p=g;var w;!function(e){e.showErrorMessage=function(e){console.error(`Failed to configure ${g.id}: ${e.message}`)}}(w||(w={}))}}]);
|
notebook/static/5921.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>o,TableOfContentsItem:()=>v,TableOfContentsModel:()=>p,TableOfContentsPanel:()=>T,TableOfContentsRegistry:()=>x,TableOfContentsTracker:()=>H,TableOfContentsTree:()=>C,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>b});var s={};n.r(s),n.d(s,{getHeadingId:()=>N,getHeadings:()=>I,isMarkdown:()=>D});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>y,addPrefix:()=>O,clearNumbering:()=>j,filterHeadings:()=>A,getHTMLHeadings:()=>E,getPrefix:()=>M,isHTML:()=>k});var a=n(82743);class o{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},o=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});o.activityStopped.connect(i);const r=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(r),s.ready.then((()=>{r(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{o.activityStopped.disconnect(i),s.pathChanged.disconnect(r)})),n}}var r=n(22205),l=n(20998),c=n(81997);const h=new l.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new l.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g,u;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class p extends r.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!u.areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit(),t&&this._activeHeadingChanged.emit(e))}setConfiguration(e){const t={...this._configuration,...e};l.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}}!function(e){e.areHeadingsEqual=function(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n].level!==t[n].level||e[n].text!==t[n].text||e[n].prefix!==t[n].prefix)return!1;return!0}return!1}}(u||(u={}));var f,m=n(35111),_=n(78156);class v extends _.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return _.createElement("li",{className:"jp-tocItem"},_.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},_.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?_.createElement(r.caretRightIcon.react,{tag:"span",width:"20px"}):_.createElement(r.caretDownIcon.react,{tag:"span",width:"20px"})),_.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&_.createElement("ol",null,e))}}class C extends _.PureComponent{render(){const{documentType:e}=this.props;return _.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[_.createElement(v,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class b extends r.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?_.createElement(C,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):_.createElement("div",{className:"jp-TableOfContents-placeholder"},_.createElement("div",{className:"jp-TableOfContents-placeholderContent"},_.createElement("h3",null,this._placeholderHeadline),_.createElement("p",null,this._placeholderText)))}}class T extends r.SidePanel{constructor(e){super({content:new m.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new f.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new b({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends m.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(f||(f={}));var w=n(2549);class x{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new w.DisposableDelegate((()=>{this._generators.delete(t)}))}}class H{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const y="numbering-entry";function A(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const o=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=M(e,a,i,s);a=e,o.push({...t,prefix:n})}}return o}function k(e){return"text/html"===e}function E(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function O(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${y}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${y}`)){s=e,S(e,n);break}}else S(s,n);return s}function M(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:o}=s;let r="";if(o){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?r=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(r=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return r}function S(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${y}">${t}</span>`)}function j(e){null==e||e.querySelectorAll(`span.${y}`).forEach((e=>{e.remove()}))}var R=n(29672);async function N(e,t,n){try{const s=await e.render(t);if(!s)return null;const i=document.createElement("div");i.innerHTML=s;const a=i.querySelector(`h${n}`);return a?R.renderMarkdown.createHeaderId(a):null}catch(e){console.error("Failed to parse a heading.",e)}return null}function I(e){const t=e.split("\n"),n=new Array;let s,i=0;if("---"===t[i])for(let e=i+1;e<t.length;e++)if("---"===t[e]){i=e+1;break}for(;i<t.length;i++){const e=t[i];if(""===e)continue;if(e.startsWith("```")&&(s=!s),s)continue;const a=$(e,t[i+1]);a&&n.push({...a,line:i})}return n}const P=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function D(e){return P.includes(e)}function $(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:L(n[2]),level:n[1].length,raw:e,skip:q.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:L(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:q.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:q.test(n[0]),raw:e}:null)}function L(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const q=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>o,TableOfContentsItem:()=>v,TableOfContentsModel:()=>p,TableOfContentsPanel:()=>T,TableOfContentsRegistry:()=>x,TableOfContentsTracker:()=>H,TableOfContentsTree:()=>C,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>b});var s={};n.r(s),n.d(s,{getHeadingId:()=>N,getHeadings:()=>I,isMarkdown:()=>D});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>y,addPrefix:()=>O,clearNumbering:()=>j,filterHeadings:()=>A,getHTMLHeadings:()=>E,getPrefix:()=>M,isHTML:()=>k});var a=n(13558);class o{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},o=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});o.activityStopped.connect(i);const r=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(r),s.ready.then((()=>{r(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{o.activityStopped.disconnect(i),s.pathChanged.disconnect(r)})),n}}var r=n(70798),l=n(20998),c=n(81997);const h=new l.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new l.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g,u;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class p extends r.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!u.areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit(),t&&this._activeHeadingChanged.emit(e))}setConfiguration(e){const t={...this._configuration,...e};l.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}}!function(e){e.areHeadingsEqual=function(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n].level!==t[n].level||e[n].text!==t[n].text||e[n].prefix!==t[n].prefix)return!1;return!0}return!1}}(u||(u={}));var f,m=n(31516),_=n(78156);class v extends _.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return _.createElement("li",{className:"jp-tocItem"},_.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},_.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?_.createElement(r.caretRightIcon.react,{tag:"span",width:"20px"}):_.createElement(r.caretDownIcon.react,{tag:"span",width:"20px"})),_.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&_.createElement("ol",null,e))}}class C extends _.PureComponent{render(){const{documentType:e}=this.props;return _.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[_.createElement(v,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class b extends r.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?_.createElement(C,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):_.createElement("div",{className:"jp-TableOfContents-placeholder"},_.createElement("div",{className:"jp-TableOfContents-placeholderContent"},_.createElement("h3",null,this._placeholderHeadline),_.createElement("p",null,this._placeholderText)))}}class T extends r.SidePanel{constructor(e){super({content:new m.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new f.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new b({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends m.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(f||(f={}));var w=n(2549);class x{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new w.DisposableDelegate((()=>{this._generators.delete(t)}))}}class H{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const y="numbering-entry";function A(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const o=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=M(e,a,i,s);a=e,o.push({...t,prefix:n})}}return o}function k(e){return"text/html"===e}function E(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function O(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${y}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${y}`)){s=e,S(e,n);break}}else S(s,n);return s}function M(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:o}=s;let r="";if(o){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?r=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(r=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return r}function S(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${y}">${t}</span>`)}function j(e){null==e||e.querySelectorAll(`span.${y}`).forEach((e=>{e.remove()}))}var R=n(99407);async function N(e,t,n){try{const s=await e.render(t);if(!s)return null;const i=document.createElement("div");i.innerHTML=s;const a=i.querySelector(`h${n}`);return a?R.renderMarkdown.createHeaderId(a):null}catch(e){console.error("Failed to parse a heading.",e)}return null}function I(e){const t=e.split("\n"),n=new Array;let s,i=0;if("---"===t[i])for(let e=i+1;e<t.length;e++)if("---"===t[e]){i=e+1;break}for(;i<t.length;i++){const e=t[i];if(""===e)continue;if(e.startsWith("```")&&(s=!s),s)continue;const a=$(e,t[i+1]);a&&n.push({...a,line:i})}return n}const P=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function D(e){return P.includes(e)}function $(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:L(n[2]),level:n[1].length,raw:e,skip:q.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:L(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:q.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:q.test(n[0]),raw:e}:null)}function L(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const q=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5982],{55982:(t,e,r)=>{r.d(e,{a:()=>l,b:()=>M,c:()=>o,d:()=>O,e:()=>v,f:()=>H,g:()=>$,h:()=>U,i:()=>f,j:()=>Y,l:()=>d,p:()=>T,s:()=>_,u:()=>c});var a=r(77019),n=r(23617),i=r(20433);const s={extension:(t,e,r)=>{a.l.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},point:(t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},l=(t,e,r,a)=>{e.forEach((e=>{s[e](t,r,a)}))},o=(t,e,r,i)=>{let s=t||"";if("object"==typeof s&&(s=s[0]),(0,a.m)((0,a.c)().flowchart.htmlLabels)){return s=s.replace(/\\n|\n/g,"<br />"),a.l.info("vertexText"+s),function(t){const e=(0,n.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),a=t.label,i=t.isNode?"nodeLabel":"edgeLabel";var s;return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+a+"</span>"),(s=t.labelStyle)&&r.attr("style",s),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:i,label:(0,a.J)(s).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e.replace("fill:","color:")})}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof s?s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?s:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}},d=async(t,e,r,s)=>{let l;const d=e.useHtmlLabels||(0,a.m)((0,a.c)().flowchart.htmlLabels);l=r||"node default";const c=t.insert("g").attr("class",l).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",e.labelStyle);let p;p=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const g=h.node();let y;y="markdown"===e.labelType?(0,i.a)(h,(0,a.d)((0,a.J)(p),(0,a.c)()),{useHtmlLabels:d,width:e.width||(0,a.c)().flowchart.wrappingWidth,classes:"markdown-node-label"}):g.appendChild(o((0,a.d)((0,a.J)(p),(0,a.c)()),e.labelStyle,!1,s));let f=y.getBBox();const w=e.padding/2;if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=y.children[0],e=(0,n.Ys)(y),r=t.getElementsByTagName("img");if(r){const t=""===p.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,a.c)().fontSize?(0,a.c)().fontSize:window.getComputedStyle(document.body).fontSize,r=5;e.style.width=parseInt(t,10)*r+"px"}else e.style.width="100%";r(e)}setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return d?h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):h.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:c,bbox:f,halfPadding:w,label:h}},c=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function h(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}function p(t,e,r,a){var n=t.x,i=t.y,s=n-a.x,l=i-a.y,o=Math.sqrt(e*e*l*l+r*r*s*s),d=Math.abs(e*r*s/o);a.x<n&&(d=-d);var c=Math.abs(e*r*l/o);return a.y<i&&(c=-c),{x:n+d,y:i+c}}function g(t,e,r,a){var n,i,s,l,o,d,c,h,p,g,f,w,b;if(n=e.y-t.y,s=t.x-e.x,o=e.x*t.y-t.x*e.y,p=n*r.x+s*r.y+o,g=n*a.x+s*a.y+o,!(0!==p&&0!==g&&y(p,g)||(i=a.y-r.y,l=r.x-a.x,d=a.x*r.y-r.x*a.y,c=i*t.x+l*t.y+d,h=i*e.x+l*e.y+d,0!==c&&0!==h&&y(c,h)||0==(f=n*l-i*s))))return w=Math.abs(f/2),{x:(b=s*d-l*o)<0?(b-w)/f:(b+w)/f,y:(b=i*o-n*d)<0?(b-w)/f:(b+w)/f}}function y(t,e){return t*e>0}const f=(t,e)=>{var r,a,n=t.x,i=t.y,s=e.x-n,l=e.y-i,o=t.width/2,d=t.height/2;return Math.abs(l)*o>Math.abs(s)*d?(l<0&&(d=-d),r=0===l?0:d*s/l,a=d):(s<0&&(o=-o),r=o,a=0===s?0:o*l/s),{x:n+r,y:i+a}},w={node:function(t,e){return t.intersect(e)},circle:function(t,e,r){return p(t,e,e,r)},ellipse:p,polygon:function(t,e,r){var a=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)})):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var o=a-t.width/2-s,d=n-t.height/2-l,c=0;c<e.length;c++){var h=e[c],p=e[c<e.length-1?c+1:0],y=g(t,r,{x:o+h.x,y:d+h.y},{x:o+p.x,y:d+p.y});y&&i.push(y)}return i.length?(i.length>1&&i.sort((function(t,e){var a=t.x-r.x,n=t.y-r.y,i=Math.sqrt(a*a+n*n),s=e.x-r.x,l=e.y-r.y,o=Math.sqrt(s*s+l*l);return i<o?-1:i===o?0:1})),i[0]):t},rect:f},b=t=>t?" "+t:"",u=(t,e)=>`${e||"node default"}${b(t.classes)} ${b(t.class)}`,x=async(t,e)=>{const{shapeSvg:r,bbox:n}=await d(t,e,u(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];a.l.info("Question main (Circle)");const l=h(r,i,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return a.l.warn("Intersect called"),w.polygon(e,s,t)},r};function m(t,e,r,n){const i=[],s=t=>{i.push(t,0)},l=t=>{i.push(0,t)};e.includes("t")?(a.l.debug("add top border"),s(r)):l(r),e.includes("r")?(a.l.debug("add right border"),s(n)):l(n),e.includes("b")?(a.l.debug("add bottom border"),s(r)):l(r),e.includes("l")?(a.l.debug("add left border"),s(n)):l(n),t.attr("stroke-dasharray",i.join(" "))}const k=(t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===r&&(n=10,i=70);const s=a.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return c(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return w.rect(e,t)},a},L={rhombus:x,question:x,rect:async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await d(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),l=n.width+e.padding,o=n.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",l).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(m(s,e.props.borders,l,o),t.delete("borders")),t.forEach((t=>{a.l.warn(`Unknown node property ${t}`)}))}return c(e,s),e.intersect=function(t){return w.rect(e,t)},r},labelRect:async(t,e)=>{const{shapeSvg:r}=await d(t,e,"label",!0);a.l.trace("Classes = ",e.class);const n=r.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(m(n,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{a.l.warn(`Unknown node property ${t}`)}))}return c(e,n),e.intersect=function(t){return w.rect(e,t)},r},rectWithTitle:(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),l=i.insert("line"),d=i.insert("g").attr("class","label"),h=e.labelText.flat?e.labelText.flat():e.labelText;let p="";p="object"==typeof h?h[0]:h,a.l.info("Label text abc79",p,h,"object"==typeof h);const g=d.node().appendChild(o(p,e.labelStyle,!0,!0));let y={width:0,height:0};if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=g.children[0],e=(0,n.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}a.l.info("Text 2",h);const f=h.slice(1,h.length);let b=g.getBBox();const u=d.node().appendChild(o(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=u.children[0],e=(0,n.Ys)(u);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const x=e.padding/2;return(0,n.Ys)(u).attr("transform","translate( "+(y.width>b.width?0:(b.width-y.width)/2)+", "+(b.height+x+5)+")"),(0,n.Ys)(g).attr("transform","translate( "+(y.width<b.width?0:-(b.width-y.width)/2)+", 0)"),y=d.node().getBBox(),d.attr("transform","translate("+-y.width/2+", "+(-y.height/2-x+3)+")"),s.attr("class","outer title-state").attr("x",-y.width/2-x).attr("y",-y.height/2-x).attr("width",y.width+e.padding).attr("height",y.height+e.padding),l.attr("class","divider").attr("x1",-y.width/2-x).attr("x2",y.width/2+x).attr("y1",-y.height/2-x+b.height+x).attr("y2",-y.height/2-x+b.height+x),c(e,s),e.intersect=function(t){return w.rect(e,t)},i},choice:(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return w.circle(e,14,t)},r},circle:async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await d(t,e,u(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.l.info("Circle main"),c(e,s),e.intersect=function(t){return a.l.info("Circle intersect",e,n.width/2+i,t),w.circle(e,n.width/2+i,t)},r},doublecircle:async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await d(t,e,u(e,void 0),!0),s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.l.info("DoubleCircle main"),c(e,l),e.intersect=function(t){return a.l.info("DoubleCircle intersect",e,n.width/2+i+5,t),w.circle(e,n.width/2+i+5,t)},r},stadium:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.height+e.padding,i=a.width+n/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return c(e,s),e.intersect=function(t){return w.rect(e,t)},r},hexagon:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.height+e.padding,i=n/4,s=a.width+2*i+e.padding,l=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],o=h(r,s,n,l);return o.attr("style",e.style),c(e,o),e.intersect=function(t){return w.polygon(e,l,t)},r},rect_left_inv_arrow:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return h(r,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return w.polygon(e,s,t)},r},lean_right:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},lean_left:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},trapezoid:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},inv_trapezoid:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},rect_right_inv_arrow:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},cylinder:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=n/2,s=i/(2.5+n/50),l=a.height+s+e.padding,o="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-l,h=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",o).attr("transform","translate("+-n/2+","+-(l/2+s)+")");return c(e,h),e.intersect=function(t){const r=w.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let n=s*s*(1-a*a/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,t.y-e.y>0&&(n=-n),r.y+=n}return r},r},start:(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),c(e,a),e.intersect=function(t){return w.circle(e,7,t)},r},end:(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),c(e,n),e.intersect=function(t){return w.circle(e,7,t)},r},note:async(t,e)=>{e.useHtmlLabels||(0,a.c)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:i}=await d(t,e,"node "+e.classes,!0);a.l.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),c(e,s),e.intersect=function(t){return w.rect(e,t)},r},subroutine:async(t,e)=>{const{shapeSvg:r,bbox:a}=await d(t,e,u(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=h(r,n,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return w.polygon(e,s,t)},r},fork:k,join:k,class_box:(t,e)=>{const r=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),l=s.insert("rect",":first-child"),d=s.insert("line"),h=s.insert("line");let p=0,g=4;const y=s.insert("g").attr("class","label");let f=0;const b=e.classData.annotations&&e.classData.annotations[0],u=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",x=y.node().appendChild(o(u,e.labelStyle,!0,!0));let m=x.getBBox();if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=x.children[0],e=(0,n.Ys)(x);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(g+=m.height+4,p+=m.width);let k=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,a.c)().flowchart.htmlLabels?k+="<"+e.classData.type+">":k+="<"+e.classData.type+">");const L=y.node().appendChild(o(k,e.labelStyle,!0,!0));(0,n.Ys)(L).attr("class","classTitle");let S=L.getBBox();if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=L.children[0],e=(0,n.Ys)(L);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}g+=S.height+4,S.width>p&&(p=S.width);const v=[];e.classData.members.forEach((t=>{const r=t.getDisplayDetails();let i=r.displayText;(0,a.c)().flowchart.htmlLabels&&(i=i.replace(/</g,"<").replace(/>/g,">"));const s=y.node().appendChild(o(i,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ys)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>p&&(p=l.width),g+=l.height+4,v.push(s)})),g+=8;const _=[];if(e.classData.methods.forEach((t=>{const r=t.getDisplayDetails();let i=r.displayText;(0,a.c)().flowchart.htmlLabels&&(i=i.replace(/</g,"<").replace(/>/g,">"));const s=y.node().appendChild(o(i,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,a.m)((0,a.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ys)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>p&&(p=l.width),g+=l.height+4,_.push(s)})),g+=8,b){let t=(p-m.width)/2;(0,n.Ys)(x).attr("transform","translate( "+(-1*p/2+t)+", "+-1*g/2+")"),f=m.height+4}let M=(p-S.width)/2;return(0,n.Ys)(L).attr("transform","translate( "+(-1*p/2+M)+", "+(-1*g/2+f)+")"),f+=S.height+4,d.attr("class","divider").attr("x1",-p/2-r).attr("x2",p/2+r).attr("y1",-g/2-r+8+f).attr("y2",-g/2-r+8+f),f+=8,v.forEach((t=>{(0,n.Ys)(t).attr("transform","translate( "+-p/2+", "+(-1*g/2+f+4)+")");const e=null==t?void 0:t.getBBox();f+=((null==e?void 0:e.height)??0)+4})),f+=8,h.attr("class","divider").attr("x1",-p/2-r).attr("x2",p/2+r).attr("y1",-g/2-r+8+f).attr("y2",-g/2-r+8+f),f+=8,_.forEach((t=>{(0,n.Ys)(t).attr("transform","translate( "+-p/2+", "+(-1*g/2+f)+")");const e=null==t?void 0:t.getBBox();f+=((null==e?void 0:e.height)??0)+4})),l.attr("class","outer title-state").attr("x",-p/2-r).attr("y",-g/2-r).attr("width",p+e.padding).attr("height",g+e.padding),c(e,l),e.intersect=function(t){return w.rect(e,t)},s}};let S={};const v=async(t,e,r)=>{let n,i;if(e.link){let s;"sandbox"===(0,a.c)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await L[e.shape](n,e,r)}else i=await L[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),S[e.id]=n,e.haveCallback&&S[e.id].attr("class",S[e.id].attr("class")+" clickable"),n},_=(t,e)=>{S[e.id]=t},M=()=>{S={}},T=t=>{const e=S[t.id];a.l.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},E={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function B(t,e){t=C(t),e=C(e);const[r,a]=[t.x,t.y],[n,i]=[e.x,e.y],s=n-r,l=i-a;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}const C=t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,Y=t=>({x:function(e,r,a){let n=0;if(0===r&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaX:r}=B(a[0],a[1]);n=E[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===a.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaX:r}=B(a[a.length-1],a[a.length-2]);n=E[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return C(e).x+n},y:function(e,r,a){let n=0;if(0===r&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaY:r}=B(a[0],a[1]);n=E[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===a.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaY:r}=B(a[a.length-1],a[a.length-2]);n=E[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return C(e).y+n}});let P={},R={};const O=()=>{P={},R={}},H=(t,e)=>{const r=(0,a.m)((0,a.c)().flowchart.htmlLabels),s="markdown"===e.labelType?(0,i.a)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0}):o(e.label,e.labelStyle);a.l.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),d=l.insert("g").attr("class","label");d.node().appendChild(s);let c,h=s.getBBox();if(r){const t=s.children[0],e=(0,n.Ys)(s);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}if(d.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),P[e.id]=l,e.width=h.width,e.height=h.height,e.startLabelLeft){const r=o(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),R[e.id]||(R[e.id]={}),R[e.id].startLeft=a,I(c,e.startLabelLeft)}if(e.startLabelRight){const r=o(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");c=a.node().appendChild(r),n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),R[e.id]||(R[e.id]={}),R[e.id].startRight=a,I(c,e.startLabelRight)}if(e.endLabelLeft){const r=o(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),R[e.id]||(R[e.id]={}),R[e.id].endLeft=a,I(c,e.endLabelLeft)}if(e.endLabelRight){const r=o(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),R[e.id]||(R[e.id]={}),R[e.id].endRight=a,I(c,e.endLabelRight)}return s};function I(t,e){(0,a.c)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const U=(t,e)=>{a.l.info("Moving label abc78 ",t.id,t.label,P[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const n=P[t.id];let i=t.x,s=t.y;if(r){const n=a.u.calcLabelPosition(r);a.l.info("Moving label "+t.label+" from (",i,",",s,") to (",n.x,",",n.y,") abc78"),e.updatedPath&&(i=n.x,s=n.y)}n.attr("transform","translate("+i+", "+s+")")}if(t.startLabelLeft){const e=R[t.id].startLeft;let n=t.x,i=t.y;if(r){const e=a.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform","translate("+n+", "+i+")")}if(t.startLabelRight){const e=R[t.id].startRight;let n=t.x,i=t.y;if(r){const e=a.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform","translate("+n+", "+i+")")}if(t.endLabelLeft){const e=R[t.id].endLeft;let n=t.x,i=t.y;if(r){const e=a.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform","translate("+n+", "+i+")")}if(t.endLabelRight){const e=R[t.id].endRight;let n=t.x,i=t.y;if(r){const e=a.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform","translate("+n+", "+i+")")}},X=(t,e)=>{a.l.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach((t=>{if(a.l.info("abc88 checking point",t,e),((t,e)=>{const r=t.x,a=t.y,n=Math.abs(e.x-r),i=Math.abs(e.y-a),s=t.width/2,l=t.height/2;return n>=s||i>=l})(e,t)||i)a.l.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const s=((t,e,r)=>{a.l.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,s=Math.abs(n-r.x),l=t.width/2;let o=r.x<e.x?l-s:l+s;const d=t.height/2,c=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*l>Math.abs(n-e.x)*d){let t=r.y<e.y?e.y-d-i:i-d-e.y;o=h*t/c;const n={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===o&&(n.x=e.x,n.y=e.y),0===h&&(n.x=e.x),0===c&&(n.y=e.y),a.l.warn(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${h}, r ${o}`,n),n}{o=r.x<e.x?e.x-l-n:n-l-e.x;let t=c*o/h,i=r.x<e.x?r.x+h-o:r.x-h+o,s=r.y<e.y?r.y+t:r.y-t;return a.l.warn(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===h&&(i=e.x),0===c&&(s=e.y),{x:i,y:s}}})(e,n,t);a.l.warn("abc88 inside",t,n,s),a.l.warn("abc88 intersection",s);let l=!1;r.forEach((t=>{l=l||t.x===s.x&&t.y===s.y})),r.some((t=>t.x===s.x&&t.y===s.y))?a.l.warn("abc88 no intersect",s,r):r.push(s),i=!0}})),a.l.warn("abc88 returning points",r),r},$=function(t,e,r,i,s,l,o){let d=r.points,c=!1;const h=l.node(e.v);var p=l.node(e.w);a.l.info("abc88 InsertEdge: ",r),p.intersect&&h.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(h.intersect(d[0])),a.l.info("Last point",d[d.length-1],p,p.intersect(d[d.length-1])),d.push(p.intersect(d[d.length-1]))),r.toCluster&&(a.l.info("to cluster abc88",i[r.toCluster]),d=X(r.points,i[r.toCluster].node),c=!0),r.fromCluster&&(a.l.info("from cluster abc88",i[r.fromCluster]),d=X(d.reverse(),i[r.fromCluster].node).reverse(),c=!0);const g=d.filter((t=>!Number.isNaN(t.y)));let y=n.$0Z;!r.curve||"graph"!==s&&"flowchart"!==s||(y=r.curve);const{x:f,y:w}=Y(r),b=(0,n.jvg)().x(f).y(w).curve(y);let u;switch(r.thickness){case"normal":u="edge-thickness-normal";break;case"thick":case"invisible":u="edge-thickness-thick";break;default:u=""}switch(r.pattern){case"solid":u+=" edge-pattern-solid";break;case"dotted":u+=" edge-pattern-dotted";break;case"dashed":u+=" edge-pattern-dashed"}const x=t.append("path").attr("d",b(g)).attr("id",r.id).attr("class"," "+u+(r.classes?" "+r.classes:"")).attr("style",r.style);let m="";switch(((0,a.c)().flowchart.arrowMarkerAbsolute||(0,a.c)().state.arrowMarkerAbsolute)&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),a.l.info("arrowTypeStart",r.arrowTypeStart),a.l.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-crossStart)");break;case"arrow_point":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-pointStart)");break;case"arrow_barb":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-barbStart)");break;case"arrow_circle":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-circleStart)");break;case"aggregation":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-aggregationStart)");break;case"extension":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-extensionStart)");break;case"composition":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-compositionStart)");break;case"dependency":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-dependencyStart)");break;case"lollipop":x.attr("marker-start","url("+m+"#"+o+"_"+s+"-lollipopStart)")}switch(r.arrowTypeEnd){case"arrow_cross":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-crossEnd)");break;case"arrow_point":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-pointEnd)");break;case"arrow_barb":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-barbEnd)");break;case"arrow_circle":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-circleEnd)");break;case"aggregation":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-aggregationEnd)");break;case"extension":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-extensionEnd)");break;case"composition":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-compositionEnd)");break;case"dependency":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-dependencyEnd)");break;case"lollipop":x.attr("marker-end","url("+m+"#"+o+"_"+s+"-lollipopEnd)")}let k={};return c&&(k.updatedPath=d),k.originalPath=r.points,k}}}]);
|
notebook/static/6017.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(71624),s=t(46819),n=t(41173);class c extends n.SearchProvider{constructor(){super(...arguments),this.isReadOnly=!0}static createNew(e,r){return new c(e)}static isApplicable(e){return e instanceof s.DocumentWidget&&e.content instanceof i.CSVViewer}clearHighlight(){return Promise.resolve()}highlightNext(e){return this.widget.content.searchService.find(this._query),Promise.resolve(void 0)}highlightPrevious(e){return this.widget.content.searchService.find(this._query,!0),Promise.resolve(void 0)}replaceCurrentMatch(e,r){return Promise.resolve(!1)}replaceAllMatches(e){return Promise.resolve(!1)}startQuery(e){return this._query=e,this.widget.content.searchService.find(e),Promise.resolve()}endQuery(){return this.widget.content.searchService.clear(),Promise.resolve()}}}}]);
|
notebook/static/6027.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6027,5573],{5573:(e,t,o)=>{o.r(t),o.d(t,{default:()=>A});var n=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6027,5573],{5573:(e,t,o)=>{o.r(t),o.d(t,{default:()=>A});var n=o(78036),a=o(13558),s=o(67115),r=o(7420),c=o(37242),i=o(50727),l=o(5944),d=o(25154),u=o(97934),k=o(31516),p=o(78156),b=o.n(p);const h=e=>{const t=e.model;if(!t)return!1;const o=Array.from(t.cells);let n=0,a=0;for(const e of o)"code"===e.type&&(n++,e.trusted&&a++);return a===n},g=({notebook:e,translator:t})=>{const o=t.load("notebook"),[n,a]=(0,p.useState)(h(e)),s=()=>{const t=h(e);a(t)};return(0,p.useEffect)((()=>(e.modelContentChanged.connect(s),e.activeCellChanged.connect(s),s(),()=>{e.modelContentChanged.disconnect(s),e.activeCellChanged.disconnect(s)}))),b().createElement("button",{className:"jp-NotebookTrustedStatus",style:n?{cursor:"help"}:{cursor:"pointer"},onClick:()=>!n&&(async()=>{await c.NotebookActions.trust(e,t),s()})(),title:n?o.__("JavaScript enabled for notebook display"):o.__("JavaScript disabled for notebook display")},n?o.__("Trusted"):o.__("Not Trusted"))};var C;!function(e){e.create=({notebook:e,translator:t})=>n.ReactWidget.create(b().createElement(g,{notebook:e,translator:t}))}(C||(C={}));const f="jp-NotebookKernelStatus-error",m="jp-NotebookKernelStatus-warn",y="jp-NotebookKernelStatus-info",v="jp-NotebookKernelStatus-fade",S={id:"@jupyter-notebook/notebook-extension:checkpoints",description:"A plugin for the checkpoint indicator.",autoStart:!0,requires:[s.IDocumentManager,l.ITranslator],optional:[d.INotebookShell,n.IToolbarWidgetRegistry],activate:(e,t,o,s,r)=>{const{shell:c}=e,i=o.load("notebook"),l=document.createElement("div");r&&r.addFactory("TopBar","checkpoint",(e=>{const t=new k.Widget({node:l});return t.id=n.DOMUtils.createDomID(),t.addClass("jp-NotebookCheckpoint"),t}));const d=async()=>{const e=c.currentWidget;if(!e)return;const o=t.contextForWidget(e);null==o||o.fileChanged.disconnect(d),null==o||o.fileChanged.connect(d);const n=await(null==o?void 0:o.listCheckpoints());if(!n)return;const s=n[n.length-1];l.textContent=i.__("Last Checkpoint: %1",a.Time.formatHuman(new Date(s.last_modified)))};s&&s.currentChanged.connect(d),new u.Poll({auto:!0,factory:()=>d(),frequency:{interval:2e3,backoff:!1},standby:"when-hidden"})}},N={id:"@jupyter-notebook/notebook-extension:close-tab",description:'Add a command to close the browser tab when clicking on "Close and Shut Down".',autoStart:!0,requires:[r.IMainMenu],optional:[l.ITranslator],activate:(e,t,o)=>{const{commands:n}=e,a=(o=null!=o?o:l.nullTranslator).load("notebook"),s="notebook:close-and-halt";n.addCommand(s,{label:a.__("Close and Shut Down Notebook"),execute:async()=>{await n.execute("notebook:close-and-shutdown"),window.close()}}),t.fileMenu.closeAndCleaners.add({id:s,rank:0})}},w={id:"@jupyter-notebook/notebook-extension:kernel-logo",description:"The kernel logo plugin.",autoStart:!0,requires:[d.INotebookShell],optional:[n.IToolbarWidgetRegistry],activate:(e,t,o)=>{const{serviceManager:n}=e,a=document.createElement("div"),s=document.createElement("img"),r=async()=>{var e,o,i,l,d;const u=t.currentWidget;if(!(u instanceof c.NotebookPanel))return;a.hasChildNodes()||a.appendChild(s),await u.sessionContext.ready,u.sessionContext.kernelChanged.disconnect(r),u.sessionContext.kernelChanged.connect(r);const k=null!==(i=null===(o=null===(e=u.sessionContext.session)||void 0===e?void 0:e.kernel)||void 0===o?void 0:o.name)&&void 0!==i?i:"",p=null===(d=null===(l=n.kernelspecs)||void 0===l?void 0:l.specs)||void 0===d?void 0:d.kernelspecs[k];if(!p)return void a.childNodes[0].remove();const b=p.resources["logo-64x64"];b?(s.src=b,s.title=p.display_name):a.childNodes[0].remove()};o&&o.addFactory("TopBar","kernelLogo",(e=>{const t=new k.Widget({node:a});return t.addClass("jp-NotebookKernelLogo"),t})),e.started.then((()=>{t.currentChanged.connect(r)}))}},x={id:"@jupyter-notebook/notebook-extension:kernel-status",description:"A plugin to display the kernel status.",autoStart:!0,requires:[d.INotebookShell,l.ITranslator],activate:(e,t,o)=>{const n=o.load("notebook"),s=new k.Widget;s.addClass("jp-NotebookKernelStatus"),e.shell.add(s,"menu",{rank:10010});const r=e=>{const t=e.kernelDisplayStatus;let o=`Kernel ${a.Text.titleCase(t)}`;switch(s.removeClass(f),s.removeClass(m),s.removeClass(y),s.removeClass(v),t){case"busy":case"idle":o="",s.addClass(v);break;case"dead":case"terminating":s.addClass(f);break;case"unknown":s.addClass(m);break;default:s.addClass(y),s.addClass(v)}s.node.textContent=n.__(o)};t.currentChanged.connect((async()=>{const e=t.currentWidget;e instanceof c.NotebookPanel&&e.sessionContext.statusChanged.connect(r)}))}},T={id:"@jupyter-notebook/notebook-extension:scroll-output",description:"A plugin to enable scrolling for outputs by default.",autoStart:!0,requires:[c.INotebookTracker],optional:[i.ISettingRegistry],activate:async(e,t,o)=>{let n=!0;const a=e=>{if(!n)return;const{outputArea:t}=e;if(void 0!==e.model.getMetadata("scrolled"))return;const{node:o}=t,a=o.scrollHeight>1.3*(parseFloat(o.style.fontSize.replace("px",""))||14)*100;e.toggleClass("jp-mod-outputsScrolled",a)},s={},r=e=>{if("code"===e.model.type){const t=e,o=t.model.id;a(t),s[o]&&t.outputArea.model.changed.disconnect(s[o]),s[o]=()=>a(t),t.outputArea.model.changed.connect(s[o])}};if(t.widgetAdded.connect(((e,t)=>{var o;t.sessionContext.ready.then((()=>{t.content.widgets.forEach(r)})),null===(o=t.model)||void 0===o||o.cells.changed.connect(((e,o)=>{t.content.widgets.forEach(r)}))})),o){const t=o.load(T.id),a=e=>{n=e.get("autoScrollOutputs").composite};Promise.all([t,e.restored]).then((([e])=>{a(e),e.changed.connect((e=>{a(e)}))})).catch((e=>{console.error(e.message)}))}}},_={id:"@jupyter-notebook/notebook-extension:notebook-tools",description:"A plugin to add the NotebookTools to the side panel.",autoStart:!0,requires:[d.INotebookShell],optional:[c.INotebookTools],activate:(e,t,o)=>{t.currentChanged.connect((async()=>{t.currentWidget instanceof c.NotebookPanel&&o&&t.add(o,"right",{type:"Property Inspector"})}))}},j={id:"@jupyter-notebook/notebook-extension:tab-icon",description:"A plugin to update the tab icon based on the kernel status.",autoStart:!0,requires:[c.INotebookTracker],activate:(e,t)=>{const o=a.PageConfig.getBaseUrl(),n=a.URLExt.join(o,"static/favicons/favicon-notebook.ico"),s=a.URLExt.join(o,"static/favicons/favicon-busy-1.ico");t.currentChanged.connect((async()=>{const e=t.currentWidget,o=null==e?void 0:e.sessionContext;o&&o.statusChanged.connect((()=>{(e=>{const t=document.querySelector("link[rel*='icon']");switch(e){case"busy":t.href=s;break;case"idle":t.href=n}})(o.kernelDisplayStatus)}))}))}},I={id:"@jupyter-notebook/notebook-extension:trusted",description:"A plugin that adds a Trusted indicator to the menu area.",autoStart:!0,requires:[d.INotebookShell,l.ITranslator],activate:(e,t,o)=>{t.currentChanged.connect((async()=>{const e=t.currentWidget;if(!(e instanceof c.NotebookPanel))return;const n=e.content;await e.context.ready;const a=C.create({notebook:n,translator:o});t.add(a,"menu",{rank:11e3})}))}},A=[S,N,w,x,_,T,j,I]}}]);
|
notebook/static/6061.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6061],{16061:(e,a,t)=>{t.r(a),t.d(a,{RenderedVega:()=>l,VEGALITE3_MIME_TYPE:()=>s,VEGALITE4_MIME_TYPE:()=>o,VEGALITE5_MIME_TYPE:()=>r,VEGA_MIME_TYPE:()=>n,default:()=>g,rendererFactory:()=>d});var i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6061],{16061:(e,a,t)=>{t.r(a),t.d(a,{RenderedVega:()=>l,VEGALITE3_MIME_TYPE:()=>s,VEGALITE4_MIME_TYPE:()=>o,VEGALITE5_MIME_TYPE:()=>r,VEGA_MIME_TYPE:()=>n,default:()=>g,rendererFactory:()=>d});var i=t(31516);const n="application/vnd.vega.v5+json",s="application/vnd.vegalite.v3+json",o="application/vnd.vegalite.v4+json",r="application/vnd.vegalite.v5+json";class l extends i.Widget{constructor(e){super(),this._mimeType=e.mimeType,this._resolver=e.resolver,this.addClass("jp-RenderedVegaCommon5"),this.addClass(this._mimeType===n?"jp-RenderedVega5":"jp-RenderedVegaLite")}async renderModel(e){const a=e.data[this._mimeType];if(void 0===a)return;const t=e.metadata[this._mimeType],i=t&&t.embed_options?t.embed_options:{};"false"===document.body.dataset.jpThemeLight&&(i.theme="dark");const s=this._mimeType===n?"vega":"vega-lite",o=null!=c.vega?c.vega:await c.ensureVega(),r=document.createElement("div");this.node.textContent="",this.node.appendChild(r),this._result&&this._result.finalize();const l=o.vega.loader({http:{credentials:"same-origin"}});if(this._result=await o.default(r,a,{actions:!0,defaultStyle:!0,...i,mode:s,loader:{...l,sanitize:async(e,a)=>{const t=this._resolver;if((null==t?void 0:t.isLocal)&&t.isLocal(e)){const a=await t.resolveUrl(e);e=await t.getDownloadUrl(a)}return l.sanitize(e,a)}}}),e.data["image/png"])return;const d=await this._result.view.toImageURL("png","number"==typeof i.scaleFactor?i.scaleFactor:i.scaleFactor?i.scaleFactor.png:i.scaleFactor);e.setData({data:{...e.data,"image/png":d.split(",")[1]}})}dispose(){this._result&&this._result.finalize(),super.dispose()}}const d={safe:!0,mimeTypes:[n,s,o,r],createRenderer:e=>new l(e)},g={id:"@jupyterlab/vega5-extension:factory",description:"Provides a renderer for Vega 5 and Vega-Lite 3 to 5 content.",rendererFactory:d,rank:57,dataType:"json",documentWidgetFactoryOptions:[{name:"Vega5",primaryFileType:"vega5",fileTypes:["vega5","json"],defaultFor:["vega5"]},{name:"Vega-Lite5",primaryFileType:"vega-lite5",fileTypes:["vega-lite3","vega-lite4","vega-lite5","json"],defaultFor:["vega-lite3","vega-lite4","vega-lite5"]}],fileTypes:[{mimeTypes:[n],name:"vega5",extensions:[".vg",".vg.json",".vega"],icon:"ui-components:vega"},{mimeTypes:[r],name:"vega-lite5",extensions:[".vl",".vl.json",".vegalite"],icon:"ui-components:vega"},{mimeTypes:[o],name:"vega-lite4",extensions:[],icon:"ui-components:vega"},{mimeTypes:[s],name:"vega-lite3",extensions:[],icon:"ui-components:vega"}]};var c;!function(e){e.ensureVega=function(){return e.vegaReady||(e.vegaReady=Promise.all([t.e(4499),t.e(1326)]).then(t.bind(t,21326))),e.vegaReady}}(c||(c={}))}}]);
|
notebook/static/6139.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var i,a=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var i,a=o(976),n=o(78036),r=o(61280),l=o(5944);!function(e){e.resetImage="imageviewer:reset-image",e.zoomIn="imageviewer:zoom-in",e.zoomOut="imageviewer:zoom-out",e.flipHorizontal="imageviewer:flip-horizontal",e.flipVertical="imageviewer:flip-vertical",e.rotateClockwise="imageviewer:rotate-clockwise",e.rotateCounterclockwise="imageviewer:rotate-counterclockwise",e.invertColors="imageviewer:invert-colors"}(i||(i={}));const c=["png","gif","jpeg","bmp","ico","tiff"],d="Image",s="Image (Text)",m=["svg","xbm"],u=new RegExp(`[.](${m.join("|")})$`),g={activate:function(e,t,o,a){const l=t.load("jupyterlab");function g(t,o){var i,a;o.context.pathChanged.connect((()=>{v.save(o)})),v.add(o);const n=e.docRegistry.getFileTypesForPath(o.context.path);n.length>0&&(o.title.icon=n[0].icon,o.title.iconClass=null!==(i=n[0].iconClass)&&void 0!==i?i:"",o.title.iconLabel=null!==(a=n[0].iconLabel)&&void 0!==a?a:"")}[new r.ImageViewerFactory({name:d,label:l.__("Image"),modelName:"base64",fileTypes:[...c,...m],defaultFor:c,readOnly:!0}),new r.ImageViewerFactory({name:s,label:l.__("Image (Text)"),modelName:"text",fileTypes:m,defaultFor:m,readOnly:!0})].forEach((t=>{e.docRegistry.addWidgetFactory(t),t.widgetCreated.connect(g)}));const v=new n.WidgetTracker({namespace:"image-widget"});if(a&&a.restore(v,{command:"docmanager:open",args:e=>({path:e.context.path,factory:u.test(e.context.path)?s:d}),name:e=>e.context.path}),function(e,t,o){const i=o.load("jupyterlab"),{commands:a,shell:n}=e;function r(){return null!==t.currentWidget&&t.currentWidget===n.currentWidget}a.addCommand("imageviewer:zoom-in",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale+.5:2*o.scale)},label:i.__("Zoom In"),isEnabled:r}),a.addCommand("imageviewer:zoom-out",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale-.5:o.scale/2)},label:i.__("Zoom Out"),isEnabled:r}),a.addCommand("imageviewer:reset-image",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=1,o.colorinversion=0,o.resetRotationFlip())},label:i.__("Reset Image"),isEnabled:r}),a.addCommand("imageviewer:rotate-clockwise",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateClockwise()},label:i.__("Rotate Clockwise"),isEnabled:r}),a.addCommand("imageviewer:rotate-counterclockwise",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateCounterclockwise()},label:i.__("Rotate Counterclockwise"),isEnabled:r}),a.addCommand("imageviewer:flip-horizontal",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipHorizontal()},label:i.__("Flip image horizontally"),isEnabled:r}),a.addCommand("imageviewer:flip-vertical",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipVertical()},label:i.__("Flip image vertically"),isEnabled:r}),a.addCommand("imageviewer:invert-colors",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.colorinversion+=1,o.colorinversion%=2)},label:i.__("Invert Colors"),isEnabled:r})}(e,v,t),o){const e=l.__("Image Viewer");[i.zoomIn,i.zoomOut,i.resetImage,i.rotateClockwise,i.rotateCounterclockwise,i.flipHorizontal,i.flipVertical,i.invertColors].forEach((t=>{o.addItem({command:t,category:e})}))}return v},description:"Adds image viewer and provide its tracker.",id:"@jupyterlab/imageviewer-extension:plugin",provides:r.IImageTracker,requires:[l.ITranslator],optional:[n.ICommandPalette,a.ILayoutRestorer],autoStart:!0}}}]);
|
notebook/static/62.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[62],{40062:(e,o,n)=>{n.r(o),n.d(o,{default:()=>c});var t,l=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[62],{40062:(e,o,n)=>{n.r(o),n.d(o,{default:()=>c});var t,l=n(976),a=n(50727),d=n(19024),i=n(5944),s=n(70798);!function(e){e.displayNumbering="toc:display-numbering",e.displayH1Numbering="toc:display-h1-numbering",e.displayOutputNumbering="toc:display-outputs-numbering",e.showPanel="toc:show-panel",e.toggleCollapse="toc:toggle-collapse"}(t||(t={}));const r={id:"@jupyterlab/toc-extension:registry",description:"Provides the table of contents registry.",autoStart:!0,provides:d.ITableOfContentsRegistry,activate:()=>new d.TableOfContentsRegistry},u={id:"@jupyterlab/toc-extension:tracker",description:"Adds the table of content widget and provides its tracker.",autoStart:!0,provides:d.ITableOfContentsTracker,requires:[d.ITableOfContentsRegistry],optional:[i.ITranslator,l.ILayoutRestorer,l.ILabShell,a.ISettingRegistry],activate:async function(e,o,n,l,a,u){const c=(null!=n?n:i.nullTranslator).load("jupyterlab");let m={...d.TableOfContents.defaultConfig};const g=new d.TableOfContentsPanel(null!=n?n:void 0);function b(e){return e.headings.some((e=>{var o;return!(null!==(o=e.collapsed)&&void 0!==o&&o)}))}g.title.icon=s.tocIcon,g.title.caption=c.__("Table of Contents"),g.id="table-of-contents",g.node.setAttribute("role","region"),g.node.setAttribute("aria-label",c.__("Table of Contents section")),e.commands.addCommand(t.displayH1Numbering,{label:c.__("Show first-level heading number"),execute:()=>{g.model&&g.model.setConfiguration({numberingH1:!g.model.configuration.numberingH1})},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("numberingH1"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.numberingH1)&&void 0!==o&&o}}),e.commands.addCommand(t.displayNumbering,{label:c.__("Show heading number in the document"),icon:e=>e.toolbar?s.numberingIcon:void 0,execute:()=>{g.model&&(g.model.setConfiguration({numberHeaders:!g.model.configuration.numberHeaders}),e.commands.notifyCommandChanged(t.displayNumbering))},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("numberHeaders"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.numberHeaders)&&void 0!==o&&o}}),e.commands.addCommand(t.displayOutputNumbering,{label:c.__("Show output headings"),execute:()=>{g.model&&g.model.setConfiguration({includeOutput:!g.model.configuration.includeOutput})},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("includeOutput"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.includeOutput)&&void 0!==o&&o}}),e.commands.addCommand(t.showPanel,{label:c.__("Table of Contents"),execute:()=>{e.shell.activateById(g.id)}}),e.commands.addCommand(t.toggleCollapse,{label:()=>g.model&&!b(g.model)?c.__("Expand All Headings"):c.__("Collapse All Headings"),icon:e=>e.toolbar?g.model&&!b(g.model)?s.expandAllIcon:s.collapseAllIcon:void 0,execute:()=>{g.model&&(b(g.model)?g.model.toggleCollapse({collapsed:!0}):g.model.toggleCollapse({collapsed:!1}))},isEnabled:()=>null!==g.model});const p=new d.TableOfContentsTracker;let C;if(l&&l.add(g,"@jupyterlab/toc:plugin"),u)try{C=await u.load(r.id);const o=o=>{const n=o.composite;for(const e of[...Object.keys(m)]){const o=n[e];void 0!==o&&(m[e]=o)}if(a)for(const e of a.widgets("main")){const o=p.get(e);o&&o.setConfiguration(m)}else if(e.shell.currentWidget){const o=p.get(e.shell.currentWidget);o&&o.setConfiguration(m)}};C&&(C.changed.connect(o),o(C))}catch(e){console.error(`Failed to load settings for the Table of Contents extension.\n\n${e}`)}const f=new s.CommandToolbarButton({commands:e.commands,id:t.displayNumbering,args:{toolbar:!0},label:""});f.addClass("jp-toc-numberingButton"),g.toolbar.addItem("display-numbering",f),g.toolbar.addItem("spacer",s.Toolbar.createSpacerItem()),g.toolbar.addItem("collapse-all",new s.CommandToolbarButton({commands:e.commands,id:t.toggleCollapse,args:{toolbar:!0},label:""}));const v=new s.MenuSvg({commands:e.commands});v.addItem({command:t.displayH1Numbering}),v.addItem({command:t.displayOutputNumbering});const h=new s.ToolbarButton({tooltip:c.__("More actions…"),icon:s.ellipsesIcon,actualOnClick:!0,onClick:()=>{const e=h.node.getBoundingClientRect();v.open(e.x,e.bottom)}});return g.toolbar.addItem("submenu",h),e.shell.add(g,"left",{rank:400,type:"Table of Contents"}),a&&a.currentChanged.connect(y),e.restored.then((()=>{y()})),p;function y(){var n;let l=e.shell.currentWidget;if(!l)return;let a=p.get(l);a||(a=null!==(n=o.getModel(l,m))&&void 0!==n?n:null,a&&p.add(l,a),l.disposed.connect((()=>{null==a||a.dispose()}))),g.model&&(g.model.headingsChanged.disconnect(T),g.model.collapseChanged.disconnect(T)),g.model=a,g.model&&(g.model.headingsChanged.connect(T),g.model.collapseChanged.connect(T)),e.commands.notifyCommandChanged(t.displayNumbering),e.commands.notifyCommandChanged(t.toggleCollapse)}function T(){e.commands.notifyCommandChanged(t.toggleCollapse)}}},c=[r,u]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6249],{46249:(t,e,a)=>{a.d(e,{diagram:()=>f});var r=a(99466),i=a(23617),n=a(7259),d=a(67406),o=a(77019);a(27693),a(7608),a(31699);let s=0;const l=function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)},p=function(t,e,a,r){o.l.debug("Rendering class ",e,a);const i=e.id,n={id:i,label:e.id,width:0,height:0},d=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?d.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let p=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("«"+t+"»");p||e.attr("dy",a.textHeight),p=!1}));let c=function(t){let e=t.id;return t.type&&(e+="<"+(0,o.v)(t.type)+">"),e}(e);const g=s.append("tspan").text(c).attr("class","title");p||g.attr("dy",a.textHeight);const h=s.node().getBBox().height;let f,x,u;if(e.members.length>0){f=d.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin/2).attr("y2",a.padding+h+a.dividerMargin/2);const t=d.append("text").attr("x",a.padding).attr("y",h+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");p=!0,e.members.forEach((function(e){l(t,e,p,a),p=!1})),x=t.node().getBBox()}if(e.methods.length>0){u=d.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin+x.height).attr("y2",a.padding+h+a.dividerMargin+x.height);const t=d.append("text").attr("x",a.padding).attr("y",h+2*a.dividerMargin+x.height+a.textHeight).attr("fill","white").attr("class","classText");p=!0,e.methods.forEach((function(e){l(t,e,p,a),p=!1}))}const y=d.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const m=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y.width+2*a.padding).attr("height",y.height+a.padding+.5*a.dividerMargin).attr("class",b).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(m-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),f&&f.attr("x2",m),u&&u.attr("x2",m),n.width=m,n.height=y.height+a.padding+.5*a.dividerMargin,n};let c={};const g=function(t){const e=Object.entries(c).find((e=>e[1].label===t));if(e)return e[0]},h={draw:function(t,e,a,r){const l=(0,o.c)().class;c={},o.l.info("Rendering diagram "+t);const h=(0,o.c)().securityLevel;let f;"sandbox"===h&&(f=(0,i.Ys)("#i"+e));const x="sandbox"===h?(0,i.Ys)(f.nodes()[0].contentDocument.body):(0,i.Ys)("body"),u=x.select(`[id='${e}']`);var y;(y=u).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),y.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),y.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");const b=new d.k({multigraph:!0});b.setGraph({isMultiGraph:!0}),b.setDefaultEdgeLabel((function(){return{}}));const m=r.db.getClasses(),k=Object.keys(m);for(const t of k){const e=m[t],a=p(u,e,l,r);c[a.id]=a,b.setNode(a.id,a),o.l.info("Org height: "+a.height)}r.db.getRelations().forEach((function(t){o.l.info("tjoho"+g(t.id1)+g(t.id2)+JSON.stringify(t)),b.setEdge(g(t.id1),g(t.id2),{relation:t},t.title||"DEFAULT")})),r.db.getNotes().forEach((function(t){o.l.debug(`Adding note: ${JSON.stringify(t)}`);const e=function(t,e,a,r){o.l.debug("Rendering note ",e,a);const i=e.id,n={id:i,text:e.text,width:0,height:0},d=t.append("g").attr("id",i).attr("class","classGroup");let s=d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){o.l.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=d.node().getBBox(),c=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(c-t.getBBox().width)/2)})),n.width=c,n.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,n}(u,t,l);c[e.id]=e,b.setNode(e.id,e),t.class&&t.class in m&&b.setEdge(t.id,g(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,n.bK)(b),b.nodes().forEach((function(t){void 0!==t&&void 0!==b.node(t)&&(o.l.debug("Node "+t+": "+JSON.stringify(b.node(t))),x.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(b.node(t).x-b.node(t).width/2)+","+(b.node(t).y-b.node(t).height/2)+" )"))})),b.edges().forEach((function(t){void 0!==t&&void 0!==b.edge(t)&&(o.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(b.edge(t))),function(t,e,a,r,n){const d=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const l=e.points,p=(0,i.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(i.$0Z),c=t.append("path").attr("d",p(l)).attr("id","edge"+s).attr("class","relation");let g,h,f="";r.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+f+"#"+d(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+f+"#"+d(a.relation.type2)+"End)");const x=e.points.length;let u,y,b,m,k=o.u.calcLabelPosition(e.points);if(g=k.x,h=k.y,x%2!=0&&x>1){let t=o.u.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=o.u.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[x-1]);o.l.debug("cardinality_1_point "+JSON.stringify(t)),o.l.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,y=t.y,b=r.x,m=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",g).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}o.l.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",y).attr("fill","black").attr("font-size","6").text(a.relationTitle1),void 0!==a.relationTitle2&&"none"!==a.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",b).attr("y",m).attr("fill","black").attr("font-size","6").text(a.relationTitle2),s++}(u,b.edge(t),b.edge(t).relation,l,r))}));const w=u.node().getBBox(),E=w.width+40,L=w.height+40;(0,o.i)(u,L,E,l.useMaxWidth);const T=`${w.x-20} ${w.y-20} ${E} ${L}`;o.l.debug(`viewBox ${T}`),u.attr("viewBox",T)}},f={parser:r.p,db:r.d,renderer:h,styles:r.s,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.d.clear()}}}}]);
|
notebook/static/6256.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6256],{86256:(e,n,o)=>{o.r(n),o.d(n,{default:()=>S});var t=o(32789),r=o(67569),l=o(63540),s=o(60795),a=o(12596),c=o(96835),i=o(35441),d=o(56895),u=o(29672),p=o(62901),m=o(58977),C=o(22205),g=o(33625),v=o(20998),h=o(2549),f=o(14421);const b={id:"@jupyterlab/console-extension:foreign",description:"Add foreign handler of IOPub messages to the console.",requires:[a.IConsoleTracker,p.ISettingRegistry,m.ITranslator],optional:[r.ICommandPalette],activate:function(e,n,o,t,r){const l=t.load("jupyterlab"),{shell:s}=e;n.widgetAdded.connect(((e,n)=>{const t=n.console,r=new a.ForeignHandler({sessionContext:t.sessionContext,parent:t});k.foreignHandlerProperty.set(t,r),o.get("@jupyterlab/console-extension:tracker","showAllKernelActivity").then((({composite:e})=>{const n=e;r.enabled=n})),t.disposed.connect((()=>{r.dispose()}))}));const{commands:c}=e,i=l.__("Console"),d="console:toggle-show-all-kernel-activity";c.addCommand(d,{label:e=>l.__("Show All Kernel Activity"),execute:e=>{const o=function(e){const o=n.currentWidget;return!1!==e.activate&&o&&s.activateById(o.id),o}(e);if(!o)return;const t=k.foreignHandlerProperty.get(o.console);t&&(t.enabled=!t.enabled)},isToggled:()=>{var e;return null!==n.currentWidget&&!!(null===(e=k.foreignHandlerProperty.get(n.currentWidget.console))||void 0===e?void 0:e.enabled)},isEnabled:()=>null!==n.currentWidget&&n.currentWidget===s.currentWidget}),r&&r.addItem({command:d,category:i,args:{isPalette:!0}})},autoStart:!0},y=b;var k,_;!function(e){e.foreignHandlerProperty=new f.AttachedProperty({name:"foreignHandler",create:()=>{}})}(k||(k={})),function(e){e.autoClosingBrackets="console:toggle-autoclosing-brackets",e.create="console:create",e.clear="console:clear",e.runUnforced="console:run-unforced",e.runForced="console:run-forced",e.linebreak="console:linebreak",e.interrupt="console:interrupt-kernel",e.restart="console:restart-kernel",e.closeAndShutdown="console:close-and-shutdown",e.open="console:open",e.inject="console:inject",e.changeKernel="console:change-kernel",e.getKernel="console:get-kernel",e.enterToExecute="console:enter-to-execute",e.shiftEnterToExecute="console:shift-enter-to-execute",e.interactionMode="console:interaction-mode",e.replaceSelection="console:replace-selection",e.shutdown="console:shutdown",e.invokeCompleter="completer:invoke-console",e.selectCompleter="completer:select-console"}(_||(_={}));const x={id:"@jupyterlab/console-extension:tracker",description:"Provides the console widget tracker.",provides:a.IConsoleTracker,requires:[a.ConsolePanel.IContentFactory,l.IEditorServices,u.IRenderMimeRegistry,p.ISettingRegistry],optional:[t.ILayoutRestorer,c.IDefaultFileBrowser,d.IMainMenu,r.ICommandPalette,i.ILauncher,t.ILabStatus,r.ISessionContextDialogs,C.IFormRendererRegistry,m.ITranslator],activate:async function(e,n,o,t,l,s,c,i,d,u,p,f,b,y){const k=null!=y?y:m.nullTranslator,x=k.load("jupyterlab"),w=e.serviceManager,{commands:I,shell:E}=e,S=x.__("Console"),P=null!=f?f:new r.SessionContextDialogs({translator:k}),M=new r.WidgetTracker({namespace:"console"});async function j(e){var r,s;await w.ready;const c=new a.ConsolePanel({manager:w,contentFactory:n,mimeTypeService:o.mimeTypeService,rendermime:t,sessionDialogs:P,translator:k,setBusy:null!==(r=p&&(()=>p.setBusy()))&&void 0!==r?r:void 0,...e}),i=(await l.get("@jupyterlab/console-extension:tracker","interactionMode")).composite;return c.console.node.dataset.jpInteractionMode=i,await M.add(c),c.sessionContext.propertyChanged.connect((()=>{M.save(c)})),E.add(c,"main",{ref:e.ref,mode:e.insertMode,activate:!1!==e.activate,type:null!==(s=e.type)&&void 0!==s?s:"Console"}),c}s&&s.restore(M,{command:_.create,args:e=>{const{path:n,name:o,kernelPreference:t}=e.console.sessionContext;return{path:n,name:o,kernelPreference:{...t}}},name:e=>{var n;return null!==(n=e.console.sessionContext.path)&&void 0!==n?n:v.UUID.uuid4()},when:w.ready}),u&&w.ready.then((()=>{let e=null;const n=()=>{e&&(e.dispose(),e=null);const n=w.kernelspecs.specs;if(n){e=new h.DisposableSet;for(const o in n.kernelspecs){const t=o===n.default?0:1/0,r=n.kernelspecs[o],l=r.resources["logo-svg"]||r.resources["logo-64x64"];e.add(u.add({command:_.create,args:{isLauncher:!0,kernelPreference:{name:o}},category:x.__("Console"),rank:t,kernelIconUrl:l,metadata:{kernel:v.JSONExt.deepCopy(r.metadata||{})}}))}}};n(),w.kernelspecs.specsChanged.connect(n)}));const T="@jupyterlab/console-extension:tracker";let A,K={};async function B(e){A=(await l.get(T,"interactionMode")).composite,K=(await l.get(T,"promptCellConfig")).composite;const n=e=>{var n,o;e.console.node.dataset.jpInteractionMode=A,e.console.editorConfig=K,null===(o=null===(n=e.console.promptCell)||void 0===n?void 0:n.editor)||void 0===o||o.setOptions(K)};e?n(e):M.forEach(n)}if(l.pluginChanged.connect(((e,n)=>{n===T&&B()})),await B(),b){const e=b.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&b.addRenderer("@jupyterlab/console-extension:tracker.promptCellConfig",e)}function R(){return null!==M.currentWidget&&M.currentWidget===E.currentWidget}M.widgetAdded.connect(((e,n)=>{B(n)})),I.addCommand(_.autoClosingBrackets,{execute:async e=>{var n;K.autoClosingBrackets=!!(null!==(n=e.force)&&void 0!==n?n:!K.autoClosingBrackets),await l.set(T,"promptCellConfig",K)},label:x.__("Auto Close Brackets for Code Console Prompt"),isToggled:()=>K.autoClosingBrackets});let U=_.open;function W(e){const n=M.currentWidget;return!1!==e.activate&&n&&E.activateById(n.id),null!=n?n:null}I.addCommand(U,{label:x.__("Open a console for the provided `path`."),execute:e=>{const n=e.path,o=M.find((e=>{var o;return(null===(o=e.console.sessionContext.session)||void 0===o?void 0:o.path)===n}));return o?(!1!==e.activate&&E.activateById(o.id),o):w.ready.then((()=>(0,g.find)(w.sessions.running(),(e=>e.path===n))?j(e):Promise.reject(`No running kernel session for path: ${n}`)))}}),U=_.create,I.addCommand(U,{label:e=>{var n,o,t,r;if(e.isPalette)return x.__("New Console");if(e.isLauncher&&e.kernelPreference){const l=e.kernelPreference;return null!==(r=null===(t=null===(o=null===(n=w.kernelspecs)||void 0===n?void 0:n.specs)||void 0===o?void 0:o.kernelspecs[l.name||""])||void 0===t?void 0:t.display_name)&&void 0!==r?r:""}return x.__("Console")},icon:e=>e.isPalette?void 0:C.consoleIcon,execute:e=>{var n;return j({basePath:null!==(n=e.basePath||e.cwd||(null==c?void 0:c.model.path))&&void 0!==n?n:"",...e})}}),I.addCommand(_.clear,{label:x.__("Clear Console Cells"),execute:e=>{const n=W(e);n&&n.console.clear()},isEnabled:R}),I.addCommand(_.runUnforced,{label:x.__("Run Cell (unforced)"),execute:e=>{const n=W(e);if(n)return n.console.execute()},isEnabled:R}),I.addCommand(_.runForced,{label:x.__("Run Cell (forced)"),execute:e=>{const n=W(e);if(n)return n.console.execute(!0)},isEnabled:R}),I.addCommand(_.linebreak,{label:x.__("Insert Line Break"),execute:e=>{const n=W(e);n&&n.console.insertLinebreak()},isEnabled:R}),I.addCommand(_.replaceSelection,{label:x.__("Replace Selection in Console"),execute:e=>{const n=W(e);if(!n)return;const o=e.text||"";n.console.replaceSelection(o)},isEnabled:R}),I.addCommand(_.interrupt,{label:x.__("Interrupt Kernel"),execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.sessionContext.session)||void 0===n?void 0:n.kernel;return t?t.interrupt():void 0},isEnabled:R}),I.addCommand(_.restart,{label:x.__("Restart Kernel…"),execute:e=>{const n=W(e);if(n)return P.restart(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.shutdown,{label:x.__("Shut Down"),execute:e=>{const n=W(e);if(n)return n.console.sessionContext.shutdown()}}),I.addCommand(_.closeAndShutdown,{label:x.__("Close and Shut Down…"),execute:e=>{const n=W(e);if(n)return(0,r.showDialog)({title:x.__("Shut down the console?"),body:x.__('Are you sure you want to close "%1"?',n.title.label),buttons:[r.Dialog.cancelButton({ariaLabel:x.__("Cancel console Shut Down")}),r.Dialog.warnButton({ariaLabel:x.__("Confirm console Shut Down")})]}).then((e=>!!e.button.accept&&I.execute(_.shutdown,{activate:!1}).then((()=>(n.dispose(),!0)))))},isEnabled:R}),I.addCommand(_.inject,{label:x.__("Inject some code in a console."),execute:e=>{const n=e.path;M.find((o=>{var t;return(null===(t=o.console.sessionContext.session)||void 0===t?void 0:t.path)===n&&(!1!==e.activate&&E.activateById(o.id),o.console.inject(e.code,e.metadata),!0)}))},isEnabled:R}),I.addCommand(_.changeKernel,{label:x.__("Change Kernel…"),execute:e=>{const n=W(e);if(n)return P.selectKernel(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.getKernel,{label:x.__("Get Kernel"),execute:e=>{var n;const o=W({activate:!1,...e});if(o)return null===(n=o.sessionContext.session)||void 0===n?void 0:n.kernel},isEnabled:R}),d&&[_.create,_.linebreak,_.clear,_.runUnforced,_.runForced,_.restart,_.interrupt,_.changeKernel,_.closeAndShutdown].forEach((e=>{d.addItem({command:e,category:S,args:{isPalette:!0}})})),i&&(i.fileMenu.closeAndCleaners.add({id:_.closeAndShutdown,isEnabled:R}),i.kernelMenu.kernelUsers.changeKernel.add({id:_.changeKernel,isEnabled:R}),i.kernelMenu.kernelUsers.clearWidget.add({id:_.clear,isEnabled:R}),i.kernelMenu.kernelUsers.interruptKernel.add({id:_.interrupt,isEnabled:R}),i.kernelMenu.kernelUsers.restartKernel.add({id:_.restart,isEnabled:R}),i.kernelMenu.kernelUsers.shutdownKernel.add({id:_.shutdown,isEnabled:R}),i.runMenu.codeRunners.run.add({id:_.runForced,isEnabled:R}),i.editMenu.clearers.clearCurrent.add({id:_.clear,isEnabled:R}),i.helpMenu.getKernel.add({id:_.getKernel,isEnabled:R}));const D={notebook:x.__("Execute with Shift+Enter"),terminal:x.__("Execute with Enter")};return I.addCommand(_.interactionMode,{label:e=>{var n;return null!==(n=D[e.interactionMode])&&void 0!==n?n:"Set the console interaction mode."},execute:async e=>{try{await l.set(T,"interactionMode",e.interactionMode)}catch(e){console.error(`Failed to set ${T}:keyMap - ${e.message}`)}},isToggled:e=>e.interactionMode===A}),M},autoStart:!0},w={id:"@jupyterlab/console-extension:factory",description:"Provides the console widget content factory.",provides:a.ConsolePanel.IContentFactory,requires:[l.IEditorServices],autoStart:!0,activate:(e,n)=>{const o=n.factoryService.newInlineEditor;return new a.ConsolePanel.ContentFactory({editorFactory:o})}},I={id:"@jupyterlab/console-extension:kernel-status",description:"Adds the console to the kernel status indicator model.",autoStart:!0,requires:[a.IConsoleTracker,r.IKernelStatusModel],activate:(e,n,o)=>{o.addSessionProvider((e=>e&&n.has(e)?e.sessionContext:null))}},E={id:"@jupyterlab/console-extension:cursor-position",description:"Adds the console to the code editor cursor position model.",autoStart:!0,requires:[a.IConsoleTracker,l.IPositionModel],activate:(e,n,o)=>{let t=null;o.addEditorProvider((async e=>{let r=null;if(e!==t){if(null==t||t.console.promptCellCreated.disconnect(o.update),t=null,e&&n.has(e)){e.console.promptCellCreated.connect(o.update);const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor),t=e}}else if(e){const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor)}return r}))}},S=[w,x,y,I,E,{id:"@jupyterlab/console-extension:completer",description:"Adds completion to the console.",autoStart:!0,requires:[a.IConsoleTracker],optional:[s.ICompletionProviderManager,m.ITranslator,r.ISanitizer],activate:function(e,n,o,t,l){if(!o)return;const s=(null!=t?t:m.nullTranslator).load("jupyterlab"),a=null!=l?l:new r.Sanitizer;e.commands.addCommand(_.invokeCompleter,{label:s.__("Display the completion helper."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.invoke(e)}}),e.commands.addCommand(_.selectCompleter,{label:s.__("Select the completion suggestion."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:_.selectCompleter,keys:["Enter"],selector:".jp-ConsolePanel .jp-mod-completer-active"});const c=async(e,n)=>{var t,r;const l={editor:null!==(r=null===(t=n.console.promptCell)||void 0===t?void 0:t.editor)&&void 0!==r?r:null,session:n.console.sessionContext.session,widget:n};await o.updateCompleter(l),n.console.promptCellCreated.connect(((e,t)=>{const r={editor:t.editor,session:e.sessionContext.session,widget:n,sanitzer:a};o.updateCompleter(r).catch(console.error)})),n.console.sessionContext.sessionChanged.connect((()=>{var e,t;const r={editor:null!==(t=null===(e=n.console.promptCell)||void 0===e?void 0:e.editor)&&void 0!==t?t:null,session:n.console.sessionContext.session,widget:n,sanitizer:a};o.updateCompleter(r).catch(console.error)}))};n.widgetAdded.connect(c),o.activeProvidersChanged.connect((()=>{n.forEach((e=>{c(0,e).catch((e=>console.error(e)))}))}))}}]}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6256],{86256:(e,n,o)=>{o.r(n),o.d(n,{default:()=>S});var t=o(976),r=o(78036),l=o(97698),s=o(79185),a=o(95997),c=o(41990),i=o(48483),d=o(7420),u=o(99407),p=o(50727),m=o(5944),C=o(70798),g=o(33625),v=o(20998),h=o(2549),f=o(14421);const b={id:"@jupyterlab/console-extension:foreign",description:"Add foreign handler of IOPub messages to the console.",requires:[a.IConsoleTracker,p.ISettingRegistry,m.ITranslator],optional:[r.ICommandPalette],activate:function(e,n,o,t,r){const l=t.load("jupyterlab"),{shell:s}=e;n.widgetAdded.connect(((e,n)=>{const t=n.console,r=new a.ForeignHandler({sessionContext:t.sessionContext,parent:t});k.foreignHandlerProperty.set(t,r),o.get("@jupyterlab/console-extension:tracker","showAllKernelActivity").then((({composite:e})=>{const n=e;r.enabled=n})),t.disposed.connect((()=>{r.dispose()}))}));const{commands:c}=e,i=l.__("Console"),d="console:toggle-show-all-kernel-activity";c.addCommand(d,{label:e=>l.__("Show All Kernel Activity"),execute:e=>{const o=function(e){const o=n.currentWidget;return!1!==e.activate&&o&&s.activateById(o.id),o}(e);if(!o)return;const t=k.foreignHandlerProperty.get(o.console);t&&(t.enabled=!t.enabled)},isToggled:()=>{var e;return null!==n.currentWidget&&!!(null===(e=k.foreignHandlerProperty.get(n.currentWidget.console))||void 0===e?void 0:e.enabled)},isEnabled:()=>null!==n.currentWidget&&n.currentWidget===s.currentWidget}),r&&r.addItem({command:d,category:i,args:{isPalette:!0}})},autoStart:!0},y=b;var k,_;!function(e){e.foreignHandlerProperty=new f.AttachedProperty({name:"foreignHandler",create:()=>{}})}(k||(k={})),function(e){e.autoClosingBrackets="console:toggle-autoclosing-brackets",e.create="console:create",e.clear="console:clear",e.runUnforced="console:run-unforced",e.runForced="console:run-forced",e.linebreak="console:linebreak",e.interrupt="console:interrupt-kernel",e.restart="console:restart-kernel",e.closeAndShutdown="console:close-and-shutdown",e.open="console:open",e.inject="console:inject",e.changeKernel="console:change-kernel",e.getKernel="console:get-kernel",e.enterToExecute="console:enter-to-execute",e.shiftEnterToExecute="console:shift-enter-to-execute",e.interactionMode="console:interaction-mode",e.replaceSelection="console:replace-selection",e.shutdown="console:shutdown",e.invokeCompleter="completer:invoke-console",e.selectCompleter="completer:select-console"}(_||(_={}));const x={id:"@jupyterlab/console-extension:tracker",description:"Provides the console widget tracker.",provides:a.IConsoleTracker,requires:[a.ConsolePanel.IContentFactory,l.IEditorServices,u.IRenderMimeRegistry,p.ISettingRegistry],optional:[t.ILayoutRestorer,c.IDefaultFileBrowser,d.IMainMenu,r.ICommandPalette,i.ILauncher,t.ILabStatus,r.ISessionContextDialogs,C.IFormRendererRegistry,m.ITranslator],activate:async function(e,n,o,t,l,s,c,i,d,u,p,f,b,y){const k=null!=y?y:m.nullTranslator,x=k.load("jupyterlab"),w=e.serviceManager,{commands:I,shell:E}=e,S=x.__("Console"),P=null!=f?f:new r.SessionContextDialogs({translator:k}),M=new r.WidgetTracker({namespace:"console"});async function j(e){var r,s;await w.ready;const c=new a.ConsolePanel({manager:w,contentFactory:n,mimeTypeService:o.mimeTypeService,rendermime:t,sessionDialogs:P,translator:k,setBusy:null!==(r=p&&(()=>p.setBusy()))&&void 0!==r?r:void 0,...e}),i=(await l.get("@jupyterlab/console-extension:tracker","interactionMode")).composite;return c.console.node.dataset.jpInteractionMode=i,await M.add(c),c.sessionContext.propertyChanged.connect((()=>{M.save(c)})),E.add(c,"main",{ref:e.ref,mode:e.insertMode,activate:!1!==e.activate,type:null!==(s=e.type)&&void 0!==s?s:"Console"}),c}s&&s.restore(M,{command:_.create,args:e=>{const{path:n,name:o,kernelPreference:t}=e.console.sessionContext;return{path:n,name:o,kernelPreference:{...t}}},name:e=>{var n;return null!==(n=e.console.sessionContext.path)&&void 0!==n?n:v.UUID.uuid4()},when:w.ready}),u&&w.ready.then((()=>{let e=null;const n=()=>{e&&(e.dispose(),e=null);const n=w.kernelspecs.specs;if(n){e=new h.DisposableSet;for(const o in n.kernelspecs){const t=o===n.default?0:1/0,r=n.kernelspecs[o],l=r.resources["logo-svg"]||r.resources["logo-64x64"];e.add(u.add({command:_.create,args:{isLauncher:!0,kernelPreference:{name:o}},category:x.__("Console"),rank:t,kernelIconUrl:l,metadata:{kernel:v.JSONExt.deepCopy(r.metadata||{})}}))}}};n(),w.kernelspecs.specsChanged.connect(n)}));const T="@jupyterlab/console-extension:tracker";let A,K={};async function B(e){A=(await l.get(T,"interactionMode")).composite,K=(await l.get(T,"promptCellConfig")).composite;const n=e=>{var n,o;e.console.node.dataset.jpInteractionMode=A,e.console.editorConfig=K,null===(o=null===(n=e.console.promptCell)||void 0===n?void 0:n.editor)||void 0===o||o.setOptions(K)};e?n(e):M.forEach(n)}if(l.pluginChanged.connect(((e,n)=>{n===T&&B()})),await B(),b){const e=b.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&b.addRenderer("@jupyterlab/console-extension:tracker.promptCellConfig",e)}function R(){return null!==M.currentWidget&&M.currentWidget===E.currentWidget}M.widgetAdded.connect(((e,n)=>{B(n)})),I.addCommand(_.autoClosingBrackets,{execute:async e=>{var n;K.autoClosingBrackets=!!(null!==(n=e.force)&&void 0!==n?n:!K.autoClosingBrackets),await l.set(T,"promptCellConfig",K)},label:x.__("Auto Close Brackets for Code Console Prompt"),isToggled:()=>K.autoClosingBrackets});let U=_.open;function W(e){const n=M.currentWidget;return!1!==e.activate&&n&&E.activateById(n.id),null!=n?n:null}I.addCommand(U,{label:x.__("Open a console for the provided `path`."),execute:e=>{const n=e.path,o=M.find((e=>{var o;return(null===(o=e.console.sessionContext.session)||void 0===o?void 0:o.path)===n}));return o?(!1!==e.activate&&E.activateById(o.id),o):w.ready.then((()=>(0,g.find)(w.sessions.running(),(e=>e.path===n))?j(e):Promise.reject(`No running kernel session for path: ${n}`)))}}),U=_.create,I.addCommand(U,{label:e=>{var n,o,t,r;if(e.isPalette)return x.__("New Console");if(e.isLauncher&&e.kernelPreference){const l=e.kernelPreference;return null!==(r=null===(t=null===(o=null===(n=w.kernelspecs)||void 0===n?void 0:n.specs)||void 0===o?void 0:o.kernelspecs[l.name||""])||void 0===t?void 0:t.display_name)&&void 0!==r?r:""}return x.__("Console")},icon:e=>e.isPalette?void 0:C.consoleIcon,execute:e=>{var n;return j({basePath:null!==(n=e.basePath||e.cwd||(null==c?void 0:c.model.path))&&void 0!==n?n:"",...e})}}),I.addCommand(_.clear,{label:x.__("Clear Console Cells"),execute:e=>{const n=W(e);n&&n.console.clear()},isEnabled:R}),I.addCommand(_.runUnforced,{label:x.__("Run Cell (unforced)"),execute:e=>{const n=W(e);if(n)return n.console.execute()},isEnabled:R}),I.addCommand(_.runForced,{label:x.__("Run Cell (forced)"),execute:e=>{const n=W(e);if(n)return n.console.execute(!0)},isEnabled:R}),I.addCommand(_.linebreak,{label:x.__("Insert Line Break"),execute:e=>{const n=W(e);n&&n.console.insertLinebreak()},isEnabled:R}),I.addCommand(_.replaceSelection,{label:x.__("Replace Selection in Console"),execute:e=>{const n=W(e);if(!n)return;const o=e.text||"";n.console.replaceSelection(o)},isEnabled:R}),I.addCommand(_.interrupt,{label:x.__("Interrupt Kernel"),execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.sessionContext.session)||void 0===n?void 0:n.kernel;return t?t.interrupt():void 0},isEnabled:R}),I.addCommand(_.restart,{label:x.__("Restart Kernel…"),execute:e=>{const n=W(e);if(n)return P.restart(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.shutdown,{label:x.__("Shut Down"),execute:e=>{const n=W(e);if(n)return n.console.sessionContext.shutdown()}}),I.addCommand(_.closeAndShutdown,{label:x.__("Close and Shut Down…"),execute:e=>{const n=W(e);if(n)return(0,r.showDialog)({title:x.__("Shut down the console?"),body:x.__('Are you sure you want to close "%1"?',n.title.label),buttons:[r.Dialog.cancelButton({ariaLabel:x.__("Cancel console Shut Down")}),r.Dialog.warnButton({ariaLabel:x.__("Confirm console Shut Down")})]}).then((e=>!!e.button.accept&&I.execute(_.shutdown,{activate:!1}).then((()=>(n.dispose(),!0)))))},isEnabled:R}),I.addCommand(_.inject,{label:x.__("Inject some code in a console."),execute:e=>{const n=e.path;M.find((o=>{var t;return(null===(t=o.console.sessionContext.session)||void 0===t?void 0:t.path)===n&&(!1!==e.activate&&E.activateById(o.id),o.console.inject(e.code,e.metadata),!0)}))},isEnabled:R}),I.addCommand(_.changeKernel,{label:x.__("Change Kernel…"),execute:e=>{const n=W(e);if(n)return P.selectKernel(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.getKernel,{label:x.__("Get Kernel"),execute:e=>{var n;const o=W({activate:!1,...e});if(o)return null===(n=o.sessionContext.session)||void 0===n?void 0:n.kernel},isEnabled:R}),d&&[_.create,_.linebreak,_.clear,_.runUnforced,_.runForced,_.restart,_.interrupt,_.changeKernel,_.closeAndShutdown].forEach((e=>{d.addItem({command:e,category:S,args:{isPalette:!0}})})),i&&(i.fileMenu.closeAndCleaners.add({id:_.closeAndShutdown,isEnabled:R}),i.kernelMenu.kernelUsers.changeKernel.add({id:_.changeKernel,isEnabled:R}),i.kernelMenu.kernelUsers.clearWidget.add({id:_.clear,isEnabled:R}),i.kernelMenu.kernelUsers.interruptKernel.add({id:_.interrupt,isEnabled:R}),i.kernelMenu.kernelUsers.restartKernel.add({id:_.restart,isEnabled:R}),i.kernelMenu.kernelUsers.shutdownKernel.add({id:_.shutdown,isEnabled:R}),i.runMenu.codeRunners.run.add({id:_.runForced,isEnabled:R}),i.editMenu.clearers.clearCurrent.add({id:_.clear,isEnabled:R}),i.helpMenu.getKernel.add({id:_.getKernel,isEnabled:R}));const D={notebook:x.__("Execute with Shift+Enter"),terminal:x.__("Execute with Enter")};return I.addCommand(_.interactionMode,{label:e=>{var n;return null!==(n=D[e.interactionMode])&&void 0!==n?n:"Set the console interaction mode."},execute:async e=>{try{await l.set(T,"interactionMode",e.interactionMode)}catch(e){console.error(`Failed to set ${T}:keyMap - ${e.message}`)}},isToggled:e=>e.interactionMode===A}),M},autoStart:!0},w={id:"@jupyterlab/console-extension:factory",description:"Provides the console widget content factory.",provides:a.ConsolePanel.IContentFactory,requires:[l.IEditorServices],autoStart:!0,activate:(e,n)=>{const o=n.factoryService.newInlineEditor;return new a.ConsolePanel.ContentFactory({editorFactory:o})}},I={id:"@jupyterlab/console-extension:kernel-status",description:"Adds the console to the kernel status indicator model.",autoStart:!0,requires:[a.IConsoleTracker,r.IKernelStatusModel],activate:(e,n,o)=>{o.addSessionProvider((e=>e&&n.has(e)?e.sessionContext:null))}},E={id:"@jupyterlab/console-extension:cursor-position",description:"Adds the console to the code editor cursor position model.",autoStart:!0,requires:[a.IConsoleTracker,l.IPositionModel],activate:(e,n,o)=>{let t=null;o.addEditorProvider((async e=>{let r=null;if(e!==t){if(null==t||t.console.promptCellCreated.disconnect(o.update),t=null,e&&n.has(e)){e.console.promptCellCreated.connect(o.update);const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor),t=e}}else if(e){const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor)}return r}))}},S=[w,x,y,I,E,{id:"@jupyterlab/console-extension:completer",description:"Adds completion to the console.",autoStart:!0,requires:[a.IConsoleTracker],optional:[s.ICompletionProviderManager,m.ITranslator,r.ISanitizer],activate:function(e,n,o,t,l){if(!o)return;const s=(null!=t?t:m.nullTranslator).load("jupyterlab"),a=null!=l?l:new r.Sanitizer;e.commands.addCommand(_.invokeCompleter,{label:s.__("Display the completion helper."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.invoke(e)}}),e.commands.addCommand(_.selectCompleter,{label:s.__("Select the completion suggestion."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:_.selectCompleter,keys:["Enter"],selector:".jp-ConsolePanel .jp-mod-completer-active"});const c=async(e,n)=>{var t,r;const l={editor:null!==(r=null===(t=n.console.promptCell)||void 0===t?void 0:t.editor)&&void 0!==r?r:null,session:n.console.sessionContext.session,widget:n};await o.updateCompleter(l),n.console.promptCellCreated.connect(((e,t)=>{const r={editor:t.editor,session:e.sessionContext.session,widget:n,sanitzer:a};o.updateCompleter(r).catch(console.error)})),n.console.sessionContext.sessionChanged.connect((()=>{var e,t;const r={editor:null!==(t=null===(e=n.console.promptCell)||void 0===e?void 0:e.editor)&&void 0!==t?t:null,session:n.console.sessionContext.session,widget:n,sanitizer:a};o.updateCompleter(r).catch(console.error)}))};n.widgetAdded.connect(c),o.activeProvidersChanged.connect((()=>{n.forEach((e=>{c(0,e).catch((e=>console.error(e)))}))}))}}]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6262],{64271:(t,e,s)=>{s.r(e),s.d(e,{Debouncer:()=>o,Poll:()=>r,RateLimiter:()=>h,Throttler:()=>d});var i,a=s(20998),n=s(81997);class r{constructor(t){var e;this._disposed=new n.Signal(this),this._lingered=0,this._tick=new a.PromiseDelegate,this._ticked=new n.Signal(this),this._factory=t.factory,this._linger=null!==(e=t.linger)&&void 0!==e?e:i.DEFAULT_LINGER,this._standby=t.standby||i.DEFAULT_STANDBY,this._state={...i.DEFAULT_STATE,timestamp:(new Date).getTime()};const s=t.frequency||{},r=Math.max(s.interval||0,s.max||0,i.DEFAULT_FREQUENCY.max);this.frequency={...i.DEFAULT_FREQUENCY,...s,max:r},this.name=t.name||i.DEFAULT_NAME,"auto"in t&&!t.auto||setTimeout((()=>this.start()))}get disposed(){return this._disposed}get frequency(){return this._frequency}set frequency(t){if(this.isDisposed||a.JSONExt.deepEqual(t,this.frequency||{}))return;let{backoff:e,interval:s,max:i}=t;if(s=Math.round(s),i=Math.round(i),"number"==typeof e&&e<1)throw new Error("Poll backoff growth factor must be at least 1");if((s<0||s>i)&&s!==r.NEVER)throw new Error("Poll interval must be between 0 and max");if(i>r.MAX_INTERVAL&&i!==r.NEVER)throw new Error(`Max interval must be less than ${r.MAX_INTERVAL}`);this._frequency={backoff:e,interval:s,max:i}}get isDisposed(){return"disposed"===this.state.phase}get standby(){return this._standby}set standby(t){this.isDisposed||this.standby===t||(this._standby=t)}get state(){return this._state}get tick(){return this._tick.promise}get ticked(){return this._ticked}async*[Symbol.asyncIterator](){for(;!this.isDisposed;)yield this.state,await this.tick.catch((()=>{}))}dispose(){this.isDisposed||(this._state={...i.DISPOSED_STATE,timestamp:(new Date).getTime()},this._tick.promise.catch((t=>{})),this._tick.reject(new Error(`Poll (${this.name}) is disposed.`)),this._disposed.emit(void 0),n.Signal.clearData(this))}refresh(){return this.schedule({cancel:({phase:t})=>"refreshed"===t,interval:r.IMMEDIATE,phase:"refreshed"})}async schedule(t={}){if(this.isDisposed)return;if(t.cancel&&t.cancel(this.state))return;const e=this._tick,s=new a.PromiseDelegate,i={interval:this.frequency.interval,payload:null,phase:"standby",timestamp:(new Date).getTime(),...t};this._state=i,this._tick=s,clearTimeout(this._timeout),this._ticked.emit(this.state),e.resolve(this),await e.promise,i.interval!==r.NEVER?this._timeout=setTimeout((()=>{this.isDisposed||this.tick!==s.promise||this._execute()}),i.interval):this._timeout=void 0}start(){return this.schedule({cancel:({phase:t})=>"constructed"!==t&&"standby"!==t&&"stopped"!==t,interval:r.IMMEDIATE,phase:"started"})}stop(){return this.schedule({cancel:({phase:t})=>"stopped"===t,interval:r.NEVER,phase:"stopped"})}get hidden(){return i.hidden}_execute(){let t="function"==typeof this.standby?this.standby():this.standby;if("never"===t?t=!1:"when-hidden"===t&&(this.hidden?t=++this._lingered>this._linger:(this._lingered=0,t=!1)),t)return void this.schedule();const e=this.tick;this._factory(this.state).then((t=>{this.isDisposed||this.tick!==e||this.schedule({payload:t,phase:"rejected"===this.state.phase?"reconnected":"resolved"})})).catch((t=>{this.isDisposed||this.tick!==e||this.schedule({interval:i.sleep(this.frequency,this.state),payload:t,phase:"rejected"})}))}}!function(t){t.IMMEDIATE=0,t.MAX_INTERVAL=2147483647,t.NEVER=1/0}(r||(r={})),function(t){t.DEFAULT_BACKOFF=3,t.DEFAULT_FREQUENCY={backoff:!0,interval:1e3,max:3e4},t.DEFAULT_LINGER=1,t.DEFAULT_NAME="unknown",t.DEFAULT_STANDBY="when-hidden",t.DEFAULT_STATE={interval:r.NEVER,payload:null,phase:"constructed",timestamp:new Date(0).getTime()},t.DISPOSED_STATE={interval:r.NEVER,payload:null,phase:"disposed",timestamp:new Date(0).getTime()},t.sleep=function(e,s){const{backoff:i,interval:a,max:n}=e;if(a===r.NEVER)return a;const h=!0===i?t.DEFAULT_BACKOFF:!1===i?1:i,o=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}(a,s.interval*h);return Math.min(n,o)},t.hidden="undefined"!=typeof document&&(document.addEventListener("visibilitychange",(()=>{t.hidden="hidden"===document.visibilityState})),document.addEventListener("pagehide",(()=>{t.hidden="hidden"===document.visibilityState})),"hidden"===document.visibilityState)}(i||(i={}));class h{constructor(t,e=500){this.args=void 0,this.payload=null,this.limit=e,this.poll=new r({auto:!1,factory:async()=>{const{args:e}=this;return this.args=void 0,t(...e)},frequency:{backoff:!1,interval:r.NEVER,max:r.NEVER},standby:"never"}),this.payload=new a.PromiseDelegate,this.poll.ticked.connect(((t,e)=>{const{payload:s}=this;return"resolved"===e.phase?(this.payload=new a.PromiseDelegate,void s.resolve(e.payload)):"rejected"===e.phase||"stopped"===e.phase?(this.payload=new a.PromiseDelegate,s.promise.catch((t=>{})),void s.reject(e.payload)):void 0}),this)}get isDisposed(){return null===this.payload}dispose(){this.isDisposed||(this.args=void 0,this.payload=null,this.poll.dispose())}async stop(){return this.poll.stop()}}class o extends h{invoke(...t){return this.args=t,this.poll.schedule({interval:this.limit,phase:"invoked"}),this.payload.promise}}class d extends h{constructor(t,e){super(t,"number"==typeof e?e:e&&e.limit),this._trailing=!1,"number"!=typeof e&&e&&"trailing"===e.edge&&(this._trailing=!0),this._interval=this._trailing?this.limit:r.IMMEDIATE}invoke(...t){const e="invoked"!==this.poll.state.phase;return(e||this._trailing)&&(this.args=t),e&&this.poll.schedule({interval:this._interval,phase:"invoked"}),this.payload.promise}}}}]);
|