notebook 7.3.0a1__py3-none-any.whl → 7.3.0b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (231) hide show
  1. notebook/_version.py +1 -1
  2. notebook/app.py +10 -2
  3. notebook/static/113.bundle.js +1 -1
  4. notebook/static/1198.bundle.js +1 -1
  5. notebook/static/134.bundle.js +1 -1
  6. notebook/static/1408.bundle.js +1 -1
  7. notebook/static/1496.bundle.js +1 -1
  8. notebook/static/1584.bundle.js +1 -1
  9. notebook/static/1647.bundle.js +1 -1
  10. notebook/static/1650.bundle.js +1 -1
  11. notebook/static/1684.bundle.js +1 -1
  12. notebook/static/170.bundle.js +1 -1
  13. notebook/static/1809.bundle.js +1 -1
  14. notebook/static/1827.bundle.js +1 -1
  15. notebook/static/1828.bundle.js +1 -1
  16. notebook/static/1833.bundle.js +1 -1
  17. notebook/static/1958.bundle.js +1 -1
  18. notebook/static/1962.bundle.js +1 -1
  19. notebook/static/2007.bundle.js +1 -1
  20. notebook/static/2065.bundle.js +1 -1
  21. notebook/static/2088.bundle.js +1 -1
  22. notebook/static/2089.bundle.js +1 -1
  23. notebook/static/2122.bundle.js +1 -1
  24. notebook/static/2167.bundle.js +1 -1
  25. notebook/static/2184.bundle.js +1 -1
  26. notebook/static/2311.bundle.js +1 -1
  27. notebook/static/{3030.bundle.js → 2323.bundle.js} +1 -1
  28. notebook/static/2401.bundle.js +1 -1
  29. notebook/static/2424.bundle.js +377 -0
  30. notebook/static/2479.bundle.js +1 -1
  31. notebook/static/2489.bundle.js +1 -1
  32. notebook/static/2607.bundle.js +1 -1
  33. notebook/static/2615.bundle.js +1 -1
  34. notebook/static/2636.bundle.js +1 -1
  35. notebook/static/2756.bundle.js +1 -1
  36. notebook/static/2813.bundle.js +1 -1
  37. notebook/static/2866.bundle.js +1 -1
  38. notebook/static/2924.bundle.js +1 -1
  39. notebook/static/2944.bundle.js +1 -1
  40. notebook/static/2955.bundle.js +1 -0
  41. notebook/static/3129.bundle.js +1 -1
  42. notebook/static/3146.bundle.js +1 -1
  43. notebook/static/3187.bundle.js +1 -1
  44. notebook/static/3213.bundle.js +1 -1
  45. notebook/static/3301.bundle.js +1 -1
  46. notebook/static/3325.bundle.js +1 -1
  47. notebook/static/3340.bundle.js +1 -1
  48. notebook/static/3360.bundle.js +1 -1
  49. notebook/static/{1261.bundle.js → 3463.bundle.js} +1 -1
  50. notebook/static/3466.bundle.js +1 -1
  51. notebook/static/35.bundle.js +1 -1
  52. notebook/static/3512.bundle.js +1 -1
  53. notebook/static/3676.bundle.js +1 -1
  54. notebook/static/3680.bundle.js +1 -1
  55. notebook/static/374.bundle.js +1 -1
  56. notebook/static/3768.bundle.js +1 -1
  57. notebook/static/377.bundle.js +1 -1
  58. notebook/static/3863.bundle.js +1 -1
  59. notebook/static/3881.bundle.js +1 -1
  60. notebook/static/4042.bundle.js +1 -1
  61. notebook/static/4058.bundle.js +1 -1
  62. notebook/static/409.bundle.js +1 -1
  63. notebook/static/4212.bundle.js +1 -1
  64. notebook/static/4242.bundle.js +79 -0
  65. notebook/static/4271.bundle.js +1 -1
  66. notebook/static/4291.bundle.js +1 -1
  67. notebook/static/4382.bundle.js +1 -1
  68. notebook/static/4526.bundle.js +1 -1
  69. notebook/static/4588.bundle.js +1 -1
  70. notebook/static/4630.bundle.js +1 -1
  71. notebook/static/4645.bundle.js +1 -1
  72. notebook/static/4811.bundle.js +1 -1
  73. notebook/static/4837.bundle.js +1 -1
  74. notebook/static/5099.bundle.js +1 -1
  75. notebook/static/5135.bundle.js +1 -1
  76. notebook/static/5166.bundle.js +1 -1
  77. notebook/static/5234.bundle.js +1 -1
  78. notebook/static/5254.bundle.js +1 -1
  79. notebook/static/5261.bundle.js +1 -1
  80. notebook/static/5263.bundle.js +1 -0
  81. notebook/static/5313.bundle.js +1 -1
  82. notebook/static/5325.bundle.js +1 -1
  83. notebook/static/5346.bundle.js +1 -1
  84. notebook/static/5426.bundle.js +1 -1
  85. notebook/static/5430.bundle.js +653 -0
  86. notebook/static/545.bundle.js +1 -1
  87. notebook/static/5451.bundle.js +1 -1
  88. notebook/static/5573.bundle.js +1 -1
  89. notebook/static/5601.bundle.js +1 -1
  90. notebook/static/5649.bundle.js +3 -3
  91. notebook/static/5733.bundle.js +1 -1
  92. notebook/static/5850.bundle.js +1 -1
  93. notebook/static/5912.bundle.js +1 -1
  94. notebook/static/5921.bundle.js +1 -1
  95. notebook/static/6017.bundle.js +1 -1
  96. notebook/static/6061.bundle.js +1 -1
  97. notebook/static/6139.bundle.js +1 -1
  98. notebook/static/62.bundle.js +1 -1
  99. notebook/static/6271.bundle.js +1 -1
  100. notebook/static/6345.bundle.js +1 -1
  101. notebook/static/6604.bundle.js +1 -1
  102. notebook/static/6621.bundle.js +1 -1
  103. notebook/static/6627.bundle.js +1 -1
  104. notebook/static/6648.bundle.js +1 -0
  105. notebook/static/6731.bundle.js +1 -1
  106. notebook/static/6748.bundle.js +1 -1
  107. notebook/static/677.bundle.js +1 -1
  108. notebook/static/6815.bundle.js +1 -1
  109. notebook/static/6853.bundle.js +1 -1
  110. notebook/static/6893.bundle.js +1 -1
  111. notebook/static/690.bundle.js +1 -1
  112. notebook/static/6962.bundle.js +1 -1
  113. notebook/static/6999.bundle.js +1 -1
  114. notebook/static/7226.bundle.js +1 -1
  115. notebook/static/7252.bundle.js +1 -1
  116. notebook/static/7302.bundle.js +1 -1
  117. notebook/static/7369.bundle.js +1 -1
  118. notebook/static/7386.bundle.js +1 -1
  119. notebook/static/7391.bundle.js +1 -1
  120. notebook/static/7543.bundle.js +1 -1
  121. notebook/static/7603.bundle.js +1 -1
  122. notebook/static/7639.bundle.js +1 -1
  123. notebook/static/7655.bundle.js +1 -1
  124. notebook/static/7684.bundle.js +1 -1
  125. notebook/static/7812.bundle.js +1 -1
  126. notebook/static/7819.bundle.js +1 -1
  127. notebook/static/7821.bundle.js +1 -1
  128. notebook/static/7854.bundle.js +1 -1
  129. notebook/static/7866.bundle.js +1 -0
  130. notebook/static/7900.bundle.js +1 -1
  131. notebook/static/7906.bundle.js +1 -1
  132. notebook/static/8010.bundle.js +1 -1
  133. notebook/static/8032.bundle.js +1 -1
  134. notebook/static/8285.bundle.js +1 -1
  135. notebook/static/8471.bundle.js +1 -1
  136. notebook/static/8579.bundle.js +1 -1
  137. notebook/static/8633.bundle.js +1 -1
  138. notebook/static/8635.bundle.js +41 -0
  139. notebook/static/8771.bundle.js +1 -1
  140. notebook/static/8781.bundle.js +1 -1
  141. notebook/static/8875.bundle.js +1 -1
  142. notebook/static/8907.bundle.js +1 -1
  143. notebook/static/8928.bundle.js +1 -1
  144. notebook/static/8929.bundle.js +1 -1
  145. notebook/static/893.bundle.js +1 -1
  146. notebook/static/901.bundle.js +1 -1
  147. notebook/static/9068.bundle.js +1 -1
  148. notebook/static/911.bundle.js +1 -1
  149. notebook/static/9136.bundle.js +1 -1
  150. notebook/static/9151.bundle.js +1 -1
  151. notebook/static/9161.bundle.js +1 -1
  152. notebook/static/9268.bundle.js +1 -1
  153. notebook/static/9335.bundle.js +1 -1
  154. notebook/static/9341.bundle.js +1 -1
  155. notebook/static/9380.bundle.js +1 -1
  156. notebook/static/9605.bundle.js +1 -1
  157. notebook/static/9638.bundle.js +1 -1
  158. notebook/static/9672.bundle.js +352 -0
  159. notebook/static/9680.bundle.js +1 -1
  160. notebook/static/9685.bundle.js +1 -1
  161. notebook/static/9752.bundle.js +1 -1
  162. notebook/static/9799.bundle.js +1 -0
  163. notebook/static/9821.bundle.js +1 -1
  164. notebook/static/9852.bundle.js +1 -1
  165. notebook/static/bundle.js +1 -1
  166. notebook/static/third-party-licenses.json +124 -130
  167. notebook/templates/consoles.html +1 -1
  168. notebook/templates/edit.html +1 -1
  169. notebook/templates/error.html +1 -1
  170. notebook/templates/notebooks.html +1 -1
  171. notebook/templates/terminals.html +1 -1
  172. notebook/templates/tree.html +1 -1
  173. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +17 -17
  174. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
  175. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  176. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +11 -11
  177. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +18 -18
  178. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -1
  179. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +13 -13
  180. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +12 -12
  181. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js +1 -0
  182. notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/600.25341cef1598f2727482.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +1 -1
  183. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +1 -0
  184. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js +1 -0
  185. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  186. {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/METADATA +2 -2
  187. {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/RECORD +210 -218
  188. notebook/static/1226.bundle.js +0 -1
  189. notebook/static/1750.bundle.js +0 -1
  190. notebook/static/1884.bundle.js +0 -386
  191. notebook/static/4045.bundle.js +0 -1
  192. notebook/static/4434.bundle.js +0 -1
  193. notebook/static/5018.bundle.js +0 -1
  194. notebook/static/5712.bundle.js +0 -1
  195. notebook/static/6164.bundle.js +0 -1
  196. notebook/static/6318.bundle.js +0 -1
  197. notebook/static/6619.bundle.js +0 -1
  198. notebook/static/6898.bundle.js +0 -1
  199. notebook/static/7506.bundle.js +0 -703
  200. notebook/static/7579.bundle.js +0 -1
  201. notebook/static/8054.bundle.js +0 -1
  202. notebook/static/8647.bundle.js +0 -1
  203. notebook/static/8723.bundle.js +0 -1
  204. notebook/static/9734.bundle.js +0 -1
  205. notebook/static/9906.bundle.js +0 -1
  206. notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.45e1d3167710e94c3d26.js +0 -1
  207. notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.b94c92715d631efb4a8f.js +0 -1
  208. notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8ca922abea871b34db72.js +0 -1
  209. /notebook/static/{7506.bundle.js.LICENSE.txt → 4242.bundle.js.LICENSE.txt} +0 -0
  210. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  211. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  212. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  213. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  214. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  215. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  216. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  217. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  218. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  219. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  220. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  221. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  222. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  223. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  224. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  225. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  226. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  227. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  228. {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  229. {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/WHEEL +0 -0
  230. {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/entry_points.txt +0 -0
  231. {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4645,6345],{94645:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var n=o(27961),s=o(97040),a=o(44548),r=o(97373),c=o(33625);const i={id:"@jupyter-notebook/console-extension:opener",requires:[n.IRouter],autoStart:!0,description:"A plugin to open consoles in a new tab",activate:(e,t)=>{const{commands:o}=e,n=new RegExp("/consoles/(.*)"),s="router:console";o.addCommand(s,{execute:e=>{const t=e.path.match(n);if(!t)return;const[,s]=t;if(!s)return;const a=decodeURIComponent(s);o.execute("console:create",{path:a})}}),t.register({command:s,pattern:n})}},d={id:"@jupyter-notebook/console-extension:redirect",requires:[s.IConsoleTracker],optional:[r.INotebookPathOpener],autoStart:!0,description:"Open consoles in a new tab",activate:(e,t,o)=>{const n=a.PageConfig.getBaseUrl(),s=null!=o?o:r.defaultNotebookPathOpener;t.widgetAdded.connect((async(t,o)=>{const{sessionContext:r}=o;await r.ready,(0,c.find)(e.shell.widgets("main"),(e=>e.id===o.id))||(s.open({prefix:a.URLExt.join(n,"consoles"),path:r.path,target:"_blank"}),o.dispose())}))}},p=[i,d]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4645,6345],{94645:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var n=o(73852),s=o(26177),a=o(20754),r=o(28976),c=o(14931);const i={id:"@jupyter-notebook/console-extension:opener",requires:[n.IRouter],autoStart:!0,description:"A plugin to open consoles in a new tab",activate:(e,t)=>{const{commands:o}=e,n=new RegExp("/consoles/(.*)"),s="router:console";o.addCommand(s,{execute:e=>{const t=e.path.match(n);if(!t)return;const[,s]=t;if(!s)return;const a=decodeURIComponent(s);o.execute("console:create",{path:a})}}),t.register({command:s,pattern:n})}},d={id:"@jupyter-notebook/console-extension:redirect",requires:[s.IConsoleTracker],optional:[r.INotebookPathOpener],autoStart:!0,description:"Open consoles in a new tab",activate:(e,t,o)=>{const n=a.PageConfig.getBaseUrl(),s=null!=o?o:r.defaultNotebookPathOpener;t.widgetAdded.connect((async(t,o)=>{const{sessionContext:r}=o;await r.ready,(0,c.find)(e.shell.widgets("main"),(e=>e.id===o.id))||(s.open({prefix:a.URLExt.join(n,"consoles"),path:r.path,target:"_blank"}),o.dispose())}))}},p=[i,d]}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4811,7386],{37386:(e,t,o)=>{o.r(t),o.d(t,{CellBarExtension:()=>u,CellToolbarTracker:()=>c});var l=o(15465),n=o(81417),a=o(12668),i=o(33625),s=o(81997);const r=["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],d="jp-toolbar-overlap";class c{constructor(e,t,o){if(this._isDisposed=!1,this._toolbar=null,this._toolbarItems=null,this._toolbarFactory=null,this._panel=e,this._previousActiveCell=this._panel.content.activeCell,this._toolbarItems=null!=t?t:null,this._toolbarFactory=null!=o?o:null,null===this._toolbarItems&&null===this._toolbarFactory)throw Error("You must provide the toolbarFactory or the toolbar items.");!this._toolbarFactory&&this._toolbarItems&&(this._onToolbarChanged(),this._toolbarItems.changed.connect(this._onToolbarChanged,this)),e.revealed.then((()=>{requestAnimationFrame((()=>{const t=e.content;this._onActiveCellChanged(t),t.activeCellChanged.connect(this._onActiveCellChanged,this),t.renderingLayoutChanged.connect(this._onActiveCellChanged,this),t.disposed.connect((()=>{t.activeCellChanged.disconnect(this._onActiveCellChanged)}))}))}))}_onMetadataChanged(e,t){"jupyter"===t.key&&("object"!=typeof t.newValue||!0!==t.newValue.source_hidden||"add"!==t.type&&"change"!==t.type?"object"==typeof t.oldValue&&!0===t.oldValue.source_hidden&&this._addToolbar(e):this._removeToolbar(e))}_onActiveCellChanged(e){this._previousActiveCell&&!this._previousActiveCell.isDisposed&&(this._removeToolbar(this._previousActiveCell.model),this._previousActiveCell.model.metadataChanged.disconnect(this._onMetadataChanged));const t=e.activeCell;this._previousActiveCell=t,null===t||t.inputHidden||(t.model.metadataChanged.connect(this._onMetadataChanged,this),this._addToolbar(t.model))}get isDisposed(){return this._isDisposed}dispose(){var e,t;this.isDisposed||(this._isDisposed=!0,null===(e=this._toolbarItems)||void 0===e||e.changed.disconnect(this._onToolbarChanged,this),null===(t=this._toolbar)||void 0===t||t.dispose(),this._panel=null,s.Signal.clearData(this))}_addToolbar(e){const t=this._getCell(e);if(t&&!t.isDisposed){const e=this._toolbar=new a.Toolbar;e.addClass("jp-cell-menu"),e.addClass("jp-cell-toolbar");const o=[t.ready];if(this._toolbarFactory)(0,l.setToolbar)(t,this._toolbarFactory,e),e.layout.widgets.forEach((e=>{e.update()}));else for(const{name:t,widget:l}of this._toolbarItems)e.addItem(t,l),l instanceof a.ReactWidget&&void 0!==l.renderPromise&&(l.update(),o.push(l.renderPromise));o.push(t.ready),Promise.all(o).then((()=>{var o;t.isDisposed||(null===(o=this._panel)||void 0===o?void 0:o.content.activeCell)!==t?e.dispose():(t.node.classList.add(d),t.inputArea.layout.insertWidget(0,e),t.displayChanged.connect(this._resizeEventCallback,this),t.model.contentChanged.connect(this._changedEventCallback,this),this._updateCellForToolbarOverlap(t))})).catch((e=>{console.error("Error rendering buttons of the cell toolbar: ",e)}))}}_getCell(e){var t;return null===(t=this._panel)||void 0===t?void 0:t.content.widgets.find((t=>t.model===e))}_removeToolbar(e){var t,o;const l=this._getCell(e);l&&!l.isDisposed&&l.displayChanged.disconnect(this._resizeEventCallback,this),e.contentChanged.disconnect(this._changedEventCallback,this),(null===(t=this._toolbar)||void 0===t?void 0:t.parent)===(null==l?void 0:l.inputArea)&&!1===(null===(o=this._toolbar)||void 0===o?void 0:o.isDisposed)&&this._toolbar.dispose()}_onToolbarChanged(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;t&&(this._removeToolbar(t.model),this._addToolbar(t.model))}_changedEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_resizeEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_updateCellForToolbarOverlap(e){requestIdleCallback((()=>{const t=e.node;t.classList.remove(d),this._cellToolbarOverlapsContents(e)&&t.classList.add(d)}))}_cellToolbarOverlapsContents(e){var t,o,l,n;const a=e.model.type,i=null===(t=e.editorWidget)||void 0===t?void 0:t.node.getBoundingClientRect(),s=null!==(o=null==i?void 0:i.left)&&void 0!==o?o:0,r=null!==(l=null==i?void 0:i.right)&&void 0!==l?l:0,d=this._cellToolbarLeft(e);return null!==d&&((s+r)/2>d||("markdown"===a&&e.rendered?this._markdownOverlapsToolbar(e):"default"===(null===(n=this._panel)||void 0===n?void 0:n.content.renderingLayout)?this._codeOverlapsToolbar(e):this._outputOverlapsToolbar(e)))}_markdownOverlapsToolbar(e){const t=e.inputArea;if(!t)return!1;const o=t.renderedInput.node.firstElementChild;if(null===o)return!1;const l=o.style.maxWidth;o.style.maxWidth="max-content";const n=o.getBoundingClientRect().right;o.style.maxWidth=l;const a=this._cellToolbarLeft(e);return null!==a&&n>a}_outputOverlapsToolbar(e){const t=e.outputArea.node;if(t){const o=t.querySelectorAll("[data-mime-type]"),l=this._cellToolbarRect(e);if(l){const{left:e,bottom:t}=l;return(0,i.some)(o,(o=>{const l=o.firstElementChild;if(l){const n=new Range;r.includes(o.getAttribute("data-mime-type")||"")?n.selectNodeContents(l):n.selectNode(l);const{right:a,top:i}=n.getBoundingClientRect();return a>e&&i<t}return!1}))}}return!1}_codeOverlapsToolbar(e){const t=e.editorWidget,o=e.editor;if(!t||!o)return!1;if(o.lineCount<1)return!1;const l=t.node.getElementsByClassName("cm-line");if(l.length<1)return!1;let n=l[0].getBoundingClientRect().left;const a=document.createRange();a.selectNodeContents(l[0]),n+=a.getBoundingClientRect().width;const i=this._cellToolbarLeft(e);return null!==i&&n>i}_cellToolbarRect(e){var t;return(null===(t=this._toolbar)||void 0===t?void 0:t.parent)!==e.inputArea?null:this._toolbar.node.getBoundingClientRect()}_cellToolbarLeft(e){var t;return(null===(t=this._cellToolbarRect(e))||void 0===t?void 0:t.left)||null}}const h=[{command:"notebook:duplicate-below",name:"duplicate-cell"},{command:"notebook:move-cell-up",name:"move-cell-up"},{command:"notebook:move-cell-down",name:"move-cell-down"},{command:"notebook:insert-cell-above",name:"insert-cell-above"},{command:"notebook:insert-cell-below",name:"insert-cell-below"},{command:"notebook:delete-cell",name:"delete-cell"}];class u{constructor(e,t){this._commands=e,this._toolbarFactory=null!=t?t:this.defaultToolbarFactory}get defaultToolbarFactory(){const e=(0,l.createDefaultFactory)(this._commands);return t=>new n.ObservableList({values:h.map((o=>({name:o.name,widget:e(u.FACTORY_NAME,t,o)})))})}createNew(e){return new c(e,void 0,this._toolbarFactory)}}u.FACTORY_NAME="Cell"}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4811,7386],{37386:(e,t,o)=>{o.r(t),o.d(t,{CellBarExtension:()=>u,CellToolbarTracker:()=>c});var l=o(53876),n=o(71370),a=o(76878),i=o(14931),s=o(2159);const r=["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],d="jp-toolbar-overlap";class c{constructor(e,t,o){if(this._isDisposed=!1,this._toolbar=null,this._toolbarItems=null,this._toolbarFactory=null,this._panel=e,this._previousActiveCell=this._panel.content.activeCell,this._toolbarItems=null!=t?t:null,this._toolbarFactory=null!=o?o:null,this._enabled=!0,null===this._toolbarItems&&null===this._toolbarFactory)throw Error("You must provide the toolbarFactory or the toolbar items.");!this._toolbarFactory&&this._toolbarItems&&(this._onToolbarChanged(),this._toolbarItems.changed.connect(this._onToolbarChanged,this)),e.revealed.then((()=>{requestAnimationFrame((()=>{const t=e.content;this._onActiveCellChanged(t),t.activeCellChanged.connect(this._onActiveCellChanged,this),t.renderingLayoutChanged.connect(this._onActiveCellChanged,this),t.disposed.connect((()=>{t.activeCellChanged.disconnect(this._onActiveCellChanged)}))}))}))}_onMetadataChanged(e,t){"jupyter"===t.key&&("object"!=typeof t.newValue||!0!==t.newValue.source_hidden||"add"!==t.type&&"change"!==t.type?"object"==typeof t.oldValue&&!0===t.oldValue.source_hidden&&this._addToolbar(e):this._removeToolbar(e))}_onActiveCellChanged(e){this._previousActiveCell&&!this._previousActiveCell.isDisposed&&(this._removeToolbar(this._previousActiveCell.model),this._previousActiveCell.model.metadataChanged.disconnect(this._onMetadataChanged));const t=e.activeCell;this._previousActiveCell=t,null===t||t.inputHidden||(t.model.metadataChanged.connect(this._onMetadataChanged,this),this._addToolbar(t.model))}get isDisposed(){return this._isDisposed}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._onToolbarChanged()}dispose(){var e,t;this.isDisposed||(this._isDisposed=!0,null===(e=this._toolbarItems)||void 0===e||e.changed.disconnect(this._onToolbarChanged,this),null===(t=this._toolbar)||void 0===t||t.dispose(),this._panel=null,s.Signal.clearData(this))}_addToolbar(e){if(!this.enabled)return;const t=this._getCell(e);if(t&&!t.isDisposed){const e=this._toolbar=new a.Toolbar;e.addClass("jp-cell-menu"),e.addClass("jp-cell-toolbar");const o=[t.ready];if(this._toolbarFactory)(0,l.setToolbar)(t,this._toolbarFactory,e),e.layout.widgets.forEach((e=>{e.update()}));else for(const{name:t,widget:l}of this._toolbarItems)e.addItem(t,l),l instanceof a.ReactWidget&&void 0!==l.renderPromise&&(l.update(),o.push(l.renderPromise));o.push(t.ready),Promise.all(o).then((()=>{var o;t.isDisposed||(null===(o=this._panel)||void 0===o?void 0:o.content.activeCell)!==t?e.dispose():(t.node.classList.add(d),t.inputArea.layout.insertWidget(0,e),t.displayChanged.connect(this._resizeEventCallback,this),t.model.contentChanged.connect(this._changedEventCallback,this),this._updateCellForToolbarOverlap(t))})).catch((e=>{console.error("Error rendering buttons of the cell toolbar: ",e)}))}}_getCell(e){var t;return null===(t=this._panel)||void 0===t?void 0:t.content.widgets.find((t=>t.model===e))}_removeToolbar(e){var t,o;const l=this._getCell(e);l&&!l.isDisposed&&l.displayChanged.disconnect(this._resizeEventCallback,this),e.contentChanged.disconnect(this._changedEventCallback,this),(null===(t=this._toolbar)||void 0===t?void 0:t.parent)===(null==l?void 0:l.inputArea)&&!1===(null===(o=this._toolbar)||void 0===o?void 0:o.isDisposed)&&this._toolbar.dispose()}_onToolbarChanged(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;t&&(this._removeToolbar(t.model),this._addToolbar(t.model))}_changedEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_resizeEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_updateCellForToolbarOverlap(e){requestIdleCallback((()=>{const t=e.node;t.classList.remove(d),this._cellToolbarOverlapsContents(e)&&t.classList.add(d)}))}_cellToolbarOverlapsContents(e){var t,o,l,n;if(!e.model)return!1;const a=e.model.type,i=null===(t=e.editorWidget)||void 0===t?void 0:t.node.getBoundingClientRect(),s=null!==(o=null==i?void 0:i.left)&&void 0!==o?o:0,r=null!==(l=null==i?void 0:i.right)&&void 0!==l?l:0,d=this._cellToolbarLeft(e);return null!==d&&((s+r)/2>d||("markdown"===a&&e.rendered?this._markdownOverlapsToolbar(e):"default"===(null===(n=this._panel)||void 0===n?void 0:n.content.renderingLayout)?this._codeOverlapsToolbar(e):this._outputOverlapsToolbar(e)))}_markdownOverlapsToolbar(e){const t=e.inputArea;if(!t)return!1;const o=t.renderedInput.node.firstElementChild;if(null===o)return!1;const l=o.style.maxWidth;o.style.maxWidth="max-content";const n=o.getBoundingClientRect().right;o.style.maxWidth=l;const a=this._cellToolbarLeft(e);return null!==a&&n>a}_outputOverlapsToolbar(e){const t=e.outputArea.node;if(t){const o=t.querySelectorAll("[data-mime-type]"),l=this._cellToolbarRect(e);if(l){const{left:e,bottom:t}=l;return(0,i.some)(o,(o=>{const l=o.firstElementChild;if(l){const n=new Range;r.includes(o.getAttribute("data-mime-type")||"")?n.selectNodeContents(l):n.selectNode(l);const{right:a,top:i}=n.getBoundingClientRect();return a>e&&i<t}return!1}))}}return!1}_codeOverlapsToolbar(e){const t=e.editorWidget,o=e.editor;if(!t||!o)return!1;if(o.lineCount<1)return!1;const l=t.node.getElementsByClassName("cm-line");if(l.length<1)return!1;let n=l[0].getBoundingClientRect().left;const a=document.createRange();a.selectNodeContents(l[0]),n+=a.getBoundingClientRect().width;const i=this._cellToolbarLeft(e);return null!==i&&n>i}_cellToolbarRect(e){var t;return(null===(t=this._toolbar)||void 0===t?void 0:t.parent)!==e.inputArea?null:this._toolbar.node.getBoundingClientRect()}_cellToolbarLeft(e){var t;return(null===(t=this._cellToolbarRect(e))||void 0===t?void 0:t.left)||null}}const h=[{command:"notebook:duplicate-below",name:"duplicate-cell"},{command:"notebook:move-cell-up",name:"move-cell-up"},{command:"notebook:move-cell-down",name:"move-cell-down"},{command:"notebook:insert-cell-above",name:"insert-cell-above"},{command:"notebook:insert-cell-below",name:"insert-cell-below"},{command:"notebook:delete-cell",name:"delete-cell"}];class u{constructor(e,t){this._commands=e,this._toolbarFactory=null!=t?t:this.defaultToolbarFactory}get defaultToolbarFactory(){const e=(0,l.createDefaultFactory)(this._commands);return t=>new n.ObservableList({values:h.map((o=>({name:o.name,widget:e(u.FACTORY_NAME,t,o)})))})}createNew(e){return this._tracker=new c(e,void 0,this._toolbarFactory)}get enabled(){return this._tracker.enabled}set enabled(e){this._tracker&&(this._tracker.enabled=e)}}u.FACTORY_NAME="Cell"}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4837,3146],{73146:(e,t,o)=>{o.r(t),o.d(t,{INotebookTree:()=>n,NotebookTreeWidget:()=>s});var r=o(12668),a=o(63485);class s extends a.TabPanel{constructor(){super({tabPlacement:"top",tabsMovable:!0,renderer:r.TabBarSvg.defaultRenderer}),this.addClass("jp-TreePanel")}}const n=new(o(20998).Token)("@jupyter-notebook/tree:INotebookTree")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4837,3146],{73146:(e,t,o)=>{o.r(t),o.d(t,{INotebookTree:()=>n,NotebookTreeWidget:()=>s});var r=o(76878),a=o(2260);class s extends a.TabPanel{constructor(){super({tabPlacement:"top",tabsMovable:!0,renderer:r.TabBarSvg.defaultRenderer}),this.addClass("jp-TreePanel")}}const n=new(o(21961).Token)("@jupyter-notebook/tree:INotebookTree")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5099],{25099:(e,t,a)=>{a.r(t),a.d(t,{default:()=>re,toggleHeader:()=>ae});var n=a(27961),o=a(15465),s=a(44548),i=a(87844),r=a(93223),l=a(25291),c=a(12668),d=a(20998),u=a(2549),m=a(97934),p=a(60211);const h="help:open",g="https://jupyterlab.readthedocs.io/en/latest/privacy_policies.html";async function b(e,t={}){const a=p.ServerConnection.makeSettings(),n=s.URLExt.join(a.baseUrl,e);let o;try{o=await p.ServerConnection.makeRequest(n,t,a)}catch(e){throw new p.ServerConnection.NetworkError(e)}const i=await o.json();if(!o.ok)throw new p.ServerConnection.ResponseError(o,i.message);return i}const f={id:"@jupyterlab/apputils-extension:announcements",description:"Add the announcement feature. It will fetch news on the internet and check for application updates.",autoStart:!0,optional:[i.ISettingRegistry,l.ITranslator],activate:(e,t,a)=>{var n;const s=f.id.replace(/[^\w]/g,"");Promise.all([e.restored,null!==(n=null==t?void 0:t.load("@jupyterlab/apputils-extension:notification"))&&void 0!==n?n:Promise.resolve(null),p.ConfigSection.create({name:s})]).then((async([t,n,s])=>{const i=(null!=a?a:l.nullTranslator).load("jupyterlab");if(o.Notification.manager.changed.connect(((e,t)=>{var a;if("removed"!==t.type)return;const{id:n,tags:o}=null!==(a=t.notification.options.data)&&void 0!==a?a:{};if((null!=o?o:[]).some((e=>["news","update"].includes(e)))&&n){const e={};e[n]={seen:!0,dismissed:!0},s.update(e).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}})),"none"===(null==n?void 0:n.get("fetchNews").composite)){const t=o.Notification.emit(i.__("Would you like to get notified about official Jupyter news?"),"default",{autoClose:!1,actions:[{label:i.__("Open privacy policy"),caption:g,callback:t=>{t.preventDefault(),e.commands.hasCommand(h)?e.commands.execute(h,{text:i.__("Privacy policies"),url:g}):window.open(g,"_blank","noreferrer")},displayType:"link"},{label:i.__("Yes"),callback:()=>{o.Notification.dismiss(t),s.update({}).then((()=>r())).catch((e=>{console.error(`Failed to get the news:\n${e}`)})),null==n||n.set("fetchNews","true").catch((e=>{console.error(`Failed to save setting 'fetchNews':\n${e}`)}))}},{label:i.__("No"),callback:()=>{o.Notification.dismiss(t),null==n||n.set("fetchNews","false").catch((e=>{console.error(`Failed to save setting 'fetchNews':\n${e}`)}))}}]})}else await r();async function r(){var e,t,a,r;if("true"===(null!==(e=null==n?void 0:n.get("fetchNews").composite)&&void 0!==e?e:"false"))try{const e=await b("/lab/api/news");for(const{link:a,message:n,type:r,options:l}of e.news){const e=l.data.id,c=null!==(t=s.data[e])&&void 0!==t?t:{seen:!1,dismissed:!1};if(!c.dismissed){if(l.actions=[{label:i.__("Hide"),caption:i.__("Never show this notification again."),callback:()=>{const t={};t[e]={seen:!0,dismissed:!0},s.update(t).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}}],2===(null==a?void 0:a.length)&&l.actions.push({label:a[0],caption:a[1],callback:()=>{window.open(a[1],"_blank","noreferrer")},displayType:"link"}),!c.seen){l.autoClose=5e3;const t={};t[e]={seen:!0},s.update(t).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}o.Notification.emit(n,r,l)}}}catch(e){console.log("Failed to get the announcements.",e)}if(null===(a=null==n?void 0:n.get("checkForUpdates").composite)||void 0===a||a){const e=await b("/lab/api/update");if(e.notification){const{link:t,message:a,type:l,options:c}=e.notification,d=c.data.id,u=null!==(r=s.data[d])&&void 0!==r?r:{seen:!1,dismissed:!1};if(!u.dismissed){let e;if(c.actions=[{label:i.__("Do not check for updates"),caption:i.__("If pressed, you will not be prompted if a new JupyterLab version is found."),callback:()=>{null==n||n.set("checkForUpdates",!1).then((()=>{o.Notification.dismiss(e)})).catch((e=>{console.error("Failed to set the `checkForUpdates` setting.",e)}))}}],2===(null==t?void 0:t.length)&&c.actions.push({label:t[0],caption:t[1],callback:()=>{window.open(t[1],"_blank","noreferrer")},displayType:"link"}),!u.seen){c.autoClose=5e3;const e={};e[d]={seen:!0},s.update(e).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}e=o.Notification.emit(a,l,c)}}}}}))}};var y,v=a(54252),_=a(63485),w=a(78156),k=a(37634);function C(e){const{manager:t,onClose:a,trans:n}=e,[o,s]=w.useState([]),[i,r]=w.useState(null);return w.useEffect((()=>{async function e(){s(await Promise.all(t.notifications.map((async e=>Object.freeze({...e})))))}return o.length!==t.count&&e(),t.changed.connect(e),()=>{t.changed.disconnect(e)}}),[t]),w.useEffect((()=>{E.getIcons().then((e=>{r(e)})).catch((e=>{console.error(`Failed to get react-toastify icons:\n${e}`)}))}),[]),w.createElement(c.UseSignal,{signal:t.changed},(()=>w.createElement(w.Fragment,null,w.createElement("h2",{className:"jp-Notification-Header jp-Toolbar"},w.createElement("span",{className:"jp-Toolbar-item"},t.count>0?n._n("%1 notification","%1 notifications",t.count):n.__("No notifications")),w.createElement("span",{className:"jp-Toolbar-item jp-Toolbar-spacer"}),w.createElement(c.ToolbarButtonComponent,{actualOnClick:!0,onClick:()=>{t.dismiss()},icon:c.deleteIcon,tooltip:n.__("Dismiss all notifications"),enabled:t.count>0}),w.createElement(c.ToolbarButtonComponent,{actualOnClick:!0,onClick:a,icon:c.closeIcon,tooltip:n.__("Hide notifications")})),w.createElement("ol",{className:"jp-Notification-List"},o.map((e=>{var a;const{id:o,message:s,type:r,options:l}=e,d="in-progress"===r?"default":r,u=()=>{t.dismiss(o)},m="default"===r?null:"in-progress"===r?null!==(a=null==i?void 0:i.spinner)&&void 0!==a?a:null:i&&i[r];return w.createElement("li",{className:"jp-Notification-List-Item",key:e.id,onClick:e=>{e.stopPropagation()}},w.createElement("div",{className:`Toastify__toast Toastify__toast-theme--light Toastify__toast--${d} jp-Notification-Toast-${d}`},w.createElement("div",{className:"Toastify__toast-body"},m&&w.createElement("div",{className:"Toastify__toast-icon"},m({theme:"light",type:d})),w.createElement("div",null,E.createContent(s,u,l.actions))),w.createElement(E.CloseButton,{close:u,closeIcon:c.deleteIcon.react,title:n.__("Dismiss notification"),closeIconMargin:!0})))}))))))}!function(e){e.dismiss="apputils:dismiss-notification",e.display="apputils:display-notifications",e.notify="apputils:notify",e.update="apputils:update-notification"}(y||(y={}));class S extends c.VDomModel{constructor(e){super(),this.manager=e,this._highlight=!1,this._listOpened=!1,this._doNotDisturbMode=!1,this._count=e.count,this.manager.changed.connect(this.onNotificationChanged,this)}get count(){return this._count}get doNotDisturbMode(){return this._doNotDisturbMode}set doNotDisturbMode(e){this._doNotDisturbMode=e}get highlight(){return this._highlight}get listOpened(){return this._listOpened}set listOpened(e){this._listOpened=e,(this._listOpened||this._highlight)&&(this._highlight=!1),this.stateChanged.emit()}onNotificationChanged(e,t){this._count=this.manager.count;const{autoClose:a}=t.notification.options,n=this.doNotDisturbMode||"number"==typeof a&&a<=0;!this._listOpened&&"removed"!==t.type&&n&&(this._highlight=!0),this.stateChanged.emit()}}function T(e){return w.createElement(v.GroupItem,{spacing:4,onClick:()=>{e.onClick()},title:e.count>0?e.trans._n("%1 notification","%1 notifications",e.count):e.trans.__("No notifications")},w.createElement(v.TextItem,{className:"jp-Notification-Status-Text",source:`${e.count}`}),w.createElement(c.bellIcon.react,{top:"2px",stylesheet:"statusBar"}))}const j={id:"@jupyterlab/apputils-extension:notification",description:"Add the notification center and its status indicator.",autoStart:!0,optional:[v.IStatusBar,i.ISettingRegistry,l.ITranslator],activate:(e,t,a,n)=>{E.translator=null!=n?n:l.nullTranslator;const s=E.translator.load("jupyterlab"),i=new S(o.Notification.manager);i.doNotDisturbMode=!1,a&&Promise.all([a.load(j.id),e.restored]).then((([e])=>{const t=()=>{i.doNotDisturbMode=e.get("doNotDisturbMode").composite};t(),e.changed.connect(t)})),e.commands.addCommand(y.notify,{label:s.__("Emit a notification"),caption:s.__("Notification is described by {message: string, type?: string, options?: {autoClose?: number | false, actions: {label: string, commandId: string, args?: ReadOnlyJSONObject, caption?: string, className?: string}[], data?: ReadOnlyJSONValue}}."),execute:t=>{var a;const{message:n,type:s}=t,i=null!==(a=t.options)&&void 0!==a?a:{};return o.Notification.manager.notify(n,null!=s?s:"default",{...i,actions:i.actions?i.actions.map((t=>({...t,callback:()=>{e.commands.execute(t.commandId,t.args).catch((e=>{console.error(`Failed to executed '${t.commandId}':\n${e}`)}))}}))):null})}}),e.commands.addCommand(y.update,{label:s.__("Update a notification"),caption:s.__("Notification is described by {id: string, message: string, type?: string, options?: {autoClose?: number | false, actions: {label: string, commandId: string, args?: ReadOnlyJSONObject, caption?: string, className?: string}[], data?: ReadOnlyJSONValue}}."),execute:t=>{const{id:a,message:n,type:s,...i}=t;return o.Notification.manager.update({id:a,message:n,type:null!=s?s:"default",...i,actions:i.actions?i.actions.map((t=>({...t,callback:()=>{e.commands.execute(t.commandId,t.args).catch((e=>{console.error(`Failed to executed '${t.commandId}':\n${e}`)}))}}))):null})}}),e.commands.addCommand(y.dismiss,{label:s.__("Dismiss a notification"),execute:e=>{const{id:t}=e;o.Notification.manager.dismiss(t)}});let r=null;i.listOpened=!1;const d=o.ReactWidget.create(w.createElement(C,{manager:o.Notification.manager,onClose:()=>{null==r||r.dispose()},trans:s}));d.addClass("jp-Notification-Center"),o.Notification.manager.changed.connect((async function(e,t){var a;if(i.doNotDisturbMode||null!==r&&!r.isDisposed)return;const{message:n,type:o,options:s,id:l}=t.notification;if(!("number"==typeof s.autoClose&&s.autoClose<=0))switch(t.type){case"added":await E.createToast(l,n,o,s);break;case"updated":{const t=await E.toast(),i=s.actions,r=null!==(a=s.autoClose)&&void 0!==a?a:!(i&&i.length>0)&&null;if(t.isActive(l)){const a=()=>{t.dismiss(l),e.dismiss(l)};t.update(l,{type:"in-progress"===o?null:o,isLoading:"in-progress"===o,autoClose:r,render:E.createContent(n,a,s.actions)})}else await E.createToast(l,n,o,s)}break;case"removed":await E.toast().then((e=>{e.dismiss(l)}))}}));const u=()=>{r?(r.dispose(),r=null):(r=(0,v.showPopup)({body:d,anchor:m,align:"right",hasDynamicSize:!0,startHidden:!0}),E.toast().then((e=>{e.dismiss()})).catch((e=>{console.error(`Failed to dismiss all toasts:\n${e}`)})).finally((()=>{null==r||r.launch(),d.node.focus(),null==r||r.disposed.connect((()=>{i.listOpened=!1,r=null}))}))),i.listOpened=null!==r};e.commands.addCommand(y.display,{label:s.__("Show Notifications"),execute:u});const m=o.ReactWidget.create(w.createElement(c.UseSignal,{signal:i.stateChanged},(()=>(i.highlight||r&&!r.isDisposed?m.addClass("jp-mod-selected"):m.removeClass("jp-mod-selected"),w.createElement(T,{count:i.count,highlight:i.highlight,trans:s,onClick:u})))));m.addClass("jp-Notification-Status"),t?t.registerStatusItem(j.id,{item:m,align:"right",rank:-1}):(m.node.style.position="fixed",m.node.style.bottom="0",m.node.style.right="10px",_.Widget.attach(m,document.body),m.show())}};var E;!function(e){e.translator=l.nullTranslator;let t=null;function n(e){var t;return w.createElement("button",{className:"jp-Button jp-mod-minimal jp-Notification-Toast-Close"+(e.closeIconMargin?" jp-Notification-Toast-Close-Margin":""),title:null!==(t=e.title)&&void 0!==t?t:"",onClick:e.close},w.createElement(e.closeIcon,{className:"jp-icon-hover",tag:"span"}))}function s(t){const a=e.translator.load("jupyterlab");return w.createElement(n,{close:t.closeToast,closeIcon:c.closeIcon.react,title:a.__("Hide notification")})}e.CloseButton=n;let i=null;async function r(){if(null===i?i=new d.PromiseDelegate:await i.promise,null===t){t=await a.e(53).then(a.t.bind(a,60053,23));const e=document.body.appendChild(document.createElement("div"));e.id="react-toastify-container",(0,k.s)(e).render(w.createElement(t.ToastContainer,{draggable:!1,closeOnClick:!1,hideProgressBar:!0,newestOnTop:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,position:"bottom-right",className:"jp-toastContainer",transition:t.Slide,closeButton:s})),i.resolve()}return t.toast}e.toast=r,e.getIcons=async function(){return null===t&&await r(),t.Icons};const u={accent:"jp-mod-accept",link:"jp-mod-link",warn:"jp-mod-warn",default:""};function m({action:e,closeToast:t}){var a,n;const o=["jp-toast-button",u[null!==(a=e.displayType)&&void 0!==a?a:"default"]].join(" ");return w.createElement(c.Button,{title:null!==(n=e.caption)&&void 0!==n?n:e.label,className:o,onClick:a=>{e.callback(a),a.defaultPrevented||t()},small:!0},e.label)}function p(e,t,a){var n;const o=e.length>140?e.slice(0,140)+"…":e;return w.createElement(w.Fragment,null,w.createElement("div",{className:"jp-toast-message"},o.split("\n").map(((e,t)=>w.createElement(w.Fragment,{key:`part-${t}`},t>0?w.createElement("br",null):null,e)))),(null!==(n=null==a?void 0:a.length)&&void 0!==n?n:0)>0&&w.createElement("div",{className:"jp-toast-buttonBar"},w.createElement("div",{className:"jp-toast-spacer"}),a.map(((e,a)=>w.createElement(m,{key:"button-"+a,action:e,closeToast:t})))))}e.createContent=p,e.createToast=async function(e,t,a,n={}){const{actions:s,autoClose:i,data:l}=n;return(await r())((({closeToast:a})=>p(t,(()=>{a&&a(),o.Notification.manager.dismiss(e)}),s)),{autoClose:null!=i?i:!(s&&s.length>0)&&void 0,data:l,className:`jp-Notification-Toast-${a}`,toastId:e,type:"in-progress"===a?null:a,isLoading:"in-progress"===a})}}(E||(E={}));var I,x,N=a(33625),P=a(16934);!function(e){e.activate="apputils:activate-command-palette"}(I||(I={}));class D{constructor(e,t){this.translator=t||l.nullTranslator;const a=this.translator.load("jupyterlab");this._palette=e,this._palette.title.label="",this._palette.title.caption=a.__("Command Palette")}set placeholder(e){this._palette.inputNode.placeholder=e}get placeholder(){return this._palette.inputNode.placeholder}activate(){this._palette.activate()}addItem(e){const t=this._palette.addItem(e);return new u.DisposableDelegate((()=>{this._palette.removeItem(t)}))}}!function(e){e.activate=function(t,a,n){const{commands:s,shell:i}=t,r=a.load("jupyterlab"),l=x.createPalette(t,a),c=new o.ModalCommandPalette({commandPalette:l});let d=!1;if(l.node.setAttribute("role","region"),l.node.setAttribute("aria-label",r.__("Command Palette Section")),i.add(l,"left",{rank:300,type:"Command Palette"}),n){const e=n.load("@jupyterlab/apputils-extension:palette"),a=e=>{const t=e.get("modal").composite;d&&!t?(l.parent=null,c.detach(),i.add(l,"left",{rank:300,type:"Command Palette"})):!d&&t&&(l.parent=null,c.palette=l,l.show(),c.attach()),d=t};Promise.all([e,t.restored]).then((([e])=>{a(e),e.changed.connect((e=>{a(e)}))})).catch((e=>{console.error(e.message)}))}const u=()=>{const e=(0,N.find)(t.commands.keyBindings,(e=>e.command===I.activate));if(e){const t=e.keys.map(P.CommandRegistry.formatKeystroke).join(", ");l.title.caption=r.__("Commands (%1)",t)}else l.title.caption=r.__("Commands")};return u(),t.commands.keyBindingChanged.connect((()=>{u()})),s.addCommand(I.activate,{execute:()=>{d?c.activate():i.activateById(l.id)},label:r.__("Activate Command Palette")}),l.inputNode.placeholder=r.__("SEARCH"),new e(l,a)},e.restore=function(e,t,a){const n=x.createPalette(e,a);t.add(n,"command-palette")}}(D||(D={})),function(e){let t;e.createPalette=function(e,a){if(!t){t=new _.CommandPalette({commands:e.commands,renderer:c.CommandPaletteSvg.defaultRenderer}),t.id="command-palette",t.title.icon=c.paletteIcon;const n=a.load("jupyterlab");t.title.label=n.__("Commands")}return t}}(x||(x={}));class F extends r.DataConnector{constructor(e){super(),this._throttlers=Object.create(null),this._connector=e}fetch(e){const t=this._throttlers;return e in t||(t[e]=new m.Throttler((()=>this._connector.fetch(e)),100)),t[e].invoke()}async list(e="all"){const{isDisabled:t}=s.PageConfig.Extension,{ids:a,values:n}=await this._connector.list("ids"===e?"ids":void 0);return"all"===e?{ids:a,values:n}:"ids"===e?{ids:a}:{ids:a.filter((e=>!t(e))),values:n.filter((({id:e})=>!t(e)))}}async save(e,t){await this._connector.save(e,t)}}const R={id:"@jupyterlab/apputils-extension:settings",description:"Provides the setting registry.",activate:async e=>{const{isDisabled:t}=s.PageConfig.Extension,a=new F(e.serviceManager.settings),n=new i.SettingRegistry({connector:a,plugins:(await a.list("active")).values.filter((t=>e.hasPlugin(t.id)))});return e.restored.then((async()=>{(await a.list("ids")).ids.forEach((async a=>{if(e.hasPlugin(a)&&!t(a)&&!(a in n.plugins))try{await n.load(a)}catch(t){console.warn(`Settings failed to load for (${a})`,t),e.isPluginActivated(a)||console.warn(`If 'jupyter.lab.transform=true' in the plugin schema, this may happen if {autoStart: false} in (${a}) or if it is one of the deferredExtensions in page config.`)}}))})),n},autoStart:!0,provides:i.ISettingRegistry},A={id:"@jupyterlab/apputils-extension:kernel-status",description:"Provides the kernel status indicator model.",autoStart:!0,requires:[v.IStatusBar],provides:o.IKernelStatusModel,optional:[o.ISessionContextDialogs,l.ITranslator,n.ILabShell],activate:(e,t,a,n,s)=>{const i=null!=n?n:l.nullTranslator,r=null!=a?a:new o.SessionContextDialogs({translator:i}),c=async()=>{d.model.sessionContext&&await r.selectKernel(d.model.sessionContext)},d=new o.KernelStatus({onClick:c,onKeyDown:async e=>{if("Enter"===e.key||"Spacebar"===e.key||" "===e.key)return e.preventDefault(),e.stopPropagation(),c()}},i),u=new Set;function m(e,t){var a;const{oldValue:n,newValue:o}=t;n&&n.title.changed.disconnect(p),d.model.sessionContext=null!==(a=[...u].map((e=>e(t.newValue))).filter((e=>null!==e))[0])&&void 0!==a?a:null,o&&d.model.sessionContext&&(p(o.title),o.title.changed.connect(p))}const p=e=>{d.model.activityName=e.label};return s&&s.currentChanged.connect(m),t.registerStatusItem(A.id,{priority:1,item:d,align:"left",rank:1,isActive:()=>null!==d.model.sessionContext}),{addSessionProvider:t=>{u.add(t),e.shell.currentWidget&&m(e.shell,{newValue:e.shell.currentWidget,oldValue:null})}}}},M={id:"@jupyterlab/apputils-extension:running-sessions-status",description:"Add the running sessions and terminals status bar item.",autoStart:!0,requires:[v.IStatusBar,l.ITranslator],activate:(e,t,a)=>{const n=new o.RunningSessions({onClick:()=>e.shell.activateById("jp-running-sessions"),onKeyDown:t=>{"Enter"!==t.key&&"Spacebar"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),e.shell.activateById("jp-running-sessions"))},serviceManager:e.serviceManager,translator:a});n.model.sessions=Array.from(e.serviceManager.sessions.running()).length,n.model.terminals=Array.from(e.serviceManager.terminals.running()).length,t.registerStatusItem(M.id,{item:n,align:"left",rank:0})}};var O,L=a(2646);!function(e){e.changeTheme="apputils:change-theme",e.changePreferredLightTheme="apputils:change-light-theme",e.changePreferredDarkTheme="apputils:change-dark-theme",e.toggleAdaptiveTheme="apputils:adaptive-theme",e.themeScrollbars="apputils:theme-scrollbars",e.changeFont="apputils:change-font",e.incrFontSize="apputils:incr-font-size",e.decrFontSize="apputils:decr-font-size"}(O||(O={}));const z={id:"@jupyterlab/apputils-extension:themes",description:"Provides the theme manager.",requires:[i.ISettingRegistry,n.JupyterFrontEnd.IPaths,l.ITranslator],optional:[o.ISplashScreen],activate:(e,t,a,n,i)=>{const r=n.load("jupyterlab"),l=e.shell,c=e.commands,d=s.URLExt.join(s.PageConfig.getBaseUrl(),a.urls.themes),u=z.id,m=new o.ThemeManager({key:u,host:l,settings:t,splash:null!=i?i:void 0,url:d});let p,h=null;return m.themeChanged.connect(((e,t)=>{p=t.newValue,document.body.dataset.jpThemeLight=String(m.isLight(p)),document.body.dataset.jpThemeName=p,document.body.style.colorScheme=m.isLight(p)?"light":"dark",document.body.dataset.jpThemeScrollbars!==String(m.themeScrollbars(p))&&(document.body.dataset.jpThemeScrollbars=String(m.themeScrollbars(p)),m.themeScrollbars(p)?(h||(h=function(e){const t=document.createElement("style");return t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/*\n * Webkit scrollbar styling.\n * Separate file which is dynamically loaded based on user/theme settings.\n */\n\n/* use standard opaque scrollbars for most nodes */\n\n::-webkit-scrollbar,\n::-webkit-scrollbar-corner {\n background: var(--jp-scrollbar-background-color);\n}\n\n::-webkit-scrollbar-thumb {\n background: rgb(var(--jp-scrollbar-thumb-color));\n border: var(--jp-scrollbar-thumb-margin) solid transparent;\n background-clip: content-box;\n border-radius: var(--jp-scrollbar-thumb-radius);\n}\n\n::-webkit-scrollbar-track:horizontal {\n border-left: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n border-right: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n}\n\n::-webkit-scrollbar-track:vertical {\n border-top: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n border-bottom: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n}\n\n/* for code nodes, use a transparent style of scrollbar */\n\n.CodeMirror-hscrollbar::-webkit-scrollbar,\n.CodeMirror-vscrollbar::-webkit-scrollbar,\n.CodeMirror-hscrollbar::-webkit-scrollbar-corner,\n.CodeMirror-vscrollbar::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.CodeMirror-hscrollbar::-webkit-scrollbar-thumb,\n.CodeMirror-vscrollbar::-webkit-scrollbar-thumb {\n background: rgba(var(--jp-scrollbar-thumb-color), 0.5);\n border: var(--jp-scrollbar-thumb-margin) solid transparent;\n background-clip: content-box;\n border-radius: var(--jp-scrollbar-thumb-radius);\n}\n\n.CodeMirror-hscrollbar::-webkit-scrollbar-track:horizontal {\n border-left: var(--jp-scrollbar-endpad) solid transparent;\n border-right: var(--jp-scrollbar-endpad) solid transparent;\n}\n\n.CodeMirror-vscrollbar::-webkit-scrollbar-track:vertical {\n border-top: var(--jp-scrollbar-endpad) solid transparent;\n border-bottom: var(--jp-scrollbar-endpad) solid transparent;\n}\n")),t}()),h.parentElement||document.body.appendChild(h)):h&&h.parentElement&&h.parentElement.removeChild(h)),c.notifyCommandChanged(O.changeTheme)})),c.addCommand(O.changeTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Use Theme: %1",a):a},isToggled:e=>e.theme===p,execute:e=>{const t=e.theme;if(t!==m.theme)return m.isToggledAdaptiveTheme()?m.toggleAdaptiveTheme():m.setTheme(t)}}),c.addCommand(O.changePreferredLightTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided light `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Set Preferred Light Theme: %1",a):a},isToggled:e=>e.theme===m.preferredLightTheme,execute:e=>{const t=e.theme;if(t!==m.preferredLightTheme)return m.setPreferredLightTheme(t)}}),c.addCommand(O.changePreferredDarkTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided dark `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Set Preferred Dark Theme: %1",a):a},isToggled:e=>e.theme===m.preferredDarkTheme,execute:e=>{const t=e.theme;if(t!==m.preferredDarkTheme)return m.setPreferredDarkTheme(t)}}),c.addCommand(O.toggleAdaptiveTheme,{label:e=>e.isPalette?r.__("Synchronize Styling Theme with System Settings"):r.__("Synchronize with System Settings"),isToggled:()=>m.isToggledAdaptiveTheme(),execute:()=>{m.toggleAdaptiveTheme().catch(console.warn)}}),c.addCommand(O.themeScrollbars,{label:r.__("Theme Scrollbars"),isToggled:()=>m.isToggledThemeScrollbars(),execute:()=>m.toggleThemeScrollbars()}),c.addCommand(O.changeFont,{label:e=>e.enabled?`${e.font}`:r.__("waiting for fonts"),isEnabled:e=>e.enabled,isToggled:e=>m.getCSS(e.key)===e.font,execute:e=>m.setCSSOverride(e.key,e.font)}),c.addCommand(O.incrFontSize,{label:e=>{switch(e.key){case"code-font-size":return r.__("Increase Code Font Size");case"content-font-size1":return r.__("Increase Content Font Size");case"ui-font-size1":return r.__("Increase UI Font Size");default:return r.__("Increase Font Size")}},execute:e=>m.incrFontSize(e.key)}),c.addCommand(O.decrFontSize,{label:e=>{switch(e.key){case"code-font-size":return r.__("Decrease Code Font Size");case"content-font-size1":return r.__("Decrease Content Font Size");case"ui-font-size1":return r.__("Decrease UI Font Size");default:return r.__("Decrease Font Size")}},execute:e=>m.decrFontSize(e.key)}),m},autoStart:!0,provides:o.IThemeManager},$={id:"@jupyterlab/apputils-extension:themes-palette-menu",description:"Adds theme commands to the menu and the command palette.",requires:[o.IThemeManager,l.ITranslator],optional:[o.ICommandPalette,L.IMainMenu],activate:(e,t,a,n,o)=>{const s=a.load("jupyterlab");o&&e.restored.then((()=>{var e;const a=null===(e=o.settingsMenu.items.find((e=>{var t;return"submenu"===e.type&&"jp-mainmenu-settings-apputilstheme"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===e?void 0:e.submenu;a&&t.themes.forEach(((e,t)=>{a.insertItem(t,{command:O.changeTheme,args:{isPalette:!1,theme:e}})}))})),n&&e.restored.then((()=>{const e=s.__("Theme"),a=O.changeTheme,o=!0;t.themes.forEach((t=>{n.addItem({command:a,args:{isPalette:o,theme:t},category:e})})),t.themes.forEach((t=>{n.addItem({command:O.changePreferredLightTheme,args:{isPalette:o,theme:t},category:e})})),t.themes.forEach((t=>{n.addItem({command:O.changePreferredDarkTheme,args:{isPalette:o,theme:t},category:e})})),n.addItem({command:O.toggleAdaptiveTheme,args:{isPalette:o},category:e}),n.addItem({command:O.themeScrollbars,category:e}),n.addItem({command:O.incrFontSize,args:{key:"code-font-size"},category:e}),n.addItem({command:O.decrFontSize,args:{key:"code-font-size"},category:e}),n.addItem({command:O.incrFontSize,args:{key:"content-font-size1"},category:e}),n.addItem({command:O.decrFontSize,args:{key:"content-font-size1"},category:e}),n.addItem({command:O.incrFontSize,args:{key:"ui-font-size1"},category:e}),n.addItem({command:O.decrFontSize,args:{key:"ui-font-size1"},category:e})}))},autoStart:!0},W={id:"@jupyterlab/apputils-extension:toolbar-registry",description:"Provides toolbar items registry.",autoStart:!0,provides:o.IToolbarWidgetRegistry,activate:e=>new o.ToolbarWidgetRegistry({defaultFactory:(0,o.createDefaultFactory)(e.commands)})};var U=a(71120),B=a(23518);const H="jupyterlab-workspace",q="."+H,J={id:"@jupyterlab/apputils-extension:workspaces",description:"Add workspace file type.",autoStart:!0,requires:[r.IStateDB,l.ITranslator,n.JupyterFrontEnd.IPaths],optional:[n.IRouter,B.IWorkspaceCommands],activate:(e,t,a,n,o,i)=>{const r=new K.WorkspaceFactory({workspaces:e.serviceManager.workspaces,state:t,translator:a,open:async t=>{if(i)await e.commands.execute(i.open,{workspace:t});else{const e=s.URLExt.join(n.urls.app,"workspaces"),a=s.URLExt.join(e,t);if(!a.startsWith(e))throw new Error("Can only be used for workspaces");o?o.navigate(a,{hard:!0}):document.location.href=a}}}),l=a.load("jupyterlab");e.docRegistry.addFileType({name:H,contentType:"file",fileFormat:"text",displayName:l.__("JupyterLab Workspace File"),extensions:[q],mimeTypes:["text/json"],iconClass:"jp-JupyterIcon"}),e.docRegistry.addWidgetFactory(r)}};var K;!function(e){class t extends U.ABCWidgetFactory{constructor(e){super({name:"Workspace loader",label:(e.translator||l.nullTranslator).load("jupyterlab").__("Workspace loader"),fileTypes:[H],defaultFor:[H],readOnly:!0}),this._state=e.state,this._workspaces=e.workspaces,this._open=e.open}createNewWidget(e){return e.ready.then((async()=>{const t=e.model.toJSON(),a=e.path,n=t.metadata.id;await this._workspaces.save(n,t),await this._state.save("workspace-ui:lastSave",a),await this._open(n)})),function(e){const t=new U.DocumentWidget({content:new _.Widget,context:e});return t.content.dispose(),t}(e)}}e.WorkspaceFactory=t}(K||(K={}));var V=a(18395);const Q="jp-ContextualShortcut-TableItem";var Y;!function(e){e.loadState="apputils:load-statedb",e.print="apputils:print",e.reset="apputils:reset",e.resetOnLoad="apputils:reset-on-load",e.runFirstEnabled="apputils:run-first-enabled",e.runAllEnabled="apputils:run-all-enabled",e.toggleHeader="apputils:toggle-header",e.displayShortcuts="apputils:display-shortcuts"}(Y||(Y={}));const G={id:"@jupyterlab/apputils-extension:palette",description:"Provides the command palette.",autoStart:!0,requires:[l.ITranslator],provides:o.ICommandPalette,optional:[i.ISettingRegistry],activate:(e,t,a)=>D.activate(e,t,a)},X={id:"@jupyterlab/apputils-extension:palette-restorer",description:"Restores the command palette.",autoStart:!0,requires:[n.ILayoutRestorer,l.ITranslator],activate:(e,t,a)=>{D.restore(e,t,a)}},Z={id:"@jupyterlab/apputils-extension:resolver",description:"Provides the window name resolver.",autoStart:!0,provides:o.IWindowResolver,requires:[n.JupyterFrontEnd.IPaths,n.IRouter],activate:async(e,t,a)=>{const{hash:n,search:i}=a.current,r=s.URLExt.queryStringToObject(i||""),l=new o.WindowResolver,c=s.PageConfig.getOption("workspace"),d=s.PageConfig.getOption("treePath"),u="multiple-document"===s.PageConfig.getOption("mode")?"lab":"doc",m=c||s.PageConfig.defaultWorkspace,p=d?s.URLExt.join("tree",d):"";try{return await l.resolve(m),l}catch(e){return new Promise((()=>{const{base:e}=t.urls,o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.floor(62*Math.random())];let i=s.URLExt.join(e,u,"workspaces",`auto-${o}`);i=p?s.URLExt.join(i,s.URLExt.encodeParts(p)):i,r.reset="";const l=i+s.URLExt.objectToQueryString(r)+(n||"");a.navigate(l,{hard:!0})}))}}},ee={id:"@jupyterlab/apputils-extension:splash",description:"Provides the splash screen.",autoStart:!0,requires:[l.ITranslator],provides:o.ISplashScreen,activate:(e,t)=>{const a=t.load("jupyterlab"),{commands:n,restored:s}=e,i=document.createElement("div"),r=document.createElement("div"),l=document.createElement("div");let d;i.id="jupyterlab-splash",r.id="galaxy",l.id="main-logo",c.jupyterFaviconIcon.element({container:l,stylesheet:"splash"}),r.appendChild(l),["1","2","3"].forEach((e=>{const t=document.createElement("div"),a=document.createElement("div");t.id=`moon${e}`,t.className="moon orbit",a.id=`planet${e}`,a.className="planet",t.appendChild(a),r.appendChild(t)})),i.appendChild(r);const p=new m.Throttler((async()=>{if(!d){d=new o.Dialog({title:a.__("Loading…"),body:a.__("The loading screen is taking a long time.\nWould you like to clear the workspace or keep waiting?"),buttons:[o.Dialog.cancelButton({label:a.__("Keep Waiting")}),o.Dialog.warnButton({label:a.__("Clear Workspace")})]});try{const e=await d.launch();if(d.dispose(),d=null,e.button.accept&&n.hasCommand(Y.reset))return n.execute(Y.reset);requestAnimationFrame((()=>{p.invoke().catch((e=>{}))}))}catch(e){}}}),{limit:12e3,edge:"trailing"});let h=0;return{show:(e=!0)=>(i.classList.remove("splash-fade"),i.classList.toggle("light",e),i.classList.toggle("dark",!e),h++,document.body.appendChild(i),p.invoke().catch((e=>{})),new u.DisposableDelegate((async()=>{await s,0==--h&&(p.stop(),d&&(d.dispose(),d=null),i.classList.add("splash-fade"),window.setTimeout((()=>{document.body.removeChild(i)}),200))})))}}},te={id:"@jupyterlab/apputils-extension:print",description:"Add the print capability",autoStart:!0,requires:[l.ITranslator],activate:(e,t)=>{var a;const n=t.load("jupyterlab");e.commands.addCommand(Y.print,{label:n.__("Print…"),isEnabled:()=>{const t=e.shell.currentWidget;return null!==o.Printing.getPrintFunction(t)},execute:async()=>{const t=e.shell.currentWidget,a=o.Printing.getPrintFunction(t);a&&await a()}}),null===(a=e.shell.currentChanged)||void 0===a||a.connect((()=>{e.commands.notifyCommandChanged(Y.print)}))}},ae={id:"@jupyterlab/apputils-extension:toggle-header",description:"Adds a command to display the main area widget content header.",autoStart:!0,requires:[l.ITranslator],optional:[o.ICommandPalette],activate:(e,t,a)=>{var n;const s=t.load("jupyterlab"),i=s.__("Main Area");e.commands.addCommand(Y.toggleHeader,{label:s.__("Show Header Above Content"),isEnabled:()=>e.shell.currentWidget instanceof o.MainAreaWidget&&!e.shell.currentWidget.contentHeader.isDisposed&&e.shell.currentWidget.contentHeader.widgets.length>0,isToggled:()=>{const t=e.shell.currentWidget;return t instanceof o.MainAreaWidget&&!t.contentHeader.isHidden},execute:async()=>{const t=e.shell.currentWidget;t instanceof o.MainAreaWidget&&t.contentHeader.setHidden(!t.contentHeader.isHidden)}}),null===(n=e.shell.currentChanged)||void 0===n||n.connect((()=>{e.commands.notifyCommandChanged(Y.toggleHeader)})),a&&a.addItem({command:Y.toggleHeader,category:i})}},ne={id:"@jupyterlab/apputils-extension:state",description:"Provides the application state. It is stored per workspaces.",autoStart:!0,provides:r.IStateDB,requires:[n.JupyterFrontEnd.IPaths,n.IRouter,l.ITranslator],optional:[o.IWindowResolver],activate:(e,t,a,n,o)=>{const i=n.load("jupyterlab");if(null===o)return new r.StateDB;let l=!1;const{commands:c,name:u,serviceManager:p}=e,{workspaces:h}=p,g=o.name,b=new d.PromiseDelegate,f=new r.StateDB({transform:b.promise}),y=new m.Debouncer((async()=>{const e=g,t={id:e},a=await f.toJSON();await h.save(e,{data:a,metadata:t})}));return f.changed.connect((()=>{y.invoke()}),f),f.changed.connect((()=>async function(e,t,a){var n,o;const i=await t.toJSON();if(void 0===(null===(o=null===(n=i["layout-restorer:data"])||void 0===n?void 0:n.main)||void 0===o?void 0:o.current))document.title=`${s.PageConfig.getOption("appName")||"JupyterLab"}${e.startsWith("auto-")?` (${e})`:""}`;else{let t=s.PathExt.basename(decodeURIComponent(window.location.href));t=t.length>15?t.slice(0,12).concat("…"):t;const n=Object.keys(i).filter((e=>e.startsWith("notebook")||e.startsWith("editor"))).length;e.startsWith("auto-")?document.title=`${t} (${e}${n>1?` : ${n}`:""}) - ${a}`:document.title=`${t}${n>1?` (${n})`:""} - ${a}`}}(g,f,u))),c.addCommand(Y.loadState,{label:i.__("Load state for the current workspace."),execute:async e=>{if(l)return;const{hash:t,path:n,search:o}=e,i=s.URLExt.queryStringToObject(o||""),r="string"==typeof i.clone?""===i.clone?s.PageConfig.defaultWorkspace:i.clone:null,c=r||g||null;if(null!==c){try{const e=await h.fetch(c);l||(l=!0,b.resolve({type:"overwrite",contents:e.data}))}catch({message:e}){console.warn(`Fetching workspace "${g}" failed.`,e),l||(l=!0,b.resolve({type:"cancel",contents:null}))}if(c===r){delete i.clone;const e=n+s.URLExt.objectToQueryString(i)+t,o=y.invoke().then((()=>a.stop));return o.then((()=>{a.navigate(e)})),o}await y.invoke()}else console.error(`${Y.loadState} cannot load null workspace.`)}}),c.addCommand(Y.reset,{label:i.__("Reset Application State"),execute:async({reload:e})=>{await f.clear(),await y.invoke(),e&&a.reload()}}),c.addCommand(Y.resetOnLoad,{label:i.__("Reset state when loading for the workspace."),execute:e=>{const{hash:t,path:n,search:o}=e,i=s.URLExt.queryStringToObject(o||""),r="clone"in i;if(!("reset"in i))return;if(l)return a.reload();l=!0,b.resolve({type:"clear",contents:null}),delete i.reset;const c=n+s.URLExt.objectToQueryString(i)+t,d=f.clear().then((()=>y.invoke()));return r?d.then((()=>{a.navigate(c,{hard:!0})})):d.then((()=>{a.navigate(c)})),d}}),a.register({command:Y.loadState,pattern:/.?/,rank:30}),a.register({command:Y.resetOnLoad,pattern:/(\?reset|\&reset)($|&)/,rank:20}),f}},oe={id:"@jupyterlab/apputils-extension:sessionDialogs",description:"Provides the session context dialogs.",provides:o.ISessionContextDialogs,optional:[l.ITranslator],autoStart:!0,activate:async(e,t)=>new o.SessionContextDialogs({translator:null!=t?t:l.nullTranslator})},se={id:"@jupyterlab/apputils-extension:utilityCommands",description:"Adds meta commands to run set of other commands.",requires:[l.ITranslator],optional:[o.ICommandPalette],autoStart:!0,activate:(e,t,a)=>{const n=t.load("jupyterlab"),{commands:s}=e;if(s.addCommand(Y.runFirstEnabled,{label:n.__("Run First Enabled Command"),execute:t=>{const a=t.commands,n=t.args,o=Array.isArray(t);for(let t=0;t<a.length;t++){const s=a[t],i=o?n[t]:n;if(e.commands.isEnabled(s,i))return e.commands.execute(s,i)}}}),s.addCommand(Y.runAllEnabled,{label:n.__("Run All Enabled Commands Passed as Args"),execute:async t=>{var a,n;const o=null!==(a=t.commands)&&void 0!==a?a:[],s=t.args,i=Array.isArray(t),r=null!==(n=t.errorIfNotEnabled)&&void 0!==n&&n;for(let t=0;t<o.length;t++){const a=o[t],n=i?s[t]:s;e.commands.isEnabled(a,n)?await e.commands.execute(a,n):r&&console.error(`${a} is not enabled.`)}},isEnabled:t=>{var a;const n=null!==(a=t.commands)&&void 0!==a?a:[],o=t.args,s=Array.isArray(t);return n.some(((t,a)=>e.commands.isEnabled(t,s?o[a]:o)))}}),s.addCommand(Y.displayShortcuts,{label:n.__("Show Keyboard Shortcuts…"),caption:n.__("Show relevant keyboard shortcuts for the current active widget"),execute:t=>{var a;const i=e.shell.currentWidget;if(!(null==i?void 0:i.node.contains(document.activeElement))&&i instanceof o.MainAreaWidget){const e=null!==(a=i.content.node)&&void 0!==a?a:null==i?void 0:i.node;null==e||e.focus()}return function(e){const{commands:t,trans:a,activeElement:n}=e,s=null!=n?n:document.activeElement;function i(e){const t=[];return e.forEach(((e,a)=>{const n=[];e.split(" ").forEach(((e,t)=>{n.push(w.createElement("span",{className:"jp-ContextualShortcut-Key",key:`ch-${t}`},w.createElement("kbd",null,e)),w.createElement(w.Fragment,{key:`fragment-${t}`}," + "))})),t.push(w.createElement("span",{key:`key-${a}`},n.slice(0,-1)),w.createElement(w.Fragment,{key:`fragment-${a}`}," + "))})),w.createElement("span",null,t.slice(0,-1))}function r(e){const a=t.label(e.command),n=e.command.split(":")[1].split("-");let o="";for(let e=0;e<n.length;e++)o=o+" "+((s=n[e]).charAt(0).toUpperCase()+s.slice(1));var s;return a.length>0?a:o}function l(e,t){let a=t;for(let t=0;null!==a&&a!==a.parentElement;a=a.parentElement,++t){if(a.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(a.matches(e))return t}return-1}const c=new Map;for(let e=0;e<t.keyBindings.length;e++){const a=t.keyBindings[e];let n=l(a.selector,s);if(n<0)continue;let o=P.CommandRegistry.formatKeystroke(a.keys);if(c.has(o)){let e=c.get(o);if(e[0]<n||e[0]===n&&V.Selector.calculateSpecificity(e[1].selector)>V.Selector.calculateSpecificity(a.selector))continue}c.set(o,[n,a])}let d=-1;const u=new Map;for(let[e,t]of c.values())d=Math.max(e,d),u.has(e)||u.set(e,[]),u.get(e).push(t);const m=[];for(let e=0;e<=d;e++)u.has(e)&&(m.push(u.get(e).map((e=>w.createElement("tr",{className:"jp-ContextualShortcut-TableRow",key:`${e.command}-${e.keys.join("-").replace(" ","_")}`},w.createElement("td",{className:Q},r(e)),w.createElement("td",{className:Q},i([...e.keys])))))),m.push(w.createElement("tr",{className:"jp-ContextualShortcut-TableLastRow",key:`group-${e}-last`})));const p=w.createElement("table",null,w.createElement("tbody",null,m));return(0,o.showDialog)({title:a.__("Keyboard Shortcuts"),body:p,buttons:[o.Dialog.cancelButton({label:a.__("Close")})]})}({commands:s,trans:n})}}),a){const e=n.__("Help");a.addItem({command:Y.displayShortcuts,category:e})}}},ie={id:"@jupyterlab/apputils-extension:sanitizer",description:"Provides the HTML sanitizer.",autoStart:!0,provides:o.ISanitizer,requires:[i.ISettingRegistry],activate:(e,t)=>{const a=new o.Sanitizer,n=e=>{const t=e.get("allowedSchemes").composite,n=e.get("autolink").composite;t&&a.setAllowedSchemes(t),a.setAutolink(n)};return t.load("@jupyterlab/apputils-extension:sanitizer").then((e=>{n(e),e.changed.connect(n)})).catch((e=>{console.error("Failed to load sanitizer settings:",e)})),a}},re=[f,A,j,G,X,te,Z,M,ie,R,ne,ee,oe,z,$,ae,W,se,J]},37634:(e,t,a)=>{var n=a(38005);t.s=n.createRoot,n.hydrateRoot}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5099],{25099:(e,t,a)=>{a.r(t),a.d(t,{default:()=>re,toggleHeader:()=>ae});var n=a(73852),o=a(53876),s=a(20754),i=a(3012),r=a(45556),l=a(93050),c=a(76878),d=a(21961),u=a(49901),m=a(32406),p=a(5348);const h="help:open",g="https://jupyterlab.readthedocs.io/en/latest/privacy_policies.html";async function b(e,t={}){const a=p.ServerConnection.makeSettings(),n=s.URLExt.join(a.baseUrl,e);let o;try{o=await p.ServerConnection.makeRequest(n,t,a)}catch(e){throw new p.ServerConnection.NetworkError(e)}const i=await o.json();if(!o.ok)throw new p.ServerConnection.ResponseError(o,i.message);return i}const f={id:"@jupyterlab/apputils-extension:announcements",description:"Add the announcement feature. It will fetch news on the internet and check for application updates.",autoStart:!0,optional:[i.ISettingRegistry,l.ITranslator],activate:(e,t,a)=>{var n;const s=f.id.replace(/[^\w]/g,"");Promise.all([e.restored,null!==(n=null==t?void 0:t.load("@jupyterlab/apputils-extension:notification"))&&void 0!==n?n:Promise.resolve(null),p.ConfigSection.create({name:s})]).then((async([t,n,s])=>{const i=(null!=a?a:l.nullTranslator).load("jupyterlab");if(o.Notification.manager.changed.connect(((e,t)=>{var a;if("removed"!==t.type)return;const{id:n,tags:o}=null!==(a=t.notification.options.data)&&void 0!==a?a:{};if((null!=o?o:[]).some((e=>["news","update"].includes(e)))&&n){const e={};e[n]={seen:!0,dismissed:!0},s.update(e).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}})),"none"===(null==n?void 0:n.get("fetchNews").composite)){const t=o.Notification.emit(i.__("Would you like to get notified about official Jupyter news?"),"default",{autoClose:!1,actions:[{label:i.__("Open privacy policy"),caption:g,callback:t=>{t.preventDefault(),e.commands.hasCommand(h)?e.commands.execute(h,{text:i.__("Privacy policies"),url:g}):window.open(g,"_blank","noreferrer")},displayType:"link"},{label:i.__("Yes"),callback:()=>{o.Notification.dismiss(t),s.update({}).then((()=>r())).catch((e=>{console.error(`Failed to get the news:\n${e}`)})),null==n||n.set("fetchNews","true").catch((e=>{console.error(`Failed to save setting 'fetchNews':\n${e}`)}))}},{label:i.__("No"),callback:()=>{o.Notification.dismiss(t),null==n||n.set("fetchNews","false").catch((e=>{console.error(`Failed to save setting 'fetchNews':\n${e}`)}))}}]})}else await r();async function r(){var e,t,a,r;if("true"===(null!==(e=null==n?void 0:n.get("fetchNews").composite)&&void 0!==e?e:"false"))try{const e=await b("/lab/api/news");for(const{link:a,message:n,type:r,options:l}of e.news){const e=l.data.id,c=null!==(t=s.data[e])&&void 0!==t?t:{seen:!1,dismissed:!1};if(!c.dismissed){if(l.actions=[{label:i.__("Hide"),caption:i.__("Never show this notification again."),callback:()=>{const t={};t[e]={seen:!0,dismissed:!0},s.update(t).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}}],2===(null==a?void 0:a.length)&&l.actions.push({label:a[0],caption:a[1],callback:()=>{window.open(a[1],"_blank","noreferrer")},displayType:"link"}),!c.seen){l.autoClose=5e3;const t={};t[e]={seen:!0},s.update(t).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}o.Notification.emit(n,r,l)}}}catch(e){console.log("Failed to get the announcements.",e)}if(null===(a=null==n?void 0:n.get("checkForUpdates").composite)||void 0===a||a){const e=await b("/lab/api/update");if(e.notification){const{link:t,message:a,type:l,options:c}=e.notification,d=c.data.id,u=null!==(r=s.data[d])&&void 0!==r?r:{seen:!1,dismissed:!1};if(!u.dismissed){let e;if(c.actions=[{label:i.__("Ignore all updates"),caption:i.__("Do not prompt me if a new JupyterLab version is available."),callback:()=>{null==n||n.set("checkForUpdates",!1).then((()=>{o.Notification.dismiss(e)})).catch((e=>{console.error("Failed to set the `checkForUpdates` setting.",e)}))}}],2===(null==t?void 0:t.length)&&c.actions.push({label:t[0],caption:t[1],callback:()=>{window.open(t[1],"_blank","noreferrer")},displayType:"accent"}),!u.seen){c.autoClose=5e3;const e={};e[d]={seen:!0},s.update(e).catch((e=>{console.error(`Failed to update the announcements config:\n${e}`)}))}e=o.Notification.emit(a,l,c)}}}}}))}};var y,v=a(33441),_=a(2260),w=a(78156),k=a(37634);function C(e){const{manager:t,onClose:a,trans:n}=e,[o,s]=w.useState([]),[i,r]=w.useState(null);return w.useEffect((()=>{async function e(){s(await Promise.all(t.notifications.map((async e=>Object.freeze({...e})))))}return o.length!==t.count&&e(),t.changed.connect(e),()=>{t.changed.disconnect(e)}}),[t]),w.useEffect((()=>{E.getIcons().then((e=>{r(e)})).catch((e=>{console.error(`Failed to get react-toastify icons:\n${e}`)}))}),[]),w.createElement(c.UseSignal,{signal:t.changed},(()=>w.createElement(w.Fragment,null,w.createElement("h2",{className:"jp-Notification-Header jp-Toolbar"},w.createElement("span",{className:"jp-Toolbar-item"},t.count>0?n._n("%1 notification","%1 notifications",t.count):n.__("No notifications")),w.createElement("span",{className:"jp-Toolbar-item jp-Toolbar-spacer"}),w.createElement(c.ToolbarButtonComponent,{noFocusOnClick:!1,onClick:()=>{t.dismiss()},icon:c.deleteIcon,tooltip:n.__("Dismiss all notifications"),enabled:t.count>0}),w.createElement(c.ToolbarButtonComponent,{noFocusOnClick:!1,onClick:a,icon:c.closeIcon,tooltip:n.__("Hide notifications")})),w.createElement("ol",{className:"jp-Notification-List"},o.map((e=>{var a;const{id:o,message:s,type:r,options:l}=e,d="in-progress"===r?"default":r,u=()=>{t.dismiss(o)},m="default"===r?null:"in-progress"===r?null!==(a=null==i?void 0:i.spinner)&&void 0!==a?a:null:i&&i[r];return w.createElement("li",{className:"jp-Notification-List-Item",key:e.id,onClick:e=>{e.stopPropagation()}},w.createElement("div",{className:`Toastify__toast Toastify__toast-theme--light Toastify__toast--${d} jp-Notification-Toast-${d}`},w.createElement("div",{className:"Toastify__toast-body"},m&&w.createElement("div",{className:"Toastify__toast-icon"},m({theme:"light",type:d})),w.createElement("div",null,E.createContent(s,u,l.actions))),w.createElement(E.CloseButton,{close:u,closeIcon:c.deleteIcon.react,title:n.__("Dismiss notification"),closeIconMargin:!0})))}))))))}!function(e){e.dismiss="apputils:dismiss-notification",e.display="apputils:display-notifications",e.notify="apputils:notify",e.update="apputils:update-notification"}(y||(y={}));class S extends c.VDomModel{constructor(e){super(),this.manager=e,this._highlight=!1,this._listOpened=!1,this._doNotDisturbMode=!1,this._count=e.count,this.manager.changed.connect(this.onNotificationChanged,this)}get count(){return this._count}get doNotDisturbMode(){return this._doNotDisturbMode}set doNotDisturbMode(e){this._doNotDisturbMode=e}get highlight(){return this._highlight}get listOpened(){return this._listOpened}set listOpened(e){this._listOpened=e,(this._listOpened||this._highlight)&&(this._highlight=!1),this.stateChanged.emit()}onNotificationChanged(e,t){this._count=this.manager.count;const{autoClose:a}=t.notification.options,n=this.doNotDisturbMode||"number"==typeof a&&a<=0;!this._listOpened&&"removed"!==t.type&&n&&(this._highlight=!0),this.stateChanged.emit()}}function T(e){return w.createElement(v.GroupItem,{spacing:4,onClick:()=>{e.onClick()},title:e.count>0?e.trans._n("%1 notification","%1 notifications",e.count):e.trans.__("No notifications")},w.createElement(v.TextItem,{className:"jp-Notification-Status-Text",source:`${e.count}`}),w.createElement(c.bellIcon.react,{top:"2px",stylesheet:"statusBar"}))}const j={id:"@jupyterlab/apputils-extension:notification",description:"Add the notification center and its status indicator.",autoStart:!0,optional:[v.IStatusBar,i.ISettingRegistry,l.ITranslator],activate:(e,t,a,n)=>{E.translator=null!=n?n:l.nullTranslator;const s=E.translator.load("jupyterlab"),i=new S(o.Notification.manager);i.doNotDisturbMode=!1,a&&Promise.all([a.load(j.id),e.restored]).then((([e])=>{const t=()=>{i.doNotDisturbMode=e.get("doNotDisturbMode").composite};t(),e.changed.connect(t)})),e.commands.addCommand(y.notify,{label:s.__("Emit a notification"),caption:s.__("Notification is described by {message: string, type?: string, options?: {autoClose?: number | false, actions: {label: string, commandId: string, args?: ReadOnlyJSONObject, caption?: string, className?: string}[], data?: ReadOnlyJSONValue}}."),execute:t=>{var a;const{message:n,type:s}=t,i=null!==(a=t.options)&&void 0!==a?a:{};return o.Notification.manager.notify(n,null!=s?s:"default",{...i,actions:i.actions?i.actions.map((t=>({...t,callback:()=>{e.commands.execute(t.commandId,t.args).catch((e=>{console.error(`Failed to executed '${t.commandId}':\n${e}`)}))}}))):null})}}),e.commands.addCommand(y.update,{label:s.__("Update a notification"),caption:s.__("Notification is described by {id: string, message: string, type?: string, options?: {autoClose?: number | false, actions: {label: string, commandId: string, args?: ReadOnlyJSONObject, caption?: string, className?: string}[], data?: ReadOnlyJSONValue}}."),execute:t=>{const{id:a,message:n,type:s,...i}=t;return o.Notification.manager.update({id:a,message:n,type:null!=s?s:"default",...i,actions:i.actions?i.actions.map((t=>({...t,callback:()=>{e.commands.execute(t.commandId,t.args).catch((e=>{console.error(`Failed to executed '${t.commandId}':\n${e}`)}))}}))):null})}}),e.commands.addCommand(y.dismiss,{label:s.__("Dismiss a notification"),execute:e=>{const{id:t}=e;o.Notification.manager.dismiss(t)}});let r=null;i.listOpened=!1;const d=o.ReactWidget.create(w.createElement(C,{manager:o.Notification.manager,onClose:()=>{null==r||r.dispose()},trans:s}));d.addClass("jp-Notification-Center"),o.Notification.manager.changed.connect((async function(e,t){var a;if(i.doNotDisturbMode||null!==r&&!r.isDisposed)return;const{message:n,type:o,options:s,id:l}=t.notification;if(!("number"==typeof s.autoClose&&s.autoClose<=0))switch(t.type){case"added":await E.createToast(l,n,o,s);break;case"updated":{const t=await E.toast(),i=s.actions,r=null!==(a=s.autoClose)&&void 0!==a?a:!(i&&i.length>0)&&null;if(t.isActive(l)){const a=()=>{t.dismiss(l),e.dismiss(l)};t.update(l,{type:"in-progress"===o?null:o,isLoading:"in-progress"===o,autoClose:r,render:E.createContent(n,a,s.actions)})}else await E.createToast(l,n,o,s)}break;case"removed":await E.toast().then((e=>{e.dismiss(l)}))}}));const u=()=>{r?(r.dispose(),r=null):(r=(0,v.showPopup)({body:d,anchor:m,align:"right",hasDynamicSize:!0,startHidden:!0}),E.toast().then((e=>{e.dismiss()})).catch((e=>{console.error(`Failed to dismiss all toasts:\n${e}`)})).finally((()=>{null==r||r.launch(),d.node.focus(),null==r||r.disposed.connect((()=>{i.listOpened=!1,r=null}))}))),i.listOpened=null!==r};e.commands.addCommand(y.display,{label:s.__("Show Notifications"),execute:u});const m=o.ReactWidget.create(w.createElement(c.UseSignal,{signal:i.stateChanged},(()=>(i.highlight||r&&!r.isDisposed?m.addClass("jp-mod-selected"):m.removeClass("jp-mod-selected"),w.createElement(T,{count:i.count,highlight:i.highlight,trans:s,onClick:u})))));m.addClass("jp-Notification-Status"),t?t.registerStatusItem(j.id,{item:m,align:"right",rank:-1}):(m.addClass("jp-ThemedContainer"),m.node.style.position="fixed",m.node.style.bottom="0",m.node.style.right="10px",_.Widget.attach(m,document.body),m.show())}};var E;!function(e){e.translator=l.nullTranslator;let t=null;function n(e){var t;return w.createElement("button",{className:"jp-Button jp-mod-minimal jp-Notification-Toast-Close"+(e.closeIconMargin?" jp-Notification-Toast-Close-Margin":""),title:null!==(t=e.title)&&void 0!==t?t:"",onClick:e.close},w.createElement(e.closeIcon,{className:"jp-icon-hover",tag:"span"}))}function s(t){const a=e.translator.load("jupyterlab");return w.createElement(n,{close:t.closeToast,closeIcon:c.closeIcon.react,title:a.__("Hide notification")})}e.CloseButton=n;let i=null;async function r(){if(null===i?i=new d.PromiseDelegate:await i.promise,null===t){t=await a.e(53).then(a.t.bind(a,60053,23));const e=document.body.appendChild(document.createElement("div"));e.id="react-toastify-container",e.classList.add("jp-ThemedContainer"),(0,k.s)(e).render(w.createElement(t.ToastContainer,{draggable:!1,closeOnClick:!1,hideProgressBar:!0,newestOnTop:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,position:"bottom-right",className:"jp-toastContainer",transition:t.Slide,closeButton:s})),i.resolve()}return t.toast}e.toast=r,e.getIcons=async function(){return null===t&&await r(),t.Icons};const u={accent:"jp-mod-accept",link:"jp-mod-link",warn:"jp-mod-warn",default:""};function m({action:e,closeToast:t}){var a,n;const o=["jp-toast-button",u[null!==(a=e.displayType)&&void 0!==a?a:"default"]].join(" ");return w.createElement(c.Button,{title:null!==(n=e.caption)&&void 0!==n?n:e.label,className:o,onClick:a=>{e.callback(a),a.defaultPrevented||t()},small:!0},e.label)}function p(e,t,a){var n;const o=e.length>140?e.slice(0,140)+"…":e;return w.createElement(w.Fragment,null,w.createElement("div",{className:"jp-toast-message"},o.split("\n").map(((e,t)=>w.createElement(w.Fragment,{key:`part-${t}`},t>0?w.createElement("br",null):null,e)))),(null!==(n=null==a?void 0:a.length)&&void 0!==n?n:0)>0&&w.createElement("div",{className:"jp-toast-buttonBar"},w.createElement("div",{className:"jp-toast-spacer"}),a.map(((e,a)=>w.createElement(m,{key:"button-"+a,action:e,closeToast:t})))))}e.createContent=p,e.createToast=async function(e,t,a,n={}){const{actions:s,autoClose:i,data:l}=n;return(await r())((({closeToast:a})=>p(t,(()=>{a&&a(),o.Notification.manager.dismiss(e)}),s)),{autoClose:null!=i?i:!(s&&s.length>0)&&void 0,data:l,className:`jp-Notification-Toast-${a}`,toastId:e,type:"in-progress"===a?null:a,isLoading:"in-progress"===a})}}(E||(E={}));var I,x,N=a(14931),P=a(86072);!function(e){e.activate="apputils:activate-command-palette"}(I||(I={}));class F{constructor(e,t){this.translator=t||l.nullTranslator;const a=this.translator.load("jupyterlab");this._palette=e,this._palette.title.label="",this._palette.title.caption=a.__("Command Palette")}set placeholder(e){this._palette.inputNode.placeholder=e}get placeholder(){return this._palette.inputNode.placeholder}activate(){this._palette.activate()}addItem(e){const t=this._palette.addItem(e);return new u.DisposableDelegate((()=>{this._palette.removeItem(t)}))}}!function(e){e.activate=function(t,a,n){const{commands:s,shell:i}=t,r=a.load("jupyterlab"),l=x.createPalette(t,a),c=new o.ModalCommandPalette({commandPalette:l});let d=!1;if(l.node.setAttribute("role","region"),l.node.setAttribute("aria-label",r.__("Command Palette Section")),i.add(l,"left",{rank:300,type:"Command Palette"}),n){const e=n.load("@jupyterlab/apputils-extension:palette"),a=e=>{const t=e.get("modal").composite;d&&!t?(l.parent=null,c.detach(),i.add(l,"left",{rank:300,type:"Command Palette"})):!d&&t&&(l.parent=null,c.palette=l,l.show(),c.attach()),d=t};Promise.all([e,t.restored]).then((([e])=>{a(e),e.changed.connect((e=>{a(e)}))})).catch((e=>{console.error(e.message)}))}const u=()=>{const e=(0,N.find)(t.commands.keyBindings,(e=>e.command===I.activate));if(e){const t=e.keys.map(P.CommandRegistry.formatKeystroke).join(", ");l.title.caption=r.__("Commands (%1)",t)}else l.title.caption=r.__("Commands")};return u(),t.commands.keyBindingChanged.connect((()=>{u()})),s.addCommand(I.activate,{execute:()=>{d?c.activate():i.activateById(l.id)},label:r.__("Activate Command Palette")}),l.inputNode.placeholder=r.__("SEARCH"),new e(l,a)},e.restore=function(e,t,a){const n=x.createPalette(e,a);t.add(n,"command-palette")}}(F||(F={})),function(e){let t;e.createPalette=function(e,a){if(!t){t=new _.CommandPalette({commands:e.commands,renderer:c.CommandPaletteSvg.defaultRenderer}),t.id="command-palette",t.title.icon=c.paletteIcon;const n=a.load("jupyterlab");t.title.label=n.__("Commands")}return t}}(x||(x={}));class D extends r.DataConnector{constructor(e){super(),this._throttlers=Object.create(null),this._connector=e}fetch(e){const t=this._throttlers;return e in t||(t[e]=new m.Throttler((()=>this._connector.fetch(e)),100)),t[e].invoke()}async list(e="all"){const{isDisabled:t}=s.PageConfig.Extension,{ids:a,values:n}=await this._connector.list("ids"===e?"ids":void 0);return"all"===e?{ids:a,values:n}:"ids"===e?{ids:a}:{ids:a.filter((e=>!t(e))),values:n.filter((({id:e})=>!t(e)))}}async save(e,t){await this._connector.save(e,t)}}const R={id:"@jupyterlab/apputils-extension:settings",description:"Provides the setting registry.",activate:async e=>{const{isDisabled:t}=s.PageConfig.Extension,a=new D(e.serviceManager.settings),n=new i.SettingRegistry({connector:a,plugins:(await a.list("active")).values.filter((t=>e.hasPlugin(t.id)))});return e.restored.then((async()=>{(await a.list("ids")).ids.forEach((async a=>{if(e.hasPlugin(a)&&!t(a)&&!(a in n.plugins))try{await n.load(a)}catch(t){console.warn(`Settings failed to load for (${a})`,t),e.isPluginActivated(a)||console.warn(`If 'jupyter.lab.transform=true' in the plugin schema, this may happen if {autoStart: false} in (${a}) or if it is one of the deferredExtensions in page config.`)}}))})),n},autoStart:!0,provides:i.ISettingRegistry},A={id:"@jupyterlab/apputils-extension:kernel-status",description:"Provides the kernel status indicator model.",autoStart:!0,requires:[v.IStatusBar],provides:o.IKernelStatusModel,optional:[o.ISessionContextDialogs,l.ITranslator,n.ILabShell],activate:(e,t,a,n,s)=>{const i=null!=n?n:l.nullTranslator,r=null!=a?a:new o.SessionContextDialogs({translator:i}),c=async()=>{d.model.sessionContext&&await r.selectKernel(d.model.sessionContext)},d=new o.KernelStatus({onClick:c,onKeyDown:async e=>{if("Enter"===e.key||"Spacebar"===e.key||" "===e.key)return e.preventDefault(),e.stopPropagation(),c()}},i),u=new Set;function m(e,t){var a;const{oldValue:n,newValue:o}=t;n&&n.title.changed.disconnect(p),d.model.sessionContext=null!==(a=[...u].map((e=>e(t.newValue))).filter((e=>null!==e))[0])&&void 0!==a?a:null,o&&d.model.sessionContext&&(p(o.title),o.title.changed.connect(p))}const p=e=>{d.model.activityName=e.label};return s&&s.currentChanged.connect(m),t.registerStatusItem(A.id,{priority:1,item:d,align:"left",rank:1,isActive:()=>null!==d.model.sessionContext}),{addSessionProvider:t=>{u.add(t),e.shell.currentWidget&&m(e.shell,{newValue:e.shell.currentWidget,oldValue:null})}}}},L={id:"@jupyterlab/apputils-extension:running-sessions-status",description:"Add the running sessions and terminals status bar item.",autoStart:!0,requires:[v.IStatusBar,l.ITranslator],activate:(e,t,a)=>{const n=new o.RunningSessions({onClick:()=>e.shell.activateById("jp-running-sessions"),onKeyDown:t=>{"Enter"!==t.key&&"Spacebar"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),e.shell.activateById("jp-running-sessions"))},serviceManager:e.serviceManager,translator:a});n.model.sessions=Array.from(e.serviceManager.sessions.running()).length,n.model.terminals=Array.from(e.serviceManager.terminals.running()).length,t.registerStatusItem(L.id,{item:n,align:"left",rank:0})}};var M,O=a(70607);!function(e){e.changeTheme="apputils:change-theme",e.changePreferredLightTheme="apputils:change-light-theme",e.changePreferredDarkTheme="apputils:change-dark-theme",e.toggleAdaptiveTheme="apputils:adaptive-theme",e.themeScrollbars="apputils:theme-scrollbars",e.changeFont="apputils:change-font",e.incrFontSize="apputils:incr-font-size",e.decrFontSize="apputils:decr-font-size"}(M||(M={}));const z={id:"@jupyterlab/apputils-extension:themes",description:"Provides the theme manager.",requires:[i.ISettingRegistry,n.JupyterFrontEnd.IPaths,l.ITranslator],optional:[o.ISplashScreen],activate:(e,t,a,n,i)=>{const r=n.load("jupyterlab"),l=e.shell,c=e.commands,d=s.URLExt.join(s.PageConfig.getBaseUrl(),a.urls.themes),u=z.id,m=new o.ThemeManager({key:u,host:l,settings:t,splash:null!=i?i:void 0,url:d});let p,h=null;return m.themeChanged.connect(((e,t)=>{p=t.newValue,document.body.dataset.jpThemeLight=String(m.isLight(p)),document.body.dataset.jpThemeName=p,document.body.style.colorScheme=m.isLight(p)?"light":"dark",document.body.dataset.jpThemeScrollbars!==String(m.themeScrollbars(p))&&(document.body.dataset.jpThemeScrollbars=String(m.themeScrollbars(p)),m.themeScrollbars(p)?(h||(h=function(e){const t=document.createElement("style");return t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/*\n * Webkit scrollbar styling.\n * Separate file which is dynamically loaded based on user/theme settings.\n */\n\n/* use standard opaque scrollbars for most nodes */\n\n::-webkit-scrollbar,\n::-webkit-scrollbar-corner {\n background: var(--jp-scrollbar-background-color);\n}\n\n::-webkit-scrollbar-thumb {\n background: rgb(var(--jp-scrollbar-thumb-color));\n border: var(--jp-scrollbar-thumb-margin) solid transparent;\n background-clip: content-box;\n border-radius: var(--jp-scrollbar-thumb-radius);\n}\n\n::-webkit-scrollbar-track:horizontal {\n border-left: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n border-right: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n}\n\n::-webkit-scrollbar-track:vertical {\n border-top: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n border-bottom: var(--jp-scrollbar-endpad) solid\n var(--jp-scrollbar-background-color);\n}\n\n/* for code nodes, use a transparent style of scrollbar */\n\n.CodeMirror-hscrollbar::-webkit-scrollbar,\n.CodeMirror-vscrollbar::-webkit-scrollbar,\n.CodeMirror-hscrollbar::-webkit-scrollbar-corner,\n.CodeMirror-vscrollbar::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.CodeMirror-hscrollbar::-webkit-scrollbar-thumb,\n.CodeMirror-vscrollbar::-webkit-scrollbar-thumb {\n background: rgba(var(--jp-scrollbar-thumb-color), 0.5);\n border: var(--jp-scrollbar-thumb-margin) solid transparent;\n background-clip: content-box;\n border-radius: var(--jp-scrollbar-thumb-radius);\n}\n\n.CodeMirror-hscrollbar::-webkit-scrollbar-track:horizontal {\n border-left: var(--jp-scrollbar-endpad) solid transparent;\n border-right: var(--jp-scrollbar-endpad) solid transparent;\n}\n\n.CodeMirror-vscrollbar::-webkit-scrollbar-track:vertical {\n border-top: var(--jp-scrollbar-endpad) solid transparent;\n border-bottom: var(--jp-scrollbar-endpad) solid transparent;\n}\n")),t}()),h.parentElement||document.body.appendChild(h)):h&&h.parentElement&&h.parentElement.removeChild(h)),c.notifyCommandChanged(M.changeTheme)})),c.addCommand(M.changeTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Use Theme: %1",a):a},isToggled:e=>e.theme===p,execute:e=>{const t=e.theme;if(t!==m.theme)return m.isToggledAdaptiveTheme()?m.toggleAdaptiveTheme():m.setTheme(t)}}),c.addCommand(M.changePreferredLightTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided light `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Set Preferred Light Theme: %1",a):a},isToggled:e=>e.theme===m.preferredLightTheme,execute:e=>{const t=e.theme;if(t!==m.preferredLightTheme)return m.setPreferredLightTheme(t)}}),c.addCommand(M.changePreferredDarkTheme,{label:e=>{if(void 0===e.theme)return r.__("Switch to the provided dark `theme`.");const t=e.theme,a=m.getDisplayName(t);return e.isPalette?r.__("Set Preferred Dark Theme: %1",a):a},isToggled:e=>e.theme===m.preferredDarkTheme,execute:e=>{const t=e.theme;if(t!==m.preferredDarkTheme)return m.setPreferredDarkTheme(t)}}),c.addCommand(M.toggleAdaptiveTheme,{label:e=>e.isPalette?r.__("Synchronize Styling Theme with System Settings"):r.__("Synchronize with System Settings"),isToggled:()=>m.isToggledAdaptiveTheme(),execute:()=>{m.toggleAdaptiveTheme().catch(console.warn)}}),c.addCommand(M.themeScrollbars,{label:r.__("Theme Scrollbars"),isToggled:()=>m.isToggledThemeScrollbars(),execute:()=>m.toggleThemeScrollbars()}),c.addCommand(M.changeFont,{label:e=>e.enabled?`${e.font}`:r.__("waiting for fonts"),isEnabled:e=>e.enabled,isToggled:e=>m.getCSS(e.key)===e.font,execute:e=>m.setCSSOverride(e.key,e.font)}),c.addCommand(M.incrFontSize,{label:e=>{switch(e.key){case"code-font-size":return r.__("Increase Code Font Size");case"content-font-size1":return r.__("Increase Content Font Size");case"ui-font-size1":return r.__("Increase UI Font Size");default:return r.__("Increase Font Size")}},execute:e=>m.incrFontSize(e.key)}),c.addCommand(M.decrFontSize,{label:e=>{switch(e.key){case"code-font-size":return r.__("Decrease Code Font Size");case"content-font-size1":return r.__("Decrease Content Font Size");case"ui-font-size1":return r.__("Decrease UI Font Size");default:return r.__("Decrease Font Size")}},execute:e=>m.decrFontSize(e.key)}),m},autoStart:!0,provides:o.IThemeManager},$={id:"@jupyterlab/apputils-extension:themes-palette-menu",description:"Adds theme commands to the menu and the command palette.",requires:[o.IThemeManager,l.ITranslator],optional:[o.ICommandPalette,O.IMainMenu],activate:(e,t,a,n,o)=>{const s=a.load("jupyterlab");o&&e.restored.then((()=>{var e;const a=null===(e=o.settingsMenu.items.find((e=>{var t;return"submenu"===e.type&&"jp-mainmenu-settings-apputilstheme"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===e?void 0:e.submenu;a&&t.themes.forEach(((e,t)=>{a.insertItem(t,{command:M.changeTheme,args:{isPalette:!1,theme:e}})}))})),n&&e.restored.then((()=>{const e=s.__("Theme"),a=M.changeTheme,o=!0;t.themes.forEach((t=>{n.addItem({command:a,args:{isPalette:o,theme:t},category:e})})),t.themes.forEach((t=>{n.addItem({command:M.changePreferredLightTheme,args:{isPalette:o,theme:t},category:e})})),t.themes.forEach((t=>{n.addItem({command:M.changePreferredDarkTheme,args:{isPalette:o,theme:t},category:e})})),n.addItem({command:M.toggleAdaptiveTheme,args:{isPalette:o},category:e}),n.addItem({command:M.themeScrollbars,category:e}),n.addItem({command:M.incrFontSize,args:{key:"code-font-size"},category:e}),n.addItem({command:M.decrFontSize,args:{key:"code-font-size"},category:e}),n.addItem({command:M.incrFontSize,args:{key:"content-font-size1"},category:e}),n.addItem({command:M.decrFontSize,args:{key:"content-font-size1"},category:e}),n.addItem({command:M.incrFontSize,args:{key:"ui-font-size1"},category:e}),n.addItem({command:M.decrFontSize,args:{key:"ui-font-size1"},category:e})}))},autoStart:!0},W={id:"@jupyterlab/apputils-extension:toolbar-registry",description:"Provides toolbar items registry.",autoStart:!0,provides:o.IToolbarWidgetRegistry,activate:e=>new o.ToolbarWidgetRegistry({defaultFactory:(0,o.createDefaultFactory)(e.commands)})};var U=a(23764),B=a(24470);const H="jupyterlab-workspace",q="."+H,J={id:"@jupyterlab/apputils-extension:workspaces",description:"Add workspace file type.",autoStart:!0,requires:[r.IStateDB,l.ITranslator,n.JupyterFrontEnd.IPaths],optional:[n.IRouter,B.IWorkspaceCommands],activate:(e,t,a,n,o,i)=>{const r=new K.WorkspaceFactory({workspaces:e.serviceManager.workspaces,state:t,translator:a,open:async t=>{if(i)await e.commands.execute(i.open,{workspace:t});else{const e=s.URLExt.join(n.urls.app,"workspaces"),a=s.URLExt.join(e,t);if(!a.startsWith(e))throw new Error("Can only be used for workspaces");o?o.navigate(a,{hard:!0}):document.location.href=a}}}),l=a.load("jupyterlab");e.docRegistry.addFileType({name:H,contentType:"file",fileFormat:"text",displayName:l.__("JupyterLab Workspace File"),extensions:[q],mimeTypes:["text/json"],iconClass:"jp-JupyterIcon"}),e.docRegistry.addWidgetFactory(r)}};var K;!function(e){class t extends U.ABCWidgetFactory{constructor(e){super({name:"Workspace loader",label:(e.translator||l.nullTranslator).load("jupyterlab").__("Workspace loader"),fileTypes:[H],defaultFor:[H],readOnly:!0}),this._state=e.state,this._workspaces=e.workspaces,this._open=e.open}createNewWidget(e){return e.ready.then((async()=>{const t=e.model.toJSON(),a=e.path,n=t.metadata.id;await this._workspaces.save(n,t),await this._state.save("workspace-ui:lastSave",a),await this._open(n)})),function(e){const t=new U.DocumentWidget({content:new _.Widget,context:e});return t.content.dispose(),t}(e)}}e.WorkspaceFactory=t}(K||(K={}));var V=a(47392);const Q="jp-ContextualShortcut-TableItem";var Y;!function(e){e.loadState="apputils:load-statedb",e.print="apputils:print",e.reset="apputils:reset",e.resetOnLoad="apputils:reset-on-load",e.runFirstEnabled="apputils:run-first-enabled",e.runAllEnabled="apputils:run-all-enabled",e.toggleHeader="apputils:toggle-header",e.displayShortcuts="apputils:display-shortcuts"}(Y||(Y={}));const G={id:"@jupyterlab/apputils-extension:palette",description:"Provides the command palette.",autoStart:!0,requires:[l.ITranslator],provides:o.ICommandPalette,optional:[i.ISettingRegistry],activate:(e,t,a)=>F.activate(e,t,a)},X={id:"@jupyterlab/apputils-extension:palette-restorer",description:"Restores the command palette.",autoStart:!0,requires:[n.ILayoutRestorer,l.ITranslator],activate:(e,t,a)=>{F.restore(e,t,a)}},Z={id:"@jupyterlab/apputils-extension:resolver",description:"Provides the window name resolver.",autoStart:!0,provides:o.IWindowResolver,requires:[n.JupyterFrontEnd.IPaths,n.IRouter],activate:async(e,t,a)=>{const{hash:n,search:i}=a.current,r=s.URLExt.queryStringToObject(i||""),l=new o.WindowResolver,c=s.PageConfig.getOption("workspace"),d=s.PageConfig.getOption("treePath"),u="multiple-document"===s.PageConfig.getOption("mode")?"lab":"doc",m=c||s.PageConfig.defaultWorkspace,p=d?s.URLExt.join("tree",d):"";try{return await l.resolve(m),l}catch(e){return new Promise((()=>{const{base:e}=t.urls,o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.floor(62*Math.random())];let i=s.URLExt.join(e,u,"workspaces",`auto-${o}`);i=p?s.URLExt.join(i,s.URLExt.encodeParts(p)):i,r.reset="";const l=i+s.URLExt.objectToQueryString(r)+(n||"");a.navigate(l,{hard:!0})}))}}},ee={id:"@jupyterlab/apputils-extension:splash",description:"Provides the splash screen.",autoStart:!0,requires:[l.ITranslator],provides:o.ISplashScreen,activate:(e,t)=>{const a=t.load("jupyterlab"),{commands:n,restored:s}=e,i=document.createElement("div"),r=document.createElement("div"),l=document.createElement("div");let d;i.id="jupyterlab-splash",r.id="galaxy",l.id="main-logo",c.jupyterFaviconIcon.element({container:l,stylesheet:"splash"}),r.appendChild(l),["1","2","3"].forEach((e=>{const t=document.createElement("div"),a=document.createElement("div");t.id=`moon${e}`,t.className="moon orbit",a.id=`planet${e}`,a.className="planet",t.appendChild(a),r.appendChild(t)})),i.appendChild(r);const p=new m.Throttler((async()=>{if(!d){d=new o.Dialog({title:a.__("Loading…"),body:a.__("The loading screen is taking a long time.\nWould you like to clear the workspace or keep waiting?"),buttons:[o.Dialog.cancelButton({label:a.__("Keep Waiting")}),o.Dialog.warnButton({label:a.__("Clear Workspace")})]});try{const e=await d.launch();if(d.dispose(),d=null,e.button.accept&&n.hasCommand(Y.reset))return n.execute(Y.reset);requestAnimationFrame((()=>{p.invoke().catch((e=>{}))}))}catch(e){}}}),{limit:12e3,edge:"trailing"});let h=0;return{show:(e=!0)=>(i.classList.remove("splash-fade"),i.classList.toggle("light",e),i.classList.toggle("dark",!e),h++,document.body.appendChild(i),p.invoke().catch((e=>{})),new u.DisposableDelegate((async()=>{await s,0==--h&&(p.stop(),d&&(d.dispose(),d=null),i.classList.add("splash-fade"),window.setTimeout((()=>{document.body.removeChild(i)}),200))})))}}},te={id:"@jupyterlab/apputils-extension:print",description:"Add the print capability",autoStart:!0,requires:[l.ITranslator],activate:(e,t)=>{var a;const n=t.load("jupyterlab");e.commands.addCommand(Y.print,{label:n.__("Print…"),isEnabled:()=>{const t=e.shell.currentWidget;return null!==o.Printing.getPrintFunction(t)},execute:async()=>{const t=e.shell.currentWidget,a=o.Printing.getPrintFunction(t);a&&await a()}}),null===(a=e.shell.currentChanged)||void 0===a||a.connect((()=>{e.commands.notifyCommandChanged(Y.print)}))}},ae={id:"@jupyterlab/apputils-extension:toggle-header",description:"Adds a command to display the main area widget content header.",autoStart:!0,requires:[l.ITranslator],optional:[o.ICommandPalette],activate:(e,t,a)=>{var n;const s=t.load("jupyterlab"),i=s.__("Main Area");e.commands.addCommand(Y.toggleHeader,{label:s.__("Show Header Above Content"),isEnabled:()=>e.shell.currentWidget instanceof o.MainAreaWidget&&!e.shell.currentWidget.contentHeader.isDisposed&&e.shell.currentWidget.contentHeader.widgets.length>0,isToggled:()=>{const t=e.shell.currentWidget;return t instanceof o.MainAreaWidget&&!t.contentHeader.isHidden},execute:async()=>{const t=e.shell.currentWidget;t instanceof o.MainAreaWidget&&t.contentHeader.setHidden(!t.contentHeader.isHidden)}}),null===(n=e.shell.currentChanged)||void 0===n||n.connect((()=>{e.commands.notifyCommandChanged(Y.toggleHeader)})),a&&a.addItem({command:Y.toggleHeader,category:i})}},ne={id:"@jupyterlab/apputils-extension:state",description:"Provides the application state. It is stored per workspaces.",autoStart:!0,provides:r.IStateDB,requires:[n.JupyterFrontEnd.IPaths,n.IRouter,l.ITranslator],optional:[o.IWindowResolver],activate:(e,t,a,n,o)=>{const i=n.load("jupyterlab");if(null===o)return new r.StateDB;let l=!1;const{commands:c,name:u,serviceManager:p}=e,{workspaces:h}=p,g=o.name,b=new d.PromiseDelegate,f=new r.StateDB({transform:b.promise}),y=new m.Debouncer((async()=>{const e=g,t={id:e},a=await f.toJSON();await h.save(e,{data:a,metadata:t})}));return f.changed.connect((()=>{y.invoke()}),f),f.changed.connect((()=>async function(e,t,a){var n,o;const i=await t.toJSON();if(void 0===(null===(o=null===(n=i["layout-restorer:data"])||void 0===n?void 0:n.main)||void 0===o?void 0:o.current))document.title=`${s.PageConfig.getOption("appName")||"JupyterLab"}${e.startsWith("auto-")?` (${e})`:""}`;else{let t=s.PathExt.basename(decodeURIComponent(window.location.href));t=t.length>15?t.slice(0,12).concat("…"):t;const n=Object.keys(i).filter((e=>e.startsWith("notebook")||e.startsWith("editor"))).length;e.startsWith("auto-")?document.title=`${t} (${e}${n>1?` : ${n}`:""}) - ${a}`:document.title=`${t}${n>1?` (${n})`:""} - ${a}`}}(g,f,u))),c.addCommand(Y.loadState,{label:i.__("Load state for the current workspace."),execute:async e=>{if(l)return;const{hash:t,path:n,search:o}=e,i=s.URLExt.queryStringToObject(o||""),r="string"==typeof i.clone?""===i.clone?s.PageConfig.defaultWorkspace:i.clone:null,c=r||g||null;if(null!==c){try{const e=await h.fetch(c);l||(l=!0,b.resolve({type:"overwrite",contents:e.data}))}catch({message:e}){console.warn(`Fetching workspace "${g}" failed.`,e),l||(l=!0,b.resolve({type:"cancel",contents:null}))}if(c===r){delete i.clone;const e=n+s.URLExt.objectToQueryString(i)+t,o=y.invoke().then((()=>a.stop));return o.then((()=>{a.navigate(e)})),o}await y.invoke()}else console.error(`${Y.loadState} cannot load null workspace.`)}}),c.addCommand(Y.reset,{label:i.__("Reset Application State"),execute:async({reload:e})=>{await f.clear(),await y.invoke(),e&&a.reload()}}),c.addCommand(Y.resetOnLoad,{label:i.__("Reset state when loading for the workspace."),execute:e=>{const{hash:t,path:n,search:o}=e,i=s.URLExt.queryStringToObject(o||""),r="clone"in i;if(!("reset"in i))return;if(l)return a.reload();l=!0,b.resolve({type:"clear",contents:null}),delete i.reset;const c=n+s.URLExt.objectToQueryString(i)+t,d=f.clear().then((()=>y.invoke()));return r?d.then((()=>{a.navigate(c,{hard:!0})})):d.then((()=>{a.navigate(c)})),d}}),a.register({command:Y.loadState,pattern:/.?/,rank:30}),a.register({command:Y.resetOnLoad,pattern:/(\?reset|\&reset)($|&)/,rank:20}),f}},oe={id:"@jupyterlab/apputils-extension:sessionDialogs",description:"Provides the session context dialogs.",provides:o.ISessionContextDialogs,optional:[l.ITranslator,i.ISettingRegistry],autoStart:!0,activate:async(e,t,a)=>new o.SessionContextDialogs({translator:null!=t?t:l.nullTranslator,settingRegistry:null!=a?a:null})},se={id:"@jupyterlab/apputils-extension:utilityCommands",description:"Adds meta commands to run set of other commands.",requires:[l.ITranslator],optional:[o.ICommandPalette],autoStart:!0,activate:(e,t,a)=>{const n=t.load("jupyterlab"),{commands:s}=e;if(s.addCommand(Y.runFirstEnabled,{label:n.__("Run First Enabled Command"),execute:t=>{const a=t.commands,n=t.args,o=Array.isArray(t);for(let t=0;t<a.length;t++){const s=a[t],i=o?n[t]:n;if(e.commands.isEnabled(s,i))return e.commands.execute(s,i)}}}),s.addCommand(Y.runAllEnabled,{label:n.__("Run All Enabled Commands Passed as Args"),execute:async t=>{var a,n;const o=null!==(a=t.commands)&&void 0!==a?a:[],s=t.args,i=Array.isArray(t),r=null!==(n=t.errorIfNotEnabled)&&void 0!==n&&n;for(let t=0;t<o.length;t++){const a=o[t],n=i?s[t]:s;e.commands.isEnabled(a,n)?await e.commands.execute(a,n):r&&console.error(`${a} is not enabled.`)}},isEnabled:t=>{var a;const n=null!==(a=t.commands)&&void 0!==a?a:[],o=t.args,s=Array.isArray(t);return n.some(((t,a)=>e.commands.isEnabled(t,s?o[a]:o)))}}),s.addCommand(Y.displayShortcuts,{label:n.__("Show Keyboard Shortcuts…"),caption:n.__("Show relevant keyboard shortcuts for the current active widget"),execute:t=>{var a;const i=e.shell.currentWidget;if(!(null==i?void 0:i.node.contains(document.activeElement))&&i instanceof o.MainAreaWidget){const e=null!==(a=i.content.node)&&void 0!==a?a:null==i?void 0:i.node;null==e||e.focus()}return function(e){const{commands:t,trans:a,activeElement:n}=e,s=null!=n?n:document.activeElement;function i(e){const t=[];return e.forEach(((e,a)=>{const n=[];e.split(" ").forEach(((e,t)=>{n.push(w.createElement("span",{className:"jp-ContextualShortcut-Key",key:`ch-${t}`},w.createElement("kbd",null,e)),w.createElement(w.Fragment,{key:`fragment-${t}`}," + "))})),t.push(w.createElement("span",{key:`key-${a}`},n.slice(0,-1)),w.createElement(w.Fragment,{key:`fragment-${a}`}," + "))})),w.createElement("span",null,t.slice(0,-1))}function r(e){const a=t.label(e.command),n=e.command.split(":")[1].split("-");let o="";for(let e=0;e<n.length;e++)o=o+" "+((s=n[e]).charAt(0).toUpperCase()+s.slice(1));var s;return a.length>0?a:o}function l(e,t){let a=t;for(let t=0;null!==a&&a!==a.parentElement;a=a.parentElement,++t){if(a.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(a.matches(e))return t}return-1}const c=new Map;for(let e=0;e<t.keyBindings.length;e++){const a=t.keyBindings[e];let n=l(a.selector,s);if(n<0)continue;let o=P.CommandRegistry.formatKeystroke(a.keys);if(c.has(o)){let e=c.get(o);if(e[0]<n||e[0]===n&&V.Selector.calculateSpecificity(e[1].selector)>V.Selector.calculateSpecificity(a.selector))continue}c.set(o,[n,a])}let d=-1;const u=new Map;for(let[e,t]of c.values())d=Math.max(e,d),u.has(e)||u.set(e,[]),u.get(e).push(t);const m=[];for(let e=0;e<=d;e++)u.has(e)&&(m.push(u.get(e).map((e=>w.createElement("tr",{className:"jp-ContextualShortcut-TableRow",key:`${e.command}-${e.keys.join("-").replace(" ","_")}`},w.createElement("td",{className:Q},r(e)),w.createElement("td",{className:Q},i([...e.keys])))))),m.push(w.createElement("tr",{className:"jp-ContextualShortcut-TableLastRow",key:`group-${e}-last`})));const p=w.createElement("table",null,w.createElement("tbody",null,m));return(0,o.showDialog)({title:a.__("Keyboard Shortcuts"),body:p,buttons:[o.Dialog.cancelButton({label:a.__("Close")})]})}({commands:s,trans:n})}}),a){const e=n.__("Help");a.addItem({command:Y.displayShortcuts,category:e})}}},ie={id:"@jupyterlab/apputils-extension:sanitizer",description:"Provides the HTML sanitizer.",autoStart:!0,provides:o.ISanitizer,requires:[i.ISettingRegistry],activate:(e,t)=>{const a=new o.Sanitizer,n=e=>{const t=e.get("allowedSchemes").composite,n=e.get("autolink").composite,o=e.get("allowNamedProperties").composite;t&&a.setAllowedSchemes(t),a.setAutolink(n),a.setAllowNamedProperties(o)};return t.load("@jupyterlab/apputils-extension:sanitizer").then((e=>{n(e),e.changed.connect(n)})).catch((e=>{console.error("Failed to load sanitizer settings:",e)})),a}},re=[f,A,j,G,X,te,Z,L,ie,R,ne,ee,oe,z,$,ae,W,se,J]},37634:(e,t,a)=>{var n=a(38005);t.s=n.createRoot,n.hydrateRoot}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5135],{45135:(e,t,i)=>{i.r(t),i.d(t,{INotebookPathOpener:()=>C,INotebookShell:()=>y,NotebookApp:()=>H,NotebookShell:()=>k,PanelHandler:()=>f,Private:()=>v,SidePanelHandler:()=>w,SidePanelPalette:()=>W,defaultNotebookPathOpener:()=>b});var s,n=i(27961),r=i(71120),a=i(75677),o=i(20389),d=i(44548),l=i(97934),h=i(25291),p=i(33625),g=i(20998),u=i(81997),c=i(63485),_=i(12668),m=i(49503);class f{constructor(){this._panelChildHook=(e,t)=>{if("child-removed"===t.type){const e=t.child;p.ArrayExt.removeFirstWhere(this._items,(t=>t.widget===e))}return!0},this._items=new Array,this._panel=new c.Panel,m.MessageLoop.installMessageHook(this._panel,this._panelChildHook)}get panel(){return this._panel}addWidget(e,t){e.parent=null;const i={widget:e,rank:t},n=p.ArrayExt.upperBound(this._items,i,s.itemCmp);p.ArrayExt.insert(this._items,n,i),this._panel.insertWidget(n,e)}}class w extends f{constructor(e){super(),this._isHiddenByUser=!1,this._widgetAdded=new u.Signal(this),this._widgetRemoved=new u.Signal(this),this._area=e,this._panel.hide(),this._currentWidget=null,this._lastCurrentWidget=null,this._widgetPanel=new c.StackedPanel,this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._closeButton=document.createElement("button"),_.closeIcon.element({container:this._closeButton,height:"16px",width:"auto"}),this._closeButton.onclick=()=>{this.collapse(),this.hide()},this._closeButton.className="jp-Button jp-SidePanel-collapse",this._closeButton.title="Collapse side panel";const t=new c.Widget({node:this._closeButton});this._panel.addWidget(t),this._panel.addWidget(this._widgetPanel)}get currentWidget(){return this._currentWidget||this._lastCurrentWidget||(this._items.length>0?this._items[0].widget:null)}get area(){return this._area}get isVisible(){return this._panel.isVisible}get panel(){return this._panel}get widgets(){return this._items.map((e=>e.widget))}get widgetAdded(){return this._widgetAdded}get widgetRemoved(){return this._widgetRemoved}get closeButton(){return this._closeButton}expand(e){e?this._currentWidget&&this._currentWidget.id===e?(this.collapse(),this.hide()):(this.collapse(),this.hide(),this.activate(e),this.show()):this.currentWidget&&(this._currentWidget=this.currentWidget,this.activate(this._currentWidget.id),this.show())}activate(e){const t=this._findWidgetByID(e);t&&(this._currentWidget=t,t.show(),t.activate())}has(e){return null!==this._findWidgetByID(e)}collapse(){var e;null===(e=this._currentWidget)||void 0===e||e.hide(),this._currentWidget=null}addWidget(e,t){e.parent=null,e.hide();const i={widget:e,rank:t},s=this._findInsertIndex(i);p.ArrayExt.insert(this._items,s,i),this._widgetPanel.insertWidget(s,e),this._refreshVisibility(),this._widgetAdded.emit(e)}hide(){this._isHiddenByUser=!0,this._refreshVisibility()}show(){this._isHiddenByUser=!1,this._refreshVisibility()}_findInsertIndex(e){return p.ArrayExt.upperBound(this._items,e,s.itemCmp)}_findWidgetIndex(e){return p.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))}_findWidgetByID(e){const t=(0,p.find)(this._items,(t=>t.widget.id===e));return t?t.widget:null}_refreshVisibility(){this._panel.setHidden(this._isHiddenByUser)}_onWidgetRemoved(e,t){t===this._lastCurrentWidget&&(this._lastCurrentWidget=null),p.ArrayExt.removeAt(this._items,this._findWidgetIndex(t)),this._refreshVisibility(),this._widgetRemoved.emit(t)}}class W{constructor(e){this._items=[],this._commandPalette=e.commandPalette,this._command=e.command}getItem(e,t){const i=this._items;for(let s=0;s<i.length;s++){const n=i[s];if(n.widgetId===e.id&&n.area===t)return n}return null}addItem(e,t){if(this.getItem(e,t))return;const i=this._commandPalette.addItem({command:this._command,category:"View",args:{side:t,title:`Show ${e.title.caption}`,id:e.id}});this._items.push({widgetId:e.id,area:t,disposable:i})}removeItem(e,t){const i=this.getItem(e,t);i&&i.disposable.dispose()}}!function(e){e.itemCmp=function(e,t){return e.rank-t.rank}}(s||(s={}));const y=new g.Token("@jupyter-notebook/application:INotebookShell");class k extends c.Widget{constructor(){super(),this._translator=h.nullTranslator,this._currentChanged=new u.Signal(this),this._mainWidgetLoaded=new g.PromiseDelegate,this.id="main",this._userLayout={},this._topHandler=new f,this._menuHandler=new f,this._leftHandler=new w("left"),this._rightHandler=new w("right"),this._main=new c.Panel;const e=this._topWrapper=new c.Panel,t=this._menuWrapper=new c.Panel;this._topHandler.panel.id="top-panel",this._topHandler.panel.node.setAttribute("role","banner"),this._menuHandler.panel.id="menu-panel",this._menuHandler.panel.node.setAttribute("role","navigation"),this._main.id="main-panel",this._main.node.setAttribute("role","main"),this._spacer_top=new c.Widget,this._spacer_top.id="spacer-widget-top",this._spacer_bottom=new c.Widget,this._spacer_bottom.id="spacer-widget-bottom",e.id="top-panel-wrapper",e.addWidget(this._topHandler.panel),t.id="menu-panel-wrapper",t.addWidget(this._menuHandler.panel);const i=new c.BoxLayout,s=this._leftHandler,n=this._rightHandler;s.panel.id="jp-left-stack",s.panel.node.setAttribute("role","complementary"),n.panel.id="jp-right-stack",n.panel.node.setAttribute("role","complementary"),s.hide(),n.hide();const r=new c.BoxLayout({spacing:0,direction:"top-to-bottom"});c.BoxLayout.setStretch(this._topWrapper,0),c.BoxLayout.setStretch(this._menuWrapper,0),c.BoxLayout.setStretch(this._main,1);const a=new c.Panel({layout:r});a.addWidget(this._topWrapper),a.addWidget(this._menuWrapper),a.addWidget(this._spacer_top),a.addWidget(this._main),a.addWidget(this._spacer_bottom),a.layout=r;const o=new c.SplitPanel;o.id="main-split-panel",o.spacing=1,c.BoxLayout.setStretch(o,1),c.SplitPanel.setStretch(s.panel,0),c.SplitPanel.setStretch(n.panel,0),c.SplitPanel.setStretch(a,1),o.addWidget(s.panel),o.addWidget(a),o.addWidget(n.panel),o.setRelativeSizes([1,2.5,1]),i.spacing=0,i.addWidget(o),this.layout=i;const d=this._skipLinkWidgetHandler=new v.SkipLinkWidgetHandler(this);this.add(d.skipLinkWidget,"top",{rank:0}),this._skipLinkWidgetHandler.show()}get currentChanged(){return this._currentChanged}get currentWidget(){var e;return null!==(e=this._main.widgets[0])&&void 0!==e?e:null}get top(){return this._topWrapper}get menu(){return this._menuWrapper}get leftHandler(){return this._leftHandler}get rightHandler(){return this._rightHandler}get leftCollapsed(){return!(this._leftHandler.isVisible&&this._leftHandler.panel.isVisible)}get rightCollapsed(){return!(this._rightHandler.isVisible&&this._rightHandler.panel.isVisible)}get restored(){return this._mainWidgetLoaded.promise}get translator(){var e;return null!==(e=this._translator)&&void 0!==e?e:h.nullTranslator}set translator(e){if(e!==this._translator){this._translator=e;const t=e.load("notebook");this._leftHandler.closeButton.title=t.__("Collapse %1 side panel",this._leftHandler.area),this._rightHandler.closeButton.title=t.__("Collapse %1 side panel",this._rightHandler.area)}}get userLayout(){return g.JSONExt.deepCopy(this._userLayout)}activateById(e){for(const t of["main","top","left","right","menu"]){const i=(0,p.find)(this.widgets(t),(t=>t.id===e));i&&("left"===t?this.expandLeft(e):"right"===t?this.expandRight(e):i.activate())}}add(e,t,i){var s,n;let r;r=(null==i?void 0:i.type)&&this._userLayout[i.type]?this._userLayout[i.type]:this._userLayout[e.id],t=null!==(s=null==r?void 0:r.area)&&void 0!==s?s:t;const a=null!==(n=null==(i=i||(null==r?void 0:r.options)?{...i,...null==r?void 0:r.options}:void 0)?void 0:i.rank)&&void 0!==n?n:900;switch(t){case"top":return this._topHandler.addWidget(e,a);case"menu":return this._menuHandler.addWidget(e,a);case"main":case void 0:{if(this._main.widgets.length>0)return;const t=this.currentWidget;this._main.addWidget(e),this._main.update(),this._currentChanged.emit({newValue:e,oldValue:t}),this._mainWidgetLoaded.resolve();break}case"left":return this._leftHandler.addWidget(e,a);case"right":return this._rightHandler.addWidget(e,a);default:console.warn(`Cannot add widget to area: ${t}`)}}collapseTop(){this._topWrapper.setHidden(!0),this._spacer_top.setHidden(!0)}expandTop(){this._topWrapper.setHidden(!1),this._spacer_top.setHidden(!1)}*widgets(e){switch(null!=e?e:"main"){case"top":return void(yield*this._topHandler.panel.widgets);case"menu":return void(yield*this._menuHandler.panel.widgets);case"main":return void(yield*this._main.widgets);case"left":return void(yield*this._leftHandler.widgets);case"right":return void(yield*this._rightHandler.widgets);default:return void console.error(`This shell has no area called "${e}"`)}}expandLeft(e){this._leftHandler.panel.show(),this._leftHandler.expand(e)}collapseLeft(){this._leftHandler.collapse(),this._leftHandler.panel.hide()}expandRight(e){this._rightHandler.panel.show(),this._rightHandler.expand(e)}collapseRight(){this._rightHandler.collapse(),this._rightHandler.panel.hide()}async restoreLayout(e){this._userLayout=e}}var v,P;!function(e){e.SkipLinkWidgetHandler=class{constructor(e){this._isDisposed=!1;const t=this._skipLinkWidget=new c.Widget,i=document.createElement("a");i.href="#first-cell",i.tabIndex=1,i.text="Skip to Main",i.className="skip-link",i.addEventListener("click",this),t.addClass("jp-skiplink"),t.id="jp-skiplink",t.node.appendChild(i)}handleEvent(e){"click"===e.type&&this._focusMain()}_focusMain(){const e=document.querySelector("#main-panel .jp-InputArea-editor");e.tabIndex=1,e.focus()}get skipLinkWidget(){return this._skipLinkWidget}dispose(){this.isDisposed||(this._isDisposed=!0,this._skipLinkWidget.node.removeEventListener("click",this),this._skipLinkWidget.dispose())}hide(){this._skipLinkWidget.hide()}show(){this._skipLinkWidget.show()}get isDisposed(){return this._isDisposed}}}(v||(v={}));class H extends n.JupyterFrontEnd{constructor(e={shell:new k}){var t,i;if(super({...e,shell:null!==(t=e.shell)&&void 0!==t?t:new k}),this.name="Jupyter Notebook",this.namespace=this.name,this.status=new o.J(this),this.version=null!==(i=d.PageConfig.getOption("appVersion"))&&void 0!==i?i:"unknown",this._info=n.JupyterLab.defaultInfo,this._formatter=new l.Throttler((()=>{P.setFormat(this)}),250),this.docRegistry.addModelFactory(new r.Base64ModelFactory),e.mimeExtensions)for(const t of(0,a.as)(e.mimeExtensions))this.registerPlugin(t);const s=Object.keys(n.JupyterLab.defaultInfo).reduce(((t,i)=>(i in e&&(t[i]=JSON.parse(JSON.stringify(e[i]))),t)),{});this._info={...n.JupyterLab.defaultInfo,...s},this.restored=this.shell.restored,this.restored.then((()=>this._formatter.invoke()))}get info(){return this._info}get paths(){return{urls:{base:d.PageConfig.getOption("baseUrl"),notFound:d.PageConfig.getOption("notFoundUrl"),app:d.PageConfig.getOption("appUrl"),static:d.PageConfig.getOption("staticUrl"),settings:d.PageConfig.getOption("settingsUrl"),themes:d.PageConfig.getOption("themesUrl"),doc:d.PageConfig.getOption("docUrl"),translations:d.PageConfig.getOption("translationsApiUrl"),hubHost:d.PageConfig.getOption("hubHost")||void 0,hubPrefix:d.PageConfig.getOption("hubPrefix")||void 0,hubUser:d.PageConfig.getOption("hubUser")||void 0,hubServerName:d.PageConfig.getOption("hubServerName")||void 0},directories:{appSettings:d.PageConfig.getOption("appSettingsDir"),schemas:d.PageConfig.getOption("schemasDir"),static:d.PageConfig.getOption("staticDir"),templates:d.PageConfig.getOption("templatesDir"),themes:d.PageConfig.getOption("themesDir"),userSettings:d.PageConfig.getOption("userSettingsDir"),serverRoot:d.PageConfig.getOption("serverRoot"),workspaces:d.PageConfig.getOption("workspacesDir")}}}handleEvent(e){super.handleEvent(e),"resize"===e.type&&this._formatter.invoke()}registerPluginModule(e){let t=e.default;Object.prototype.hasOwnProperty.call(e,"__esModule")||(t=e),Array.isArray(t)||(t=[t]),t.forEach((e=>{try{this.registerPlugin(e)}catch(e){console.error(e)}}))}registerPluginModules(e){e.forEach((e=>{this.registerPluginModule(e)}))}}!function(e){e.setFormat=function(e){e.format=window.matchMedia("only screen and (max-width: 760px)").matches?"mobile":"desktop"}}(P||(P={}));const b=new class{open(e){const{prefix:t,path:i,searchParams:s,target:n,features:r}=e,a=new URL(d.URLExt.join(t,null!=i?i:""),window.location.origin);return s&&(a.search=s.toString()),window.open(a,n,r)}},C=new g.Token("@jupyter-notebook/application:INotebookPathOpener")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5135],{45135:(e,t,i)=>{i.r(t),i.d(t,{INotebookPathOpener:()=>C,INotebookShell:()=>y,NotebookApp:()=>H,NotebookShell:()=>k,PanelHandler:()=>f,Private:()=>v,SidePanelHandler:()=>w,SidePanelPalette:()=>W,defaultNotebookPathOpener:()=>b});var s,n=i(73852),r=i(23764),a=i(75677),o=i(20389),d=i(20754),l=i(32406),h=i(93050),p=i(14931),g=i(21961),u=i(2159),c=i(2260),_=i(76878),m=i(62633);class f{constructor(){this._panelChildHook=(e,t)=>{if("child-removed"===t.type){const e=t.child;p.ArrayExt.removeFirstWhere(this._items,(t=>t.widget===e))}return!0},this._items=new Array,this._panel=new c.Panel,m.MessageLoop.installMessageHook(this._panel,this._panelChildHook)}get panel(){return this._panel}addWidget(e,t){e.parent=null;const i={widget:e,rank:t},n=p.ArrayExt.upperBound(this._items,i,s.itemCmp);p.ArrayExt.insert(this._items,n,i),this._panel.insertWidget(n,e)}}class w extends f{constructor(e){super(),this._isHiddenByUser=!1,this._widgetAdded=new u.Signal(this),this._widgetRemoved=new u.Signal(this),this._area=e,this._panel.hide(),this._currentWidget=null,this._lastCurrentWidget=null,this._widgetPanel=new c.StackedPanel,this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._closeButton=document.createElement("button"),_.closeIcon.element({container:this._closeButton,height:"16px",width:"auto"}),this._closeButton.onclick=()=>{this.collapse(),this.hide()},this._closeButton.className="jp-Button jp-SidePanel-collapse",this._closeButton.title="Collapse side panel";const t=new c.Widget({node:this._closeButton});this._panel.addWidget(t),this._panel.addWidget(this._widgetPanel)}get currentWidget(){return this._currentWidget||this._lastCurrentWidget||(this._items.length>0?this._items[0].widget:null)}get area(){return this._area}get isVisible(){return this._panel.isVisible}get panel(){return this._panel}get widgets(){return this._items.map((e=>e.widget))}get widgetAdded(){return this._widgetAdded}get widgetRemoved(){return this._widgetRemoved}get closeButton(){return this._closeButton}expand(e){e?this._currentWidget&&this._currentWidget.id===e?(this.collapse(),this.hide()):(this.collapse(),this.hide(),this.activate(e),this.show()):this.currentWidget&&(this._currentWidget=this.currentWidget,this.activate(this._currentWidget.id),this.show())}activate(e){const t=this._findWidgetByID(e);t&&(this._currentWidget=t,t.show(),t.activate())}has(e){return null!==this._findWidgetByID(e)}collapse(){var e;null===(e=this._currentWidget)||void 0===e||e.hide(),this._currentWidget=null}addWidget(e,t){e.parent=null,e.hide();const i={widget:e,rank:t},s=this._findInsertIndex(i);p.ArrayExt.insert(this._items,s,i),this._widgetPanel.insertWidget(s,e),this._refreshVisibility(),this._widgetAdded.emit(e)}hide(){this._isHiddenByUser=!0,this._refreshVisibility()}show(){this._isHiddenByUser=!1,this._refreshVisibility()}_findInsertIndex(e){return p.ArrayExt.upperBound(this._items,e,s.itemCmp)}_findWidgetIndex(e){return p.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))}_findWidgetByID(e){const t=(0,p.find)(this._items,(t=>t.widget.id===e));return t?t.widget:null}_refreshVisibility(){this._panel.setHidden(this._isHiddenByUser)}_onWidgetRemoved(e,t){t===this._lastCurrentWidget&&(this._lastCurrentWidget=null),p.ArrayExt.removeAt(this._items,this._findWidgetIndex(t)),this._refreshVisibility(),this._widgetRemoved.emit(t)}}class W{constructor(e){this._items=[],this._commandPalette=e.commandPalette,this._command=e.command}getItem(e,t){const i=this._items;for(let s=0;s<i.length;s++){const n=i[s];if(n.widgetId===e.id&&n.area===t)return n}return null}addItem(e,t){if(this.getItem(e,t))return;const i=this._commandPalette.addItem({command:this._command,category:"View",args:{side:t,title:`Show ${e.title.caption}`,id:e.id}});this._items.push({widgetId:e.id,area:t,disposable:i})}removeItem(e,t){const i=this.getItem(e,t);i&&i.disposable.dispose()}}!function(e){e.itemCmp=function(e,t){return e.rank-t.rank}}(s||(s={}));const y=new g.Token("@jupyter-notebook/application:INotebookShell");class k extends c.Widget{constructor(){super(),this._translator=h.nullTranslator,this._currentChanged=new u.Signal(this),this._mainWidgetLoaded=new g.PromiseDelegate,this.id="main",this._userLayout={},this._topHandler=new f,this._menuHandler=new f,this._leftHandler=new w("left"),this._rightHandler=new w("right"),this._main=new c.Panel;const e=this._topWrapper=new c.Panel,t=this._menuWrapper=new c.Panel;this._topHandler.panel.id="top-panel",this._topHandler.panel.node.setAttribute("role","banner"),this._menuHandler.panel.id="menu-panel",this._menuHandler.panel.node.setAttribute("role","navigation"),this._main.id="main-panel",this._main.node.setAttribute("role","main"),this._spacer_top=new c.Widget,this._spacer_top.id="spacer-widget-top",this._spacer_bottom=new c.Widget,this._spacer_bottom.id="spacer-widget-bottom",e.id="top-panel-wrapper",e.addWidget(this._topHandler.panel),t.id="menu-panel-wrapper",t.addWidget(this._menuHandler.panel);const i=new c.BoxLayout,s=this._leftHandler,n=this._rightHandler;s.panel.id="jp-left-stack",s.panel.node.setAttribute("role","complementary"),n.panel.id="jp-right-stack",n.panel.node.setAttribute("role","complementary"),s.hide(),n.hide();const r=new c.BoxLayout({spacing:0,direction:"top-to-bottom"});c.BoxLayout.setStretch(this._topWrapper,0),c.BoxLayout.setStretch(this._menuWrapper,0),c.BoxLayout.setStretch(this._main,1);const a=new c.Panel({layout:r});a.addWidget(this._topWrapper),a.addWidget(this._menuWrapper),a.addWidget(this._spacer_top),a.addWidget(this._main),a.addWidget(this._spacer_bottom),a.layout=r;const o=new c.SplitPanel;o.id="main-split-panel",o.spacing=1,c.BoxLayout.setStretch(o,1),c.SplitPanel.setStretch(s.panel,0),c.SplitPanel.setStretch(n.panel,0),c.SplitPanel.setStretch(a,1),o.addWidget(s.panel),o.addWidget(a),o.addWidget(n.panel),o.setRelativeSizes([1,2.5,1]),i.spacing=0,i.addWidget(o),this.layout=i;const d=this._skipLinkWidgetHandler=new v.SkipLinkWidgetHandler(this);this.add(d.skipLinkWidget,"top",{rank:0}),this._skipLinkWidgetHandler.show()}get currentChanged(){return this._currentChanged}get currentWidget(){var e;return null!==(e=this._main.widgets[0])&&void 0!==e?e:null}get top(){return this._topWrapper}get menu(){return this._menuWrapper}get leftHandler(){return this._leftHandler}get rightHandler(){return this._rightHandler}get leftCollapsed(){return!(this._leftHandler.isVisible&&this._leftHandler.panel.isVisible)}get rightCollapsed(){return!(this._rightHandler.isVisible&&this._rightHandler.panel.isVisible)}get restored(){return this._mainWidgetLoaded.promise}get translator(){var e;return null!==(e=this._translator)&&void 0!==e?e:h.nullTranslator}set translator(e){if(e!==this._translator){this._translator=e;const t=e.load("notebook");this._leftHandler.closeButton.title=t.__("Collapse %1 side panel",this._leftHandler.area),this._rightHandler.closeButton.title=t.__("Collapse %1 side panel",this._rightHandler.area)}}get userLayout(){return g.JSONExt.deepCopy(this._userLayout)}activateById(e){for(const t of["main","top","left","right","menu"]){const i=(0,p.find)(this.widgets(t),(t=>t.id===e));i&&("left"===t?this.expandLeft(e):"right"===t?this.expandRight(e):i.activate())}}add(e,t,i){var s,n;let r;r=(null==i?void 0:i.type)&&this._userLayout[i.type]?this._userLayout[i.type]:this._userLayout[e.id],t=null!==(s=null==r?void 0:r.area)&&void 0!==s?s:t;const a=null!==(n=null==(i=i||(null==r?void 0:r.options)?{...i,...null==r?void 0:r.options}:void 0)?void 0:i.rank)&&void 0!==n?n:900;switch(t){case"top":return this._topHandler.addWidget(e,a);case"menu":return this._menuHandler.addWidget(e,a);case"main":case void 0:{if(this._main.widgets.length>0)return;const t=this.currentWidget;this._main.addWidget(e),this._main.update(),this._currentChanged.emit({newValue:e,oldValue:t}),this._mainWidgetLoaded.resolve();break}case"left":return this._leftHandler.addWidget(e,a);case"right":return this._rightHandler.addWidget(e,a);default:console.warn(`Cannot add widget to area: ${t}`)}}collapseTop(){this._topWrapper.setHidden(!0),this._spacer_top.setHidden(!0)}expandTop(){this._topWrapper.setHidden(!1),this._spacer_top.setHidden(!1)}*widgets(e){switch(null!=e?e:"main"){case"top":return void(yield*this._topHandler.panel.widgets);case"menu":return void(yield*this._menuHandler.panel.widgets);case"main":return void(yield*this._main.widgets);case"left":return void(yield*this._leftHandler.widgets);case"right":return void(yield*this._rightHandler.widgets);default:return void console.error(`This shell has no area called "${e}"`)}}expandLeft(e){this._leftHandler.panel.show(),this._leftHandler.expand(e)}collapseLeft(){this._leftHandler.collapse(),this._leftHandler.panel.hide()}expandRight(e){this._rightHandler.panel.show(),this._rightHandler.expand(e)}collapseRight(){this._rightHandler.collapse(),this._rightHandler.panel.hide()}async restoreLayout(e){this._userLayout=e}}var v,P;!function(e){e.SkipLinkWidgetHandler=class{constructor(e){this._isDisposed=!1;const t=this._skipLinkWidget=new c.Widget,i=document.createElement("a");i.href="#first-cell",i.tabIndex=1,i.text="Skip to Main",i.className="skip-link",i.addEventListener("click",this),t.addClass("jp-skiplink"),t.id="jp-skiplink",t.node.appendChild(i)}handleEvent(e){"click"===e.type&&this._focusMain()}_focusMain(){const e=document.querySelector("#main-panel .jp-InputArea-editor");e.tabIndex=1,e.focus()}get skipLinkWidget(){return this._skipLinkWidget}dispose(){this.isDisposed||(this._isDisposed=!0,this._skipLinkWidget.node.removeEventListener("click",this),this._skipLinkWidget.dispose())}hide(){this._skipLinkWidget.hide()}show(){this._skipLinkWidget.show()}get isDisposed(){return this._isDisposed}}}(v||(v={}));class H extends n.JupyterFrontEnd{constructor(e={shell:new k}){var t,i;if(super({...e,shell:null!==(t=e.shell)&&void 0!==t?t:new k}),this.name="Jupyter Notebook",this.namespace=this.name,this.status=new o.J(this),this.version=null!==(i=d.PageConfig.getOption("appVersion"))&&void 0!==i?i:"unknown",this._info=n.JupyterLab.defaultInfo,this._formatter=new l.Throttler((()=>{P.setFormat(this)}),250),this.docRegistry.addModelFactory(new r.Base64ModelFactory),e.mimeExtensions)for(const t of(0,a.as)(e.mimeExtensions))this.registerPlugin(t);const s=Object.keys(n.JupyterLab.defaultInfo).reduce(((t,i)=>(i in e&&(t[i]=JSON.parse(JSON.stringify(e[i]))),t)),{});this._info={...n.JupyterLab.defaultInfo,...s},this.restored=this.shell.restored,this.restored.then((()=>this._formatter.invoke()))}get info(){return this._info}get paths(){return{urls:{base:d.PageConfig.getOption("baseUrl"),notFound:d.PageConfig.getOption("notFoundUrl"),app:d.PageConfig.getOption("appUrl"),static:d.PageConfig.getOption("staticUrl"),settings:d.PageConfig.getOption("settingsUrl"),themes:d.PageConfig.getOption("themesUrl"),doc:d.PageConfig.getOption("docUrl"),translations:d.PageConfig.getOption("translationsApiUrl"),hubHost:d.PageConfig.getOption("hubHost")||void 0,hubPrefix:d.PageConfig.getOption("hubPrefix")||void 0,hubUser:d.PageConfig.getOption("hubUser")||void 0,hubServerName:d.PageConfig.getOption("hubServerName")||void 0},directories:{appSettings:d.PageConfig.getOption("appSettingsDir"),schemas:d.PageConfig.getOption("schemasDir"),static:d.PageConfig.getOption("staticDir"),templates:d.PageConfig.getOption("templatesDir"),themes:d.PageConfig.getOption("themesDir"),userSettings:d.PageConfig.getOption("userSettingsDir"),serverRoot:d.PageConfig.getOption("serverRoot"),workspaces:d.PageConfig.getOption("workspacesDir")}}}handleEvent(e){super.handleEvent(e),"resize"===e.type&&this._formatter.invoke()}registerPluginModule(e){let t=e.default;Object.prototype.hasOwnProperty.call(e,"__esModule")||(t=e),Array.isArray(t)||(t=[t]),t.forEach((e=>{try{this.registerPlugin(e)}catch(e){console.error(e)}}))}registerPluginModules(e){e.forEach((e=>{this.registerPluginModule(e)}))}}!function(e){e.setFormat=function(e){e.format=window.matchMedia("only screen and (max-width: 760px)").matches?"mobile":"desktop"}}(P||(P={}));const b=new class{open(e){const{prefix:t,path:i,searchParams:s,target:n,features:r}=e,a=new URL(d.URLExt.join(t,null!=i?i:""),window.location.origin);return s&&(a.search=s.toString()),window.open(a,n,r)}},C=new g.Token("@jupyter-notebook/application:INotebookPathOpener")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5166,1828],{11828:(a,e,s)=>{s.r(e),s.d(e,{IWorkspaceCommands:()=>o,IWorkspacesModel:()=>n,WorkspacesModel:()=>r});var t=s(97934),i=s(81997);class r{constructor(a){var e;this._refreshed=new i.Signal(this),this._isDisposed=!1,this._workspaceData={ids:[],values:[]},this._manager=a.manager;const s=a.refreshInterval||1e4;this._poll=new t.Poll({auto:null===(e=a.auto)||void 0===e||e,name:"@jupyterlab/workspaces:Model",factory:()=>this._fetchList(),frequency:{interval:s,backoff:!0,max:3e5},standby:a.refreshStandby||"when-hidden"})}get workspaces(){return this._workspaceData.values}get identifiers(){return this._workspaceData.ids}async create(a){await this._manager.save(a,{metadata:{id:a},data:{}}),await this.refresh()}get refreshed(){return this._refreshed}async refresh(){await this._poll.refresh(),await this._poll.tick}async rename(a,e){const s=await this._manager.fetch(a);s.metadata.id=e,await this._manager.save(e,s),await this._manager.remove(a),await this.refresh()}async reset(a){const e=await this._manager.fetch(a);e.data={},await this._manager.save(a,e),await this.refresh()}async remove(a){await this._manager.remove(a),await this.refresh()}async saveAs(a,e){const s=await this._manager.fetch(a);s.metadata.id=e,await this._manager.save(e,s),await this.refresh()}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._poll.dispose(),i.Signal.clearData(this))}async _fetchList(){this._workspaceData=await this._manager.list(),this._refreshed.emit(void 0)}}var h=s(20998);const o=new h.Token("@jupyterlab/workspaces:IWorkspaceCommands","Provides identifiers of workspace commands."),n=new h.Token("@jupyterlab/workspaces:IWorkspacesModel","Provides a model for available workspaces.")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5166,1828],{11828:(a,e,s)=>{s.r(e),s.d(e,{IWorkspaceCommands:()=>o,IWorkspacesModel:()=>n,WorkspacesModel:()=>r});var t=s(32406),i=s(2159);class r{constructor(a){var e;this._refreshed=new i.Signal(this),this._isDisposed=!1,this._workspaceData={ids:[],values:[]},this._manager=a.manager;const s=a.refreshInterval||1e4;this._poll=new t.Poll({auto:null===(e=a.auto)||void 0===e||e,name:"@jupyterlab/workspaces:Model",factory:()=>this._fetchList(),frequency:{interval:s,backoff:!0,max:3e5},standby:a.refreshStandby||"when-hidden"})}get workspaces(){return this._workspaceData.values}get identifiers(){return this._workspaceData.ids}async create(a){await this._manager.save(a,{metadata:{id:a},data:{}}),await this.refresh()}get refreshed(){return this._refreshed}async refresh(){await this._poll.refresh(),await this._poll.tick}async rename(a,e){const s=await this._manager.fetch(a);s.metadata.id=e,await this._manager.save(e,s),await this._manager.remove(a),await this.refresh()}async reset(a){const e=await this._manager.fetch(a);e.data={},await this._manager.save(a,e),await this.refresh()}async remove(a){await this._manager.remove(a),await this.refresh()}async saveAs(a,e){const s=await this._manager.fetch(a);s.metadata.id=e,await this._manager.save(e,s),await this.refresh()}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._poll.dispose(),i.Signal.clearData(this))}async _fetchList(){this._workspaceData=await this._manager.list(),this._refreshed.emit(void 0)}}var h=s(21961);const o=new h.Token("@jupyterlab/workspaces:IWorkspaceCommands","Provides identifiers of workspace commands."),n=new h.Token("@jupyterlab/workspaces:IWorkspacesModel","Provides a model for available workspaces.")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5234],{85234:(t,i,e)=>{e.r(i),e.d(i,{VirtualDOM:()=>n,VirtualElement:()=>s,VirtualElementPass:()=>a,VirtualText:()=>r,h:()=>b,hpass:()=>l});var n,d,o=e(33625);class r{constructor(t){this.type="text",this.content=t}}class s{constructor(t,i,e,n){this.type="element",this.tag=t,this.attrs=i,this.children=e,this.renderer=n}}class a extends s{constructor(t,i,e){super(t,i,[],e||void 0)}}function b(t){let i,e={},n=[];for(let t=1,o=arguments.length;t<o;++t){let o=arguments[t];"string"==typeof o?n.push(new r(o)):o instanceof r||o instanceof s?n.push(o):o instanceof Array?d(n,o):1!==t&&2!==t||!o||"object"!=typeof o||("render"in o?i=o:e=o)}return new s(t,e,n,i);function d(t,i){for(let e of i)"string"==typeof e?t.push(new r(e)):(e instanceof r||e instanceof s)&&t.push(e)}}function l(t){let i={},e=null;if(2===arguments.length){const t=arguments[1];"render"in t?e=t:i=t}else if(3===arguments.length)i=arguments[1],e=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new a(t,i,e)}!function(t){t.a=t.bind(void 0,"a"),t.abbr=t.bind(void 0,"abbr"),t.address=t.bind(void 0,"address"),t.area=t.bind(void 0,"area"),t.article=t.bind(void 0,"article"),t.aside=t.bind(void 0,"aside"),t.audio=t.bind(void 0,"audio"),t.b=t.bind(void 0,"b"),t.bdi=t.bind(void 0,"bdi"),t.bdo=t.bind(void 0,"bdo"),t.blockquote=t.bind(void 0,"blockquote"),t.br=t.bind(void 0,"br"),t.button=t.bind(void 0,"button"),t.canvas=t.bind(void 0,"canvas"),t.caption=t.bind(void 0,"caption"),t.cite=t.bind(void 0,"cite"),t.code=t.bind(void 0,"code"),t.col=t.bind(void 0,"col"),t.colgroup=t.bind(void 0,"colgroup"),t.data=t.bind(void 0,"data"),t.datalist=t.bind(void 0,"datalist"),t.dd=t.bind(void 0,"dd"),t.del=t.bind(void 0,"del"),t.dfn=t.bind(void 0,"dfn"),t.div=t.bind(void 0,"div"),t.dl=t.bind(void 0,"dl"),t.dt=t.bind(void 0,"dt"),t.em=t.bind(void 0,"em"),t.embed=t.bind(void 0,"embed"),t.fieldset=t.bind(void 0,"fieldset"),t.figcaption=t.bind(void 0,"figcaption"),t.figure=t.bind(void 0,"figure"),t.footer=t.bind(void 0,"footer"),t.form=t.bind(void 0,"form"),t.h1=t.bind(void 0,"h1"),t.h2=t.bind(void 0,"h2"),t.h3=t.bind(void 0,"h3"),t.h4=t.bind(void 0,"h4"),t.h5=t.bind(void 0,"h5"),t.h6=t.bind(void 0,"h6"),t.header=t.bind(void 0,"header"),t.hr=t.bind(void 0,"hr"),t.i=t.bind(void 0,"i"),t.iframe=t.bind(void 0,"iframe"),t.img=t.bind(void 0,"img"),t.input=t.bind(void 0,"input"),t.ins=t.bind(void 0,"ins"),t.kbd=t.bind(void 0,"kbd"),t.label=t.bind(void 0,"label"),t.legend=t.bind(void 0,"legend"),t.li=t.bind(void 0,"li"),t.main=t.bind(void 0,"main"),t.map=t.bind(void 0,"map"),t.mark=t.bind(void 0,"mark"),t.meter=t.bind(void 0,"meter"),t.nav=t.bind(void 0,"nav"),t.noscript=t.bind(void 0,"noscript"),t.object=t.bind(void 0,"object"),t.ol=t.bind(void 0,"ol"),t.optgroup=t.bind(void 0,"optgroup"),t.option=t.bind(void 0,"option"),t.output=t.bind(void 0,"output"),t.p=t.bind(void 0,"p"),t.param=t.bind(void 0,"param"),t.pre=t.bind(void 0,"pre"),t.progress=t.bind(void 0,"progress"),t.q=t.bind(void 0,"q"),t.rp=t.bind(void 0,"rp"),t.rt=t.bind(void 0,"rt"),t.ruby=t.bind(void 0,"ruby"),t.s=t.bind(void 0,"s"),t.samp=t.bind(void 0,"samp"),t.section=t.bind(void 0,"section"),t.select=t.bind(void 0,"select"),t.small=t.bind(void 0,"small"),t.source=t.bind(void 0,"source"),t.span=t.bind(void 0,"span"),t.strong=t.bind(void 0,"strong"),t.sub=t.bind(void 0,"sub"),t.summary=t.bind(void 0,"summary"),t.sup=t.bind(void 0,"sup"),t.table=t.bind(void 0,"table"),t.tbody=t.bind(void 0,"tbody"),t.td=t.bind(void 0,"td"),t.textarea=t.bind(void 0,"textarea"),t.tfoot=t.bind(void 0,"tfoot"),t.th=t.bind(void 0,"th"),t.thead=t.bind(void 0,"thead"),t.time=t.bind(void 0,"time"),t.title=t.bind(void 0,"title"),t.tr=t.bind(void 0,"tr"),t.track=t.bind(void 0,"track"),t.u=t.bind(void 0,"u"),t.ul=t.bind(void 0,"ul"),t.var_=t.bind(void 0,"var"),t.video=t.bind(void 0,"video"),t.wbr=t.bind(void 0,"wbr")}(b||(b={})),function(t){t.realize=function(t){return d.createDOMNode(t)},t.render=function(t,i){let e=d.hostMap.get(i)||[],n=d.asContentArray(t);d.hostMap.set(i,n),d.updateContent(i,e,n)}}(n||(n={})),function(t){function i(t){let e=arguments[1]||null;const d=arguments[2]||null;if(e)e.insertBefore(i(t),d);else{if("text"===t.type)return document.createTextNode(t.content);if(e=document.createElement(t.tag),function(t,i){for(let e in i)e in n||("on"===e.substr(0,2)?t[e]=i[e]:t.setAttribute(e,i[e]));void 0!==i.className&&t.setAttribute("class",i.className),void 0!==i.htmlFor&&t.setAttribute("for",i.htmlFor),i.dataset&&function(t,i){for(let e in i)t.setAttribute(`data-${e}`,i[e])}(t,i.dataset),i.style&&function(t,i){let e,n=t.style;for(e in i)n[e]=i[e]}(t,i.style)}(e,t.attrs),t.renderer)return t.renderer.render(e,{attrs:t.attrs,children:t.children}),e;for(let n=0,d=t.children.length;n<d;++n)i(t.children[n],e)}return e}function e(t,i,n,d){for(let o=i.length-1;o>=n;--o){const n=i[o],r=d?t.lastChild:t.childNodes[o];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(r,{attrs:n.attrs,children:n.children}):e(r,n.children,0,!1)),d&&t.removeChild(r)}}t.hostMap=new WeakMap,t.asContentArray=function(t){return t?t instanceof Array?t:[t]:[]},t.createDOMNode=i,t.updateContent=function t(n,r,s){if(r===s)return;let a=function(t,i){let e=t.firstChild,n=Object.create(null);for(let t of i)"element"===t.type&&t.attrs.key&&(n[t.attrs.key]={vNode:t,element:e}),e=e.nextSibling;return n}(n,r),b=r.slice(),l=n.firstChild,v=s.length;for(let e=0;e<v;++e){if(e>=b.length){i(s[e],n);continue}let r=b[e],v=s[e];if(r===v){l=l.nextSibling;continue}if("text"===r.type&&"text"===v.type){l.textContent!==v.content&&(l.textContent=v.content),l=l.nextSibling;continue}if("text"===r.type||"text"===v.type){o.ArrayExt.insert(b,e,v),i(v,n,l);continue}if(!r.renderer!=!v.renderer){o.ArrayExt.insert(b,e,v),i(v,n,l);continue}let c=v.attrs.key;if(c&&c in a){let t=a[c];t.vNode!==r&&(o.ArrayExt.move(b,b.indexOf(t.vNode,e+1),e),n.insertBefore(t.element,l),r=t.vNode,l=t.element)}if(r===v){l=l.nextSibling;continue}let u=r.attrs.key;u&&u!==c?(o.ArrayExt.insert(b,e,v),i(v,n,l)):r.tag===v.tag?(d(l,r.attrs,v.attrs),v.renderer?v.renderer.render(l,{attrs:v.attrs,children:v.children}):t(l,r.children,v.children),l=l.nextSibling):(o.ArrayExt.insert(b,e,v),i(v,n,l))}e(n,b,v,!0)};const n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function d(t,i,e){if(i===e)return;let d;for(d in i)d in n||d in e||("on"===d.substr(0,2)?t[d]=null:t.removeAttribute(d));for(d in e)d in n||i[d]===e[d]||("on"===d.substr(0,2)?t[d]=e[d]:t.setAttribute(d,e[d]));i.className!==e.className&&(void 0!==e.className?t.setAttribute("class",e.className):t.removeAttribute("class")),i.htmlFor!==e.htmlFor&&(void 0!==e.htmlFor?t.setAttribute("for",e.htmlFor):t.removeAttribute("for")),i.dataset!==e.dataset&&function(t,i,e){for(let n in i)n in e||t.removeAttribute(`data-${n}`);for(let n in e)i[n]!==e[n]&&t.setAttribute(`data-${n}`,e[n])}(t,i.dataset||{},e.dataset||{}),i.style!==e.style&&function(t,i,e){let n,d=t.style;for(n in i)n in e||(d[n]="");for(n in e)i[n]!==e[n]&&(d[n]=e[n])}(t,i.style||{},e.style||{})}}(d||(d={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5234],{85234:(t,i,e)=>{e.r(i),e.d(i,{VirtualDOM:()=>n,VirtualElement:()=>s,VirtualElementPass:()=>a,VirtualText:()=>r,h:()=>b,hpass:()=>l});var n,d,o=e(14931);class r{constructor(t){this.type="text",this.content=t}}class s{constructor(t,i,e,n){this.type="element",this.tag=t,this.attrs=i,this.children=e,this.renderer=n}}class a extends s{constructor(t,i,e){super(t,i,[],e||void 0)}}function b(t){let i,e={},n=[];for(let t=1,o=arguments.length;t<o;++t){let o=arguments[t];"string"==typeof o?n.push(new r(o)):o instanceof r||o instanceof s?n.push(o):o instanceof Array?d(n,o):1!==t&&2!==t||!o||"object"!=typeof o||("render"in o?i=o:e=o)}return new s(t,e,n,i);function d(t,i){for(let e of i)"string"==typeof e?t.push(new r(e)):(e instanceof r||e instanceof s)&&t.push(e)}}function l(t){let i={},e=null;if(2===arguments.length){const t=arguments[1];"render"in t?e=t:i=t}else if(3===arguments.length)i=arguments[1],e=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new a(t,i,e)}!function(t){t.a=t.bind(void 0,"a"),t.abbr=t.bind(void 0,"abbr"),t.address=t.bind(void 0,"address"),t.area=t.bind(void 0,"area"),t.article=t.bind(void 0,"article"),t.aside=t.bind(void 0,"aside"),t.audio=t.bind(void 0,"audio"),t.b=t.bind(void 0,"b"),t.bdi=t.bind(void 0,"bdi"),t.bdo=t.bind(void 0,"bdo"),t.blockquote=t.bind(void 0,"blockquote"),t.br=t.bind(void 0,"br"),t.button=t.bind(void 0,"button"),t.canvas=t.bind(void 0,"canvas"),t.caption=t.bind(void 0,"caption"),t.cite=t.bind(void 0,"cite"),t.code=t.bind(void 0,"code"),t.col=t.bind(void 0,"col"),t.colgroup=t.bind(void 0,"colgroup"),t.data=t.bind(void 0,"data"),t.datalist=t.bind(void 0,"datalist"),t.dd=t.bind(void 0,"dd"),t.del=t.bind(void 0,"del"),t.dfn=t.bind(void 0,"dfn"),t.div=t.bind(void 0,"div"),t.dl=t.bind(void 0,"dl"),t.dt=t.bind(void 0,"dt"),t.em=t.bind(void 0,"em"),t.embed=t.bind(void 0,"embed"),t.fieldset=t.bind(void 0,"fieldset"),t.figcaption=t.bind(void 0,"figcaption"),t.figure=t.bind(void 0,"figure"),t.footer=t.bind(void 0,"footer"),t.form=t.bind(void 0,"form"),t.h1=t.bind(void 0,"h1"),t.h2=t.bind(void 0,"h2"),t.h3=t.bind(void 0,"h3"),t.h4=t.bind(void 0,"h4"),t.h5=t.bind(void 0,"h5"),t.h6=t.bind(void 0,"h6"),t.header=t.bind(void 0,"header"),t.hr=t.bind(void 0,"hr"),t.i=t.bind(void 0,"i"),t.iframe=t.bind(void 0,"iframe"),t.img=t.bind(void 0,"img"),t.input=t.bind(void 0,"input"),t.ins=t.bind(void 0,"ins"),t.kbd=t.bind(void 0,"kbd"),t.label=t.bind(void 0,"label"),t.legend=t.bind(void 0,"legend"),t.li=t.bind(void 0,"li"),t.main=t.bind(void 0,"main"),t.map=t.bind(void 0,"map"),t.mark=t.bind(void 0,"mark"),t.meter=t.bind(void 0,"meter"),t.nav=t.bind(void 0,"nav"),t.noscript=t.bind(void 0,"noscript"),t.object=t.bind(void 0,"object"),t.ol=t.bind(void 0,"ol"),t.optgroup=t.bind(void 0,"optgroup"),t.option=t.bind(void 0,"option"),t.output=t.bind(void 0,"output"),t.p=t.bind(void 0,"p"),t.param=t.bind(void 0,"param"),t.pre=t.bind(void 0,"pre"),t.progress=t.bind(void 0,"progress"),t.q=t.bind(void 0,"q"),t.rp=t.bind(void 0,"rp"),t.rt=t.bind(void 0,"rt"),t.ruby=t.bind(void 0,"ruby"),t.s=t.bind(void 0,"s"),t.samp=t.bind(void 0,"samp"),t.section=t.bind(void 0,"section"),t.select=t.bind(void 0,"select"),t.small=t.bind(void 0,"small"),t.source=t.bind(void 0,"source"),t.span=t.bind(void 0,"span"),t.strong=t.bind(void 0,"strong"),t.sub=t.bind(void 0,"sub"),t.summary=t.bind(void 0,"summary"),t.sup=t.bind(void 0,"sup"),t.table=t.bind(void 0,"table"),t.tbody=t.bind(void 0,"tbody"),t.td=t.bind(void 0,"td"),t.textarea=t.bind(void 0,"textarea"),t.tfoot=t.bind(void 0,"tfoot"),t.th=t.bind(void 0,"th"),t.thead=t.bind(void 0,"thead"),t.time=t.bind(void 0,"time"),t.title=t.bind(void 0,"title"),t.tr=t.bind(void 0,"tr"),t.track=t.bind(void 0,"track"),t.u=t.bind(void 0,"u"),t.ul=t.bind(void 0,"ul"),t.var_=t.bind(void 0,"var"),t.video=t.bind(void 0,"video"),t.wbr=t.bind(void 0,"wbr")}(b||(b={})),function(t){t.realize=function(t){return d.createDOMNode(t)},t.render=function(t,i){let e=d.hostMap.get(i)||[],n=d.asContentArray(t);d.hostMap.set(i,n),d.updateContent(i,e,n)}}(n||(n={})),function(t){function i(t){let e=arguments[1]||null;const d=arguments[2]||null;if(e)e.insertBefore(i(t),d);else{if("text"===t.type)return document.createTextNode(t.content);if(e=document.createElement(t.tag),function(t,i){for(let e in i)e in n||("on"===e.substr(0,2)?t[e]=i[e]:t.setAttribute(e,i[e]));void 0!==i.className&&t.setAttribute("class",i.className),void 0!==i.htmlFor&&t.setAttribute("for",i.htmlFor),i.dataset&&function(t,i){for(let e in i)t.setAttribute(`data-${e}`,i[e])}(t,i.dataset),i.style&&function(t,i){let e,n=t.style;for(e in i)n[e]=i[e]}(t,i.style)}(e,t.attrs),t.renderer)return t.renderer.render(e,{attrs:t.attrs,children:t.children}),e;for(let n=0,d=t.children.length;n<d;++n)i(t.children[n],e)}return e}function e(t,i,n,d){for(let o=i.length-1;o>=n;--o){const n=i[o],r=d?t.lastChild:t.childNodes[o];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(r,{attrs:n.attrs,children:n.children}):e(r,n.children,0,!1)),d&&t.removeChild(r)}}t.hostMap=new WeakMap,t.asContentArray=function(t){return t?t instanceof Array?t:[t]:[]},t.createDOMNode=i,t.updateContent=function t(n,r,s){if(r===s)return;let a=function(t,i){let e=t.firstChild,n=Object.create(null);for(let t of i)"element"===t.type&&t.attrs.key&&(n[t.attrs.key]={vNode:t,element:e}),e=e.nextSibling;return n}(n,r),b=r.slice(),l=n.firstChild,v=s.length;for(let e=0;e<v;++e){if(e>=b.length){i(s[e],n);continue}let r=b[e],v=s[e];if(r===v){l=l.nextSibling;continue}if("text"===r.type&&"text"===v.type){l.textContent!==v.content&&(l.textContent=v.content),l=l.nextSibling;continue}if("text"===r.type||"text"===v.type){o.ArrayExt.insert(b,e,v),i(v,n,l);continue}if(!r.renderer!=!v.renderer){o.ArrayExt.insert(b,e,v),i(v,n,l);continue}let c=v.attrs.key;if(c&&c in a){let t=a[c];t.vNode!==r&&(o.ArrayExt.move(b,b.indexOf(t.vNode,e+1),e),n.insertBefore(t.element,l),r=t.vNode,l=t.element)}if(r===v){l=l.nextSibling;continue}let u=r.attrs.key;u&&u!==c?(o.ArrayExt.insert(b,e,v),i(v,n,l)):r.tag===v.tag?(d(l,r.attrs,v.attrs),v.renderer?v.renderer.render(l,{attrs:v.attrs,children:v.children}):t(l,r.children,v.children),l=l.nextSibling):(o.ArrayExt.insert(b,e,v),i(v,n,l))}e(n,b,v,!0)};const n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function d(t,i,e){if(i===e)return;let d;for(d in i)d in n||d in e||("on"===d.substr(0,2)?t[d]=null:t.removeAttribute(d));for(d in e)d in n||i[d]===e[d]||("on"===d.substr(0,2)?t[d]=e[d]:t.setAttribute(d,e[d]));i.className!==e.className&&(void 0!==e.className?t.setAttribute("class",e.className):t.removeAttribute("class")),i.htmlFor!==e.htmlFor&&(void 0!==e.htmlFor?t.setAttribute("for",e.htmlFor):t.removeAttribute("for")),i.dataset!==e.dataset&&function(t,i,e){for(let n in i)n in e||t.removeAttribute(`data-${n}`);for(let n in e)i[n]!==e[n]&&t.setAttribute(`data-${n}`,e[n])}(t,i.dataset||{},e.dataset||{}),i.style!==e.style&&function(t,i,e){let n,d=t.style;for(n in i)n in e||(d[n]="");for(n in e)i[n]!==e[n]&&(d[n]=e[n])}(t,i.style||{},e.style||{})}}(d||(d={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5254],{95254:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var r=t(15465),s=t(25291);const i={id:"@jupyterlab/theme-dark-high-contrast-extension:plugin",description:"Adds a dark high contrast theme.",requires:[r.IThemeManager,s.ITranslator],activate:(e,a,t)=>{const r=t.load("jupyterlab");a.register({name:"JupyterLab Dark High Contrast",displayName:r.__("JupyterLab Dark High Contrast"),isLight:!1,themeScrollbars:!0,load:()=>a.loadCSS("@jupyterlab/theme-dark-high-contrast-extension/index.css"),unload:()=>Promise.resolve(void 0)})},autoStart:!0}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5254],{95254:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var r=t(53876),s=t(93050);const i={id:"@jupyterlab/theme-dark-high-contrast-extension:plugin",description:"Adds a dark high contrast theme.",requires:[r.IThemeManager,s.ITranslator],activate:(e,a,t)=>{const r=t.load("jupyterlab");a.register({name:"JupyterLab Dark High Contrast",displayName:r.__("JupyterLab Dark High Contrast"),isLight:!1,themeScrollbars:!0,load:()=>a.loadCSS("@jupyterlab/theme-dark-high-contrast-extension/index.css"),unload:()=>Promise.resolve(void 0)})},autoStart:!0}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5261],{25261:(e,t,r)=>{r.r(t),r.d(t,{RegExpCursor:()=>u,SearchCursor:()=>l,SearchQuery:()=>W,closeSearchPanel:()=>ae,findNext:()=>G,findPrevious:()=>H,getSearchQuery:()=>_,gotoLine:()=>y,highlightSelectionMatches:()=>C,openSearchPanel:()=>se,replaceAll:()=>te,replaceNext:()=>ee,search:()=>A,searchKeymap:()=>le,searchPanelOpen:()=>N,selectMatches:()=>X,selectNextOccurrence:()=>L,selectSelectionMatches:()=>Z,setSearchQuery:()=>$});var i=r(46750),n=r(89843);function o(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,r=arguments[1];if(r&&"object"==typeof r&&null==r.nodeType&&!Array.isArray(r)){for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=r[i];"string"==typeof n?e.setAttribute(i,n):null!=n&&(e[i]=n)}t++}for(;t<arguments.length;t++)s(e,arguments[t]);return e}function s(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var r=0;r<t.length;r++)s(e,t[r])}}const a="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class l{constructor(e,t,r=0,i=e.length,n,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=n?e=>n(a(e)):a,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,n.codePointAt)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,n.fromCodePoint)(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=(0,n.codePointSize)(e);let i=this.normalize(t);for(let e=0,n=r;;e++){let o=i.charCodeAt(e),s=this.match(o,n,this.bufferPos+this.bufferStart);if(e==i.length-1){if(s)return this.value=s,this;break}n==r&&e<t.length&&t.charCodeAt(e)==o&&n++}}}match(e,t,r){let i=null;for(let t=0;t<this.matches.length;t+=2){let n=this.matches[t],o=!1;this.query.charCodeAt(n)==e&&(n==this.query.length-1?i={from:this.matches[t+1],to:r}:(this.matches[t]++,o=!0)),o||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}"undefined"!=typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this});const c={from:-1,to:-1,match:/.*/.exec("")},h="gm"+(null==/x/.unicode?"":"u");class u{constructor(e,t,r,i=0,n=e.length){if(this.text=e,this.to=n,this.curLine="",this.done=!1,this.value=c,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new m(e,t,r,i,n);this.re=new RegExp(t,h+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=p(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=p(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const f=new WeakMap;class d{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=f.get(e);if(!i||i.from>=r||i.to<=t){let i=new d(t,e.sliceString(t,r));return f.set(e,i),i}if(i.from==t&&i.to==r)return i;let{text:n,from:o}=i;return o>t&&(n=e.sliceString(t,o)+n,o=t),i.to<r&&(n+=e.sliceString(i.to,r)),f.set(e,new d(o,n)),new d(t,n.slice(t-o,r-o))}}class m{constructor(e,t,r,i,n){this.text=e,this.to=n,this.done=!1,this.value=c,this.matchPos=p(e,i),this.re=new RegExp(t,h+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.flat=d.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,r=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,r,t)))return this.value={from:e,to:r,match:t},this.matchPos=p(this.text,r+(e==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=d.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function p(e,t){if(t>=e.length)return t;let r,i=e.lineAt(t);for(;t<i.to&&(r=i.text.charCodeAt(t-i.from))>=56320&&r<57344;)t++;return t}function g(e){let t=o("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function r(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=e,s=o.doc.lineAt(o.selection.main.head),[,a,l,c,h]=r,u=c?+c.slice(1):0,f=l?+l:s.number;if(l&&h){let e=f/100;a&&(e=e*("-"==a?-1:1)+s.number/o.doc.lines),f=Math.round(o.doc.lines*e)}else l&&a&&(f=f*("-"==a?-1:1)+s.number);let d=o.doc.line(Math.max(1,Math.min(o.doc.lines,f))),m=n.EditorSelection.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[v.of(!1),i.EditorView.scrollIntoView(m.from,{y:"center"})],selection:m}),e.focus()}return{dom:o("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:v.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},o("label",e.state.phrase("Go to line"),": ",t)," ",o("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(u.prototype[Symbol.iterator]=m.prototype[Symbol.iterator]=function(){return this});const v=n.StateEffect.define(),x=n.StateField.define({create:()=>!0,update(e,t){for(let r of t.effects)r.is(v)&&(e=r.value);return e},provide:e=>i.showPanel.from(e,(e=>e?g:null))}),y=e=>{let t=(0,i.getPanel)(e,g);if(!t){let r=[v.of(!0)];null==e.state.field(x,!1)&&r.push(n.StateEffect.appendConfig.of([x,w])),e.dispatch({effects:r}),t=(0,i.getPanel)(e,g)}return t&&t.dom.querySelector("input").select(),!0},w=i.EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),S={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},b=n.Facet.define({combine:e=>(0,n.combineConfig)(e,S,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function C(e){let t=[q,D];return e&&t.push(b.of(e)),t}const k=i.Decoration.mark({class:"cm-selectionMatch"}),M=i.Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function E(e,t,r,i){return!(0!=r&&e(t.sliceDoc(r-1,r))==n.CharCategory.Word||i!=t.doc.length&&e(t.sliceDoc(i,i+1))==n.CharCategory.Word)}const D=i.ViewPlugin.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(b),{state:r}=e,o=r.selection;if(o.ranges.length>1)return i.Decoration.none;let s,a=o.main,c=null;if(a.empty){if(!t.highlightWordAroundCursor)return i.Decoration.none;let e=r.wordAt(a.head);if(!e)return i.Decoration.none;c=r.charCategorizer(a.head),s=r.sliceDoc(e.from,e.to)}else{let e=a.to-a.from;if(e<t.minSelectionLength||e>200)return i.Decoration.none;if(t.wholeWords){if(s=r.sliceDoc(a.from,a.to),c=r.charCategorizer(a.head),!E(c,r,a.from,a.to)||!function(e,t,r,i){return e(t.sliceDoc(r,r+1))==n.CharCategory.Word&&e(t.sliceDoc(i-1,i))==n.CharCategory.Word}(c,r,a.from,a.to))return i.Decoration.none}else if(s=r.sliceDoc(a.from,a.to),!s)return i.Decoration.none}let h=[];for(let n of e.visibleRanges){let e=new l(r.doc,s,n.from,n.to);for(;!e.next().done;){let{from:n,to:o}=e.value;if((!c||E(c,r,n,o))&&(a.empty&&n<=a.from&&o>=a.to?h.push(M.range(n,o)):(n>=a.to||o<=a.from)&&h.push(k.range(n,o)),h.length>t.maxMatches))return i.Decoration.none}}return i.Decoration.set(h)}},{decorations:e=>e.decorations}),q=i.EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),L=({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:r}=e,i=n.EditorSelection.create(r.ranges.map((t=>e.wordAt(t.head)||n.EditorSelection.cursor(t.head))),r.mainIndex);return!i.eq(r)&&(t(e.update({selection:i})),!0)})({state:e,dispatch:t});let o=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=o)))return!1;let s=function(e,t){let{main:r,ranges:i}=e.selection,n=e.wordAt(r.head),o=n&&n.from==r.from&&n.to==r.to;for(let r=!1,n=new l(e.doc,t,i[i.length-1].to);;){if(n.next(),!n.done){if(r&&i.some((e=>e.from==n.value.from)))continue;if(o){let t=e.wordAt(n.value.from);if(!t||t.from!=n.value.from||t.to!=n.value.to)continue}return n.value}if(r)return null;n=new l(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),r=!0}}(e,o);return!!s&&(t(e.update({selection:e.selection.addRange(n.EditorSelection.range(s.from,s.to),!1),effects:i.EditorView.scrollIntoView(s.to)})),!0)},P=n.Facet.define({combine:e=>(0,n.combineConfig)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new ce(e),scrollToMatch:e=>i.EditorView.scrollIntoView(e)})});function A(e){return e?[P.of(e),pe]:pe}class W{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,h),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new z(this):new T(this)}getCursor(e,t=0,r){let i=e.doc?e:n.EditorState.create({doc:e});return null==r&&(r=i.doc.length),this.regexp?O(this,i,t,r):R(this,i,t,r)}}class F{constructor(e){this.spec=e}}function R(e,t,r,i){return new l(t.doc,e.unquoted,r,i,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,s=t.charCategorizer(t.selection.main.head),(e,t,r,i)=>((i>e||i+r.length<t)&&(i=Math.max(0,e-2),r=o.sliceString(i,Math.min(o.length,t+2))),!(s(V(r,e-i))==n.CharCategory.Word&&s(I(r,e-i))==n.CharCategory.Word||s(I(r,t-i))==n.CharCategory.Word&&s(V(r,t-i))==n.CharCategory.Word))):void 0);var o,s}class T extends F{constructor(e){super(e)}nextMatch(e,t,r){let i=R(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=R(this.spec,e,0,t).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let r=Math.max(t,i-1e4-this.spec.unquoted.length),n=R(this.spec,e,r,i),o=null;for(;!n.nextOverlapping().done;)o=n.value;if(o)return o;if(r==t)return null;i-=1e4}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=R(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let n=R(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!n.next().done;)i(n.value.from,n.value.to)}}function O(e,t,r,i){return new u(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,r)=>!r[0].length||(o(V(r.input,r.index))!=n.CharCategory.Word||o(I(r.input,r.index))!=n.CharCategory.Word)&&(o(I(r.input,r.index+r[0].length))!=n.CharCategory.Word||o(V(r.input,r.index+r[0].length))!=n.CharCategory.Word)):void 0},r,i);var o}function V(e,t){return e.slice((0,n.findClusterBreak)(e,t,!1),t)}function I(e,t){return e.slice(t,(0,n.findClusterBreak)(e,t))}class z extends F{nextMatch(e,t,r){let i=O(this.spec,e,r,e.doc.length).next();return i.done&&(i=O(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let n=Math.max(t,r-1e4*i),o=O(this.spec,e,n,r),s=null;for(;!o.next().done;)s=o.value;if(s&&(n==t||s.from>n+10))return s;if(n==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,r)=>"$"==r?"$":"&"==r?e.match[0]:"0"!=r&&+r<e.match.length?e.match[r]:t))}matchAll(e,t){let r=O(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let n=O(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!n.next().done;)i(n.value.from,n.value.to)}}const $=n.StateEffect.define(),U=n.StateEffect.define(),B=n.StateField.define({create:e=>new Q(ie(e).create(),null),update(e,t){for(let r of t.effects)r.is($)?e=new Q(r.value.create(),e.panel):r.is(U)&&(e=new Q(e.query,r.value?re:null));return e},provide:e=>i.showPanel.from(e,(e=>e.panel))});function _(e){let t=e.field(B,!1);return t?t.query.spec:ie(e)}function N(e){var t;return null!=(null===(t=e.field(B,!1))||void 0===t?void 0:t.panel)}class Q{constructor(e,t){this.query=e,this.panel=t}}const K=i.Decoration.mark({class:"cm-searchMatch"}),j=i.Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),J=i.ViewPlugin.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(B))}update(e){let t=e.state.field(B);(t!=e.startState.field(B)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return i.Decoration.none;let{view:r}=this,o=new n.RangeSetBuilder;for(let t=0,i=r.visibleRanges,n=i.length;t<n;t++){let{from:s,to:a}=i[t];for(;t<n-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(r.state,s,a,((e,t)=>{let i=r.state.selection.ranges.some((r=>r.from==e&&r.to==t));o.add(e,t,i?j:K)}))}return o.finish()}},{decorations:e=>e.decorations});function Y(e){return t=>{let r=t.state.field(B,!1);return r&&r.query.spec.valid?e(t,r):se(t)}}const G=Y(((e,{query:t})=>{let{to:r}=e.state.selection.main,i=t.nextMatch(e.state,r,r);if(!i)return!1;let o=n.EditorSelection.single(i.from,i.to),s=e.state.facet(P);return e.dispatch({selection:o,effects:[de(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),oe(e),!0})),H=Y(((e,{query:t})=>{let{state:r}=e,{from:i}=r.selection.main,o=t.prevMatch(r,i,i);if(!o)return!1;let s=n.EditorSelection.single(o.from,o.to),a=e.state.facet(P);return e.dispatch({selection:s,effects:[de(e,o),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),oe(e),!0})),X=Y(((e,{query:t})=>{let r=t.matchAll(e.state,1e3);return!(!r||!r.length||(e.dispatch({selection:n.EditorSelection.create(r.map((e=>n.EditorSelection.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),Z=({state:e,dispatch:t})=>{let r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:i,to:o}=r.main,s=[],a=0;for(let t=new l(e.doc,e.sliceDoc(i,o));!t.next().done;){if(s.length>1e3)return!1;t.value.from==i&&(a=s.length),s.push(n.EditorSelection.range(t.value.from,t.value.to))}return t(e.update({selection:n.EditorSelection.create(s,a),userEvent:"select.search.matches"})),!0},ee=Y(((e,{query:t})=>{let{state:r}=e,{from:o,to:s}=r.selection.main;if(r.readOnly)return!1;let a=t.nextMatch(r,o,o);if(!a)return!1;let l,c,h=[],u=[];if(a.from==o&&a.to==s&&(c=r.toText(t.getReplacement(a)),h.push({from:a.from,to:a.to,insert:c}),a=t.nextMatch(r,a.from,a.to),u.push(i.EditorView.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),a){let t=0==h.length||h[0].from>=a.to?0:a.to-a.from-c.length;l=n.EditorSelection.single(a.from-t,a.to-t),u.push(de(e,a)),u.push(r.facet(P).scrollToMatch(l.main,e))}return e.dispatch({changes:h,selection:l,effects:u,userEvent:"input.replace"}),!0})),te=Y(((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map((e=>{let{from:r,to:i}=e;return{from:r,to:i,insert:t.getReplacement(e)}}));if(!r.length)return!1;let n=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:i.EditorView.announce.of(n),userEvent:"input.replace.all"}),!0}));function re(e){return e.state.facet(P).createPanel(e)}function ie(e,t){var r,i,n,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(P);return new W({search:(null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==t?void 0:t.caseSensitive)&&void 0!==i?i:c.caseSensitive,literal:null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null==t?void 0:t.wholeWord)&&void 0!==s?s:c.wholeWord})}function ne(e){let t=(0,i.getPanel)(e,re);return t&&t.dom.querySelector("[main-field]")}function oe(e){let t=ne(e);t&&t==e.root.activeElement&&t.select()}const se=e=>{let t=e.state.field(B,!1);if(t&&t.panel){let r=ne(e);if(r&&r!=e.root.activeElement){let i=ie(e.state,t.query.spec);i.valid&&e.dispatch({effects:$.of(i)}),r.focus(),r.select()}}else e.dispatch({effects:[U.of(!0),t?$.of(ie(e.state,t.query.spec)):n.StateEffect.appendConfig.of(pe)]});return!0},ae=e=>{let t=e.state.field(B,!1);if(!t||!t.panel)return!1;let r=(0,i.getPanel)(e,re);return r&&r.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:U.of(!1)}),!0},le=[{key:"Mod-f",run:se,scope:"editor search-panel"},{key:"F3",run:G,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:G,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ae,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Z},{key:"Mod-Alt-g",run:y},{key:"Mod-d",run:L,preventDefault:!0}];class ce{constructor(e){this.view=e;let t=this.query=e.state.field(B).query.spec;function r(e,t,r){return o("button",{class:"cm-button",name:e,onclick:t,type:"button"},r)}this.commit=this.commit.bind(this),this.searchField=o("input",{value:t.search,placeholder:he(e,"Find"),"aria-label":he(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=o("input",{value:t.replace,placeholder:he(e,"Replace"),"aria-label":he(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=o("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=o("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=o("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=o("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,r("next",(()=>G(e)),[he(e,"next")]),r("prev",(()=>H(e)),[he(e,"previous")]),r("select",(()=>X(e)),[he(e,"all")]),o("label",null,[this.caseField,he(e,"match case")]),o("label",null,[this.reField,he(e,"regexp")]),o("label",null,[this.wordField,he(e,"by word")]),...e.state.readOnly?[]:[o("br"),this.replaceField,r("replace",(()=>ee(e)),[he(e,"replace")]),r("replaceAll",(()=>te(e)),[he(e,"replace all")])],o("button",{name:"close",onclick:()=>ae(e),"aria-label":he(e,"close"),type:"button"},["×"])])}commit(){let e=new W({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:$.of(e)}))}keydown(e){(0,i.runScopeHandlers)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?H:G)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),ee(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is($)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(P).top}}function he(e,t){return e.state.phrase(t)}const ue=30,fe=/[\s\.,:;?!]/;function de(e,{from:t,to:r}){let n=e.state.doc.lineAt(t),o=e.state.doc.lineAt(r).to,s=Math.max(n.from,t-ue),a=Math.min(o,r+ue),l=e.state.sliceDoc(s,a);if(s!=n.from)for(let e=0;e<ue;e++)if(!fe.test(l[e+1])&&fe.test(l[e])){l=l.slice(e);break}if(a!=o)for(let e=l.length-1;e>l.length-ue;e--)if(!fe.test(l[e-1])&&fe.test(l[e])){l=l.slice(0,e);break}return i.EditorView.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${n.number}.`)}const me=i.EditorView.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),pe=[B,n.Prec.low(J),me]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5261],{25261:(e,t,r)=>{r.r(t),r.d(t,{RegExpCursor:()=>u,SearchCursor:()=>l,SearchQuery:()=>W,closeSearchPanel:()=>ae,findNext:()=>G,findPrevious:()=>H,getSearchQuery:()=>_,gotoLine:()=>y,highlightSelectionMatches:()=>C,openSearchPanel:()=>se,replaceAll:()=>te,replaceNext:()=>ee,search:()=>A,searchKeymap:()=>le,searchPanelOpen:()=>N,selectMatches:()=>X,selectNextOccurrence:()=>L,selectSelectionMatches:()=>Z,setSearchQuery:()=>$});var i=r(63720),n=r(89843);function o(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,r=arguments[1];if(r&&"object"==typeof r&&null==r.nodeType&&!Array.isArray(r)){for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=r[i];"string"==typeof n?e.setAttribute(i,n):null!=n&&(e[i]=n)}t++}for(;t<arguments.length;t++)s(e,arguments[t]);return e}function s(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var r=0;r<t.length;r++)s(e,t[r])}}const a="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class l{constructor(e,t,r=0,i=e.length,n,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=n?e=>n(a(e)):a,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,n.codePointAt)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,n.fromCodePoint)(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=(0,n.codePointSize)(e);let i=this.normalize(t);for(let e=0,n=r;;e++){let o=i.charCodeAt(e),s=this.match(o,n,this.bufferPos+this.bufferStart);if(e==i.length-1){if(s)return this.value=s,this;break}n==r&&e<t.length&&t.charCodeAt(e)==o&&n++}}}match(e,t,r){let i=null;for(let t=0;t<this.matches.length;t+=2){let n=this.matches[t],o=!1;this.query.charCodeAt(n)==e&&(n==this.query.length-1?i={from:this.matches[t+1],to:r}:(this.matches[t]++,o=!0)),o||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}"undefined"!=typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this});const c={from:-1,to:-1,match:/.*/.exec("")},h="gm"+(null==/x/.unicode?"":"u");class u{constructor(e,t,r,i=0,n=e.length){if(this.text=e,this.to=n,this.curLine="",this.done=!1,this.value=c,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new m(e,t,r,i,n);this.re=new RegExp(t,h+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=p(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=p(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const f=new WeakMap;class d{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=f.get(e);if(!i||i.from>=r||i.to<=t){let i=new d(t,e.sliceString(t,r));return f.set(e,i),i}if(i.from==t&&i.to==r)return i;let{text:n,from:o}=i;return o>t&&(n=e.sliceString(t,o)+n,o=t),i.to<r&&(n+=e.sliceString(i.to,r)),f.set(e,new d(o,n)),new d(t,n.slice(t-o,r-o))}}class m{constructor(e,t,r,i,n){this.text=e,this.to=n,this.done=!1,this.value=c,this.matchPos=p(e,i),this.re=new RegExp(t,h+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.flat=d.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,r=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,r,t)))return this.value={from:e,to:r,match:t},this.matchPos=p(this.text,r+(e==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=d.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function p(e,t){if(t>=e.length)return t;let r,i=e.lineAt(t);for(;t<i.to&&(r=i.text.charCodeAt(t-i.from))>=56320&&r<57344;)t++;return t}function g(e){let t=o("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function r(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=e,s=o.doc.lineAt(o.selection.main.head),[,a,l,c,h]=r,u=c?+c.slice(1):0,f=l?+l:s.number;if(l&&h){let e=f/100;a&&(e=e*("-"==a?-1:1)+s.number/o.doc.lines),f=Math.round(o.doc.lines*e)}else l&&a&&(f=f*("-"==a?-1:1)+s.number);let d=o.doc.line(Math.max(1,Math.min(o.doc.lines,f))),m=n.EditorSelection.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[v.of(!1),i.EditorView.scrollIntoView(m.from,{y:"center"})],selection:m}),e.focus()}return{dom:o("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:v.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},o("label",e.state.phrase("Go to line"),": ",t)," ",o("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(u.prototype[Symbol.iterator]=m.prototype[Symbol.iterator]=function(){return this});const v=n.StateEffect.define(),x=n.StateField.define({create:()=>!0,update(e,t){for(let r of t.effects)r.is(v)&&(e=r.value);return e},provide:e=>i.showPanel.from(e,(e=>e?g:null))}),y=e=>{let t=(0,i.getPanel)(e,g);if(!t){let r=[v.of(!0)];null==e.state.field(x,!1)&&r.push(n.StateEffect.appendConfig.of([x,w])),e.dispatch({effects:r}),t=(0,i.getPanel)(e,g)}return t&&t.dom.querySelector("input").select(),!0},w=i.EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),S={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},b=n.Facet.define({combine:e=>(0,n.combineConfig)(e,S,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function C(e){let t=[q,D];return e&&t.push(b.of(e)),t}const k=i.Decoration.mark({class:"cm-selectionMatch"}),M=i.Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function E(e,t,r,i){return!(0!=r&&e(t.sliceDoc(r-1,r))==n.CharCategory.Word||i!=t.doc.length&&e(t.sliceDoc(i,i+1))==n.CharCategory.Word)}const D=i.ViewPlugin.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(b),{state:r}=e,o=r.selection;if(o.ranges.length>1)return i.Decoration.none;let s,a=o.main,c=null;if(a.empty){if(!t.highlightWordAroundCursor)return i.Decoration.none;let e=r.wordAt(a.head);if(!e)return i.Decoration.none;c=r.charCategorizer(a.head),s=r.sliceDoc(e.from,e.to)}else{let e=a.to-a.from;if(e<t.minSelectionLength||e>200)return i.Decoration.none;if(t.wholeWords){if(s=r.sliceDoc(a.from,a.to),c=r.charCategorizer(a.head),!E(c,r,a.from,a.to)||!function(e,t,r,i){return e(t.sliceDoc(r,r+1))==n.CharCategory.Word&&e(t.sliceDoc(i-1,i))==n.CharCategory.Word}(c,r,a.from,a.to))return i.Decoration.none}else if(s=r.sliceDoc(a.from,a.to),!s)return i.Decoration.none}let h=[];for(let n of e.visibleRanges){let e=new l(r.doc,s,n.from,n.to);for(;!e.next().done;){let{from:n,to:o}=e.value;if((!c||E(c,r,n,o))&&(a.empty&&n<=a.from&&o>=a.to?h.push(M.range(n,o)):(n>=a.to||o<=a.from)&&h.push(k.range(n,o)),h.length>t.maxMatches))return i.Decoration.none}}return i.Decoration.set(h)}},{decorations:e=>e.decorations}),q=i.EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),L=({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:r}=e,i=n.EditorSelection.create(r.ranges.map((t=>e.wordAt(t.head)||n.EditorSelection.cursor(t.head))),r.mainIndex);return!i.eq(r)&&(t(e.update({selection:i})),!0)})({state:e,dispatch:t});let o=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=o)))return!1;let s=function(e,t){let{main:r,ranges:i}=e.selection,n=e.wordAt(r.head),o=n&&n.from==r.from&&n.to==r.to;for(let r=!1,n=new l(e.doc,t,i[i.length-1].to);;){if(n.next(),!n.done){if(r&&i.some((e=>e.from==n.value.from)))continue;if(o){let t=e.wordAt(n.value.from);if(!t||t.from!=n.value.from||t.to!=n.value.to)continue}return n.value}if(r)return null;n=new l(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),r=!0}}(e,o);return!!s&&(t(e.update({selection:e.selection.addRange(n.EditorSelection.range(s.from,s.to),!1),effects:i.EditorView.scrollIntoView(s.to)})),!0)},P=n.Facet.define({combine:e=>(0,n.combineConfig)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new ce(e),scrollToMatch:e=>i.EditorView.scrollIntoView(e)})});function A(e){return e?[P.of(e),pe]:pe}class W{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,h),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new z(this):new T(this)}getCursor(e,t=0,r){let i=e.doc?e:n.EditorState.create({doc:e});return null==r&&(r=i.doc.length),this.regexp?O(this,i,t,r):R(this,i,t,r)}}class F{constructor(e){this.spec=e}}function R(e,t,r,i){return new l(t.doc,e.unquoted,r,i,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,s=t.charCategorizer(t.selection.main.head),(e,t,r,i)=>((i>e||i+r.length<t)&&(i=Math.max(0,e-2),r=o.sliceString(i,Math.min(o.length,t+2))),!(s(V(r,e-i))==n.CharCategory.Word&&s(I(r,e-i))==n.CharCategory.Word||s(I(r,t-i))==n.CharCategory.Word&&s(V(r,t-i))==n.CharCategory.Word))):void 0);var o,s}class T extends F{constructor(e){super(e)}nextMatch(e,t,r){let i=R(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=R(this.spec,e,0,t).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let r=Math.max(t,i-1e4-this.spec.unquoted.length),n=R(this.spec,e,r,i),o=null;for(;!n.nextOverlapping().done;)o=n.value;if(o)return o;if(r==t)return null;i-=1e4}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=R(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let n=R(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!n.next().done;)i(n.value.from,n.value.to)}}function O(e,t,r,i){return new u(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,r)=>!r[0].length||(o(V(r.input,r.index))!=n.CharCategory.Word||o(I(r.input,r.index))!=n.CharCategory.Word)&&(o(I(r.input,r.index+r[0].length))!=n.CharCategory.Word||o(V(r.input,r.index+r[0].length))!=n.CharCategory.Word)):void 0},r,i);var o}function V(e,t){return e.slice((0,n.findClusterBreak)(e,t,!1),t)}function I(e,t){return e.slice(t,(0,n.findClusterBreak)(e,t))}class z extends F{nextMatch(e,t,r){let i=O(this.spec,e,r,e.doc.length).next();return i.done&&(i=O(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let n=Math.max(t,r-1e4*i),o=O(this.spec,e,n,r),s=null;for(;!o.next().done;)s=o.value;if(s&&(n==t||s.from>n+10))return s;if(n==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,r)=>"$"==r?"$":"&"==r?e.match[0]:"0"!=r&&+r<e.match.length?e.match[r]:t))}matchAll(e,t){let r=O(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let n=O(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!n.next().done;)i(n.value.from,n.value.to)}}const $=n.StateEffect.define(),U=n.StateEffect.define(),B=n.StateField.define({create:e=>new Q(ie(e).create(),null),update(e,t){for(let r of t.effects)r.is($)?e=new Q(r.value.create(),e.panel):r.is(U)&&(e=new Q(e.query,r.value?re:null));return e},provide:e=>i.showPanel.from(e,(e=>e.panel))});function _(e){let t=e.field(B,!1);return t?t.query.spec:ie(e)}function N(e){var t;return null!=(null===(t=e.field(B,!1))||void 0===t?void 0:t.panel)}class Q{constructor(e,t){this.query=e,this.panel=t}}const K=i.Decoration.mark({class:"cm-searchMatch"}),j=i.Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),J=i.ViewPlugin.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(B))}update(e){let t=e.state.field(B);(t!=e.startState.field(B)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return i.Decoration.none;let{view:r}=this,o=new n.RangeSetBuilder;for(let t=0,i=r.visibleRanges,n=i.length;t<n;t++){let{from:s,to:a}=i[t];for(;t<n-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(r.state,s,a,((e,t)=>{let i=r.state.selection.ranges.some((r=>r.from==e&&r.to==t));o.add(e,t,i?j:K)}))}return o.finish()}},{decorations:e=>e.decorations});function Y(e){return t=>{let r=t.state.field(B,!1);return r&&r.query.spec.valid?e(t,r):se(t)}}const G=Y(((e,{query:t})=>{let{to:r}=e.state.selection.main,i=t.nextMatch(e.state,r,r);if(!i)return!1;let o=n.EditorSelection.single(i.from,i.to),s=e.state.facet(P);return e.dispatch({selection:o,effects:[de(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),oe(e),!0})),H=Y(((e,{query:t})=>{let{state:r}=e,{from:i}=r.selection.main,o=t.prevMatch(r,i,i);if(!o)return!1;let s=n.EditorSelection.single(o.from,o.to),a=e.state.facet(P);return e.dispatch({selection:s,effects:[de(e,o),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),oe(e),!0})),X=Y(((e,{query:t})=>{let r=t.matchAll(e.state,1e3);return!(!r||!r.length||(e.dispatch({selection:n.EditorSelection.create(r.map((e=>n.EditorSelection.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),Z=({state:e,dispatch:t})=>{let r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:i,to:o}=r.main,s=[],a=0;for(let t=new l(e.doc,e.sliceDoc(i,o));!t.next().done;){if(s.length>1e3)return!1;t.value.from==i&&(a=s.length),s.push(n.EditorSelection.range(t.value.from,t.value.to))}return t(e.update({selection:n.EditorSelection.create(s,a),userEvent:"select.search.matches"})),!0},ee=Y(((e,{query:t})=>{let{state:r}=e,{from:o,to:s}=r.selection.main;if(r.readOnly)return!1;let a=t.nextMatch(r,o,o);if(!a)return!1;let l,c,h=[],u=[];if(a.from==o&&a.to==s&&(c=r.toText(t.getReplacement(a)),h.push({from:a.from,to:a.to,insert:c}),a=t.nextMatch(r,a.from,a.to),u.push(i.EditorView.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),a){let t=0==h.length||h[0].from>=a.to?0:a.to-a.from-c.length;l=n.EditorSelection.single(a.from-t,a.to-t),u.push(de(e,a)),u.push(r.facet(P).scrollToMatch(l.main,e))}return e.dispatch({changes:h,selection:l,effects:u,userEvent:"input.replace"}),!0})),te=Y(((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map((e=>{let{from:r,to:i}=e;return{from:r,to:i,insert:t.getReplacement(e)}}));if(!r.length)return!1;let n=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:i.EditorView.announce.of(n),userEvent:"input.replace.all"}),!0}));function re(e){return e.state.facet(P).createPanel(e)}function ie(e,t){var r,i,n,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(P);return new W({search:(null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==t?void 0:t.caseSensitive)&&void 0!==i?i:c.caseSensitive,literal:null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null==t?void 0:t.wholeWord)&&void 0!==s?s:c.wholeWord})}function ne(e){let t=(0,i.getPanel)(e,re);return t&&t.dom.querySelector("[main-field]")}function oe(e){let t=ne(e);t&&t==e.root.activeElement&&t.select()}const se=e=>{let t=e.state.field(B,!1);if(t&&t.panel){let r=ne(e);if(r&&r!=e.root.activeElement){let i=ie(e.state,t.query.spec);i.valid&&e.dispatch({effects:$.of(i)}),r.focus(),r.select()}}else e.dispatch({effects:[U.of(!0),t?$.of(ie(e.state,t.query.spec)):n.StateEffect.appendConfig.of(pe)]});return!0},ae=e=>{let t=e.state.field(B,!1);if(!t||!t.panel)return!1;let r=(0,i.getPanel)(e,re);return r&&r.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:U.of(!1)}),!0},le=[{key:"Mod-f",run:se,scope:"editor search-panel"},{key:"F3",run:G,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:G,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ae,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Z},{key:"Mod-Alt-g",run:y},{key:"Mod-d",run:L,preventDefault:!0}];class ce{constructor(e){this.view=e;let t=this.query=e.state.field(B).query.spec;function r(e,t,r){return o("button",{class:"cm-button",name:e,onclick:t,type:"button"},r)}this.commit=this.commit.bind(this),this.searchField=o("input",{value:t.search,placeholder:he(e,"Find"),"aria-label":he(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=o("input",{value:t.replace,placeholder:he(e,"Replace"),"aria-label":he(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=o("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=o("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=o("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=o("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,r("next",(()=>G(e)),[he(e,"next")]),r("prev",(()=>H(e)),[he(e,"previous")]),r("select",(()=>X(e)),[he(e,"all")]),o("label",null,[this.caseField,he(e,"match case")]),o("label",null,[this.reField,he(e,"regexp")]),o("label",null,[this.wordField,he(e,"by word")]),...e.state.readOnly?[]:[o("br"),this.replaceField,r("replace",(()=>ee(e)),[he(e,"replace")]),r("replaceAll",(()=>te(e)),[he(e,"replace all")])],o("button",{name:"close",onclick:()=>ae(e),"aria-label":he(e,"close"),type:"button"},["×"])])}commit(){let e=new W({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:$.of(e)}))}keydown(e){(0,i.runScopeHandlers)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?H:G)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),ee(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is($)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(P).top}}function he(e,t){return e.state.phrase(t)}const ue=30,fe=/[\s\.,:;?!]/;function de(e,{from:t,to:r}){let n=e.state.doc.lineAt(t),o=e.state.doc.lineAt(r).to,s=Math.max(n.from,t-ue),a=Math.min(o,r+ue),l=e.state.sliceDoc(s,a);if(s!=n.from)for(let e=0;e<ue;e++)if(!fe.test(l[e+1])&&fe.test(l[e])){l=l.slice(e);break}if(a!=o)for(let e=l.length-1;e>l.length-ue;e--)if(!fe.test(l[e-1])&&fe.test(l[e])){l=l.slice(0,e);break}return i.EditorView.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${n.number}.`)}const me=i.EditorView.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),pe=[B,n.Prec.low(J),me]}}]);