jupyter-docprovider-codio 2.1.1__tar.gz
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.
- jupyter_docprovider_codio-2.1.1/.gitignore +135 -0
- jupyter_docprovider_codio-2.1.1/LICENSE +59 -0
- jupyter_docprovider_codio-2.1.1/PKG-INFO +97 -0
- jupyter_docprovider_codio-2.1.1/README.md +9 -0
- jupyter_docprovider_codio-2.1.1/build.sh +29 -0
- jupyter_docprovider_codio-2.1.1/install.json +5 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/__init__.py +8 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/_version.py +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/package.json +134 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/20.114e91c3e854ad17cf2c.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/422.6b0e09d1345a6bf6e1ea.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/444.bdfc2c5249d9bfe47b0e.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/840.33666aef8ec77264e958.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/944.be7235c91f0dc005aaa4.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/96.947875594fd1250b2ad1.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/remoteEntry.2c320ffe8bdfc52130c7.js +1 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/style.js +4 -0
- jupyter_docprovider_codio-2.1.1/jupyter_docprovider_codio/labextension/static/third-party-licenses.json +58 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/babel.config.js +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/jest.config.js +37 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/TimelineSlider.d.ts +14 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/TimelineSlider.js +30 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/awareness.d.ts +54 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/awareness.js +44 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/component.d.ts +14 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/component.js +196 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/forkManager.d.ts +41 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/forkManager.js +85 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/index.d.ts +12 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/index.js +16 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/notebookCellExecutor.d.ts +23 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/notebookCellExecutor.js +108 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/requests.d.ts +34 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/requests.js +116 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/tokens.d.ts +103 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/tokens.js +9 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/ydrive.d.ts +63 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/ydrive.js +280 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/yprovider.d.ts +90 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/lib/yprovider.js +131 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/package.json +81 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/TimelineSlider.tsx +62 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/__tests__/forkManager.spec.ts +95 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/__tests__/yprovider.spec.ts +12 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/awareness.ts +99 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/component.tsx +309 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/forkManager.ts +124 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/index.ts +17 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/notebookCellExecutor.ts +138 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/requests.ts +182 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/tokens.ts +117 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/ydrive.ts +382 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/src/yprovider.ts +229 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/style/base.css +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/style/index.css +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/style/index.js +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/style/slider.css +42 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/tsconfig.json +10 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/tsconfig.test.json +4 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-codio/tsconfig.tsbuildinfo +1 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/README.md +5 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/codio.d.ts +18 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/codio.js +76 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/executor.d.ts +7 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/executor.js +23 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/filebrowser.d.ts +19 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/filebrowser.js +254 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/forkManager.d.ts +3 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/forkManager.js +17 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/index.d.ts +10 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/lib/index.js +22 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/babel.config.js +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/jest.config.js +37 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/TimelineSlider.d.ts +14 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/TimelineSlider.js +30 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/awareness.d.ts +54 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/awareness.js +44 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/component.d.ts +14 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/component.js +196 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/forkManager.d.ts +41 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/forkManager.js +85 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/index.d.ts +12 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/index.js +16 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/notebookCellExecutor.d.ts +23 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/notebookCellExecutor.js +108 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/requests.d.ts +34 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/requests.js +116 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/tokens.d.ts +103 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/tokens.js +9 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/ydrive.d.ts +63 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/ydrive.js +280 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/yprovider.d.ts +90 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/lib/yprovider.js +131 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/package.json +81 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/TimelineSlider.tsx +62 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/__tests__/forkManager.spec.ts +95 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/__tests__/yprovider.spec.ts +12 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/awareness.ts +99 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/component.tsx +309 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/forkManager.ts +124 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/index.ts +17 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/notebookCellExecutor.ts +138 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/requests.ts +182 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/tokens.ts +117 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/ydrive.ts +382 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/src/yprovider.ts +229 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/style/base.css +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/style/index.css +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/style/index.js +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/style/slider.css +42 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/tsconfig.json +10 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/tsconfig.test.json +4 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/node_modules/docprovider-codio/tsconfig.tsbuildinfo +1 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/package.json +129 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/src/codio.ts +91 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/src/executor.ts +31 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/src/filebrowser.ts +380 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/src/forkManager.ts +31 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/src/index.ts +33 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/style/index.css +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/style/index.js +6 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/tsconfig.json +9 -0
- jupyter_docprovider_codio-2.1.1/packages/docprovider-extension-codio/tsconfig.tsbuildinfo +1 -0
- jupyter_docprovider_codio-2.1.1/pyproject.toml +74 -0
- jupyter_docprovider_codio-2.1.1/setup.py +5 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
*.bundle.*
|
|
2
|
+
lib/
|
|
3
|
+
node_modules/
|
|
4
|
+
*.log
|
|
5
|
+
.eslintcache
|
|
6
|
+
.stylelintcache
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.ipynb_checkpoints
|
|
9
|
+
*.tsbuildinfo
|
|
10
|
+
package-lock.json
|
|
11
|
+
docs/source/ts
|
|
12
|
+
.jupyter
|
|
13
|
+
labextension
|
|
14
|
+
|
|
15
|
+
# Integration tests
|
|
16
|
+
ui-tests/test-results/
|
|
17
|
+
ui-tests/playwright-report/
|
|
18
|
+
|
|
19
|
+
# Created by https://www.gitignore.io/api/python
|
|
20
|
+
# Edit at https://www.gitignore.io/?templates=python
|
|
21
|
+
|
|
22
|
+
### Python ###
|
|
23
|
+
# Byte-compiled / optimized / DLL files
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*$py.class
|
|
27
|
+
|
|
28
|
+
# C extensions
|
|
29
|
+
*.so
|
|
30
|
+
|
|
31
|
+
# Distribution / packaging
|
|
32
|
+
.Python
|
|
33
|
+
build/
|
|
34
|
+
develop-eggs/
|
|
35
|
+
dist/
|
|
36
|
+
downloads/
|
|
37
|
+
eggs/
|
|
38
|
+
.eggs/
|
|
39
|
+
lib/
|
|
40
|
+
lib64/
|
|
41
|
+
parts/
|
|
42
|
+
sdist/
|
|
43
|
+
var/
|
|
44
|
+
wheels/
|
|
45
|
+
pip-wheel-metadata/
|
|
46
|
+
share/python-wheels/
|
|
47
|
+
.installed.cfg
|
|
48
|
+
*.egg
|
|
49
|
+
MANIFEST
|
|
50
|
+
|
|
51
|
+
# PyInstaller
|
|
52
|
+
# Usually these files are written by a python script from a template
|
|
53
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
54
|
+
*.manifest
|
|
55
|
+
*.spec
|
|
56
|
+
|
|
57
|
+
# Installer logs
|
|
58
|
+
pip-log.txt
|
|
59
|
+
pip-delete-this-directory.txt
|
|
60
|
+
|
|
61
|
+
# Unit test / coverage reports
|
|
62
|
+
htmlcov/
|
|
63
|
+
.tox/
|
|
64
|
+
.nox/
|
|
65
|
+
.coverage
|
|
66
|
+
.coverage.*
|
|
67
|
+
.cache
|
|
68
|
+
nosetests.xml
|
|
69
|
+
coverage/
|
|
70
|
+
coverage.xml
|
|
71
|
+
*.cover
|
|
72
|
+
.hypothesis/
|
|
73
|
+
.pytest_cache/
|
|
74
|
+
|
|
75
|
+
# Translations
|
|
76
|
+
*.mo
|
|
77
|
+
*.pot
|
|
78
|
+
|
|
79
|
+
# Scrapy stuff:
|
|
80
|
+
.scrapy
|
|
81
|
+
|
|
82
|
+
# Sphinx documentation
|
|
83
|
+
docs/_build/
|
|
84
|
+
|
|
85
|
+
# PyBuilder
|
|
86
|
+
target/
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
.python-version
|
|
90
|
+
|
|
91
|
+
# celery beat schedule file
|
|
92
|
+
celerybeat-schedule
|
|
93
|
+
|
|
94
|
+
# SageMath parsed files
|
|
95
|
+
*.sage.py
|
|
96
|
+
|
|
97
|
+
# Spyder project settings
|
|
98
|
+
.spyderproject
|
|
99
|
+
.spyproject
|
|
100
|
+
|
|
101
|
+
# Rope project settings
|
|
102
|
+
.ropeproject
|
|
103
|
+
|
|
104
|
+
# Mr Developer
|
|
105
|
+
.mr.developer.cfg
|
|
106
|
+
.project
|
|
107
|
+
.pydevproject
|
|
108
|
+
|
|
109
|
+
# mkdocs documentation
|
|
110
|
+
/site
|
|
111
|
+
|
|
112
|
+
# mypy
|
|
113
|
+
.mypy_cache/
|
|
114
|
+
.dmypy.json
|
|
115
|
+
dmypy.json
|
|
116
|
+
|
|
117
|
+
# Pyre type checker
|
|
118
|
+
.pyre/
|
|
119
|
+
|
|
120
|
+
# End of https://www.gitignore.io/api/python
|
|
121
|
+
|
|
122
|
+
# OSX files
|
|
123
|
+
.DS_Store
|
|
124
|
+
docs/source/changelog.md
|
|
125
|
+
|
|
126
|
+
.pnp.*
|
|
127
|
+
.yarn/
|
|
128
|
+
!.yarn/patches
|
|
129
|
+
!.yarn/plugins
|
|
130
|
+
!.yarn/releases
|
|
131
|
+
!.yarn/sdks
|
|
132
|
+
!.yarn/versions
|
|
133
|
+
packages/docprovider/junit.xml
|
|
134
|
+
packages/docprovider-codio/junit.xml
|
|
135
|
+
.jupyter_ystore.db
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Licensing terms
|
|
2
|
+
|
|
3
|
+
This project is licensed under the terms of the Modified BSD License
|
|
4
|
+
(also known as New or Revised or 3-Clause BSD), as follows:
|
|
5
|
+
|
|
6
|
+
- Copyright (c) 2021-, Jupyter Development Team
|
|
7
|
+
|
|
8
|
+
All rights reserved.
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
|
11
|
+
modification, are permitted provided that the following conditions are met:
|
|
12
|
+
|
|
13
|
+
Redistributions of source code must retain the above copyright notice, this
|
|
14
|
+
list of conditions and the following disclaimer.
|
|
15
|
+
|
|
16
|
+
Redistributions in binary form must reproduce the above copyright notice, this
|
|
17
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
18
|
+
other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
Neither the name of the Jupyter Development Team nor the names of its
|
|
21
|
+
contributors may be used to endorse or promote products derived from this
|
|
22
|
+
software without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
25
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
28
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
29
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
31
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
32
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
|
|
35
|
+
## About the Jupyter Development Team
|
|
36
|
+
|
|
37
|
+
The Jupyter Development Team is the set of all contributors to the Jupyter project.
|
|
38
|
+
This includes all of the Jupyter subprojects.
|
|
39
|
+
|
|
40
|
+
The core team that coordinates development on GitHub can be found here:
|
|
41
|
+
https://github.com/jupyter/.
|
|
42
|
+
|
|
43
|
+
## Our Copyright Policy
|
|
44
|
+
|
|
45
|
+
Jupyter uses a shared copyright model. Each contributor maintains copyright
|
|
46
|
+
over their contributions to Jupyter. But, it is important to note that these
|
|
47
|
+
contributions are typically only changes to the repositories. Thus, the Jupyter
|
|
48
|
+
source code, in its entirety is not the copyright of any single person or
|
|
49
|
+
institution. Instead, it is the collective copyright of the entire Jupyter
|
|
50
|
+
Development Team. If individual contributors want to maintain a record of what
|
|
51
|
+
changes/contributions they have specific copyright on, they should indicate
|
|
52
|
+
their copyright in the commit message of the change, when they commit the
|
|
53
|
+
change to one of the Jupyter repositories.
|
|
54
|
+
|
|
55
|
+
With this in mind, the following banner should be used in any source code file
|
|
56
|
+
to indicate the copyright and license terms:
|
|
57
|
+
|
|
58
|
+
# Copyright (c) Jupyter Development Team.
|
|
59
|
+
# Distributed under the terms of the Modified BSD License.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jupyter-docprovider-codio
|
|
3
|
+
Version: 2.1.1
|
|
4
|
+
Summary: JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models.
|
|
5
|
+
Project-URL: Documentation, https://jupyterlab-realtime-collaboration.readthedocs.io/
|
|
6
|
+
Project-URL: Repository, https://github.com/codio/jupyter-collaboration
|
|
7
|
+
Project-URL: Changelog, https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/changelog.html
|
|
8
|
+
Project-URL: Source, https://github.com/codio/jupyter-collaboration/tree/main/packages/docprovider-extension-codio
|
|
9
|
+
Project-URL: Issues, https://github.com/codio/jupyter-collaboration/issues/new/choose
|
|
10
|
+
Author-email: Jupyter Development Team <jupyter@googlegroups.com>
|
|
11
|
+
License: # Licensing terms
|
|
12
|
+
|
|
13
|
+
This project is licensed under the terms of the Modified BSD License
|
|
14
|
+
(also known as New or Revised or 3-Clause BSD), as follows:
|
|
15
|
+
|
|
16
|
+
- Copyright (c) 2021-, Jupyter Development Team
|
|
17
|
+
|
|
18
|
+
All rights reserved.
|
|
19
|
+
|
|
20
|
+
Redistribution and use in source and binary forms, with or without
|
|
21
|
+
modification, are permitted provided that the following conditions are met:
|
|
22
|
+
|
|
23
|
+
Redistributions of source code must retain the above copyright notice, this
|
|
24
|
+
list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
Redistributions in binary form must reproduce the above copyright notice, this
|
|
27
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
28
|
+
other materials provided with the distribution.
|
|
29
|
+
|
|
30
|
+
Neither the name of the Jupyter Development Team nor the names of its
|
|
31
|
+
contributors may be used to endorse or promote products derived from this
|
|
32
|
+
software without specific prior written permission.
|
|
33
|
+
|
|
34
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
35
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
36
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
37
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
38
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
39
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
40
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
41
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
42
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
43
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
44
|
+
|
|
45
|
+
## About the Jupyter Development Team
|
|
46
|
+
|
|
47
|
+
The Jupyter Development Team is the set of all contributors to the Jupyter project.
|
|
48
|
+
This includes all of the Jupyter subprojects.
|
|
49
|
+
|
|
50
|
+
The core team that coordinates development on GitHub can be found here:
|
|
51
|
+
https://github.com/jupyter/.
|
|
52
|
+
|
|
53
|
+
## Our Copyright Policy
|
|
54
|
+
|
|
55
|
+
Jupyter uses a shared copyright model. Each contributor maintains copyright
|
|
56
|
+
over their contributions to Jupyter. But, it is important to note that these
|
|
57
|
+
contributions are typically only changes to the repositories. Thus, the Jupyter
|
|
58
|
+
source code, in its entirety is not the copyright of any single person or
|
|
59
|
+
institution. Instead, it is the collective copyright of the entire Jupyter
|
|
60
|
+
Development Team. If individual contributors want to maintain a record of what
|
|
61
|
+
changes/contributions they have specific copyright on, they should indicate
|
|
62
|
+
their copyright in the commit message of the change, when they commit the
|
|
63
|
+
change to one of the Jupyter repositories.
|
|
64
|
+
|
|
65
|
+
With this in mind, the following banner should be used in any source code file
|
|
66
|
+
to indicate the copyright and license terms:
|
|
67
|
+
|
|
68
|
+
# Copyright (c) Jupyter Development Team.
|
|
69
|
+
# Distributed under the terms of the Modified BSD License.
|
|
70
|
+
License-File: LICENSE
|
|
71
|
+
Classifier: Framework :: Jupyter
|
|
72
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
73
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
74
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
75
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
76
|
+
Classifier: Intended Audience :: Developers
|
|
77
|
+
Classifier: Intended Audience :: Science/Research
|
|
78
|
+
Classifier: Intended Audience :: System Administrators
|
|
79
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
80
|
+
Classifier: Programming Language :: Python
|
|
81
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
82
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
83
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
84
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
85
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
86
|
+
Requires-Python: >=3.8
|
|
87
|
+
Description-Content-Type: text/markdown
|
|
88
|
+
|
|
89
|
+
# jupyter-docprovider-codio
|
|
90
|
+
# fork of jupyter-docprovider
|
|
91
|
+
|
|
92
|
+
Codio fork of
|
|
93
|
+
JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models.
|
|
94
|
+
|
|
95
|
+
The collaborative shared models are used for both:
|
|
96
|
+
- real time collaboration, and
|
|
97
|
+
- server-side execution of notebooks
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# jupyter-docprovider-codio
|
|
2
|
+
# fork of jupyter-docprovider
|
|
3
|
+
|
|
4
|
+
Codio fork of
|
|
5
|
+
JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models.
|
|
6
|
+
|
|
7
|
+
The collaborative shared models are used for both:
|
|
8
|
+
- real time collaboration, and
|
|
9
|
+
- server-side execution of notebooks
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Copyright (c) Jupyter Development Team.
|
|
3
|
+
# Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
pwd
|
|
7
|
+
|
|
8
|
+
cd ../../packages/docprovider-codio
|
|
9
|
+
pwd
|
|
10
|
+
jlpm run clean:all
|
|
11
|
+
jlpm
|
|
12
|
+
jlpm run build:prod
|
|
13
|
+
|
|
14
|
+
cd ../../packages/docprovider-extension-codio
|
|
15
|
+
pwd
|
|
16
|
+
jlpm run clean:all
|
|
17
|
+
jlpm
|
|
18
|
+
jlpm run build:prod
|
|
19
|
+
|
|
20
|
+
cd ../../packages/collaboration-extension
|
|
21
|
+
pwd
|
|
22
|
+
jlpm run clean:all
|
|
23
|
+
jlpm
|
|
24
|
+
jlpm run build:prod
|
|
25
|
+
|
|
26
|
+
cd ../../projects/jupyter-docprovider-codio
|
|
27
|
+
pwd
|
|
28
|
+
rm -rf dir/
|
|
29
|
+
python -m build
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.1"
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docprovider-extension-codio",
|
|
3
|
+
"version": "4.1.1",
|
|
4
|
+
"description": "Codio fork of JupyterLab - Collaborative Shared Models",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/codio/jupyter-collaboration",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/codio/jupyter-collaboration/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/codio/jupyter-collaboration.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "BSD-3-Clause",
|
|
19
|
+
"author": "Project Jupyter",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"style/*.css",
|
|
22
|
+
"style/index.js"
|
|
23
|
+
],
|
|
24
|
+
"main": "lib/index.js",
|
|
25
|
+
"types": "lib/index.d.ts",
|
|
26
|
+
"style": "style/index.css",
|
|
27
|
+
"styleModule": "style/index.js",
|
|
28
|
+
"directories": {
|
|
29
|
+
"lib": "lib/"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"lib/*.d.ts",
|
|
33
|
+
"lib/*.js.map",
|
|
34
|
+
"lib/*.js",
|
|
35
|
+
"schema/*.json",
|
|
36
|
+
"style/*.css",
|
|
37
|
+
"style/index.js"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
|
|
41
|
+
"build:lib": "tsc --sourceMap",
|
|
42
|
+
"build:lib:prod": "tsc",
|
|
43
|
+
"build:prod": "jlpm run clean && jlpm run build:lib:prod && jlpm run build:labextension",
|
|
44
|
+
"build:labextension": "jupyter labextension build .",
|
|
45
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
46
|
+
"clean": "jlpm run clean:lib",
|
|
47
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo node_modules",
|
|
48
|
+
"clean:labextension": "rimraf ../../projects/jupyter-docprovider-codio/jupyter_docprovider_codio/labextension",
|
|
49
|
+
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
|
|
50
|
+
"install:extension": "jlpm run build",
|
|
51
|
+
"watch": "run-p watch:src watch:labextension",
|
|
52
|
+
"watch:src": "tsc -w",
|
|
53
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@jupyter/collaborative-drive": "^4.1.1",
|
|
57
|
+
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
|
|
58
|
+
"@jupyterlab/application": "^4.4.0",
|
|
59
|
+
"@jupyterlab/apputils": "^4.4.0",
|
|
60
|
+
"@jupyterlab/docregistry": "^4.4.0",
|
|
61
|
+
"@jupyterlab/filebrowser": "^4.4.0",
|
|
62
|
+
"@jupyterlab/fileeditor": "^4.4.0",
|
|
63
|
+
"@jupyterlab/logconsole": "^4.4.0",
|
|
64
|
+
"@jupyterlab/notebook": "^4.4.0",
|
|
65
|
+
"@jupyterlab/settingregistry": "^4.4.0",
|
|
66
|
+
"@jupyterlab/translation": "^4.4.0",
|
|
67
|
+
"@lumino/commands": "^2.3.2",
|
|
68
|
+
"docprovider-codio": "../docprovider-codio",
|
|
69
|
+
"y-protocols": "^1.0.5",
|
|
70
|
+
"y-websocket": "^1.3.15",
|
|
71
|
+
"yjs": "^13.5.40"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@jupyterlab/builder": "^4.4.0",
|
|
75
|
+
"@types/react": "~18.3.1",
|
|
76
|
+
"npm-run-all": "^4.1.5",
|
|
77
|
+
"rimraf": "^4.1.2",
|
|
78
|
+
"typescript": "~5.1.6"
|
|
79
|
+
},
|
|
80
|
+
"private": true,
|
|
81
|
+
"typedoc": {
|
|
82
|
+
"entryPoint": "./src/index.ts",
|
|
83
|
+
"readmeFile": "./README.md",
|
|
84
|
+
"displayName": "docprovider-extension-codio",
|
|
85
|
+
"tsconfig": "./tsconfig.json"
|
|
86
|
+
},
|
|
87
|
+
"jupyterlab": {
|
|
88
|
+
"extension": true,
|
|
89
|
+
"outputDir": "../../projects/jupyter-docprovider-codio/jupyter_docprovider_codio/labextension",
|
|
90
|
+
"disabledExtensions": [
|
|
91
|
+
"@jupyterlab/filebrowser-extension:defaultFileBrowser",
|
|
92
|
+
"@jupyterlab/notebook-extension:cell-executor"
|
|
93
|
+
],
|
|
94
|
+
"sharedPackages": {
|
|
95
|
+
"@codemirror/state": {
|
|
96
|
+
"bundled": false,
|
|
97
|
+
"singleton": true
|
|
98
|
+
},
|
|
99
|
+
"@codemirror/view": {
|
|
100
|
+
"bundled": false,
|
|
101
|
+
"singleton": true
|
|
102
|
+
},
|
|
103
|
+
"@jupyter/collaboration": {
|
|
104
|
+
"bundled": false,
|
|
105
|
+
"singleton": true
|
|
106
|
+
},
|
|
107
|
+
"@jupyter/collaborative-drive": {
|
|
108
|
+
"bundled": true,
|
|
109
|
+
"singleton": true
|
|
110
|
+
},
|
|
111
|
+
"docprovider-codio": {
|
|
112
|
+
"bundled": true,
|
|
113
|
+
"singleton": true
|
|
114
|
+
},
|
|
115
|
+
"@jupyter/ydoc": {
|
|
116
|
+
"bundled": false,
|
|
117
|
+
"singleton": true
|
|
118
|
+
},
|
|
119
|
+
"y-protocols": {
|
|
120
|
+
"bundled": false,
|
|
121
|
+
"singleton": true
|
|
122
|
+
},
|
|
123
|
+
"yjs": {
|
|
124
|
+
"bundled": false,
|
|
125
|
+
"singleton": true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"_build": {
|
|
129
|
+
"load": "static/remoteEntry.2c320ffe8bdfc52130c7.js",
|
|
130
|
+
"extension": "./extension",
|
|
131
|
+
"style": "./style"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[20],{20:(e,t,s)=>{"use strict";s.r(t),s.d(t,{WebsocketProvider:()=>ee,messageAuth:()=>J,messageAwareness:()=>V,messageQueryAwareness:()=>Q,messageSync:()=>W});var n=s(206);const o=()=>new Map,c=(e,t,s)=>{let n=e.get(t);return void 0===n&&e.set(t,n=s()),n},r=()=>new Set;var a=s(554);let i=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},l=!0;try{"undefined"!=typeof localStorage&&localStorage&&(i=localStorage,l=!1)}catch(e){}const h=i,d=Array.from,u=(Array.isArray,Object.assign,Object.keys),f=(Object.values,e=>u(e).length),g=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p=(Object.freeze,Symbol("Equality")),w=(e,t)=>{if(e===t)return!0;if(null==e||null==t||e.constructor!==t.constructor)return!1;if(null!=e[p])return e[p](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;break;case Set:if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;break;case Map:if(e.size!==t.size)return!1;for(const s of e.keys())if(!t.has(s)||!w(e.get(s),t.get(s)))return!1;break;case Object:if(f(e)!==f(t))return!1;for(const s in e)if(!g(e,s)||!w(e[s],t[s]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!w(e[s],t[s]))return!1;break;default:return!1}return!0};var m=s(288);const v=void 0!==m&&m.release&&/node|io\.js/.test(m.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==m?m:0),b="undefined"!=typeof window&&"undefined"!=typeof document&&!v;let y;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);const _=[],k=e=>(()=>{if(void 0===y)if(v){y=o();const e=m.argv;let t=null;for(let s=0;s<e.length;s++){const n=e[s];"-"===n[0]?(null!==t&&y.set(t,""),t=n):null!==t?(y.set(t,n),t=null):_.push(n)}null!==t&&y.set(t,"")}else"object"==typeof location?(y=o(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){const[t,s]=e.split("=");y.set(`--${a.jN(t,"-")}`,s),y.set(`-${a.jN(t,"-")}`,s)}})):y=o();return y})().has(e),S=e=>{return void 0===(t=v?m.env[e.toUpperCase().replaceAll("-","_")]:h.getItem(e))?null:t;var t},I=e=>k("--"+e)||null!==S(e);var C;I("production"),v&&(C=m.env.FORCE_COLOR,["true","1","2"].includes(C))||!k("--no-colors")&&!I("no-color")&&(!v||m.stdout.isTTY)&&(!v||k("--color")||null!==S("COLORTERM")||(S("TERM")||"").includes("color"));const L=b?e=>{let t="";for(let s=0;s<e.byteLength;s++)t+=a.QV(e[s]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),U=b?e=>{const t=atob(e),s=(n=t.length,new Uint8Array(n));var n;for(let e=0;e<t.length;e++)s[e]=t.charCodeAt(e);return s}:e=>{const t=Buffer.from(e,"base64");return s=t.buffer,n=t.byteOffset,o=t.byteLength,new Uint8Array(s,n,o);var s,n,o},x=new Map,T="undefined"==typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:U(t.newValue||"")}),t=this._onChange,l||addEventListener("storage",t)}postMessage(e){h.setItem(this.room,L(new Uint8Array(e)))}close(){var e;e=this._onChange,l||removeEventListener("storage",e)}}:BroadcastChannel,z=e=>c(x,e,()=>{const t=r(),s=new T(e);return s.onmessage=e=>t.forEach(t=>t(e.data,"broadcastchannel")),{bc:s,subs:t}}),A=(e,t,s=null)=>{const n=z(e);n.bc.postMessage(t),n.subs.forEach(e=>e(t,s))},O=Date.now;var E=s(214),B=s(721);const j=(e,t)=>{E.zd(e,0);const s=n.encodeStateVector(t);E.Gu(e,s)},M=(e,t,s)=>{E.zd(e,1),E.Gu(e,n.encodeStateAsUpdate(t,s))},R=(e,t,s)=>{try{n.applyUpdate(t,B.bo(e),s)}catch(e){console.error("Caught error while handling a Yjs update",e)}},F=R;var D=s(801);class H{constructor(){this._observers=o()}on(e,t){c(this._observers,e,r).add(t)}once(e,t){const s=(...n)=>{this.off(e,s),t(...n)};this.on(e,s)}off(e,t){const s=this._observers.get(e);void 0!==s&&(s.delete(t),0===s.size&&this._observers.delete(e))}emit(e,t){return d((this._observers.get(e)||o()).values()).forEach(e=>e(...t))}destroy(){this._observers=o()}}class G extends H{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=O();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach((s,n)=>{n!==this.clientID&&3e4<=e-s.lastUpdated&&this.states.has(n)&&t.push(n)}),t.length>0&&$(this,t,"timeout")},D.RI(3e3)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const t=this.clientID,s=this.meta.get(t),n=void 0===s?0:s.clock+1,o=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:n,lastUpdated:O()});const c=[],r=[],a=[],i=[];null===e?i.push(t):null==o?null!=e&&c.push(t):(r.push(t),w(o,e)||a.push(t)),(c.length>0||a.length>0||i.length>0)&&this.emit("change",[{added:c,updated:a,removed:i},"local"]),this.emit("update",[{added:c,updated:r,removed:i},"local"])}setLocalStateField(e,t){const s=this.getLocalState();null!==s&&this.setLocalState({...s,[e]:t})}getStates(){return this.states}}const $=(e,t,s)=>{const n=[];for(let s=0;s<t.length;s++){const o=t[s];if(e.states.has(o)){if(e.states.delete(o),o===e.clientID){const t=e.meta.get(o);e.meta.set(o,{clock:t.clock+1,lastUpdated:O()})}n.push(o)}}n.length>0&&(e.emit("change",[{added:[],updated:[],removed:n},s]),e.emit("update",[{added:[],updated:[],removed:n},s]))},N=(e,t,s=e.states)=>{const n=t.length,o=E.xv();E.zd(o,n);for(let c=0;c<n;c++){const n=t[c],r=s.get(n)||null,a=e.meta.get(n).clock;E.zd(o,n),E.zd(o,a),E.Qj(o,JSON.stringify(r))}return E.Fo(o)};var P=s(288);const W=0,Q=3,V=1,J=2,Y=[];Y[W]=(e,t,s,n,o)=>{E.zd(e,W);const c=((e,t,s,n)=>{const o=B.cw(e);switch(o){case 0:((e,t,s)=>{M(t,s,B.bo(e))})(e,t,s);break;case 1:R(e,s,n);break;case 2:F(e,s,n);break;default:throw new Error("Unknown message type")}return o})(t,e,s.doc,s);n&&1===c&&!s.synced&&(s.synced=!0)},Y[Q]=(e,t,s,n,o)=>{E.zd(e,V),E.Gu(e,N(s.awareness,Array.from(s.awareness.getStates().keys())))},Y[V]=(e,t,s,n,o)=>{((e,t,s)=>{const n=B.$C(t),o=O(),c=[],r=[],a=[],i=[],l=B.cw(n);for(let t=0;t<l;t++){const t=B.cw(n);let s=B.cw(n);const l=JSON.parse(B.t3(n)),h=e.meta.get(t),d=e.states.get(t),u=void 0===h?0:h.clock;(u<s||u===s&&null===l&&e.states.has(t))&&(null===l?t===e.clientID&&null!=e.getLocalState()?s++:e.states.delete(t):e.states.set(t,l),e.meta.set(t,{clock:s,lastUpdated:o}),void 0===h&&null!==l?c.push(t):void 0!==h&&null===l?i.push(t):null!==l&&(w(l,d)||a.push(t),r.push(t)))}(c.length>0||a.length>0||i.length>0)&&e.emit("change",[{added:c,updated:a,removed:i},s]),(c.length>0||r.length>0||i.length>0)&&e.emit("update",[{added:c,updated:r,removed:i},s])})(s.awareness,B.bo(t),s)},Y[J]=(e,t,s,n,o)=>{((e,t,s)=>{0===B.cw(e)&&s(0,B.t3(e))})(t,s.doc,(e,t)=>q(s,t))};const q=(e,t)=>console.warn(`Permission denied to access ${e.url}.\n${t}`),K=(e,t,s)=>{const n=B.$C(t),o=E.xv(),c=B.cw(n),r=e.messageHandlers[c];return r?r(o,n,e,s,c):console.error("Unable to compute message"),o},X=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=s=>{e.wsLastMessageReceived=O();const n=K(e,new Uint8Array(s.data),!0);E.Bw(n)>1&&t.send(E.Fo(n))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=t=>{e.emit("connection-close",[t,e]),e.ws=null,e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,$(e.awareness,Array.from(e.awareness.getStates().keys()).filter(t=>t!==e.doc.clientID),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(X,D.jk(100*D.n7(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e)},t.onopen=()=>{e.wsLastMessageReceived=O(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const s=E.xv();if(E.zd(s,W),j(s,e.doc),t.send(E.Fo(s)),null!==e.awareness.getLocalState()){const s=E.xv();E.zd(s,V),E.Gu(s,N(e.awareness,[e.doc.clientID])),t.send(E.Fo(s))}},e.emit("status",[{status:"connecting"}])}},Z=(e,t)=>{const s=e.ws;e.wsconnected&&s&&s.readyState===s.OPEN&&s.send(t),e.bcconnected&&A(e.bcChannel,t,e)};class ee extends H{constructor(e,t,s,{connect:n=!0,awareness:o=new G(s),params:c={},WebSocketPolyfill:r=WebSocket,resyncInterval:a=-1,maxBackoffTime:i=2500,disableBc:l=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);const h=(e=>((e,t)=>{const s=[];for(const n in e)s.push(t(e[n],n));return s})(e,(e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&"))(c);this.maxBackoffTime=i,this.bcChannel=e+"/"+t,this.url=e+"/"+t+(0===h.length?"":"?"+h),this.roomname=t,this.doc=s,this._WS=r,this.awareness=o,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=l,this.wsUnsuccessfulReconnects=0,this.messageHandlers=Y.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=n,this._resyncInterval=0,a>0&&(this._resyncInterval=setInterval(()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=E.xv();E.zd(e,W),j(e,s),this.ws.send(E.Fo(e))}},a)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=K(this,new Uint8Array(e),!1);E.Bw(t)>1&&A(this.bcChannel,E.Fo(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=E.xv();E.zd(t,W),((e,t)=>{E.zd(e,2),E.Gu(e,t)})(t,e),Z(this,E.Fo(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:s},n)=>{const c=e.concat(t).concat(s),r=E.xv();E.zd(r,V),E.Gu(r,N(o,c)),Z(this,E.Fo(r))},this._exitHandler=()=>{$(this.awareness,[s.clientID],"app closed")},v&&void 0!==P&&P.on("exit",this._exitHandler),o.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval(()=>{this.wsconnected&&3e4<O()-this.wsLastMessageReceived&&this.ws.close()},3e3),n&&this.connect()}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),v&&void 0!==P&&P.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;var e,t;this.bcconnected||(e=this.bcChannel,t=this._bcSubscriber,z(e).subs.add(t),this.bcconnected=!0);const s=E.xv();E.zd(s,W),j(s,this.doc),A(this.bcChannel,E.Fo(s),this);const n=E.xv();E.zd(n,W),M(n,this.doc),A(this.bcChannel,E.Fo(n),this);const o=E.xv();E.zd(o,Q),A(this.bcChannel,E.Fo(o),this);const c=E.xv();E.zd(c,V),E.Gu(c,N(this.awareness,[this.doc.clientID])),A(this.bcChannel,E.Fo(c),this)}disconnectBc(){const e=E.xv();E.zd(e,V),E.Gu(e,N(this.awareness,[this.doc.clientID],new Map)),Z(this,E.Fo(e)),this.bcconnected&&(((e,t)=>{const s=z(e);s.subs.delete(t)&&0===s.subs.size&&(s.bc.close(),x.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&this.ws.close()}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(X(this),this.connectBc())}}},288:e=>{var t,s,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function r(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(s){try{return t.call(null,e,0)}catch(s){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{s="function"==typeof clearTimeout?clearTimeout:c}catch(e){s=c}}();var a,i=[],l=!1,h=-1;function d(){l&&a&&(l=!1,a.length?i=a.concat(i):h=-1,i.length&&u())}function u(){if(!l){var e=r(d);l=!0;for(var t=i.length;t;){for(a=i,i=[];++h<t;)a&&a[h].run();h=-1,t=i.length}a=null,l=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===c||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)t[s-1]=arguments[s];i.push(new f(e,t)),1!==i.length||l||r(u)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[422],{214:(e,t,n)=>{n.d(t,{Bw:()=>f,Fo:()=>u,Gu:()=>h,Qj:()=>b,xv:()=>a,zd:()=>i});var o=n(801),r=n(734),s=n(554);class c{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const a=()=>new c,f=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},u=e=>{const t=new Uint8Array(f(e));let n=0;for(let o=0;o<e.bufs.length;o++){const r=e.bufs[o];t.set(r,n),n+=r.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},l=(e,t)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},i=(e,t)=>{for(;t>r.WD;)l(e,r.wt|r.WD&t),t=o.RI(t/128);l(e,r.WD&t)},d=new Uint8Array(3e4),p=d.length/3,b=s.db&&s.db.encodeInto?(e,t)=>{if(t.length<p){const n=s.db.encodeInto(t,d).written||0;i(e,n);for(let t=0;t<n;t++)l(e,d[t])}else h(e,s.Af(t))}:(e,t)=>{const n=unescape(encodeURIComponent(t)),o=n.length;i(e,o);for(let t=0;t<o;t++)l(e,n.codePointAt(t))},h=(e,t)=>{i(e,t.byteLength),((e,t)=>{const n=e.cbuf.length,r=e.cpos,s=o.jk(n-r,t.length),c=t.length-s;e.cbuf.set(t.subarray(0,s),r),e.cpos+=s,c>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(o.T9(2*n,c)),e.cbuf.set(t.subarray(s)),e.cpos=c)})(e,t)};new DataView(new ArrayBuffer(4))},554:(e,t,n)=>{n.d(t,{Af:()=>f,QV:()=>o,db:()=>a,jN:()=>c,tv:()=>u});const o=String.fromCharCode,r=(String.fromCodePoint,o(65535),/^\s*/g),s=/([A-Z])/g,c=(e,t)=>(e=>e.replace(r,""))(e.replace(s,e=>`${t}${(e=>e.toLowerCase())(e)}`)),a="undefined"!=typeof TextEncoder?new TextEncoder:null,f=a?e=>a.encode(e):e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let e=0;e<n;e++)o[e]=t.codePointAt(e);return o};let u="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});u&&1===u.decode(new Uint8Array).length&&(u=null)},721:(e,t,n)=>{n.d(t,{$C:()=>l,t3:()=>b,cw:()=>p,bo:()=>i});var o=n(734);n(801);const r=Number.MAX_SAFE_INTEGER;Number.MIN_SAFE_INTEGER,o.vZ,o.CW,Number.isInteger,Number.isNaN,Number.parseInt;var s=n(554);const c=e=>new Error(e),a=c("Unexpected end of array"),f=c("Integer out of Range");class u{constructor(e){this.arr=e,this.pos=0}}const l=e=>new u(e),i=e=>((e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n})(e,p(e)),d=e=>e.arr[e.pos++],p=e=>{let t=0,n=1;const s=e.arr.length;for(;e.pos<s;){const s=e.arr[e.pos++];if(t+=(s&o.WD)*n,n*=128,s<o.wt)return t;if(t>r)throw f}throw a},b=s.tv?e=>s.tv.decode(i(e)):e=>{let t=p(e);if(0===t)return"";{let n=String.fromCodePoint(d(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(d(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}}},734:(e,t,n)=>{n.d(t,{CW:()=>f,D7:()=>o,P1:()=>s,WD:()=>c,vZ:()=>a,wt:()=>r});const o=64,r=128,s=63,c=127,a=2147483647,f=4294967295},801:(e,t,n)=>{n.d(t,{RI:()=>o,T9:()=>s,jk:()=>r,n7:()=>c,sj:()=>a});const o=Math.floor,r=(Math.ceil,Math.abs,Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),s=(e,t)=>e>t?e:t,c=(Number.isNaN,Math.pow),a=(Math.sign,e=>0!==e?e<0:1/e<0)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[444],{444:(o,e,n)=>{n.r(e),n.d(e,{ICollaborativeContentProvider:()=>t,IGlobalAwareness:()=>a});var r=n(262);const t=new r.Token("@jupyter/collaboration-extension:ICollaborativeContentProvider"),a=new r.Token("@jupyter/collaboration:IGlobalAwareness")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[840],{42:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(758),r=o.n(n),s=o(935),i=o.n(s)()(r());i.push([e.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-timelineSliderWrapper .jp-sliderContainer{\n display: flex;\n align-items: center;\n}\n\n.jp-Slider {\n height: 4.5px\n}\n\n#jp-slider-status-bar {\n display: flex;\n}\n\n.jp-timestampDisplay {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n\n.jp-restoreBtnContainer {\n width: 192px;\n}\n\n.jp-ToolbarButtonComponent.jp-restoreBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n\n.jp-ToolbarButtonComponent.jp-closeBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n",""]);const a=i},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},128:e=>{var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},591:e=>{var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var s={},i=[],a=0;a<e.length;a++){var c=e[a],l=n.base?c[0]+n.base:c[0],d=s[l]||0,u="".concat(l," ").concat(d);s[l]=d+1;var h=o(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var m=r(p,n);n.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}i.push(u)}return i}function r(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,r){var s=n(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var a=o(s[i]);t[a].references--}for(var c=n(e,r),l=0;l<s.length;l++){var d=o(s[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var r=void 0!==o.layer;r&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,r&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},758:e=>{e.exports=function(e){return e[1]}},840:(e,t,o)=>{o.r(t),o.d(t,{ForkManager:()=>V,IForkManagerToken:()=>z,JUPYTER_COLLABORATION_FORK_EVENTS_URI:()=>K,NotebookCellServerExecutor:()=>l,ROOM_FORK_URL:()=>p,RtcContentProvider:()=>b,TimelineWidget:()=>q,WebSocketAwarenessProvider:()=>r,WebSocketProvider:()=>w,requestAPI:()=>m,requestDocSession:()=>v,requestDocumentTimeline:()=>f,requestUndoRedo:()=>g});var n=o(560);class r extends n.WebsocketProvider{constructor(e){super(e.url,e.roomID,e.awareness.doc,{awareness:e.awareness}),this._isDisposed=!1,this._awareness=e.awareness,this._user=e.user,this._user.ready.then(()=>this._onUserChanged(this._user)).catch(e=>console.error(e)),this._user.userChanged.connect(this._onUserChanged,this)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._user.userChanged.disconnect(this._onUserChanged,this),this._isDisposed=!0,this.destroy())}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var s=o(246),i=o(907),a=o(748),c=o(104);class l{constructor(e){var t;this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings()}async runCell({cell:e,notebook:t,notebookConfig:o,onCellExecuted:n,onCellExecutionScheduled:r,sessionContext:l,sessionDialogs:d,translator:u}){var h,p,m;const v=(u=null!=u?u:c.nullTranslator).load("jupyterlab");switch(e.model.type){case"markdown":e.rendered=!0,e.inputHidden=!1,n({cell:e,success:!0});break;case"code":if(l){if(l.isTerminating){await(0,s.showDialog)({title:v.__("Kernel Terminating"),body:v.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(h=l.session)||void 0===h?void 0:h.path),buttons:[s.Dialog.okButton()]});break}if(l.pendingInput)return await(0,s.showDialog)({title:v.__("Cell not executed due to pending input"),body:v.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[s.Dialog.okButton()]}),!1;if(l.hasNoKernel&&await l.startKernel()&&d&&await d.selectKernel(l),l.hasNoKernel)return e.model.sharedModel.transact(()=>{e.model.clearExecution()}),!0;const o=null===(m=null===(p=null==l?void 0:l.session)||void 0===p?void 0:p.kernel)||void 0===m?void 0:m.id,c=i.URLExt.join(this._serverSettings.baseUrl,`api/kernels/${o}/execute`),u=e.model.sharedModel.getId(),f=t.sharedModel.getState("document_id"),g={method:"POST",body:JSON.stringify({cell_id:u,document_id:f})};r({cell:e});let y=!1;try{y=(await a.ServerConnection.makeRequest(c,g,this._serverSettings)).ok}catch(t){if(n({cell:e,success:!1}),e.isDisposed)return!1;throw t}return n({cell:e,success:y}),!0}e.model.sharedModel.transact(()=>{e.model.clearExecution()},!1)}return Promise.resolve(!0)}}const d="api/collaboration/session",u="api/collaboration/undo_redo",h="api/collaboration/timeline",p="api/collaboration/fork";async function m(e="",t={}){const o=a.ServerConnection.makeSettings(),n=i.URLExt.join(o.baseUrl,e);let r;try{r=await a.ServerConnection.makeRequest(n,t,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}let s=await r.text();if(s.length>0)try{s=JSON.parse(s)}catch(e){console.error("Not a JSON response body.",r)}if(!r.ok)throw new a.ServerConnection.ResponseError(r,s.message||s);return s}async function v(e,t,o){const n=a.ServerConnection.makeSettings(),r=i.URLExt.join(n.baseUrl,d,encodeURIComponent(o)),s={method:"PUT",body:JSON.stringify({format:e,type:t})};let c;try{c=await a.ServerConnection.makeRequest(r,s,n)}catch(e){throw new a.ServerConnection.NetworkError(e)}let l=await c.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.log("Not a JSON response body.",c)}if(!c.ok)throw new a.ServerConnection.ResponseError(c,l.message||l);return l}async function f(e,t,o){const n=a.ServerConnection.makeSettings();let r=i.URLExt.join(n.baseUrl,h,o);r=r.concat(`?format=${e}&&type=${t}`);const s={method:"GET"};let c;try{c=await a.ServerConnection.makeRequest(r,s,n)}catch(e){throw new a.ServerConnection.NetworkError(e)}return c}async function g(e,t,o,n){const r=a.ServerConnection.makeSettings();let s=i.URLExt.join(r.baseUrl,u,encodeURIComponent(e));s=s.concat(`?action=${t}&&steps=${o}&&forkRoom=${n}`);const c={method:"PUT"};let l;try{l=await a.ServerConnection.makeRequest(s,c,r)}catch(e){throw new a.ServerConnection.NetworkError(e)}let d=await l.text();if(d.length>0)try{d=JSON.parse(d)}catch(e){console.log("Not a JSON response body.",l)}if(!l.ok)throw new a.ServerConnection.ResponseError(l,d.message||d);return d}var y=o(262),_=o(602);class w{constructor(e){this._onConnectionClosed=e=>{1003===e.code&&(console.error("Document provider closed:",e.reason),(0,s.showErrorMessage)(this._trans.__("Document session error"),e.reason,[s.Dialog.okButton()]),this._sharedModel.dispose())},this._onSync=e=>{e&&(this._yWebsocketProvider&&(this._yWebsocketProvider.off("sync",this._onSync),this._sharedModel.ydoc.getMap("state").set("document_id",this._yWebsocketProvider.roomname)),this._ready.resolve())},this._ready=new y.PromiseDelegate,this._isDisposed=!1,this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._serverUrl=e.url,this._sharedModel=e.model,this._awareness=e.model.awareness,this._yWebsocketProvider=null,this._trans=e.translator;const t=e.user;t.ready.then(()=>{this._onUserChanged(t)}).catch(e=>console.error(e)),t.userChanged.connect(this._onUserChanged,this),this._connect().catch(e=>console.warn(e))}get isDisposed(){return this._isDisposed}get ready(){return this._ready.promise}get contentType(){return this._contentType}get format(){return this._format}dispose(){var e,t,o;this.isDisposed||(this._isDisposed=!0,null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(o=this._yWebsocketProvider)||void 0===o||o.destroy(),this._disconnect(),_.Signal.clearData(this))}async reconnect(){this._disconnect(),this._connect()}async _connect(){const e=await v(this._format,this._contentType,this._path);this._yWebsocketProvider=new n.WebsocketProvider(this._serverUrl,`${e.format}:${e.type}:${e.fileId}`,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:e.sessionId},awareness:this._awareness}),this._yWebsocketProvider.on("sync",this._onSync),this._yWebsocketProvider.on("connection-close",this._onConnectionClosed)}async connectToForkDoc(e,t){this._disconnect(),this._yWebsocketProvider=new n.WebsocketProvider(this._serverUrl,e,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:t},awareness:this._awareness})}get wsProvider(){return this._yWebsocketProvider}_disconnect(){var e,t,o;null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(o=this._yWebsocketProvider)||void 0===o||o.destroy(),this._yWebsocketProvider=null}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var S=o(721),k=o(214);const C="true"===i.PageConfig.getOption("disableRTC");class b extends a.RestContentProvider{constructor(e){super(e),this._onCreate=(e,t)=>{var o,n,r,s,a,c;if("string"!=typeof e.format)return;const l=null===(r=null===(n=null===(o=this._docmanagerSettings)||void 0===o?void 0:o.composite)||void 0===n?void 0:n.autosave)||void 0===r||r;t.awareness.setLocalStateField("autosave",l),null===(s=this._docmanagerSettings)||void 0===s||s.changed.connect(()=>{var e,o,n;const r=null===(n=null===(o=null===(e=this._docmanagerSettings)||void 0===e?void 0:e.composite)||void 0===o?void 0:o.autosave)||void 0===n||n;t.awareness.setLocalStateField("autosave",r)});try{const o=new w({url:i.URLExt.join(this._serverSettings.wsUrl,"api/collaboration/room"),path:e.path,format:e.format,contentType:e.contentType,model:t,user:this._user,translator:this._trans}),n=((null===(a=this._globalAwareness)||void 0===a?void 0:a.getLocalState())||{}).documents||[];n.includes(e.path)||(n.push(e.path),null===(c=this._globalAwareness)||void 0===c||c.setLocalStateField("documents",n));const r=`${e.format}:${e.contentType}:${e.path}`;this._providers.set(r,o),t.changed.connect(async(o,n)=>{var r;if(!n.stateChange)return;const s=n.stateChange.filter(e=>"hash"===e.name);if(0===s.length)return;s.length>1&&console.error("Unexpected multiple changes to hash value in a single transaction");const i=s[0],a=null!==(r=t.state.path)&&void 0!==r?r:e.path,c=await this.get(a,{content:!1});this._ydriveFileChanged.emit({type:"save",newValue:{...c,hash:i.newValue},oldValue:{hash:i.oldValue}})}),t.disposed.connect(()=>{var t,o;const n=this._providers.get(r);n&&(n.dispose(),this._providers.delete(r));const s=((null===(t=this._globalAwareness)||void 0===t?void 0:t.getLocalState())||{}).documents||[],i=s.indexOf(e.path);i>-1&&s.splice(i,1),null===(o=this._globalAwareness)||void 0===o||o.setLocalStateField("documents",s)})}catch(t){console.error(`Failed to open websocket connection for ${e.path}.\n:${t}`)}},this._saveCounter=0,this._ydriveFileChanged=new _.Signal(this),this._user=e.user,this._trans=e.trans,this._globalAwareness=e.globalAwareness,this._serverSettings=e.serverSettings,this.sharedModelFactory=new E(this._onCreate),this._providers=new Map,this._docmanagerSettings=e.docmanagerSettings}get providers(){return this._providers}async get(e,t){if(t&&t.format&&t.type){const o=`${t.format}:${t.type}:${e}`,n=this._providers.get(o);if(n){const[o]=await Promise.all([super.get(e,{...t,content:!1}),n.ready]);return{...o,format:t.format}}}return super.get(e,t)}async save(e,t={}){var o;if(t.format&&t.type){const n=`${t.format}:${t.type}:${e}`,r=this._providers.get(n),s=++this._saveCounter;if(r){const n=null===(o=r.wsProvider)||void 0===o?void 0:o.ws;if(n){const e=new y.PromiseDelegate,t=t=>{const o=new Uint8Array(t.data),n=S.$C(o);try{if(2!==S.cw(n))return}catch(e){return}const r=S.t3(n);let i=null;try{i=JSON.parse(r)}catch(e){console.debug("The raw reply received was not a JSON reply")}i&&"save"===i.type&&i.responseTo===s&&("success"===i.status?e.resolve():"failed"===i.status?e.reject("Saving failed"):"skipped"===i.status?e.reject("Saving already in progress"):e.reject("Unrecognised save reply status"))};n.addEventListener("message",t);const o=k.xv();k.zd(o,2),k.Qj(o,"save"),k.zd(o,s);const r=k.Fo(o);n.send(r),await e.promise,n.removeEventListener("message",t)}const i={type:t.type,format:t.format,content:!1};return this.get(e,i)}}return super.save(e,t)}get fileChanged(){return this._ydriveFileChanged}}class E{constructor(e){this._onCreate=e,this.collaborative=!C,this.documentFactories=new Map}registerDocumentFactory(e,t){if(this.documentFactories.has(e))throw new Error(`The content type ${e} already exists`);this.documentFactories.set(e,t)}createNew(e){if("string"==typeof e.format){if(this.collaborative&&e.collaborative&&this.documentFactories.has(e.contentType)){const t=this.documentFactories.get(e.contentType)(e);return this._onCreate(e,t),t}}else console.warn(`Only defined format are supported; got ${e.format}.`)}}var T=o(345),R=o.n(T),x=o(591),U=o.n(x),$=o(740),j=o.n($),I=o(128),D=o.n(I),N=o(855),P=o.n(N),L=o(51),F=o.n(L),M=o(656),A=o.n(M),W=o(42),O={};O.styleTagTransform=A(),O.setAttributes=P(),O.insert=D().bind(null,"head"),O.domAPI=j(),O.insertStyleElement=F(),U()(W.A,O),W.A&&W.A.locals&&W.A.locals;var B=o(346);const J=({apiURL:e,provider:t,contentType:o,format:n,documentTimelineUrl:r,projectIsComplete:i,docIsReadonly:a})=>{const[c,l]=(0,T.useState)({roomId:"",timestamps:[],forkRoom:"",sessionId:""}),[d,u]=(0,T.useState)(c.timestamps.length-1),[h,p]=(0,T.useState)(!1),[m,y]=(0,T.useState)(!1),_=(0,T.useRef)(!0),w=(0,T.useRef)(!0),S=(0,T.useRef)(null);function k(e){return e<d?"undo":"redo"}function C(e){try{const t=new URL(e).pathname,o=t.lastIndexOf(r);if(-1===o)throw new Error(`API segment "${r}" not found in URL.`);return t.slice(o+r.length)}catch(e){return console.error("Invalid URL or unable to extract filename:",e),""}}return(0,T.useEffect)(()=>{(async()=>{if(!a)return;const r=C(e),s=await f(n,o,r);if(!s.ok)throw 404===s.status?new Error("Not found"):503===s.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${s.statusText}`);const i=await s.text();let c={forkRoom:"",sessionId:""};c=JSON.parse(i),t.connectToForkDoc(c.forkRoom,c.sessionId)})()},[]),R().createElement("div",{className:"jp-sliderContainer"},R().createElement("div",{onClick:()=>{!async function(r){try{if(_.current){const i=await f(n,o,r);if(!i.ok)throw 404===i.status?new Error("Not found"):503===i.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${i.statusText}`);const a=await i.text();let c={roomId:"",timestamps:[],forkRoom:"",sessionId:""};return a&&(s.Notification.warning("Document is now in read-only mode. Changes will not be saved.",{autoClose:2500}),c=JSON.parse(a),l(c),u(c.timestamps.length-1),t.connectToForkDoc(c.forkRoom,c.sessionId),S.current=await v(n,o,C(e))),p(!0),_.current=!1,c}}catch(e){console.error("Error fetching data:",e)}}(C(e))},className:"jp-mod-highlighted",title:"Document Timeline Codio"},R().createElement(B.historyIcon.react,{marginRight:"4px"})),h&&R().createElement("div",{className:"jp-timestampDisplay"},R().createElement("input",{type:"range",min:0,max:c.timestamps.length-1,value:d,onChange:async e=>{const t=parseInt(e.target.value),o=Math.abs(t-d);try{const e=k(t);if(u(t),w.current&&(y(!0),w.current=!1),!S.current)return void console.error("Session is not initialized");await g(`${S.current.format}:${S.current.type}:${S.current.fileId}`,e,o,c.forkRoom)}catch(e){console.error("Error fetching or applying updates:",e)}},className:"jp-Slider"}),R().createElement("div",null,R().createElement("strong",null,C(e).split("/").pop()," ")," "),m&&!(i||a)&&R().createElement("div",{className:"jp-restoreBtnContainer"},R().createElement("button",{onClick:async()=>{if(!S.current)return void console.error("Session is not initialized");const e=await g(`${S.current.format}:${S.current.type}:${S.current.fileId}`,"restore",0,c.forkRoom);200===e.code?(s.Notification.success(e.status,{autoClose:4e3}),t.reconnect(),p(!1),_.current=!0):s.Notification.error(e.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-restoreBtn"},"Restore version"," ",(e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})(c.timestamps[d]))),R().createElement("div",{className:"jp-closeBtnContainer"},R().createElement("button",{onClick:async()=>{if(!S.current)return void console.error("Session is not initialized");const e=c.timestamps.length-1,o=Math.abs(e-d);try{const t=k(e);u(e),w.current&&(y(!0),w.current=!1),await g(`${S.current.format}:${S.current.type}:${S.current.fileId}`,t,o,c.forkRoom)}catch(e){console.error("Error fetching or applying updates:",e)}const n=await g(`${S.current.format}:${S.current.type}:${S.current.fileId}`,"restore",0,c.forkRoom);200===n.code?(s.Notification.success(n.status,{autoClose:4e3}),t.reconnect(),p(!1),_.current=!0):s.Notification.error(n.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-closeBtn"},"Close"))))};class q extends s.ReactWidget{constructor(e,t,o,n,r,s,i){super(),this.apiURL=e,this.provider=t,this.contentType=o,this.format=n,this.documentTimelineUrl=r,this.projectIsComplete=s,this.docIsReadonly=i,this.addClass("jp-timelineSliderWrapper")}render(){return T.createElement(J,{key:this.apiURL,apiURL:this.apiURL,provider:this.provider,contentType:this.contentType,format:this.format,documentTimelineUrl:this.documentTimelineUrl,projectIsComplete:this.projectIsComplete,docIsReadonly:this.docIsReadonly})}updateContent(e,t){this.apiURL=e,this.provider=t,this.contentType=this.provider.contentType,this.format=this.provider.format,this.update()}}const z=new y.Token("docprovider-codio:IForkManagerToken"),K="https://schema.jupyter.org/jupyter_collaboration/fork/v1";class V{constructor(e){this._disposed=!1,this._forkAddedSignal=new _.Signal(this),this._forkDeletedSignal=new _.Signal(this);const{contentProvider:t,eventManager:o}=e;this._contentProvider=t,this._eventManager=o,this._eventManager.stream.connect(this._handleEvent,this)}get isDisposed(){return this._disposed}get forkAdded(){return this._forkAddedSignal}get forkDeleted(){return this._forkDeletedSignal}dispose(){var e;this._disposed||(null===(e=this._eventManager)||void 0===e||e.stream.disconnect(this._handleEvent),this._disposed=!0)}async createFork(e){const{rootId:t,title:o,description:n,synchronize:r}=e,s={method:"PUT",body:JSON.stringify({title:o,description:n,synchronize:r})},a=i.URLExt.join(p,t);return await m(a,s)}async getAllForks(e){const t=i.URLExt.join(p,e);return await m(t,{method:"GET"})}async deleteFork(e){const{forkId:t,merge:o}=e,n=i.URLExt.join(p,t),r=i.URLExt.objectToQueryString({merge:o});await m(`${n}${r}`,{method:"DELETE"})}getProvider(e){const{documentPath:t,format:o,type:n}=e,r=this._contentProvider;if(r){const e=t;return r.providers.get(`${o}:${n}:${e}`)}}_handleEvent(e,t){if(t.schema_id===K)switch(t.action){case"create":this._forkAddedSignal.emit(t);break;case"delete":this._forkDeletedSignal.emit(t)}}}},855:(e,t,o)=>{e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);n&&i[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[944],{28:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/************************************************************\n Main Panel\n*************************************************************/\n\n.jp-RTCPanel {\n min-width: var(--jp-sidebar-min-width) !important;\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n font-size: var(--jp-ui-font-size1);\n}\n\n/************************************************************\n User Info Panel\n*************************************************************/\n.jp-UserInfoPanel {\n display: flex;\n flex-direction: column;\n max-height: 140px;\n padding-top: 3px;\n}\n\n.jp-UserInfo-Container {\n margin: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.jp-UserInfo-Icon {\n margin: auto;\n width: 50px;\n height: 50px;\n border-radius: 50px;\n display: inline-flex;\n align-items: center;\n}\n\n.jp-UserInfo-Icon span {\n margin: auto;\n text-align: center;\n font-size: 25px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info {\n margin: 20px;\n display: inline-flex;\n flex-direction: column;\n}\n\n.jp-UserInfo-Info label {\n font-weight: bold;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info input {\n text-decoration: none;\n border-top: none;\n border-left: none;\n border-right: none;\n border-color: var(--jp-ui-font-color1);\n border-width: 0.5px;\n background-color: transparent;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n/************************************************************\n Collaborators Info Panel\n*************************************************************/\n\n.jp-CollaboratorsPanel {\n overflow-y: auto;\n}\n\n.jp-CollaboratorsList {\n flex-direction: column;\n display: flex;\n z-index: 1000;\n}\n\n.jp-CollaboratorHeader {\n padding: 10px;\n display: flex;\n align-items: center;\n font-size: var(--jp-ui-font-size0);\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorHeader > span {\n padding-left: 7px;\n}\n\n.jp-ClickableCollaborator:hover {\n cursor: pointer;\n background-color: var(--jp-layout-color2);\n fill: var(--jp-ui-font-color0);\n color: var(--jp-ui-font-color0);\n}\n\n.jp-CollaboratorHeaderCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-CollaboratorHeader:not(.jp-ClickableCollaborator) .jp-CollaboratorHeaderCollapser {\n visibility: hidden;\n}\n\n.jp-CollaboratorHeaderCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-CollaboratorIcon {\n border-radius: 100%;\n padding: 2px;\n width: 24px;\n height: 24px;\n display: flex;\n}\n\n.jp-CollaboratorIcon > span {\n text-align: center;\n margin: auto;\n font-size: 12px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorFiles {\n padding-left: 1em;\n margin-top: 0;\n box-shadow: 0 2px 2px -2px rgb(0 0 0 / 24%);\n\n}\n\n/************************************************************\n User Info Details\n*************************************************************/\n.jp-UserInfo-Field {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-UserInfo-Field > label,\n.jp-UserInfo-Field > input {\n padding: 0.5em 1em;\n margin: 0.25em 0;\n}\n\n.jp-UserInfo-Field > label {\n font-weight: bold;\n}\n\n.jp-UserInfo-Field > input {\n border: none;\n}\n\n.jp-UserInfo-Field > input:not(:disabled) {\n cursor: pointer;\n background-color: var(--jp-input-background);\n}\n\n.jp-UserInfo-Field > input:focus {\n border: solid 1px var(--jp-cell-editor-active-border-color);\n}\n\n.jp-UserInfo-Field > input:focus-visible {\n outline: none;\n}\n",""]);const l=i},51:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},78:(n,e,o)=>{o.d(e,{A:()=>u});var r=o(758),t=o.n(r),a=o(935),i=o.n(a),l=o(875),p=o(28),s=o(921),d=o(674),c=i()(t());c.i(l.A),c.i(p.A),c.i(s.A),c.i(d.A),c.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n",""]);const u=c},128:n=>{var e={};n.exports=function(n,o){var r=function(n){if(void 0===e[n]){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(n){o=null}e[n]=o}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},591:n=>{var e=[];function o(n){for(var o=-1,r=0;r<e.length;r++)if(e[r].identifier===n){o=r;break}return o}function r(n,r){for(var a={},i=[],l=0;l<n.length;l++){var p=n[l],s=r.base?p[0]+r.base:p[0],d=a[s]||0,c="".concat(s," ").concat(d);a[s]=d+1;var u=o(c),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==u)e[u].references++,e[u].updater(f);else{var h=t(f,r);r.byIndex=l,e.splice(l,0,{identifier:c,updater:h,references:1})}i.push(c)}return i}function t(n,e){var o=e.domAPI(e);return o.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;o.update(n=e)}else o.remove()}}n.exports=function(n,t){var a=r(n=n||[],t=t||{});return function(n){n=n||[];for(var i=0;i<a.length;i++){var l=o(a[i]);e[l].references--}for(var p=r(n,t),s=0;s<a.length;s++){var d=o(a[s]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}a=p}}},656:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},674:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n\n.jp-ManageSharesBody-search-container {\n margin-bottom: 10px;\n}\n\n.jp-ManageSharesBody-search-input {\n width: 100%;\n padding: 5px;\n margin-top: 5px;\n}\n\n.jp-ManageSharesBody-search-results {\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n padding: 5px;\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-user-item {\n padding: 5px;\n cursor: pointer;\n}\n\n.jp-ManageSharesBody-user-item:hover {\n background-color: var(--jp-border-color3);\n}\n\n.jp-ManageSharesBody-selected-users {\n margin-top: 10px;\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-url-input {\n width: 100%;\n padding: 5px;\n margin-top: 10px;\n}\n\n.jp-ManageSharesBody-shares-table {\n width: 100%;\n}\n\n.jp-ManageSharesBody-shares-table td:nth-child(2),\n.jp-ManageSharesBody-shares-table td:nth-child(3) {\n text-align: center;\n}\n\n.jp-Dialog-content:has(.jp-shared-link-body) {\n max-height: 750px;\n}\n",""]);const l=i},740:n=>{n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(o){!function(n,e,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var t=void 0!==o.layer;t&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,t&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,o)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},758:n=>{n.exports=function(n){return n[1]}},855:(n,e,o)=>{n.exports=function(n){var e=o.nc;e&&n.setAttribute("nonce",e)}},875:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-MenuBar-label {\n margin-left: 25px;\n}\n\n.jp-MenuBar-anonymousIcon span {\n width: 24px;\n text-align: center;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-MenuBar-anonymousIcon,\n.jp-MenuBar-imageIcon {\n position: absolute;\n top: 1px;\n left: 8px;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n}\n\n.jp-MenuBar-imageIcon img {\n width: 24px;\n border-radius: 100%;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserMenu-caretDownIcon {\n height: 22px;\n position: relative;\n top: 15%;\n}\n",""]);const l=i},921:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-toolbar-users-item {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n}\n\n.jp-toolbar-users-item .jp-MenuBar-anonymousIcon,\n.jp-toolbar-users-item .jp-MenuBar-imageIcon {\n position: relative;\n left: 0;\n height: 22px;\n width: 22px;\n box-sizing: border-box;\n cursor: default;\n}\n",""]);const l=i},935:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var o="",r=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),r&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=n(e),r&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(n,o,r,t,a){"string"==typeof n&&(n=[[null,n,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var p=this[l][0];null!=p&&(i[p]=!0)}for(var s=0;s<n.length;s++){var d=[].concat(n[s]);r&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),t&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=t):d[4]="".concat(t)),e.push(d))}},e}},944:(n,e,o)=>{var r=o(591),t=o.n(r),a=o(740),i=o.n(a),l=o(128),p=o.n(l),s=o(855),d=o.n(s),c=o(51),u=o.n(c),f=o(656),h=o.n(f),m=o(78),v={};v.styleTagTransform=h(),v.setAttributes=d(),v.insert=p().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=u(),t()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdocprovider_extension_codio=self.webpackChunkdocprovider_extension_codio||[]).push([[96],{96:(e,t,o)=>{o.r(t),o.d(t,{default:()=>I});var r=o(246),n=o(256),i=o(334),a=o(644),s=o(176),c=o(212),d=o(598),l=o(912),u=o(104),v=o(0),g=o(818),p=o(981),h=o(907);const b=(()=>{let e,t;const o=new Promise((o,r)=>{e=o,t=r});return{resolve:e,reject:t,promise:o}})(),m=function(){b.resolve(),console.log("[docprovider-extension] codio client loaded")},w="api/collaboration/timeline",y="The file %1 has been opened with two different views. This is not supported. Please close this view; otherwise, some of your edits may not be saved properly.",f={id:"docprovider-extension-codio:content-provider",description:"The RTC content provider",provides:g.ICollaborativeContentProvider,requires:[u.ITranslator],optional:[g.IGlobalAwareness,l.ISettingRegistry],activate:async(e,t,o,r)=>{const n=t.load("jupyter_collaboration"),i=e.serviceManager.contents.defaultDrive;if(!i)throw Error("Cannot initialize content provider: default drive property not accessible on contents manager instance.");const a=i.contentProviderRegistry;if(!a)throw Error("Cannot initialize content provider: no content provider registry.");const s=r?await r.load("@jupyterlab/docmanager-extension:plugin"):null,c=new p.RtcContentProvider({apiEndpoint:"/api/contents",serverSettings:i.serverSettings,user:e.serviceManager.user,trans:n,globalAwareness:o,docmanagerSettings:s});return a.register("rtc",c),c}},x={id:"docprovider-extension-codio:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[g.ICollaborativeContentProvider,s.IEditorWidgetFactory],activate:(e,t,o)=>{t.sharedModelFactory.registerDocumentFactory("file",()=>new v.YFile),o.contentProviderId="rtc"}},C={id:"docprovider-extension-codio:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[g.ICollaborativeContentProvider,d.INotebookWidgetFactory],optional:[l.ISettingRegistry],activate:(e,t,o,r)=>{let n=!0;r&&r.load("@jupyterlab/notebook-extension:tracker").then(e=>{const t=e=>{var t;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;n=null===(t=!o)||void 0===t||t};t(e),e.changed.connect(e=>t(e))}),t.sharedModelFactory.registerDocumentFactory("notebook",()=>new v.YNotebook({disableDocumentWideUndoRedo:n})),o.contentProviderId="rtc"}},k={id:"docprovider-extension-codio:statusBarTimeline",description:"Plugin to add a timeline slider to the status bar",autoStart:!0,requires:[a.IStatusBar,g.ICollaborativeContentProvider,i.IDocumentManager],activate:async(e,t,o,r)=>{try{await(async e=>{window.codio?b.resolve():(e||(e="https://codio.com/ext/iframe/base/static/codio-client.js"),((e,t,o)=>{console.log("[docprovider-extension] loadCodio from url",e);const r=document.createElement("script");r.src=e,r.onload=t,r.onerror=(...e)=>{console.log("[docprovider-extension] loading script error",e),b.reject(e)},o.appendChild(r)})(e,m,document.body),await b.promise)})("https://codio.com/ext/iframe/base/static/codio-client.js");const i=await(async()=>{var e;if(!window.codio)return!1;const t=new Promise((e,t)=>{window.codio.subscribe("projectState",async t=>{e(t)}),setTimeout(()=>{e({})},1e4)});return null===(e=window.codio)||void 0===e||e.setLoaded(),await window.codio.loaded(),t})();let a=null,s=null;const c=async(t,a)=>{var c;if(!a)return;s&&(s.dispose(),s=null);const[d,l]=a.split(":"),u=o.providers.get(`${d}:${l}:${t}`);if(!u)return;const v=u,g=h.URLExt.join(e.serviceManager.serverSettings.baseUrl,w,t);let b=!1;const m=e.shell.currentWidget;if(m){const e=r.contextForWidget(m);e&&(b=!0!==(null===(c=e.contentsModel)||void 0===c?void 0:c.writable))}s=new p.TimelineWidget(g,v,v.contentType,v.format,w,i&&i.complete,b);const y=document.getElementById("jp-slider-status-bar");y&&!s.isAttached&&n.Widget.attach(s,y)};e.shell.currentChanged&&e.shell.currentChanged.connect(async(e,t)=>{const o=t.newValue;s&&(s.dispose(),s=null),o&&"context"in o&&(await o.context.ready,await c(o.context.path,o.context.model.sharedModel.getState("document_id")))}),t&&(a||(a=new n.Widget,a.addClass("jp-StatusBar-GroupItem"),a.addClass("jp-mod-highlighted"),a.id="jp-slider-status-bar",t.registerStatusItem("jp-slider-status-bar",{item:a,align:"left",rank:4,isActive:()=>{var t,o;const r=e.shell.currentWidget;return(null===(o=null===(t=null==r?void 0:r.context)||void 0===t?void 0:t.model)||void 0===o?void 0:o.collaborative)||!1}})))}catch(e){console.error("Failed to activate statusBarTimeline plugin:",e)}}},I=[f,x,C,{id:"docprovider-extension-codio:logger",description:"A logging plugin for debugging purposes.",autoStart:!0,optional:[c.ILoggerRegistry,s.IEditorTracker,d.INotebookTracker,u.ITranslator],activate:(e,t,o,n,i)=>{const a=(null!=i?i:u.nullTranslator).load("jupyter_collaboration"),s="https://schema.jupyter.org/jupyter_collaboration/session/v1";if(!t)return void e.serviceManager.events.stream.connect((e,t)=>{var o,n;t.schema_id===s&&(console.debug(`[${t.room}(${t.path})] ${null!==(o=t.action)&&void 0!==o?o:""}: ${null!==(n=t.msg)&&void 0!==n?n:""}`),"WARNING"===t.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,t.path),buttons:[r.Dialog.okButton()]}))});const c=new Map,d=(e,o)=>{const r=t.getLogger(o.context.path);c.set(o.context.localPath,r),o.disposed.connect(e=>{c.delete(e.context.localPath)})};o&&o.widgetAdded.connect(d),n&&n.widgetAdded.connect(d),(async()=>{var t,o;const{events:n}=e.serviceManager;for await(const e of n.stream)if(e.schema_id===s){const n=c.get(e.path);null==n||n.log({type:"text",level:e.level.toLowerCase(),data:`[${e.room}] ${null!==(t=e.action)&&void 0!==t?t:""}: ${null!==(o=e.msg)&&void 0!==o?o:""}`}),"WARNING"===e.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,e.path),buttons:[r.Dialog.warnButton({label:a.__("Ok")})]})}})()}},{id:"docprovider-extension-codio:notebook-cell-executor",description:"Add notebook cell executor that uses REST API instead of kernel protocol over WebSocket.",autoStart:!0,provides:d.INotebookCellExecutor,activate:e=>"true"===h.PageConfig.getOption("serverSideExecution")?new p.NotebookCellServerExecutor({serverSettings:e.serviceManager.serverSettings}):Object.freeze({runCell:d.runCell})},k,{id:"docprovider-extension-codio:forkManager",autoStart:!0,requires:[g.ICollaborativeContentProvider],provides:p.IForkManagerToken,activate:(e,t)=>{const o=e.serviceManager.events;return new p.ForkManager({contentProvider:t,eventManager:o})}}]}}]);
|