gwchq-textjam 0.2.28 → 0.2.31
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.
package/dist/index.js
CHANGED
|
@@ -68191,7 +68191,7 @@ module.exports = {
|
|
|
68191
68191
|
|
|
68192
68192
|
/***/ }),
|
|
68193
68193
|
|
|
68194
|
-
/***/
|
|
68194
|
+
/***/ 33037:
|
|
68195
68195
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68196
68196
|
|
|
68197
68197
|
// ESM COMPAT FLAG
|
|
@@ -68202,6 +68202,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
68202
68202
|
enigmaWhlUrl: () => (/* reexport */ py_enigma_0_1_py3_none_anyurl_namespaceObject),
|
|
68203
68203
|
p5WhlUrl: () => (/* reexport */ p5_0_0_1_py3_none_anyurl_namespaceObject),
|
|
68204
68204
|
pygalUrl: () => (/* reexport */ pygalurl_namespaceObject),
|
|
68205
|
+
pyodideStdinSwUrl: () => (/* reexport */ pyodide_stdin_swurl_namespaceObject),
|
|
68205
68206
|
turtleWhlUrl: () => (/* reexport */ turtle_0_0_1_py3_none_anyurl_namespaceObject)
|
|
68206
68207
|
});
|
|
68207
68208
|
|
|
@@ -68213,6 +68214,8 @@ const turtle_0_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "as
|
|
|
68213
68214
|
const p5_0_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "assets/p5-0.0.1-py3-none-any94083ec22b4dfbbd6318.whl";
|
|
68214
68215
|
;// ./src/assets/editor/pyodide/packages/py_enigma-0.1-py3-none-any.whl?url
|
|
68215
68216
|
const py_enigma_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "assets/py_enigma-0.1-py3-none-any77b539746537424950f6.whl";
|
|
68217
|
+
;// ./src/assets/editor/pyodide/pyodide-stdin-sw.js?url
|
|
68218
|
+
const pyodide_stdin_swurl_namespaceObject = __webpack_require__.p + "assets/pyodide-stdin-sw.js";
|
|
68216
68219
|
;// ./src/assets/editor/index.js
|
|
68217
68220
|
// These ?url imports MUST be treated as asset/resource by webpack
|
|
68218
68221
|
|
|
@@ -68221,9 +68224,10 @@ const py_enigma_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "a
|
|
|
68221
68224
|
|
|
68222
68225
|
|
|
68223
68226
|
|
|
68227
|
+
|
|
68224
68228
|
/***/ }),
|
|
68225
68229
|
|
|
68226
|
-
/***/
|
|
68230
|
+
/***/ 79428:
|
|
68227
68231
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68228
68232
|
|
|
68229
68233
|
// ESM COMPAT FLAG
|
|
@@ -68337,7 +68341,7 @@ var Button = props => {
|
|
|
68337
68341
|
|
|
68338
68342
|
/***/ }),
|
|
68339
68343
|
|
|
68340
|
-
/***/
|
|
68344
|
+
/***/ 74215:
|
|
68341
68345
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68342
68346
|
|
|
68343
68347
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -68351,7 +68355,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68351
68355
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
68352
68356
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39243);
|
|
68353
68357
|
/* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
|
|
68354
|
-
/* harmony import */ var _assets_stylesheets_DraggableTabs_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
68358
|
+
/* harmony import */ var _assets_stylesheets_DraggableTabs_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44221);
|
|
68355
68359
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74848);
|
|
68356
68360
|
|
|
68357
68361
|
|
|
@@ -68419,7 +68423,7 @@ DraggableTab.tabsRole = "Tab";
|
|
|
68419
68423
|
|
|
68420
68424
|
/***/ }),
|
|
68421
68425
|
|
|
68422
|
-
/***/
|
|
68426
|
+
/***/ 48339:
|
|
68423
68427
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68424
68428
|
|
|
68425
68429
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -68431,7 +68435,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68431
68435
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68432
68436
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
|
|
68433
68437
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
|
|
68434
|
-
/* harmony import */ var _assets_stylesheets_DraggableTabs_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
68438
|
+
/* harmony import */ var _assets_stylesheets_DraggableTabs_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44221);
|
|
68435
68439
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74848);
|
|
68436
68440
|
|
|
68437
68441
|
|
|
@@ -68472,7 +68476,7 @@ DroppableTabList.tabsRole = "TabList";
|
|
|
68472
68476
|
|
|
68473
68477
|
/***/ }),
|
|
68474
68478
|
|
|
68475
|
-
/***/
|
|
68479
|
+
/***/ 82467:
|
|
68476
68480
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68477
68481
|
|
|
68478
68482
|
// ESM COMPAT FLAG
|
|
@@ -101798,7 +101802,7 @@ var editorLightTheme = EditorView.theme({
|
|
|
101798
101802
|
dark: false
|
|
101799
101803
|
});
|
|
101800
101804
|
// EXTERNAL MODULE: ./src/utils/settings.js
|
|
101801
|
-
var utils_settings = __webpack_require__(
|
|
101805
|
+
var utils_settings = __webpack_require__(62161);
|
|
101802
101806
|
// EXTERNAL MODULE: ./src/redux/stores/index.ts
|
|
101803
101807
|
var stores = __webpack_require__(32132);
|
|
101804
101808
|
// EXTERNAL MODULE: ./src/components/AssetPreview/index.tsx
|
|
@@ -101960,7 +101964,7 @@ var EditorPanel = _ref => {
|
|
|
101960
101964
|
|
|
101961
101965
|
/***/ }),
|
|
101962
101966
|
|
|
101963
|
-
/***/
|
|
101967
|
+
/***/ 26665:
|
|
101964
101968
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
101965
101969
|
|
|
101966
101970
|
// ESM COMPAT FLAG
|
|
@@ -101993,7 +101997,7 @@ var Sidebar_default = /*#__PURE__*/__webpack_require__.n(Sidebar);
|
|
|
101993
101997
|
var EditorInput = __webpack_require__(99692);
|
|
101994
101998
|
var EditorInput_default = /*#__PURE__*/__webpack_require__.n(EditorInput);
|
|
101995
101999
|
// EXTERNAL MODULE: ./src/utils/ResizableWithHandle.js + 3 modules
|
|
101996
|
-
var ResizableWithHandle = __webpack_require__(
|
|
102000
|
+
var ResizableWithHandle = __webpack_require__(51535);
|
|
101997
102001
|
;// ./src/utils/containerQueries.js
|
|
101998
102002
|
var projContainer = {
|
|
101999
102003
|
"width-larger-than-720": {
|
|
@@ -102085,7 +102089,7 @@ var Project = props => {
|
|
|
102085
102089
|
|
|
102086
102090
|
/***/ }),
|
|
102087
102091
|
|
|
102088
|
-
/***/
|
|
102092
|
+
/***/ 46590:
|
|
102089
102093
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102090
102094
|
|
|
102091
102095
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -102125,7 +102129,7 @@ var ExternalFiles = () => {
|
|
|
102125
102129
|
|
|
102126
102130
|
/***/ }),
|
|
102127
102131
|
|
|
102128
|
-
/***/
|
|
102132
|
+
/***/ 83617:
|
|
102129
102133
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102130
102134
|
|
|
102131
102135
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -102133,13 +102137,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102133
102137
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
102134
102138
|
/* harmony export */ });
|
|
102135
102139
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
102136
|
-
/* harmony import */ var _utils_ResizableWithHandle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
102140
|
+
/* harmony import */ var _utils_ResizableWithHandle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51535);
|
|
102137
102141
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46942);
|
|
102138
102142
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
|
|
102139
|
-
/* harmony import */ var _utils_mediaQueryBreakpoints__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
102143
|
+
/* harmony import */ var _utils_mediaQueryBreakpoints__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22554);
|
|
102140
102144
|
/* harmony import */ var react_responsive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17988);
|
|
102141
102145
|
/* harmony import */ var react_responsive__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_responsive__WEBPACK_IMPORTED_MODULE_4__);
|
|
102142
|
-
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
102146
|
+
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21852);
|
|
102143
102147
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74848);
|
|
102144
102148
|
|
|
102145
102149
|
|
|
@@ -102197,7 +102201,7 @@ var SidebarPanel = props => {
|
|
|
102197
102201
|
|
|
102198
102202
|
/***/ }),
|
|
102199
102203
|
|
|
102200
|
-
/***/
|
|
102204
|
+
/***/ 97933:
|
|
102201
102205
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102202
102206
|
|
|
102203
102207
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -102207,9 +102211,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102207
102211
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
102208
102212
|
/* harmony import */ var react_modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20312);
|
|
102209
102213
|
/* harmony import */ var react_modal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_modal__WEBPACK_IMPORTED_MODULE_1__);
|
|
102210
|
-
/* harmony import */ var _Button_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
102211
|
-
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
102212
|
-
/* harmony import */ var _utils_CloseIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
102214
|
+
/* harmony import */ var _Button_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79428);
|
|
102215
|
+
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27924);
|
|
102216
|
+
/* harmony import */ var _utils_CloseIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61193);
|
|
102213
102217
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74848);
|
|
102214
102218
|
|
|
102215
102219
|
|
|
@@ -102285,7 +102289,7 @@ var BaseModal = _ref => {
|
|
|
102285
102289
|
|
|
102286
102290
|
/***/ }),
|
|
102287
102291
|
|
|
102288
|
-
/***/
|
|
102292
|
+
/***/ 56724:
|
|
102289
102293
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102290
102294
|
|
|
102291
102295
|
// ESM COMPAT FLAG
|
|
@@ -102299,9 +102303,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
102299
102303
|
// EXTERNAL MODULE: external "react-redux"
|
|
102300
102304
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102301
102305
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102302
|
-
var BaseModal = __webpack_require__(
|
|
102306
|
+
var BaseModal = __webpack_require__(97933);
|
|
102303
102307
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102304
|
-
var Button = __webpack_require__(
|
|
102308
|
+
var Button = __webpack_require__(79428);
|
|
102305
102309
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102306
102310
|
var SvgIcon = __webpack_require__(82917);
|
|
102307
102311
|
// EXTERNAL MODULE: ./src/assets/icons/alertTriangle.svg
|
|
@@ -102316,7 +102320,7 @@ var stores = __webpack_require__(32132);
|
|
|
102316
102320
|
// extracted by mini-css-extract-plugin
|
|
102317
102321
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--Xo0FC","body":"styles-module__body--t9rtp","buttonsContainer":"styles-module__buttonsContainer--JGhSm","headerText":"styles-module__headerText--pmvJm","headerIcon":"styles-module__headerIcon--3TJZO","description":"styles-module__description--uzzI+"});
|
|
102318
102322
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102319
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102323
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102320
102324
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
102321
102325
|
var jsx_runtime = __webpack_require__(74848);
|
|
102322
102326
|
;// ./src/components/Modals/DraftUnsavedChangesModal/DraftUnsavedChangesModal.js
|
|
@@ -102381,7 +102385,7 @@ var DraftUnsavedChangesModal = () => {
|
|
|
102381
102385
|
|
|
102382
102386
|
/***/ }),
|
|
102383
102387
|
|
|
102384
|
-
/***/
|
|
102388
|
+
/***/ 15382:
|
|
102385
102389
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102386
102390
|
|
|
102387
102391
|
// ESM COMPAT FLAG
|
|
@@ -102402,7 +102406,7 @@ var external_react_redux_ = __webpack_require__(14062);
|
|
|
102402
102406
|
// EXTERNAL MODULE: ./node_modules/react-i18next/dist/es/index.js + 17 modules
|
|
102403
102407
|
var es = __webpack_require__(56576);
|
|
102404
102408
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102405
|
-
var Button = __webpack_require__(
|
|
102409
|
+
var Button = __webpack_require__(79428);
|
|
102406
102410
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102407
102411
|
var EditorSlice = __webpack_require__(68512);
|
|
102408
102412
|
;// ./src/assets/stylesheets/Modal.scss
|
|
@@ -102476,7 +102480,7 @@ var ErrorModal = _ref => {
|
|
|
102476
102480
|
|
|
102477
102481
|
/***/ }),
|
|
102478
102482
|
|
|
102479
|
-
/***/
|
|
102483
|
+
/***/ 14472:
|
|
102480
102484
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102481
102485
|
|
|
102482
102486
|
// ESM COMPAT FLAG
|
|
@@ -102491,7 +102495,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
102491
102495
|
// extracted by mini-css-extract-plugin
|
|
102492
102496
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--5mqMd","body":"styles-module__body--FT2ak","buttonsContainer":"styles-module__buttonsContainer--LsIFl","headerText":"styles-module__headerText--7Ob34","headerIcon":"styles-module__headerIcon--u9yrl","description":"styles-module__description--IvKuo"});
|
|
102493
102497
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102494
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102498
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102495
102499
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102496
102500
|
var EditorSlice = __webpack_require__(68512);
|
|
102497
102501
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -102499,9 +102503,9 @@ var types = __webpack_require__(92932);
|
|
|
102499
102503
|
// EXTERNAL MODULE: external "react-redux"
|
|
102500
102504
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102501
102505
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102502
|
-
var BaseModal = __webpack_require__(
|
|
102506
|
+
var BaseModal = __webpack_require__(97933);
|
|
102503
102507
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102504
|
-
var Button = __webpack_require__(
|
|
102508
|
+
var Button = __webpack_require__(79428);
|
|
102505
102509
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102506
102510
|
var SvgIcon = __webpack_require__(82917);
|
|
102507
102511
|
// EXTERNAL MODULE: ./src/assets/icons/remix.svg
|
|
@@ -102567,7 +102571,7 @@ var RemixProjectModal = () => {
|
|
|
102567
102571
|
|
|
102568
102572
|
/***/ }),
|
|
102569
102573
|
|
|
102570
|
-
/***/
|
|
102574
|
+
/***/ 15406:
|
|
102571
102575
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102572
102576
|
|
|
102573
102577
|
// ESM COMPAT FLAG
|
|
@@ -102584,7 +102588,7 @@ var external_react_ = __webpack_require__(51649);
|
|
|
102584
102588
|
// extracted by mini-css-extract-plugin
|
|
102585
102589
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--uVl64","headerContainer":"styles-module__headerContainer--FPLYl","headerIcon":"styles-module__headerIcon--VUrhy","headerText":"styles-module__headerText--F+NA0","containerBox":"styles-module__containerBox--Dezow","buttonsContainer":"styles-module__buttonsContainer--pnT1Q"});
|
|
102586
102590
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102587
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102591
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102588
102592
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102589
102593
|
var EditorSlice = __webpack_require__(68512);
|
|
102590
102594
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -102592,7 +102596,7 @@ var types = __webpack_require__(92932);
|
|
|
102592
102596
|
// EXTERNAL MODULE: external "react-redux"
|
|
102593
102597
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102594
102598
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102595
|
-
var BaseModal = __webpack_require__(
|
|
102599
|
+
var BaseModal = __webpack_require__(97933);
|
|
102596
102600
|
;// ./src/assets/icons/remove.svg
|
|
102597
102601
|
var _path;
|
|
102598
102602
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -102610,7 +102614,7 @@ function SvgRemove(props) {
|
|
|
102610
102614
|
}
|
|
102611
102615
|
/* harmony default export */ const remove = (SvgRemove);
|
|
102612
102616
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102613
|
-
var Button = __webpack_require__(
|
|
102617
|
+
var Button = __webpack_require__(79428);
|
|
102614
102618
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102615
102619
|
var SvgIcon = __webpack_require__(82917);
|
|
102616
102620
|
// EXTERNAL MODULE: ./src/redux/stores/index.ts
|
|
@@ -102681,7 +102685,7 @@ var RemoveItemModal = () => {
|
|
|
102681
102685
|
|
|
102682
102686
|
/***/ }),
|
|
102683
102687
|
|
|
102684
|
-
/***/
|
|
102688
|
+
/***/ 23765:
|
|
102685
102689
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102686
102690
|
|
|
102687
102691
|
// ESM COMPAT FLAG
|
|
@@ -102698,7 +102702,7 @@ var external_react_ = __webpack_require__(51649);
|
|
|
102698
102702
|
// extracted by mini-css-extract-plugin
|
|
102699
102703
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--UhJMG","modalContentHeader":"styles-module__modalContentHeader--YPWsb","headerText":"styles-module__headerText--89Clx","containerBox":"styles-module__containerBox--WUoyb","messageContainer":"styles-module__messageContainer--WzXV7","messageIcon":"styles-module__messageIcon--a6yn-","messageContent":"styles-module__messageContent--CYn9o","buttonsContainer":"styles-module__buttonsContainer--1toXb"});
|
|
102700
102704
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102701
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102705
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102702
102706
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102703
102707
|
var EditorSlice = __webpack_require__(68512);
|
|
102704
102708
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -102706,13 +102710,13 @@ var types = __webpack_require__(92932);
|
|
|
102706
102710
|
// EXTERNAL MODULE: external "react-redux"
|
|
102707
102711
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102708
102712
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102709
|
-
var BaseModal = __webpack_require__(
|
|
102713
|
+
var BaseModal = __webpack_require__(97933);
|
|
102710
102714
|
// EXTERNAL MODULE: ./src/assets/icons/alert.svg
|
|
102711
102715
|
var icons_alert = __webpack_require__(11367);
|
|
102712
102716
|
// EXTERNAL MODULE: ./src/assets/icons/flag.svg
|
|
102713
102717
|
var flag = __webpack_require__(91953);
|
|
102714
102718
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102715
|
-
var Button = __webpack_require__(
|
|
102719
|
+
var Button = __webpack_require__(79428);
|
|
102716
102720
|
// EXTERNAL MODULE: ./src/assets/icons/close.svg
|
|
102717
102721
|
var icons_close = __webpack_require__(80181);
|
|
102718
102722
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
@@ -102785,7 +102789,7 @@ var SaveProjectReminderModal = () => {
|
|
|
102785
102789
|
|
|
102786
102790
|
/***/ }),
|
|
102787
102791
|
|
|
102788
|
-
/***/
|
|
102792
|
+
/***/ 38876:
|
|
102789
102793
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102790
102794
|
|
|
102791
102795
|
// ESM COMPAT FLAG
|
|
@@ -102802,7 +102806,7 @@ var external_react_ = __webpack_require__(51649);
|
|
|
102802
102806
|
// extracted by mini-css-extract-plugin
|
|
102803
102807
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--khecF","headerIcon":"styles-module__headerIcon--fnE18","headerText":"styles-module__headerText--ua6h6","copyButton":"styles-module__copyButton--jEsq1","tabContainer":"styles-module__tabContainer--Xb4IP","tabButton":"styles-module__tabButton--4BrBv","tabButtonActive":"styles-module__tabButtonActive--CdxX8","containerBox":"styles-module__containerBox--rwoTV","linkContainer":"styles-module__linkContainer--XPt-Q","linkText":"styles-module__linkText--3vzcO"});
|
|
102804
102808
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102805
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102809
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102806
102810
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102807
102811
|
var EditorSlice = __webpack_require__(68512);
|
|
102808
102812
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -102810,13 +102814,13 @@ var types = __webpack_require__(92932);
|
|
|
102810
102814
|
// EXTERNAL MODULE: external "react-redux"
|
|
102811
102815
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102812
102816
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102813
|
-
var BaseModal = __webpack_require__(
|
|
102817
|
+
var BaseModal = __webpack_require__(97933);
|
|
102814
102818
|
// EXTERNAL MODULE: ./src/assets/icons/link.svg
|
|
102815
102819
|
var icons_link = __webpack_require__(19351);
|
|
102816
102820
|
// EXTERNAL MODULE: ./src/assets/icons/close.svg
|
|
102817
102821
|
var icons_close = __webpack_require__(80181);
|
|
102818
102822
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102819
|
-
var Button = __webpack_require__(
|
|
102823
|
+
var Button = __webpack_require__(79428);
|
|
102820
102824
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102821
102825
|
var SvgIcon = __webpack_require__(82917);
|
|
102822
102826
|
// EXTERNAL MODULE: ./src/assets/icons/flag.svg
|
|
@@ -102923,7 +102927,7 @@ var ShareProjectModal = () => {
|
|
|
102923
102927
|
|
|
102924
102928
|
/***/ }),
|
|
102925
102929
|
|
|
102926
|
-
/***/
|
|
102930
|
+
/***/ 66156:
|
|
102927
102931
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102928
102932
|
|
|
102929
102933
|
// ESM COMPAT FLAG
|
|
@@ -102940,7 +102944,7 @@ var external_react_ = __webpack_require__(51649);
|
|
|
102940
102944
|
// extracted by mini-css-extract-plugin
|
|
102941
102945
|
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","content":"styles-module__content--pEmxZ","headerIcon":"styles-module__headerIcon--mzjrS","headerText":"styles-module__headerText--pt2r0","containerBox":"styles-module__containerBox--r5zsA","buttonsContainer":"styles-module__buttonsContainer--I3Coy"});
|
|
102942
102946
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102943
|
-
var BaseModal_styles_module = __webpack_require__(
|
|
102947
|
+
var BaseModal_styles_module = __webpack_require__(27924);
|
|
102944
102948
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102945
102949
|
var EditorSlice = __webpack_require__(68512);
|
|
102946
102950
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -102948,11 +102952,11 @@ var types = __webpack_require__(92932);
|
|
|
102948
102952
|
// EXTERNAL MODULE: external "react-redux"
|
|
102949
102953
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102950
102954
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102951
|
-
var BaseModal = __webpack_require__(
|
|
102955
|
+
var BaseModal = __webpack_require__(97933);
|
|
102952
102956
|
// EXTERNAL MODULE: ./src/assets/icons/alertTriangle.svg
|
|
102953
102957
|
var alertTriangle = __webpack_require__(30103);
|
|
102954
102958
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102955
|
-
var Button = __webpack_require__(
|
|
102959
|
+
var Button = __webpack_require__(79428);
|
|
102956
102960
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102957
102961
|
var SvgIcon = __webpack_require__(82917);
|
|
102958
102962
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
@@ -103004,7 +103008,7 @@ var UploadSizeLimitModal = () => {
|
|
|
103004
103008
|
|
|
103005
103009
|
/***/ }),
|
|
103006
103010
|
|
|
103007
|
-
/***/
|
|
103011
|
+
/***/ 73658:
|
|
103008
103012
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103009
103013
|
|
|
103010
103014
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -103017,7 +103021,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103017
103021
|
/* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
|
|
103018
103022
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46942);
|
|
103019
103023
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
|
103020
|
-
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
103024
|
+
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29881);
|
|
103021
103025
|
/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78556);
|
|
103022
103026
|
/* harmony import */ var components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26982);
|
|
103023
103027
|
/* harmony import */ var components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8__);
|
|
@@ -103156,7 +103160,7 @@ var ProjectName = _ref => {
|
|
|
103156
103160
|
|
|
103157
103161
|
/***/ }),
|
|
103158
103162
|
|
|
103159
|
-
/***/
|
|
103163
|
+
/***/ 57715:
|
|
103160
103164
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103161
103165
|
|
|
103162
103166
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -103164,8 +103168,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103164
103168
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
103165
103169
|
/* harmony export */ });
|
|
103166
103170
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
103167
|
-
/* harmony import */ var _RunnerControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
103168
|
-
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
103171
|
+
/* harmony import */ var _RunnerControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80263);
|
|
103172
|
+
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67534);
|
|
103169
103173
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74848);
|
|
103170
103174
|
|
|
103171
103175
|
|
|
@@ -103186,7 +103190,7 @@ var RunBar = _ref => {
|
|
|
103186
103190
|
|
|
103187
103191
|
/***/ }),
|
|
103188
103192
|
|
|
103189
|
-
/***/
|
|
103193
|
+
/***/ 80263:
|
|
103190
103194
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103191
103195
|
|
|
103192
103196
|
// ESM COMPAT FLAG
|
|
@@ -103204,7 +103208,7 @@ var objectSpread2 = __webpack_require__(89379);
|
|
|
103204
103208
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
|
|
103205
103209
|
var objectWithoutProperties = __webpack_require__(53986);
|
|
103206
103210
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
103207
|
-
var Button = __webpack_require__(
|
|
103211
|
+
var Button = __webpack_require__(79428);
|
|
103208
103212
|
// EXTERNAL MODULE: external "react-redux"
|
|
103209
103213
|
var external_react_redux_ = __webpack_require__(14062);
|
|
103210
103214
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
@@ -103244,7 +103248,7 @@ var RunButton = _ref => {
|
|
|
103244
103248
|
var classnames = __webpack_require__(46942);
|
|
103245
103249
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
103246
103250
|
// EXTERNAL MODULE: ./src/components/RunButton/styles.module.scss
|
|
103247
|
-
var styles_module = __webpack_require__(
|
|
103251
|
+
var styles_module = __webpack_require__(67534);
|
|
103248
103252
|
// EXTERNAL MODULE: ./src/components/SpinnerDotted/SpinnerDotted.tsx
|
|
103249
103253
|
var SpinnerDotted = __webpack_require__(79458);
|
|
103250
103254
|
;// ./src/components/RunButton/StopButton.jsx
|
|
@@ -103371,7 +103375,7 @@ var RunnerControls = () => {
|
|
|
103371
103375
|
|
|
103372
103376
|
/***/ }),
|
|
103373
103377
|
|
|
103374
|
-
/***/
|
|
103378
|
+
/***/ 88814:
|
|
103375
103379
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103376
103380
|
|
|
103377
103381
|
// ESM COMPAT FLAG
|
|
@@ -103418,7 +103422,7 @@ var external_react_redux_ = __webpack_require__(14062);
|
|
|
103418
103422
|
// EXTERNAL MODULE: ./src/assets/icons/save.svg
|
|
103419
103423
|
var save = __webpack_require__(48060);
|
|
103420
103424
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
103421
|
-
var Button = __webpack_require__(
|
|
103425
|
+
var Button = __webpack_require__(79428);
|
|
103422
103426
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
103423
103427
|
var EditorSlice = __webpack_require__(68512);
|
|
103424
103428
|
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
@@ -103502,7 +103506,7 @@ var SaveButton = props => {
|
|
|
103502
103506
|
|
|
103503
103507
|
/***/ }),
|
|
103504
103508
|
|
|
103505
|
-
/***/
|
|
103509
|
+
/***/ 53841:
|
|
103506
103510
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103507
103511
|
|
|
103508
103512
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -103539,7 +103543,7 @@ var themeUpdatedEvent = detail => webComponentCustomEvent("editor-themeUpdated",
|
|
|
103539
103543
|
|
|
103540
103544
|
/***/ }),
|
|
103541
103545
|
|
|
103542
|
-
/***/
|
|
103546
|
+
/***/ 41527:
|
|
103543
103547
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103544
103548
|
|
|
103545
103549
|
// ESM COMPAT FLAG
|
|
@@ -106200,7 +106204,7 @@ instance.use(es.initReactI18next)
|
|
|
106200
106204
|
|
|
106201
106205
|
/***/ }),
|
|
106202
106206
|
|
|
106203
|
-
/***/
|
|
106207
|
+
/***/ 61193:
|
|
106204
106208
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
106205
106209
|
|
|
106206
106210
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -106235,7 +106239,7 @@ var CloseIcon = props => {
|
|
|
106235
106239
|
|
|
106236
106240
|
/***/ }),
|
|
106237
106241
|
|
|
106238
|
-
/***/
|
|
106242
|
+
/***/ 29441:
|
|
106239
106243
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
106240
106244
|
|
|
106241
106245
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -106254,7 +106258,7 @@ var defaultMZCriteria = {
|
|
|
106254
106258
|
|
|
106255
106259
|
/***/ }),
|
|
106256
106260
|
|
|
106257
|
-
/***/
|
|
106261
|
+
/***/ 51535:
|
|
106258
106262
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
106259
106263
|
|
|
106260
106264
|
// ESM COMPAT FLAG
|
|
@@ -107224,7 +107228,7 @@ var ResizableWithHandle = props => {
|
|
|
107224
107228
|
|
|
107225
107229
|
/***/ }),
|
|
107226
107230
|
|
|
107227
|
-
/***/
|
|
107231
|
+
/***/ 22554:
|
|
107228
107232
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
107229
107233
|
|
|
107230
107234
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -107237,7 +107241,7 @@ var MOBILE_MEDIA_QUERY = "(max-width: ".concat(MOBILE_BREAKPOINT, ")");
|
|
|
107237
107241
|
|
|
107238
107242
|
/***/ }),
|
|
107239
107243
|
|
|
107240
|
-
/***/
|
|
107244
|
+
/***/ 62161:
|
|
107241
107245
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
107242
107246
|
|
|
107243
107247
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142800,7 +142804,7 @@ function populateMaps (extensions, types) {
|
|
|
142800
142804
|
|
|
142801
142805
|
/***/ }),
|
|
142802
142806
|
|
|
142803
|
-
/***/
|
|
142807
|
+
/***/ 31323:
|
|
142804
142808
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142805
142809
|
|
|
142806
142810
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142809,7 +142813,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142809
142813
|
|
|
142810
142814
|
/***/ }),
|
|
142811
142815
|
|
|
142812
|
-
/***/
|
|
142816
|
+
/***/ 63724:
|
|
142813
142817
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142814
142818
|
|
|
142815
142819
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142821,7 +142825,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142821
142825
|
|
|
142822
142826
|
/***/ }),
|
|
142823
142827
|
|
|
142824
|
-
/***/
|
|
142828
|
+
/***/ 44502:
|
|
142825
142829
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142826
142830
|
|
|
142827
142831
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142833,7 +142837,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142833
142837
|
|
|
142834
142838
|
/***/ }),
|
|
142835
142839
|
|
|
142836
|
-
/***/
|
|
142840
|
+
/***/ 71244:
|
|
142837
142841
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142838
142842
|
|
|
142839
142843
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142845,7 +142849,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142845
142849
|
|
|
142846
142850
|
/***/ }),
|
|
142847
142851
|
|
|
142848
|
-
/***/
|
|
142852
|
+
/***/ 39412:
|
|
142849
142853
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142850
142854
|
|
|
142851
142855
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142857,7 +142861,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142857
142861
|
|
|
142858
142862
|
/***/ }),
|
|
142859
142863
|
|
|
142860
|
-
/***/
|
|
142864
|
+
/***/ 12914:
|
|
142861
142865
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142862
142866
|
|
|
142863
142867
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142869,7 +142873,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142869
142873
|
|
|
142870
142874
|
/***/ }),
|
|
142871
142875
|
|
|
142872
|
-
/***/
|
|
142876
|
+
/***/ 87295:
|
|
142873
142877
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142874
142878
|
|
|
142875
142879
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142881,7 +142885,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142881
142885
|
|
|
142882
142886
|
/***/ }),
|
|
142883
142887
|
|
|
142884
|
-
/***/
|
|
142888
|
+
/***/ 28076:
|
|
142885
142889
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142886
142890
|
|
|
142887
142891
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142893,7 +142897,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142893
142897
|
|
|
142894
142898
|
/***/ }),
|
|
142895
142899
|
|
|
142896
|
-
/***/
|
|
142900
|
+
/***/ 51191:
|
|
142897
142901
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142898
142902
|
|
|
142899
142903
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142905,7 +142909,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142905
142909
|
|
|
142906
142910
|
/***/ }),
|
|
142907
142911
|
|
|
142908
|
-
/***/
|
|
142912
|
+
/***/ 52160:
|
|
142909
142913
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142910
142914
|
|
|
142911
142915
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142917,7 +142921,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142917
142921
|
|
|
142918
142922
|
/***/ }),
|
|
142919
142923
|
|
|
142920
|
-
/***/
|
|
142924
|
+
/***/ 10614:
|
|
142921
142925
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142922
142926
|
|
|
142923
142927
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142929,7 +142933,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142929
142933
|
|
|
142930
142934
|
/***/ }),
|
|
142931
142935
|
|
|
142932
|
-
/***/
|
|
142936
|
+
/***/ 10556:
|
|
142933
142937
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142934
142938
|
|
|
142935
142939
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142941,7 +142945,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142941
142945
|
|
|
142942
142946
|
/***/ }),
|
|
142943
142947
|
|
|
142944
|
-
/***/
|
|
142948
|
+
/***/ 21852:
|
|
142945
142949
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142946
142950
|
|
|
142947
142951
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142953,7 +142957,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142953
142957
|
|
|
142954
142958
|
/***/ }),
|
|
142955
142959
|
|
|
142956
|
-
/***/
|
|
142960
|
+
/***/ 62857:
|
|
142957
142961
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142958
142962
|
|
|
142959
142963
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142965,7 +142969,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142965
142969
|
|
|
142966
142970
|
/***/ }),
|
|
142967
142971
|
|
|
142968
|
-
/***/
|
|
142972
|
+
/***/ 27924:
|
|
142969
142973
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142970
142974
|
|
|
142971
142975
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142977,7 +142981,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142977
142981
|
|
|
142978
142982
|
/***/ }),
|
|
142979
142983
|
|
|
142980
|
-
/***/
|
|
142984
|
+
/***/ 29642:
|
|
142981
142985
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142982
142986
|
|
|
142983
142987
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -142989,7 +142993,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142989
142993
|
|
|
142990
142994
|
/***/ }),
|
|
142991
142995
|
|
|
142992
|
-
/***/
|
|
142996
|
+
/***/ 6631:
|
|
142993
142997
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
142994
142998
|
|
|
142995
142999
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143001,7 +143005,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143001
143005
|
|
|
143002
143006
|
/***/ }),
|
|
143003
143007
|
|
|
143004
|
-
/***/
|
|
143008
|
+
/***/ 38653:
|
|
143005
143009
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143006
143010
|
|
|
143007
143011
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143013,7 +143017,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143013
143017
|
|
|
143014
143018
|
/***/ }),
|
|
143015
143019
|
|
|
143016
|
-
/***/
|
|
143020
|
+
/***/ 88525:
|
|
143017
143021
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143018
143022
|
|
|
143019
143023
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143025,7 +143029,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143025
143029
|
|
|
143026
143030
|
/***/ }),
|
|
143027
143031
|
|
|
143028
|
-
/***/
|
|
143032
|
+
/***/ 29881:
|
|
143029
143033
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143030
143034
|
|
|
143031
143035
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143037,7 +143041,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143037
143041
|
|
|
143038
143042
|
/***/ }),
|
|
143039
143043
|
|
|
143040
|
-
/***/
|
|
143044
|
+
/***/ 67534:
|
|
143041
143045
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143042
143046
|
|
|
143043
143047
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -143048,7 +143052,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143048
143052
|
|
|
143049
143053
|
/***/ }),
|
|
143050
143054
|
|
|
143051
|
-
/***/
|
|
143055
|
+
/***/ 68776:
|
|
143052
143056
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143053
143057
|
|
|
143054
143058
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143060,7 +143064,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143060
143064
|
|
|
143061
143065
|
/***/ }),
|
|
143062
143066
|
|
|
143063
|
-
/***/
|
|
143067
|
+
/***/ 73386:
|
|
143064
143068
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143065
143069
|
|
|
143066
143070
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143072,7 +143076,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143072
143076
|
|
|
143073
143077
|
/***/ }),
|
|
143074
143078
|
|
|
143075
|
-
/***/
|
|
143079
|
+
/***/ 91156:
|
|
143076
143080
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143077
143081
|
|
|
143078
143082
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143084,7 +143088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143084
143088
|
|
|
143085
143089
|
/***/ }),
|
|
143086
143090
|
|
|
143087
|
-
/***/
|
|
143091
|
+
/***/ 27112:
|
|
143088
143092
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143089
143093
|
|
|
143090
143094
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143096,7 +143100,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143096
143100
|
|
|
143097
143101
|
/***/ }),
|
|
143098
143102
|
|
|
143099
|
-
/***/
|
|
143103
|
+
/***/ 28188:
|
|
143100
143104
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143101
143105
|
|
|
143102
143106
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143108,7 +143112,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143108
143112
|
|
|
143109
143113
|
/***/ }),
|
|
143110
143114
|
|
|
143111
|
-
/***/
|
|
143115
|
+
/***/ 93105:
|
|
143112
143116
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143113
143117
|
|
|
143114
143118
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143120,7 +143124,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143120
143124
|
|
|
143121
143125
|
/***/ }),
|
|
143122
143126
|
|
|
143123
|
-
/***/
|
|
143127
|
+
/***/ 36974:
|
|
143124
143128
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143125
143129
|
|
|
143126
143130
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143132,7 +143136,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143132
143136
|
|
|
143133
143137
|
/***/ }),
|
|
143134
143138
|
|
|
143135
|
-
/***/
|
|
143139
|
+
/***/ 44221:
|
|
143136
143140
|
/***/ (() => {
|
|
143137
143141
|
|
|
143138
143142
|
// extracted by mini-css-extract-plugin
|
|
@@ -143140,7 +143144,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143140
143144
|
|
|
143141
143145
|
/***/ }),
|
|
143142
143146
|
|
|
143143
|
-
/***/
|
|
143147
|
+
/***/ 7703:
|
|
143144
143148
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143145
143149
|
|
|
143146
143150
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143149,7 +143153,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143149
143153
|
|
|
143150
143154
|
/***/ }),
|
|
143151
143155
|
|
|
143152
|
-
/***/
|
|
143156
|
+
/***/ 75765:
|
|
143153
143157
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143154
143158
|
|
|
143155
143159
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -143158,7 +143162,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143158
143162
|
|
|
143159
143163
|
/***/ }),
|
|
143160
143164
|
|
|
143161
|
-
/***/
|
|
143165
|
+
/***/ 41882:
|
|
143162
143166
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143163
143167
|
|
|
143164
143168
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -228020,7 +228024,7 @@ function registerTraceModule(_module) {
|
|
|
228020
228024
|
|
|
228021
228025
|
// add maplibre-gl CSS here to avoid console warning on instantiation
|
|
228022
228026
|
if(bpmName === 'map') {
|
|
228023
|
-
__webpack_require__(
|
|
228027
|
+
__webpack_require__(31323);
|
|
228024
228028
|
}
|
|
228025
228029
|
|
|
228026
228030
|
// if `plotly-geo-assets.js` is not included,
|
|
@@ -368723,7 +368727,7 @@ const stores_1 = __webpack_require__(32132);
|
|
|
368723
368727
|
const react_redux_1 = __webpack_require__(14062);
|
|
368724
368728
|
const react_router_dom_1 = __webpack_require__(92648);
|
|
368725
368729
|
const AuthContext_1 = __webpack_require__(55471);
|
|
368726
|
-
__webpack_require__(
|
|
368730
|
+
__webpack_require__(41527);
|
|
368727
368731
|
const editorListener_1 = __webpack_require__(41824);
|
|
368728
368732
|
const Loading_1 = __importDefault(__webpack_require__(34466));
|
|
368729
368733
|
const LeaveGuardController_1 = __webpack_require__(65240);
|
|
@@ -368872,9 +368876,9 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
368872
368876
|
const react_1 = __webpack_require__(51649);
|
|
368873
368877
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
368874
368878
|
const history_svg_1 = __importDefault(__webpack_require__(93113));
|
|
368875
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
368879
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
368876
368880
|
const stores_1 = __webpack_require__(32132);
|
|
368877
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
368881
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(63724));
|
|
368878
368882
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
368879
368883
|
const CommitHistoryMenu_1 = __webpack_require__(46175);
|
|
368880
368884
|
const Tooltip_1 = __importDefault(__webpack_require__(26982));
|
|
@@ -368910,7 +368914,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
368910
368914
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
368911
368915
|
const Text_1 = __webpack_require__(82803);
|
|
368912
368916
|
const history_svg_1 = __importDefault(__webpack_require__(93113));
|
|
368913
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
368917
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(63724));
|
|
368914
368918
|
const CommitHoverElement = () => {
|
|
368915
368919
|
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.commitHoverElement, children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { SvgElement: history_svg_1.default, size: 18 }), (0, jsx_runtime_1.jsx)(Text_1.Text, { size: 10, weight: "medium", children: "Restore" })] }));
|
|
368916
368920
|
};
|
|
@@ -368933,7 +368937,7 @@ const js_convert_case_1 = __webpack_require__(61647);
|
|
|
368933
368937
|
const download_svg_1 = __importDefault(__webpack_require__(63279));
|
|
368934
368938
|
const stores_1 = __webpack_require__(32132);
|
|
368935
368939
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
368936
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
368940
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
368937
368941
|
const createProjectArchive_1 = __webpack_require__(46514);
|
|
368938
368942
|
const DownloadButton = (props) => {
|
|
368939
368943
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
@@ -368996,16 +369000,16 @@ const react_redux_1 = __webpack_require__(14062);
|
|
|
368996
369000
|
const react_tabs_1 = __webpack_require__(39243);
|
|
368997
369001
|
const react_responsive_1 = __webpack_require__(17988);
|
|
368998
369002
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
368999
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
369000
|
-
const EditorPanel_1 = __importDefault(__webpack_require__(
|
|
369001
|
-
const DraggableTab_1 = __importDefault(__webpack_require__(
|
|
369002
|
-
const DroppableTabList_1 = __importDefault(__webpack_require__(
|
|
369003
|
-
const RunnerControls_1 = __importDefault(__webpack_require__(
|
|
369004
|
-
const mediaQueryBreakpoints_1 = __webpack_require__(
|
|
369005
|
-
const CloseIcon_1 = __importDefault(__webpack_require__(
|
|
369003
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
369004
|
+
const EditorPanel_1 = __importDefault(__webpack_require__(82467));
|
|
369005
|
+
const DraggableTab_1 = __importDefault(__webpack_require__(74215));
|
|
369006
|
+
const DroppableTabList_1 = __importDefault(__webpack_require__(48339));
|
|
369007
|
+
const RunnerControls_1 = __importDefault(__webpack_require__(80263));
|
|
369008
|
+
const mediaQueryBreakpoints_1 = __webpack_require__(22554);
|
|
369009
|
+
const CloseIcon_1 = __importDefault(__webpack_require__(61193));
|
|
369006
369010
|
const FileIcon_1 = __importDefault(__webpack_require__(94028));
|
|
369007
369011
|
const readonly_svg_1 = __importDefault(__webpack_require__(19297));
|
|
369008
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369012
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(44502));
|
|
369009
369013
|
const stores_1 = __webpack_require__(32132);
|
|
369010
369014
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
369011
369015
|
const projectHelpers_1 = __webpack_require__(2610);
|
|
@@ -369146,7 +369150,7 @@ exports.ErrorDetails = void 0;
|
|
|
369146
369150
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369147
369151
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
369148
369152
|
const alert_svg_1 = __importDefault(__webpack_require__(11367));
|
|
369149
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369153
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(71244));
|
|
369150
369154
|
const Text_1 = __webpack_require__(82803);
|
|
369151
369155
|
const stores_1 = __webpack_require__(32132);
|
|
369152
369156
|
const Errors_1 = __webpack_require__(20339);
|
|
@@ -369173,7 +369177,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
369173
369177
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369174
369178
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369175
369179
|
const stores_1 = __webpack_require__(32132);
|
|
369176
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369180
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(71244));
|
|
369177
369181
|
const react_1 = __webpack_require__(51649);
|
|
369178
369182
|
const ErrorDetails_1 = __webpack_require__(80335);
|
|
369179
369183
|
const ErrorMessage = () => {
|
|
@@ -369205,7 +369209,7 @@ exports.NotFoundPage = void 0;
|
|
|
369205
369209
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369206
369210
|
const not_found_code_svg_1 = __importDefault(__webpack_require__(15552));
|
|
369207
369211
|
const not_found_svg_1 = __importDefault(__webpack_require__(95436));
|
|
369208
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369212
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(71244));
|
|
369209
369213
|
const ErrorDetails_1 = __webpack_require__(80335);
|
|
369210
369214
|
const NotFoundPage = () => {
|
|
369211
369215
|
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notFoundContainer, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notFoundText, children: [(0, jsx_runtime_1.jsx)(not_found_code_svg_1.default, {}), (0, jsx_runtime_1.jsx)(not_found_svg_1.default, {})] }), (0, jsx_runtime_1.jsx)(ErrorDetails_1.ErrorDetails, {})] }));
|
|
@@ -369224,9 +369228,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
369224
369228
|
};
|
|
369225
369229
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369226
369230
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369227
|
-
const ExternalFiles_1 = __importDefault(__webpack_require__(
|
|
369231
|
+
const ExternalFiles_1 = __importDefault(__webpack_require__(46590));
|
|
369228
369232
|
const RunnerFactory_1 = __importDefault(__webpack_require__(78329));
|
|
369229
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369233
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(39412));
|
|
369230
369234
|
const stores_1 = __webpack_require__(32132);
|
|
369231
369235
|
const Output = ({ packageApiUrl }) => {
|
|
369232
369236
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
@@ -369247,7 +369251,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
369247
369251
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369248
369252
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369249
369253
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
369250
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369254
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
369251
369255
|
const LogRenderer_1 = __importDefault(__webpack_require__(67278));
|
|
369252
369256
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
369253
369257
|
const alert_svg_1 = __importDefault(__webpack_require__(11367));
|
|
@@ -369280,7 +369284,6 @@ const node_html_parser_1 = __webpack_require__(36192);
|
|
|
369280
369284
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
369281
369285
|
const react_router_dom_1 = __webpack_require__(92648);
|
|
369282
369286
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
369283
|
-
const externalLinkHelper_1 = __webpack_require__(31615);
|
|
369284
369287
|
const open_in_new_tab_svg_1 = __importDefault(__webpack_require__(86936));
|
|
369285
369288
|
const stores_1 = __webpack_require__(32132);
|
|
369286
369289
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
@@ -369289,14 +369292,14 @@ const SvgIcon_1 = __webpack_require__(82917);
|
|
|
369289
369292
|
const console_svg_1 = __importDefault(__webpack_require__(20602));
|
|
369290
369293
|
const preview_svg_1 = __importDefault(__webpack_require__(80417));
|
|
369291
369294
|
const OutputTabPanel_1 = __webpack_require__(25931);
|
|
369292
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369295
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
369293
369296
|
const helpers_1 = __webpack_require__(1108);
|
|
369294
369297
|
const fileParsers_1 = __webpack_require__(26683);
|
|
369295
369298
|
const scripts_1 = __webpack_require__(57621);
|
|
369296
369299
|
const Errors_1 = __webpack_require__(20339);
|
|
369297
369300
|
const NotFoundPage_1 = __webpack_require__(87931);
|
|
369298
369301
|
const HtmlConsole_1 = __importDefault(__webpack_require__(55339));
|
|
369299
|
-
const ResizableWithHandle_1 = __importDefault(__webpack_require__(
|
|
369302
|
+
const ResizableWithHandle_1 = __importDefault(__webpack_require__(51535));
|
|
369300
369303
|
const BROADCAST_CHANNEL = "html_runner_channel";
|
|
369301
369304
|
var BroadcastMessageType;
|
|
369302
369305
|
(function (BroadcastMessageType) {
|
|
@@ -369366,29 +369369,22 @@ function HtmlRunner() {
|
|
|
369366
369369
|
};
|
|
369367
369370
|
}
|
|
369368
369371
|
}, [isPreviewMode]);
|
|
369369
|
-
|
|
369370
|
-
|
|
369371
|
-
|
|
369372
|
-
|
|
369373
|
-
|
|
369374
|
-
|
|
369375
|
-
|
|
369376
|
-
|
|
369377
|
-
|
|
369378
|
-
|
|
369379
|
-
|
|
369380
|
-
|
|
369381
|
-
|
|
369382
|
-
}
|
|
369383
|
-
else {
|
|
369384
|
-
handleRegularExternalLink(event.data.payload.linkTo);
|
|
369385
|
-
}
|
|
369386
|
-
}
|
|
369387
|
-
});
|
|
369388
|
-
};
|
|
369372
|
+
(0, react_1.useEffect)(() => {
|
|
369373
|
+
const handleReloadMessage = (event) => {
|
|
369374
|
+
if (event.data?.msg !== "RELOAD")
|
|
369375
|
+
return;
|
|
369376
|
+
const nextPage = event.data?.payload?.linkTo;
|
|
369377
|
+
if (typeof nextPage !== "string")
|
|
369378
|
+
return;
|
|
369379
|
+
dispatch((0, EditorSlice_1.setPage)(nextPage));
|
|
369380
|
+
dispatch((0, EditorSlice_1.triggerCodeRun)());
|
|
369381
|
+
};
|
|
369382
|
+
window.addEventListener("message", handleReloadMessage);
|
|
369383
|
+
return () => window.removeEventListener("message", handleReloadMessage);
|
|
369384
|
+
}, [dispatch]);
|
|
369389
369385
|
const iframeReload = () => {
|
|
369390
369386
|
const iframe = output.current?.contentDocument;
|
|
369391
|
-
const filePath = (0, helpers_1.getFilenameFromIFrame)(iframe)
|
|
369387
|
+
const filePath = (0, helpers_1.getFilenameFromIFrame)(iframe);
|
|
369392
369388
|
if (runningFilePath !== filePath) {
|
|
369393
369389
|
setRunningFilePath(filePath);
|
|
369394
369390
|
}
|
|
@@ -369398,9 +369394,11 @@ function HtmlRunner() {
|
|
|
369398
369394
|
linkElement.addEventListener("click", (e) => {
|
|
369399
369395
|
const href = linkElement.getAttribute("href");
|
|
369400
369396
|
const target = linkElement.getAttribute("target");
|
|
369401
|
-
|
|
369397
|
+
if (!href || target !== "_blank" || (0, helpers_1.isExternalUrl)(href))
|
|
369398
|
+
return;
|
|
369399
|
+
// block in-iframe navigation for internal html links with target="_blank"
|
|
369402
369400
|
// and open them in a preview tab
|
|
369403
|
-
if (
|
|
369401
|
+
if (href?.includes(".html")) {
|
|
369404
369402
|
e.preventDefault();
|
|
369405
369403
|
e.stopImmediatePropagation();
|
|
369406
369404
|
openPreview(`/${href}`);
|
|
@@ -369408,10 +369406,8 @@ function HtmlRunner() {
|
|
|
369408
369406
|
}, true);
|
|
369409
369407
|
});
|
|
369410
369408
|
}
|
|
369411
|
-
setExternalLink(null);
|
|
369412
369409
|
};
|
|
369413
369410
|
(0, react_1.useEffect)(() => {
|
|
369414
|
-
eventListener();
|
|
369415
369411
|
dispatch((0, EditorSlice_1.loadingRunner)(EditorTypes_1.RunnerType.HTML));
|
|
369416
369412
|
dispatch((0, EditorSlice_1.setLoadedRunner)(EditorTypes_1.RunnerType.HTML));
|
|
369417
369413
|
}, []);
|
|
@@ -369436,39 +369432,31 @@ function HtmlRunner() {
|
|
|
369436
369432
|
const fileToRun = page ?? defaultPreviewFilePath;
|
|
369437
369433
|
setRunningFilePath(fileToRun);
|
|
369438
369434
|
dispatch((0, EditorSlice_1.setError)(null));
|
|
369439
|
-
|
|
369440
|
-
|
|
369441
|
-
|
|
369442
|
-
|
|
369443
|
-
|
|
369444
|
-
|
|
369445
|
-
|
|
369446
|
-
|
|
369447
|
-
|
|
369448
|
-
|
|
369449
|
-
:
|
|
369450
|
-
|
|
369451
|
-
|
|
369452
|
-
|
|
369453
|
-
return;
|
|
369454
|
-
}
|
|
369455
|
-
const indexPage = (0, node_html_parser_1.parse)(entryPoint.content);
|
|
369456
|
-
const body = indexPage.querySelector("body") || indexPage;
|
|
369457
|
-
const htmlRoot = indexPage.querySelector("html") ?? indexPage;
|
|
369458
|
-
body.insertAdjacentHTML("afterbegin", scripts_1.disableLocalStorageScript);
|
|
369459
|
-
htmlRoot.insertAdjacentHTML("afterbegin", scripts_1.consoleOverrideScript);
|
|
369460
|
-
const { content } = await (0, fileParsers_1.resolveAndRewriteHtmlImports)(indexPage.toString(), projectComponents, entryPoint.path, page ?? entryPoint.path);
|
|
369461
|
-
if (output.current) {
|
|
369462
|
-
output.current.srcdoc = content;
|
|
369463
|
-
}
|
|
369464
|
-
if (codeRunTriggered) {
|
|
369465
|
-
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
369466
|
-
}
|
|
369435
|
+
const entryPoint = (0, helpers_1.getEntryPoint)(projectComponents, fileToRun);
|
|
369436
|
+
if (!entryPoint) {
|
|
369437
|
+
dispatch((0, EditorSlice_1.setError)(fileToRun === helpers_1.DEFAULT_ENTRY_FILE_PATH && !isPreviewMode
|
|
369438
|
+
? {
|
|
369439
|
+
type: Errors_1.ErrorType.ENTRY_FILE_NOT_FOUND,
|
|
369440
|
+
details: {
|
|
369441
|
+
fileName: helpers_1.DEFAULT_ENTRY_FILE_NAME,
|
|
369442
|
+
},
|
|
369443
|
+
}
|
|
369444
|
+
: {
|
|
369445
|
+
type: Errors_1.ErrorType.PAGE_NOT_FOUND,
|
|
369446
|
+
}));
|
|
369447
|
+
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
369448
|
+
return;
|
|
369467
369449
|
}
|
|
369468
|
-
|
|
369469
|
-
|
|
369470
|
-
|
|
369471
|
-
|
|
369450
|
+
const indexPage = (0, node_html_parser_1.parse)(entryPoint.content);
|
|
369451
|
+
const body = indexPage.querySelector("body") || indexPage;
|
|
369452
|
+
const htmlRoot = indexPage.querySelector("html") ?? indexPage;
|
|
369453
|
+
body.insertAdjacentHTML("afterbegin", scripts_1.disableLocalStorageScript);
|
|
369454
|
+
htmlRoot.insertAdjacentHTML("afterbegin", scripts_1.consoleOverrideScript);
|
|
369455
|
+
const { content } = await (0, fileParsers_1.resolveAndRewriteHtmlImports)(indexPage.toString(), projectComponents, entryPoint.path, page ?? entryPoint.path);
|
|
369456
|
+
if (output.current) {
|
|
369457
|
+
output.current.srcdoc = content;
|
|
369458
|
+
}
|
|
369459
|
+
if (codeRunTriggered) {
|
|
369472
369460
|
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
369473
369461
|
}
|
|
369474
369462
|
};
|
|
@@ -369508,7 +369496,7 @@ function HtmlRunner() {
|
|
|
369508
369496
|
const iframeClasses = (0, classnames_1.default)(styles_module_scss_1.default.iframe, {
|
|
369509
369497
|
[styles_module_scss_1.default.codeHasBeenRun]: codeHasBeenRun,
|
|
369510
369498
|
});
|
|
369511
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups", referrerPolicy: "strict-origin-when-cross-origin", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media;\n fullscreen;\n picture-in-picture;\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !isPreviewMode && ((0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }) }))] }));
|
|
369499
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups allow-popups-to-escape-sandbox", referrerPolicy: "strict-origin-when-cross-origin", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media;\n fullscreen;\n picture-in-picture;\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !isPreviewMode && ((0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }) }))] }));
|
|
369512
369500
|
}
|
|
369513
369501
|
exports["default"] = HtmlRunner;
|
|
369514
369502
|
|
|
@@ -369524,7 +369512,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
369524
369512
|
};
|
|
369525
369513
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369526
369514
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369527
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
369515
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
369528
369516
|
var SerializedNodeType;
|
|
369529
369517
|
(function (SerializedNodeType) {
|
|
369530
369518
|
SerializedNodeType["String"] = "string";
|
|
@@ -369587,6 +369575,7 @@ const node_html_parser_1 = __webpack_require__(36192);
|
|
|
369587
369575
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
369588
369576
|
const binaryStore_1 = __webpack_require__(5060);
|
|
369589
369577
|
const projectHelpers_1 = __webpack_require__(2610);
|
|
369578
|
+
const helpers_1 = __webpack_require__(1108);
|
|
369590
369579
|
/** Normalizes CSS paths
|
|
369591
369580
|
* Treats paths without leading / or ./ or ../ as relative to current file
|
|
369592
369581
|
* E.g. 'image.png' will be treated as './image.png'
|
|
@@ -369640,9 +369629,7 @@ const getMimeType = (filePath, fallback = "application/octet-stream") => {
|
|
|
369640
369629
|
};
|
|
369641
369630
|
/** Check if a URL is external, blob, or data */
|
|
369642
369631
|
const isExternalOrDataUrl = (url) => {
|
|
369643
|
-
return (url.startsWith("blob:") ||
|
|
369644
|
-
/^(https?:)?\/\//.test(url) ||
|
|
369645
|
-
url.startsWith("data:"));
|
|
369632
|
+
return (url.startsWith("blob:") || (0, helpers_1.isExternalUrl)(url) || url.startsWith("data:"));
|
|
369646
369633
|
};
|
|
369647
369634
|
async function replaceAsync(input, regex, replacer) {
|
|
369648
369635
|
let result = "";
|
|
@@ -369819,7 +369806,12 @@ async function rewriteSources(indexPage, components, baseFilePath, propName, blo
|
|
|
369819
369806
|
const nodes = indexPage.querySelectorAll(`[${propName}]`);
|
|
369820
369807
|
for (const node of nodes) {
|
|
369821
369808
|
const raw = node.getAttribute(propName);
|
|
369822
|
-
if (!raw
|
|
369809
|
+
if (!raw)
|
|
369810
|
+
continue;
|
|
369811
|
+
// For external links with target="_blank", add noopener and noreferrer for security
|
|
369812
|
+
if ((0, helpers_1.isExternalUrl)(raw) && node.getAttribute("target") === "_blank")
|
|
369813
|
+
node.setAttribute("rel", "noopener noreferrer");
|
|
369814
|
+
if (isExternalOrDataUrl(raw))
|
|
369823
369815
|
continue;
|
|
369824
369816
|
if ((0, projectHelpers_1.parseFileName)(raw).extension === ProjectTypes_1.ProjectFileExtension.HTML &&
|
|
369825
369817
|
propName === "href") {
|
|
@@ -369872,7 +369864,7 @@ async function resolveAndRewriteHtmlImports(html, projectComponents, baseFilePat
|
|
|
369872
369864
|
|
|
369873
369865
|
|
|
369874
369866
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369875
|
-
exports.getFilenameFromIFrame = exports.getEntryPoint = exports.DEFAULT_ENTRY_FILE_PATH = exports.DEFAULT_ENTRY_FILE_NAME = void 0;
|
|
369867
|
+
exports.isExternalUrl = exports.getFilenameFromIFrame = exports.getEntryPoint = exports.DEFAULT_ENTRY_FILE_PATH = exports.DEFAULT_ENTRY_FILE_NAME = void 0;
|
|
369876
369868
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
369877
369869
|
exports.DEFAULT_ENTRY_FILE_NAME = "index.html";
|
|
369878
369870
|
exports.DEFAULT_ENTRY_FILE_PATH = `/${exports.DEFAULT_ENTRY_FILE_NAME}`;
|
|
@@ -369883,6 +369875,10 @@ const getEntryPoint = (components, filePath) => {
|
|
|
369883
369875
|
exports.getEntryPoint = getEntryPoint;
|
|
369884
369876
|
const getFilenameFromIFrame = (iframe) => iframe?.querySelector("meta[filename]")?.getAttribute("filename") ?? null;
|
|
369885
369877
|
exports.getFilenameFromIFrame = getFilenameFromIFrame;
|
|
369878
|
+
const isExternalUrl = (url) => {
|
|
369879
|
+
return /^(https?:)?\/\//.test(url);
|
|
369880
|
+
};
|
|
369881
|
+
exports.isExternalUrl = isExternalUrl;
|
|
369886
369882
|
|
|
369887
369883
|
|
|
369888
369884
|
/***/ }),
|
|
@@ -370142,7 +370138,7 @@ const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
|
370142
370138
|
const react_tabs_1 = __webpack_require__(39243);
|
|
370143
370139
|
const Text_1 = __webpack_require__(82803);
|
|
370144
370140
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
370145
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
370141
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
370146
370142
|
const stores_1 = __webpack_require__(32132);
|
|
370147
370143
|
const OutputTabPanel = ({ title, icon: Icon, readOnly, children, outputWrapperClassName, extraTabContent, tabPanelClassName, }) => {
|
|
370148
370144
|
const outputOnly = (0, stores_1.useAppSelector)((state) => state.editor.isOutputOnly);
|
|
@@ -370160,418 +370156,41 @@ exports.OutputTabPanel = OutputTabPanel;
|
|
|
370160
370156
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
370161
370157
|
|
|
370162
370158
|
|
|
370163
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
370164
|
-
if (k2 === undefined) k2 = k;
|
|
370165
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
370166
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
370167
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
370168
|
-
}
|
|
370169
|
-
Object.defineProperty(o, k2, desc);
|
|
370170
|
-
}) : (function(o, m, k, k2) {
|
|
370171
|
-
if (k2 === undefined) k2 = k;
|
|
370172
|
-
o[k2] = m[k];
|
|
370173
|
-
}));
|
|
370174
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
370175
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
370176
|
-
}) : function(o, v) {
|
|
370177
|
-
o["default"] = v;
|
|
370178
|
-
});
|
|
370179
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
370180
|
-
var ownKeys = function(o) {
|
|
370181
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
370182
|
-
var ar = [];
|
|
370183
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
370184
|
-
return ar;
|
|
370185
|
-
};
|
|
370186
|
-
return ownKeys(o);
|
|
370187
|
-
};
|
|
370188
|
-
return function (mod) {
|
|
370189
|
-
if (mod && mod.__esModule) return mod;
|
|
370190
|
-
var result = {};
|
|
370191
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
370192
|
-
__setModuleDefault(result, mod);
|
|
370193
|
-
return result;
|
|
370194
|
-
};
|
|
370195
|
-
})();
|
|
370196
370159
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
370197
370160
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
370198
370161
|
};
|
|
370199
370162
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370200
370163
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
370201
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
370202
|
-
const react_1 = __webpack_require__(51649);
|
|
370203
|
-
const react_redux_1 = __webpack_require__(14062);
|
|
370204
370164
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
370205
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
370206
|
-
const EditorSlice_1 = __webpack_require__(68512);
|
|
370165
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
370207
370166
|
const ErrorMessage_1 = __importDefault(__webpack_require__(74364));
|
|
370208
370167
|
const VisualOutputPane_1 = __importDefault(__webpack_require__(39626));
|
|
370209
|
-
const pyodideAssets = __importStar(__webpack_require__(39644));
|
|
370210
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
370211
|
-
// @ts-ignore
|
|
370212
|
-
const PyodideWorker_url_1 = __importDefault(__webpack_require__(24427));
|
|
370213
370168
|
const stores_1 = __webpack_require__(32132);
|
|
370214
|
-
const EditorTypes_1 = __webpack_require__(42108);
|
|
370215
370169
|
const OutputTabPanel_1 = __webpack_require__(25931);
|
|
370216
370170
|
const console_svg_1 = __importDefault(__webpack_require__(20602));
|
|
370217
370171
|
const preview_svg_1 = __importDefault(__webpack_require__(80417));
|
|
370218
|
-
const
|
|
370219
|
-
const
|
|
370220
|
-
const
|
|
370221
|
-
|
|
370222
|
-
|
|
370223
|
-
|
|
370224
|
-
|
|
370172
|
+
const ResizableWithHandle_1 = __importDefault(__webpack_require__(51535));
|
|
370173
|
+
const usePyodideRunner_1 = __webpack_require__(65587);
|
|
370174
|
+
const consoleInput_1 = __webpack_require__(35660);
|
|
370175
|
+
/**
|
|
370176
|
+
* Pyodide-powered Python runner.
|
|
370177
|
+
*
|
|
370178
|
+
* All worker plumbing — Pyodide Web Worker lifecycle, stdin Service Worker
|
|
370179
|
+
* registration, message dispatching, run/stop orchestration — lives in
|
|
370180
|
+
* `usePyodideRunner` and its sub-hooks. This component is purely a thin
|
|
370181
|
+
* shell that wires the returned state into the layout.
|
|
370182
|
+
*/
|
|
370225
370183
|
const PyodideRunner = ({ active, packageApiUrl, }) => {
|
|
370226
|
-
const [pyodideWorker, setPyodideWorker] = (0, react_1.useState)(null);
|
|
370227
|
-
const interruptBuffer = (0, react_1.useRef)(null);
|
|
370228
|
-
const stdinBuffer = (0, react_1.useRef)(null);
|
|
370229
|
-
const stdinClosed = (0, react_1.useRef)(false);
|
|
370230
|
-
const workerReady = (0, react_1.useRef)(false);
|
|
370231
|
-
const loadedRunner = (0, stores_1.useAppSelector)((state) => state.editor.loadedRunner);
|
|
370232
|
-
const project = (0, stores_1.useAppSelector)((s) => s.editor.project);
|
|
370233
|
-
const projectComponents = project.components || [];
|
|
370234
|
-
const projectCode = (0, react_1.useMemo)(() => projectComponents.filter((component) => component.type === ProjectTypes_1.ProjectComponentType.FILE), [projectComponents]);
|
|
370235
|
-
const userModuleNames = (0, react_1.useMemo)(() => (0, helpers_1.getPythonUserModuleNames)(projectCode), [projectCode]);
|
|
370236
|
-
const codeRunTriggered = (0, stores_1.useAppSelector)((s) => s.editor.codeRunTriggered);
|
|
370237
|
-
const codeRunStopped = (0, stores_1.useAppSelector)((s) => s.editor.codeRunStopped);
|
|
370238
370184
|
const readOnly = (0, stores_1.useAppSelector)((state) => state.editor.readOnly);
|
|
370239
|
-
const output = (0,
|
|
370240
|
-
|
|
370241
|
-
|
|
370242
|
-
|
|
370243
|
-
|
|
370244
|
-
worker.onmessage = ({ data }) => {
|
|
370245
|
-
switch (data.method) {
|
|
370246
|
-
case "handleLoading":
|
|
370247
|
-
handleLoading();
|
|
370248
|
-
break;
|
|
370249
|
-
case "handleLoaded":
|
|
370250
|
-
handleLoaded(data.stdinBuffer, data.interruptBuffer);
|
|
370251
|
-
break;
|
|
370252
|
-
case "handleInput":
|
|
370253
|
-
handleInput(worker);
|
|
370254
|
-
break;
|
|
370255
|
-
case "handleOutput":
|
|
370256
|
-
handleOutput(data.stream, data.content);
|
|
370257
|
-
break;
|
|
370258
|
-
case "handleError":
|
|
370259
|
-
handleError(data.file, data.line, data.mistake, data.type, data.info);
|
|
370260
|
-
break;
|
|
370261
|
-
case "handleFileWrite":
|
|
370262
|
-
handleFileWrite(data.filename, data.content, data.mode);
|
|
370263
|
-
break;
|
|
370264
|
-
case "handleVisual":
|
|
370265
|
-
handleVisual(data.origin, data.content);
|
|
370266
|
-
break;
|
|
370267
|
-
default:
|
|
370268
|
-
throw new Error(`Unsupported method: ${data.method}`);
|
|
370269
|
-
}
|
|
370270
|
-
};
|
|
370271
|
-
worker.onerror = (error) => {
|
|
370272
|
-
console.error("Error in PyodideWorker:", error);
|
|
370273
|
-
};
|
|
370274
|
-
return worker;
|
|
370275
|
-
}, []);
|
|
370276
|
-
const destroyAndRecreateWorker = (0, react_1.useCallback)(() => {
|
|
370277
|
-
if (pyodideWorker) {
|
|
370278
|
-
console.log("Destroying and recreating Pyodide worker");
|
|
370279
|
-
pyodideWorker.terminate();
|
|
370280
|
-
}
|
|
370281
|
-
workerReady.current = false;
|
|
370282
|
-
interruptBuffer.current = null;
|
|
370283
|
-
stdinBuffer.current = null;
|
|
370284
|
-
stdinClosed.current = false;
|
|
370285
|
-
disableInput();
|
|
370286
|
-
const newWorker = createWorker();
|
|
370287
|
-
setPyodideWorker(newWorker);
|
|
370288
|
-
}, [pyodideWorker, url]);
|
|
370289
|
-
(0, react_1.useEffect)(() => {
|
|
370290
|
-
if (pyodideWorker)
|
|
370291
|
-
return;
|
|
370292
|
-
if (!active)
|
|
370293
|
-
return;
|
|
370294
|
-
const worker = createWorker();
|
|
370295
|
-
setPyodideWorker(worker);
|
|
370296
|
-
}, [active, pyodideWorker]);
|
|
370297
|
-
(0, react_1.useEffect)(() => {
|
|
370298
|
-
destroyAndRecreateWorker();
|
|
370299
|
-
}, [project.identifier]);
|
|
370300
|
-
(0, react_1.useEffect)(() => {
|
|
370301
|
-
if (!pyodideWorker)
|
|
370302
|
-
return;
|
|
370303
|
-
pyodideWorker.postMessage({
|
|
370304
|
-
method: "init",
|
|
370305
|
-
assets: pyodideAssets,
|
|
370306
|
-
packageApiUrl,
|
|
370307
|
-
});
|
|
370308
|
-
return () => {
|
|
370309
|
-
pyodideWorker.terminate();
|
|
370310
|
-
};
|
|
370311
|
-
}, [pyodideWorker]);
|
|
370312
|
-
(0, react_1.useEffect)(() => {
|
|
370313
|
-
if (codeRunTriggered && active && output.current) {
|
|
370314
|
-
handleRun();
|
|
370315
|
-
}
|
|
370316
|
-
}, [codeRunTriggered, output.current]);
|
|
370317
|
-
(0, react_1.useEffect)(() => {
|
|
370318
|
-
if (codeRunStopped && active) {
|
|
370319
|
-
handleStop();
|
|
370320
|
-
}
|
|
370321
|
-
}, [codeRunStopped]);
|
|
370322
|
-
const handleLoading = () => {
|
|
370323
|
-
return;
|
|
370324
|
-
};
|
|
370325
|
-
const handleLoaded = (stdin, interrupt) => {
|
|
370326
|
-
stdinBuffer.current = stdin;
|
|
370327
|
-
interruptBuffer.current = interrupt;
|
|
370328
|
-
workerReady.current = true;
|
|
370329
|
-
if (loadedRunner !== EditorTypes_1.RunnerType.PYODIDE) {
|
|
370330
|
-
dispatch((0, EditorSlice_1.setLoadedRunner)(EditorTypes_1.RunnerType.PYODIDE));
|
|
370331
|
-
}
|
|
370332
|
-
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370333
|
-
disableInput();
|
|
370334
|
-
};
|
|
370335
|
-
const handleInput = async (workerOverride) => {
|
|
370336
|
-
const targetWorker = workerOverride ?? pyodideWorker;
|
|
370337
|
-
if (stdinClosed.current) {
|
|
370338
|
-
if (stdinBuffer.current) {
|
|
370339
|
-
stdinBuffer.current[0] = -1;
|
|
370340
|
-
}
|
|
370341
|
-
else {
|
|
370342
|
-
targetWorker?.postMessage({
|
|
370343
|
-
method: "stdinResponse",
|
|
370344
|
-
ctrlD: true,
|
|
370345
|
-
});
|
|
370346
|
-
}
|
|
370347
|
-
return;
|
|
370348
|
-
}
|
|
370349
|
-
const outputPane = output.current;
|
|
370350
|
-
outputPane?.appendChild(inputSpan());
|
|
370351
|
-
const element = getInputElement();
|
|
370352
|
-
const { content, ctrlD } = await getInputContent(element);
|
|
370353
|
-
if (stdinBuffer.current) {
|
|
370354
|
-
const encoder = new TextEncoder();
|
|
370355
|
-
const bytes = encoder.encode(content + "\n");
|
|
370356
|
-
const previousLength = stdinBuffer.current[0] ?? 0;
|
|
370357
|
-
stdinBuffer.current.set(bytes, previousLength);
|
|
370358
|
-
const currentLength = previousLength + bytes.length;
|
|
370359
|
-
stdinBuffer.current[0] = currentLength;
|
|
370360
|
-
}
|
|
370361
|
-
else {
|
|
370362
|
-
targetWorker?.postMessage({
|
|
370363
|
-
method: "stdinResponse",
|
|
370364
|
-
content: content !== undefined ? content + "\n" : "",
|
|
370365
|
-
ctrlD,
|
|
370366
|
-
});
|
|
370367
|
-
}
|
|
370368
|
-
if (ctrlD) {
|
|
370369
|
-
stdinClosed.current = true; // Don't accept any more stdin this run.
|
|
370370
|
-
}
|
|
370371
|
-
};
|
|
370372
|
-
const handleOutput = (stream, content) => {
|
|
370373
|
-
const node = output.current;
|
|
370374
|
-
const div = document.createElement("span");
|
|
370375
|
-
div.className = (0, classnames_1.default)(styles_module_scss_1.default.pythonConsoleLine, stream === "stderr" && styles_module_scss_1.default["stderr"], stream === "stdout" && styles_module_scss_1.default["stdout"]);
|
|
370376
|
-
div.innerHTML = new Option(content || " ").innerHTML + "\n";
|
|
370377
|
-
if (node) {
|
|
370378
|
-
node.appendChild(div);
|
|
370379
|
-
node.scrollTop = node.scrollHeight;
|
|
370380
|
-
}
|
|
370381
|
-
};
|
|
370382
|
-
const handleError = (file, line, mistake, type, info) => {
|
|
370383
|
-
let errorMessage;
|
|
370384
|
-
if (type === "KeyboardInterrupt") {
|
|
370385
|
-
errorMessage = "Execution interrupted";
|
|
370386
|
-
}
|
|
370387
|
-
else {
|
|
370388
|
-
const message = [type, info].filter((s) => s).join(": ");
|
|
370389
|
-
errorMessage = [message, `on line ${line} of ${file}`].join(" ");
|
|
370390
|
-
if (mistake) {
|
|
370391
|
-
errorMessage += `:\n${mistake}`;
|
|
370392
|
-
}
|
|
370393
|
-
console.error(message);
|
|
370394
|
-
}
|
|
370395
|
-
dispatch((0, EditorSlice_1.setError)({
|
|
370396
|
-
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370397
|
-
message: errorMessage,
|
|
370398
|
-
}));
|
|
370399
|
-
disableInput();
|
|
370400
|
-
};
|
|
370401
|
-
const handleFileWrite = (filePath, content, mode) => {
|
|
370402
|
-
const componentToUpdate = projectCode.find((item) => item.path === filePath);
|
|
370403
|
-
let updatedContent;
|
|
370404
|
-
if (mode === "w" || mode === "x") {
|
|
370405
|
-
updatedContent = content;
|
|
370406
|
-
}
|
|
370407
|
-
else if (mode === "a") {
|
|
370408
|
-
updatedContent =
|
|
370409
|
-
(componentToUpdate ? componentToUpdate.content : "") + content;
|
|
370410
|
-
}
|
|
370411
|
-
if (componentToUpdate) {
|
|
370412
|
-
dispatch((0, EditorSlice_1.updateProjectComponent)({
|
|
370413
|
-
...componentToUpdate,
|
|
370414
|
-
content: updatedContent,
|
|
370415
|
-
}));
|
|
370416
|
-
}
|
|
370417
|
-
else {
|
|
370418
|
-
const { dirPath, name, extension } = (0, projectHelpers_1.parseComponentPath)(filePath);
|
|
370419
|
-
const newFile = {
|
|
370420
|
-
id: crypto.randomUUID(),
|
|
370421
|
-
name,
|
|
370422
|
-
extension,
|
|
370423
|
-
content: updatedContent,
|
|
370424
|
-
type: ProjectTypes_1.ProjectComponentType.FILE,
|
|
370425
|
-
path: filePath,
|
|
370426
|
-
};
|
|
370427
|
-
dispatch((0, EditorSlice_1.addProjectComponent)(newFile));
|
|
370428
|
-
const dirParent = projectComponents.find((component) => component.type === ProjectTypes_1.ProjectComponentType.DIR &&
|
|
370429
|
-
component.path === dirPath);
|
|
370430
|
-
if (dirParent) {
|
|
370431
|
-
dispatch((0, EditorSlice_1.updateProjectComponent)({
|
|
370432
|
-
...dirParent,
|
|
370433
|
-
children: [...(dirParent.children ?? []), newFile.id],
|
|
370434
|
-
}));
|
|
370435
|
-
}
|
|
370436
|
-
}
|
|
370437
|
-
};
|
|
370438
|
-
const handleVisual = (origin, content) => {
|
|
370439
|
-
setVisuals((array) => [...array, { origin, content }]);
|
|
370440
|
-
};
|
|
370441
|
-
const handleRun = async () => {
|
|
370442
|
-
if (!workerReady.current || !pyodideWorker) {
|
|
370443
|
-
return;
|
|
370444
|
-
}
|
|
370445
|
-
if (output.current) {
|
|
370446
|
-
output.current.innerHTML = "";
|
|
370447
|
-
}
|
|
370448
|
-
// entry file is the component with name main and extension py
|
|
370449
|
-
const entryFile = projectCode.find((component) => component.path === PYTHON_ENTRY_FILE_PATH);
|
|
370450
|
-
if (!entryFile) {
|
|
370451
|
-
dispatch((0, EditorSlice_1.setError)({
|
|
370452
|
-
type: Errors_1.ErrorType.ENTRY_FILE_NOT_FOUND,
|
|
370453
|
-
message: `can't open file '${PYTHON_ENTRY_FILE_PATH}': No such file or directory`,
|
|
370454
|
-
details: {
|
|
370455
|
-
fileName: PYTHON_ENTRY_FILE_PATH.split("/").pop(),
|
|
370456
|
-
},
|
|
370457
|
-
}));
|
|
370458
|
-
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370459
|
-
return;
|
|
370460
|
-
}
|
|
370461
|
-
dispatch((0, EditorSlice_1.setError)(null));
|
|
370462
|
-
setVisuals([]);
|
|
370463
|
-
stdinClosed.current = false;
|
|
370464
|
-
const dirSet = new Set();
|
|
370465
|
-
for (const { path } of projectCode) {
|
|
370466
|
-
if (path) {
|
|
370467
|
-
const lastSlash = path.lastIndexOf("/");
|
|
370468
|
-
if (lastSlash > 0) {
|
|
370469
|
-
dirSet.add(path.slice(0, lastSlash));
|
|
370470
|
-
}
|
|
370471
|
-
}
|
|
370472
|
-
}
|
|
370473
|
-
// Create directories in Pyodide FS
|
|
370474
|
-
const dirs = Array.from(dirSet);
|
|
370475
|
-
if (pyodideWorker) {
|
|
370476
|
-
pyodideWorker.postMessage({
|
|
370477
|
-
method: "createDirectories",
|
|
370478
|
-
dirs,
|
|
370479
|
-
});
|
|
370480
|
-
}
|
|
370481
|
-
// Write files to Pyodide FS
|
|
370482
|
-
for (const { path, content } of projectCode) {
|
|
370483
|
-
if (path) {
|
|
370484
|
-
writeFile(path, content);
|
|
370485
|
-
}
|
|
370486
|
-
}
|
|
370487
|
-
if (interruptBuffer.current) {
|
|
370488
|
-
interruptBuffer.current[0] = 0; // Clear previous signals.
|
|
370489
|
-
}
|
|
370490
|
-
pyodideWorker?.postMessage({
|
|
370491
|
-
method: "runPython",
|
|
370492
|
-
python: entryFile.content,
|
|
370493
|
-
userModuleNames,
|
|
370494
|
-
});
|
|
370495
|
-
};
|
|
370496
|
-
const handleStop = () => {
|
|
370497
|
-
pyodideWorker?.postMessage({ method: "stopPython" });
|
|
370498
|
-
if (interruptBuffer.current) {
|
|
370499
|
-
interruptBuffer.current[0] = 2; // Send a SIGINT signal.
|
|
370500
|
-
disableInput();
|
|
370501
|
-
return;
|
|
370502
|
-
}
|
|
370503
|
-
disableInput();
|
|
370504
|
-
destroyAndRecreateWorker();
|
|
370505
|
-
dispatch((0, EditorSlice_1.setError)({
|
|
370506
|
-
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370507
|
-
message: "Execution interrupted",
|
|
370508
|
-
}));
|
|
370509
|
-
};
|
|
370510
|
-
const writeFile = (filename, content) => {
|
|
370511
|
-
pyodideWorker?.postMessage({ method: "writeFile", filename, content });
|
|
370512
|
-
};
|
|
370513
|
-
const inputSpan = () => {
|
|
370514
|
-
const span = document.createElement("span");
|
|
370515
|
-
span.setAttribute("id", "input");
|
|
370516
|
-
span.setAttribute("spellCheck", "false");
|
|
370517
|
-
span.setAttribute("class", styles_module_scss_1.default.pythonrunnerInput);
|
|
370518
|
-
span.setAttribute("contentEditable", "true");
|
|
370519
|
-
return span;
|
|
370520
|
-
};
|
|
370521
|
-
const getInputElement = () => document.getElementById("input");
|
|
370522
|
-
const getInputContent = async (element) => {
|
|
370523
|
-
element.focus();
|
|
370524
|
-
return new Promise((resolve, reject) => {
|
|
370525
|
-
element.addEventListener("keydown", function removeInput(e) {
|
|
370526
|
-
const ctrlD = (e.ctrlKey && e.key.toLowerCase() === "d");
|
|
370527
|
-
const lineEnded = e.key === "Enter" || ctrlD;
|
|
370528
|
-
if (lineEnded) {
|
|
370529
|
-
element.removeEventListener(e.type, removeInput);
|
|
370530
|
-
const content = element.innerText;
|
|
370531
|
-
element.removeAttribute("id");
|
|
370532
|
-
element.removeAttribute("contentEditable");
|
|
370533
|
-
element.innerText = content + "\n";
|
|
370534
|
-
document.addEventListener("keyup", function storeInput(e) {
|
|
370535
|
-
if (lineEnded) {
|
|
370536
|
-
document.removeEventListener(e.type, storeInput);
|
|
370537
|
-
resolve({ content, ctrlD });
|
|
370538
|
-
}
|
|
370539
|
-
});
|
|
370540
|
-
}
|
|
370541
|
-
});
|
|
370542
|
-
});
|
|
370543
|
-
};
|
|
370544
|
-
const shiftFocusToInput = (event) => {
|
|
370545
|
-
const documentSelection = window.getSelection();
|
|
370546
|
-
if (documentSelection && documentSelection.toString().length > 0) {
|
|
370547
|
-
return;
|
|
370548
|
-
}
|
|
370549
|
-
const inputBox = getInputElement();
|
|
370550
|
-
if (inputBox && event.target !== inputBox) {
|
|
370551
|
-
const input = getInputElement();
|
|
370552
|
-
const selection = window.getSelection();
|
|
370553
|
-
selection?.removeAllRanges();
|
|
370554
|
-
if (input?.innerText && input.innerText.length > 0) {
|
|
370555
|
-
const range = document.createRange();
|
|
370556
|
-
range.setStart(input, 1);
|
|
370557
|
-
range.collapse(true);
|
|
370558
|
-
selection?.addRange(range);
|
|
370559
|
-
}
|
|
370560
|
-
input?.focus();
|
|
370561
|
-
}
|
|
370562
|
-
};
|
|
370563
|
-
const disableInput = () => {
|
|
370564
|
-
const element = getInputElement();
|
|
370565
|
-
if (element) {
|
|
370566
|
-
element.removeAttribute("id");
|
|
370567
|
-
element.removeAttribute("contentEditable");
|
|
370568
|
-
}
|
|
370569
|
-
};
|
|
370570
|
-
if (!pyodideWorker && active) {
|
|
370185
|
+
const { output, visuals, setVisuals, workerInitialized } = (0, usePyodideRunner_1.usePyodideRunner)({
|
|
370186
|
+
active,
|
|
370187
|
+
packageApiUrl,
|
|
370188
|
+
});
|
|
370189
|
+
if (!workerInitialized && active) {
|
|
370571
370190
|
console.warn("PyodideWorker is not initialized");
|
|
370572
370191
|
return null;
|
|
370573
370192
|
}
|
|
370574
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.pythonrunnerContainer, styles_module_scss_1.default.pyodiderunner, active && styles_module_scss_1.default.active), children: [(0, jsx_runtime_1.jsxs)(OutputTabPanel_1.OutputTabPanel, { title: "Terminal", icon: console_svg_1.default, readOnly: readOnly, children: [(0, jsx_runtime_1.jsx)(ErrorMessage_1.default, {}), (0, jsx_runtime_1.jsx)("pre", { className: styles_module_scss_1.default.console, onClick: shiftFocusToInput, ref: output })] }), (0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Visual output", icon: preview_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(VisualOutputPane_1.default, { visuals: visuals, setVisuals: setVisuals }) }) })] }));
|
|
370193
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.pythonrunnerContainer, styles_module_scss_1.default.pyodiderunner, active && styles_module_scss_1.default.active), children: [(0, jsx_runtime_1.jsxs)(OutputTabPanel_1.OutputTabPanel, { title: "Terminal", icon: console_svg_1.default, readOnly: readOnly, children: [(0, jsx_runtime_1.jsx)(ErrorMessage_1.default, {}), (0, jsx_runtime_1.jsx)("pre", { className: styles_module_scss_1.default.console, onClick: consoleInput_1.shiftFocusToInput, ref: output })] }), (0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Visual output", icon: preview_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(VisualOutputPane_1.default, { visuals: visuals, setVisuals: setVisuals }) }) })] }));
|
|
370575
370194
|
};
|
|
370576
370195
|
exports["default"] = PyodideRunner;
|
|
370577
370196
|
|
|
@@ -370590,7 +370209,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
370590
370209
|
const react_1 = __webpack_require__(51649);
|
|
370591
370210
|
const highcharts_1 = __importDefault(__webpack_require__(14783));
|
|
370592
370211
|
const plotly_js_1 = __importDefault(__webpack_require__(28850));
|
|
370593
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
370212
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
370594
370213
|
const VisualOutputPane = ({ visuals, setVisuals }) => {
|
|
370595
370214
|
const output = (0, react_1.useRef)(null);
|
|
370596
370215
|
const showVisual = (0, react_1.useCallback)((visual, output) => {
|
|
@@ -370671,6 +370290,1190 @@ const elementFromProps = (map) => {
|
|
|
370671
370290
|
exports["default"] = VisualOutputPane;
|
|
370672
370291
|
|
|
370673
370292
|
|
|
370293
|
+
/***/ }),
|
|
370294
|
+
|
|
370295
|
+
/***/ 85799:
|
|
370296
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
370297
|
+
|
|
370298
|
+
|
|
370299
|
+
/**
|
|
370300
|
+
* Webpack-resolved URLs for the Pyodide worker and the stdin Service Worker.
|
|
370301
|
+
*
|
|
370302
|
+
* Isolated from `./constants.ts` so the pure-constants module can be loaded
|
|
370303
|
+
* by tests without needing webpack to handle the `?url` query suffix.
|
|
370304
|
+
*/
|
|
370305
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
370306
|
+
if (k2 === undefined) k2 = k;
|
|
370307
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
370308
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
370309
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
370310
|
+
}
|
|
370311
|
+
Object.defineProperty(o, k2, desc);
|
|
370312
|
+
}) : (function(o, m, k, k2) {
|
|
370313
|
+
if (k2 === undefined) k2 = k;
|
|
370314
|
+
o[k2] = m[k];
|
|
370315
|
+
}));
|
|
370316
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
370317
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
370318
|
+
}) : function(o, v) {
|
|
370319
|
+
o["default"] = v;
|
|
370320
|
+
});
|
|
370321
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
370322
|
+
var ownKeys = function(o) {
|
|
370323
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
370324
|
+
var ar = [];
|
|
370325
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
370326
|
+
return ar;
|
|
370327
|
+
};
|
|
370328
|
+
return ownKeys(o);
|
|
370329
|
+
};
|
|
370330
|
+
return function (mod) {
|
|
370331
|
+
if (mod && mod.__esModule) return mod;
|
|
370332
|
+
var result = {};
|
|
370333
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
370334
|
+
__setModuleDefault(result, mod);
|
|
370335
|
+
return result;
|
|
370336
|
+
};
|
|
370337
|
+
})();
|
|
370338
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
370339
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
370340
|
+
};
|
|
370341
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370342
|
+
exports.pyodideAssets = exports.PYODIDE_STDIN_SW_URL = exports.PYODIDE_WORKER_URL = void 0;
|
|
370343
|
+
const pyodideAssets = __importStar(__webpack_require__(33037));
|
|
370344
|
+
exports.pyodideAssets = pyodideAssets;
|
|
370345
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
370346
|
+
// @ts-ignore
|
|
370347
|
+
const PyodideWorker_url_1 = __importDefault(__webpack_require__(24427));
|
|
370348
|
+
exports.PYODIDE_WORKER_URL = new URL(PyodideWorker_url_1.default, window.origin).href;
|
|
370349
|
+
exports.PYODIDE_STDIN_SW_URL = new URL(pyodideAssets.pyodideStdinSwUrl, window.origin).href;
|
|
370350
|
+
|
|
370351
|
+
|
|
370352
|
+
/***/ }),
|
|
370353
|
+
|
|
370354
|
+
/***/ 90804:
|
|
370355
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
370356
|
+
|
|
370357
|
+
|
|
370358
|
+
/**
|
|
370359
|
+
* Pure constants for the Pyodide runner. Kept free of webpack-specific
|
|
370360
|
+
* `?url` imports so the file can be required from a plain Jest environment.
|
|
370361
|
+
*
|
|
370362
|
+
* Resolved asset/worker URLs live in `./assetUrls.ts`.
|
|
370363
|
+
*/
|
|
370364
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370365
|
+
exports.SERVICE_WORKER_PROBE_TIMEOUT_MS = exports.SERVICE_WORKER_CONTROL_WAIT_MS = exports.PYODIDE_TAB_ID_STORAGE_KEY = exports.PYODIDE_STDIN_ENDPOINT = exports.PYTHON_ENTRY_FILE_PATH = void 0;
|
|
370366
|
+
exports.PYTHON_ENTRY_FILE_PATH = "/main.py";
|
|
370367
|
+
exports.PYODIDE_STDIN_ENDPOINT = "/pyodide-stdin";
|
|
370368
|
+
exports.PYODIDE_TAB_ID_STORAGE_KEY = "pyodide-stdin-tab-id";
|
|
370369
|
+
exports.SERVICE_WORKER_CONTROL_WAIT_MS = 2500;
|
|
370370
|
+
exports.SERVICE_WORKER_PROBE_TIMEOUT_MS = 1500;
|
|
370371
|
+
|
|
370372
|
+
|
|
370373
|
+
/***/ }),
|
|
370374
|
+
|
|
370375
|
+
/***/ 65587:
|
|
370376
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
370377
|
+
|
|
370378
|
+
|
|
370379
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370380
|
+
exports.usePyodideRunner = void 0;
|
|
370381
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
370382
|
+
const react_1 = __webpack_require__(51649);
|
|
370383
|
+
const react_redux_1 = __webpack_require__(14062);
|
|
370384
|
+
const stores_1 = __webpack_require__(32132);
|
|
370385
|
+
const EditorSlice_1 = __webpack_require__(68512);
|
|
370386
|
+
const Errors_1 = __webpack_require__(20339);
|
|
370387
|
+
const ProjectTypes_1 = __webpack_require__(27130);
|
|
370388
|
+
const EditorTypes_1 = __webpack_require__(42108);
|
|
370389
|
+
const constants_1 = __webpack_require__(90804);
|
|
370390
|
+
const assetUrls_1 = __webpack_require__(85799);
|
|
370391
|
+
const helpers_1 = __webpack_require__(55717);
|
|
370392
|
+
const consoleInput_1 = __webpack_require__(35660);
|
|
370393
|
+
const consoleOutput_1 = __webpack_require__(98131);
|
|
370394
|
+
const fileWrite_1 = __webpack_require__(45230);
|
|
370395
|
+
const serviceWorker_1 = __webpack_require__(58158);
|
|
370396
|
+
const stdinFallbackMessages_1 = __webpack_require__(94879);
|
|
370397
|
+
const tabId_1 = __webpack_require__(95369);
|
|
370398
|
+
const usePyodideWorker_1 = __webpack_require__(93895);
|
|
370399
|
+
const useStdinServiceWorker_1 = __webpack_require__(86357);
|
|
370400
|
+
/**
|
|
370401
|
+
* Top-level coordinator for the Pyodide runner.
|
|
370402
|
+
*
|
|
370403
|
+
* It composes the two lifecycle hooks (Pyodide worker + stdin Service Worker)
|
|
370404
|
+
* and owns the cross-cutting state — buffers shared with the worker, the
|
|
370405
|
+
* current run id, the active input request, and the per-tab id used by the
|
|
370406
|
+
* stdin fallback. It also defines the message handlers the worker fires
|
|
370407
|
+
* back, and the run/stop callbacks driven by Redux.
|
|
370408
|
+
*
|
|
370409
|
+
* The React component itself stays free of any worker plumbing — it just
|
|
370410
|
+
* consumes the values returned here to drive its JSX.
|
|
370411
|
+
*/
|
|
370412
|
+
const usePyodideRunner = ({ active, packageApiUrl, }) => {
|
|
370413
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
370414
|
+
// -------------------------------------------------------------------------
|
|
370415
|
+
// Redux selectors
|
|
370416
|
+
// -------------------------------------------------------------------------
|
|
370417
|
+
const loadedRunner = (0, stores_1.useAppSelector)((state) => state.editor.loadedRunner);
|
|
370418
|
+
const project = (0, stores_1.useAppSelector)((s) => s.editor.project);
|
|
370419
|
+
const codeRunTriggered = (0, stores_1.useAppSelector)((s) => s.editor.codeRunTriggered);
|
|
370420
|
+
const codeRunStopped = (0, stores_1.useAppSelector)((s) => s.editor.codeRunStopped);
|
|
370421
|
+
const projectComponents = project.components || [];
|
|
370422
|
+
const projectCode = (0, react_1.useMemo)(() => projectComponents.filter((component) => component.type === ProjectTypes_1.ProjectComponentType.FILE), [projectComponents]);
|
|
370423
|
+
const userModuleNames = (0, react_1.useMemo)(() => (0, helpers_1.getPythonUserModuleNames)(projectCode), [projectCode]);
|
|
370424
|
+
// -------------------------------------------------------------------------
|
|
370425
|
+
// Long-lived refs shared across handlers
|
|
370426
|
+
// -------------------------------------------------------------------------
|
|
370427
|
+
/** Pointer into the SharedArrayBuffer used for stdin (sab strategy). */
|
|
370428
|
+
const stdinBuffer = (0, react_1.useRef)(null);
|
|
370429
|
+
/** Pointer into the SharedArrayBuffer used for SIGINT. */
|
|
370430
|
+
const interruptBuffer = (0, react_1.useRef)(null);
|
|
370431
|
+
/** True once the worker reports it's ready to run code. */
|
|
370432
|
+
const workerReady = (0, react_1.useRef)(false);
|
|
370433
|
+
/** Latched when the user signals EOF; persists for the rest of the run. */
|
|
370434
|
+
const stdinClosed = (0, react_1.useRef)(false);
|
|
370435
|
+
/** Which stdin strategy the worker negotiated: "sab" | "jspi" | "sync-xhr" | "unavailable". */
|
|
370436
|
+
const stdinStrategy = (0, react_1.useRef)("sab");
|
|
370437
|
+
/** Identifier of the currently-running Python execution. */
|
|
370438
|
+
const runId = (0, react_1.useRef)(null);
|
|
370439
|
+
/** Stable id used by the stdin SW to route input requests to this tab. */
|
|
370440
|
+
const tabIdRef = (0, react_1.useRef)((0, tabId_1.getOrCreateTabId)());
|
|
370441
|
+
/** The SW-fallback input request that's currently waiting on the user. */
|
|
370442
|
+
const activeInputRequest = (0, react_1.useRef)(null);
|
|
370443
|
+
// -------------------------------------------------------------------------
|
|
370444
|
+
// Component-managed state
|
|
370445
|
+
// -------------------------------------------------------------------------
|
|
370446
|
+
const output = (0, react_1.useRef)(null);
|
|
370447
|
+
const [visuals, setVisuals] = (0, react_1.useState)([]);
|
|
370448
|
+
// -------------------------------------------------------------------------
|
|
370449
|
+
// Local helpers
|
|
370450
|
+
// -------------------------------------------------------------------------
|
|
370451
|
+
const disableInput = (0, react_1.useCallback)(() => {
|
|
370452
|
+
(0, consoleInput_1.disableInputElement)();
|
|
370453
|
+
activeInputRequest.current = null;
|
|
370454
|
+
}, []);
|
|
370455
|
+
// -------------------------------------------------------------------------
|
|
370456
|
+
// Worker-message handlers (forwarded to usePyodideWorker via handleMessage)
|
|
370457
|
+
// -------------------------------------------------------------------------
|
|
370458
|
+
const handleLoading = (0, react_1.useCallback)(() => {
|
|
370459
|
+
// No-op; kept for symmetry with the worker protocol.
|
|
370460
|
+
}, []);
|
|
370461
|
+
const handleLoaded = (0, react_1.useCallback)((stdin, interrupt, strategy = "sab") => {
|
|
370462
|
+
stdinBuffer.current = stdin;
|
|
370463
|
+
interruptBuffer.current = interrupt;
|
|
370464
|
+
workerReady.current = true;
|
|
370465
|
+
runId.current = null;
|
|
370466
|
+
activeInputRequest.current = null;
|
|
370467
|
+
stdinStrategy.current = strategy;
|
|
370468
|
+
if (loadedRunner !== EditorTypes_1.RunnerType.PYODIDE) {
|
|
370469
|
+
dispatch((0, EditorSlice_1.setLoadedRunner)(EditorTypes_1.RunnerType.PYODIDE));
|
|
370470
|
+
}
|
|
370471
|
+
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370472
|
+
disableInput();
|
|
370473
|
+
if (strategy === "unavailable") {
|
|
370474
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370475
|
+
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370476
|
+
message: "Python input() is unavailable in this browser context. Activate the stdin Service Worker and reload the page.",
|
|
370477
|
+
}));
|
|
370478
|
+
}
|
|
370479
|
+
}, [dispatch, disableInput, loadedRunner]);
|
|
370480
|
+
const handleInput = (0, react_1.useCallback)(async (workerOverride, swRunId, swRequestId) => {
|
|
370481
|
+
const targetWorker = workerOverride ?? null;
|
|
370482
|
+
const isServiceWorkerRequest = Boolean(swRunId && swRequestId);
|
|
370483
|
+
const postStdinFallbackResponse = (value) => (0, serviceWorker_1.postMessageToStdinServiceWorker)((0, stdinFallbackMessages_1.buildStdinFallbackResponse)({
|
|
370484
|
+
clientId: tabIdRef.current,
|
|
370485
|
+
// swRunId / swRequestId are non-empty when isServiceWorkerRequest.
|
|
370486
|
+
runId: swRunId,
|
|
370487
|
+
requestId: swRequestId,
|
|
370488
|
+
value,
|
|
370489
|
+
}));
|
|
370490
|
+
const postStdinFallbackEof = () => (0, serviceWorker_1.postMessageToStdinServiceWorker)((0, stdinFallbackMessages_1.buildStdinFallbackEof)({
|
|
370491
|
+
clientId: tabIdRef.current,
|
|
370492
|
+
runId: swRunId,
|
|
370493
|
+
requestId: swRequestId,
|
|
370494
|
+
}));
|
|
370495
|
+
// If the user already pressed Ctrl+D earlier in this run, immediately
|
|
370496
|
+
// return EOF without prompting again. Under sync-XHR this must be an
|
|
370497
|
+
// explicit EOF (HTTP 204) — sending a CANCEL would surface in user code
|
|
370498
|
+
// as KeyboardInterrupt instead of EOFError.
|
|
370499
|
+
if (stdinClosed.current) {
|
|
370500
|
+
if (stdinBuffer.current) {
|
|
370501
|
+
stdinBuffer.current[0] = -1;
|
|
370502
|
+
}
|
|
370503
|
+
else if (isServiceWorkerRequest) {
|
|
370504
|
+
postStdinFallbackEof();
|
|
370505
|
+
}
|
|
370506
|
+
else {
|
|
370507
|
+
targetWorker?.postMessage({
|
|
370508
|
+
method: "stdinResponse",
|
|
370509
|
+
ctrlD: true,
|
|
370510
|
+
});
|
|
370511
|
+
}
|
|
370512
|
+
return;
|
|
370513
|
+
}
|
|
370514
|
+
const outputPane = output.current;
|
|
370515
|
+
outputPane?.appendChild((0, consoleInput_1.inputSpan)());
|
|
370516
|
+
const element = (0, consoleInput_1.getInputElement)();
|
|
370517
|
+
if (!element) {
|
|
370518
|
+
return;
|
|
370519
|
+
}
|
|
370520
|
+
const { content, ctrlD } = await (0, consoleInput_1.getInputContent)(element);
|
|
370521
|
+
if (stdinBuffer.current) {
|
|
370522
|
+
const encoder = new TextEncoder();
|
|
370523
|
+
const bytes = encoder.encode((content ?? "") + "\n");
|
|
370524
|
+
const previousLength = stdinBuffer.current[0] ?? 0;
|
|
370525
|
+
stdinBuffer.current.set(bytes, previousLength);
|
|
370526
|
+
const currentLength = previousLength + bytes.length;
|
|
370527
|
+
stdinBuffer.current[0] = currentLength;
|
|
370528
|
+
}
|
|
370529
|
+
else if (isServiceWorkerRequest) {
|
|
370530
|
+
if (ctrlD) {
|
|
370531
|
+
// First-time Ctrl+D: signal EOF (HTTP 204), not cancel (HTTP 499).
|
|
370532
|
+
// Cancel would terminate the whole run with KeyboardInterrupt;
|
|
370533
|
+
// EOF lets user code catch EOFError and keep going.
|
|
370534
|
+
postStdinFallbackEof();
|
|
370535
|
+
}
|
|
370536
|
+
else {
|
|
370537
|
+
postStdinFallbackResponse(content !== undefined ? content : "");
|
|
370538
|
+
}
|
|
370539
|
+
}
|
|
370540
|
+
else {
|
|
370541
|
+
targetWorker?.postMessage({
|
|
370542
|
+
method: "stdinResponse",
|
|
370543
|
+
content: content !== undefined ? content + "\n" : "",
|
|
370544
|
+
ctrlD,
|
|
370545
|
+
});
|
|
370546
|
+
}
|
|
370547
|
+
if (isServiceWorkerRequest) {
|
|
370548
|
+
activeInputRequest.current = null;
|
|
370549
|
+
}
|
|
370550
|
+
if (ctrlD) {
|
|
370551
|
+
// Don't accept any more stdin this run.
|
|
370552
|
+
stdinClosed.current = true;
|
|
370553
|
+
}
|
|
370554
|
+
}, []);
|
|
370555
|
+
const handleOutput = (0, react_1.useCallback)((stream, content) => {
|
|
370556
|
+
(0, consoleOutput_1.appendConsoleLine)(output.current, stream, content);
|
|
370557
|
+
}, []);
|
|
370558
|
+
const handleError = (0, react_1.useCallback)((file, line, mistake, type, info) => {
|
|
370559
|
+
let errorMessage;
|
|
370560
|
+
if (type === "KeyboardInterrupt") {
|
|
370561
|
+
errorMessage = "Execution interrupted";
|
|
370562
|
+
}
|
|
370563
|
+
else {
|
|
370564
|
+
const message = [type, info].filter((s) => s).join(": ");
|
|
370565
|
+
errorMessage = [message, `on line ${line} of ${file}`].join(" ");
|
|
370566
|
+
if (mistake) {
|
|
370567
|
+
errorMessage += `:\n${mistake}`;
|
|
370568
|
+
}
|
|
370569
|
+
console.error(message);
|
|
370570
|
+
}
|
|
370571
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370572
|
+
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370573
|
+
message: errorMessage,
|
|
370574
|
+
}));
|
|
370575
|
+
disableInput();
|
|
370576
|
+
}, [dispatch, disableInput]);
|
|
370577
|
+
const handleFileWrite = (0, react_1.useCallback)((filePath, content, mode) => {
|
|
370578
|
+
(0, fileWrite_1.applyPyodideFileWrite)({
|
|
370579
|
+
dispatch,
|
|
370580
|
+
projectComponents,
|
|
370581
|
+
projectCode,
|
|
370582
|
+
filePath,
|
|
370583
|
+
content,
|
|
370584
|
+
mode,
|
|
370585
|
+
});
|
|
370586
|
+
}, [dispatch, projectComponents, projectCode]);
|
|
370587
|
+
const handleVisual = (0, react_1.useCallback)((origin, content) => {
|
|
370588
|
+
setVisuals((array) => [...array, { origin, content }]);
|
|
370589
|
+
}, []);
|
|
370590
|
+
// -------------------------------------------------------------------------
|
|
370591
|
+
// Worker lifecycle
|
|
370592
|
+
// -------------------------------------------------------------------------
|
|
370593
|
+
const handleBeforeRecreate = (0, react_1.useCallback)(() => {
|
|
370594
|
+
workerReady.current = false;
|
|
370595
|
+
interruptBuffer.current = null;
|
|
370596
|
+
stdinBuffer.current = null;
|
|
370597
|
+
stdinClosed.current = false;
|
|
370598
|
+
disableInput();
|
|
370599
|
+
}, [disableInput]);
|
|
370600
|
+
const handleMessage = (0, react_1.useCallback)((data, w) => {
|
|
370601
|
+
switch (data.method) {
|
|
370602
|
+
case "handleLoading":
|
|
370603
|
+
handleLoading();
|
|
370604
|
+
break;
|
|
370605
|
+
case "handleLoaded":
|
|
370606
|
+
handleLoaded(data.stdinBuffer, data.interruptBuffer, data.stdinStrategy);
|
|
370607
|
+
break;
|
|
370608
|
+
case "handleInput":
|
|
370609
|
+
handleInput(w);
|
|
370610
|
+
break;
|
|
370611
|
+
case "handleOutput":
|
|
370612
|
+
handleOutput(data.stream, data.content);
|
|
370613
|
+
break;
|
|
370614
|
+
case "handleError":
|
|
370615
|
+
handleError(data.file, data.line, data.mistake, data.type, data.info);
|
|
370616
|
+
break;
|
|
370617
|
+
case "handleFileWrite":
|
|
370618
|
+
handleFileWrite(data.filename, data.content, data.mode);
|
|
370619
|
+
break;
|
|
370620
|
+
case "handleVisual":
|
|
370621
|
+
handleVisual(data.origin, data.content);
|
|
370622
|
+
break;
|
|
370623
|
+
default:
|
|
370624
|
+
throw new Error(`Unsupported method: ${data.method}`);
|
|
370625
|
+
}
|
|
370626
|
+
}, [
|
|
370627
|
+
handleLoading,
|
|
370628
|
+
handleLoaded,
|
|
370629
|
+
handleInput,
|
|
370630
|
+
handleOutput,
|
|
370631
|
+
handleError,
|
|
370632
|
+
handleFileWrite,
|
|
370633
|
+
handleVisual,
|
|
370634
|
+
]);
|
|
370635
|
+
const { worker: pyodideWorker, recreateWorker } = (0, usePyodideWorker_1.usePyodideWorker)({
|
|
370636
|
+
active,
|
|
370637
|
+
projectIdentifier: project.identifier,
|
|
370638
|
+
onMessage: handleMessage,
|
|
370639
|
+
onBeforeRecreate: handleBeforeRecreate,
|
|
370640
|
+
});
|
|
370641
|
+
// -------------------------------------------------------------------------
|
|
370642
|
+
// Stdin Service Worker
|
|
370643
|
+
// -------------------------------------------------------------------------
|
|
370644
|
+
const handleStdinRequest = (0, react_1.useCallback)((request) => {
|
|
370645
|
+
if (request.runId !== runId.current) {
|
|
370646
|
+
return;
|
|
370647
|
+
}
|
|
370648
|
+
activeInputRequest.current = {
|
|
370649
|
+
runId: request.runId,
|
|
370650
|
+
requestId: request.requestId,
|
|
370651
|
+
};
|
|
370652
|
+
handleInput(undefined, request.runId, request.requestId);
|
|
370653
|
+
}, [handleInput]);
|
|
370654
|
+
const handleControllerChange = (0, react_1.useCallback)(() => {
|
|
370655
|
+
// If we already had a working stdin strategy (sab / sync-xhr), there's
|
|
370656
|
+
// no need to reset the runtime — the SW just rotated. We only force a
|
|
370657
|
+
// recreate when we previously couldn't get any stdin path at all.
|
|
370658
|
+
if (stdinStrategy.current !== "unavailable") {
|
|
370659
|
+
return;
|
|
370660
|
+
}
|
|
370661
|
+
recreateWorker();
|
|
370662
|
+
}, [recreateWorker]);
|
|
370663
|
+
const { ensureInputServiceWorker, registerStdinClient } = (0, useStdinServiceWorker_1.useStdinServiceWorker)({
|
|
370664
|
+
active,
|
|
370665
|
+
tabIdRef,
|
|
370666
|
+
onStdinRequest: handleStdinRequest,
|
|
370667
|
+
onControllerChange: handleControllerChange,
|
|
370668
|
+
});
|
|
370669
|
+
// -------------------------------------------------------------------------
|
|
370670
|
+
// Run / stop orchestration
|
|
370671
|
+
// -------------------------------------------------------------------------
|
|
370672
|
+
const writeFile = (0, react_1.useCallback)((filename, content) => {
|
|
370673
|
+
pyodideWorker?.postMessage({ method: "writeFile", filename, content });
|
|
370674
|
+
}, [pyodideWorker]);
|
|
370675
|
+
const handleRun = (0, react_1.useCallback)(async () => {
|
|
370676
|
+
if (!workerReady.current || !pyodideWorker) {
|
|
370677
|
+
return;
|
|
370678
|
+
}
|
|
370679
|
+
if (stdinStrategy.current === "unavailable") {
|
|
370680
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370681
|
+
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370682
|
+
message: "Python input() fallback is unavailable because the Service Worker is not controlling this page. Reload after Service Worker activation.",
|
|
370683
|
+
}));
|
|
370684
|
+
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370685
|
+
return;
|
|
370686
|
+
}
|
|
370687
|
+
if (stdinStrategy.current === "sync-xhr") {
|
|
370688
|
+
const swStatus = await ensureInputServiceWorker();
|
|
370689
|
+
if (!swStatus.controlled) {
|
|
370690
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370691
|
+
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370692
|
+
message: "Python input() fallback requires an active Service Worker controller. Reload the page and try again.",
|
|
370693
|
+
}));
|
|
370694
|
+
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370695
|
+
return;
|
|
370696
|
+
}
|
|
370697
|
+
registerStdinClient();
|
|
370698
|
+
}
|
|
370699
|
+
if (output.current) {
|
|
370700
|
+
output.current.innerHTML = "";
|
|
370701
|
+
}
|
|
370702
|
+
const entryFile = projectCode.find((component) => component.path === constants_1.PYTHON_ENTRY_FILE_PATH);
|
|
370703
|
+
if (!entryFile) {
|
|
370704
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370705
|
+
type: Errors_1.ErrorType.ENTRY_FILE_NOT_FOUND,
|
|
370706
|
+
message: `can't open file '${constants_1.PYTHON_ENTRY_FILE_PATH}': No such file or directory`,
|
|
370707
|
+
details: {
|
|
370708
|
+
fileName: constants_1.PYTHON_ENTRY_FILE_PATH.split("/").pop(),
|
|
370709
|
+
},
|
|
370710
|
+
}));
|
|
370711
|
+
dispatch((0, EditorSlice_1.codeRunHandled)());
|
|
370712
|
+
return;
|
|
370713
|
+
}
|
|
370714
|
+
dispatch((0, EditorSlice_1.setError)(null));
|
|
370715
|
+
setVisuals([]);
|
|
370716
|
+
stdinClosed.current = false;
|
|
370717
|
+
// Mirror the project directory tree into the Pyodide filesystem so that
|
|
370718
|
+
// relative imports between user files resolve correctly.
|
|
370719
|
+
const dirSet = new Set();
|
|
370720
|
+
for (const { path } of projectCode) {
|
|
370721
|
+
if (path) {
|
|
370722
|
+
const lastSlash = path.lastIndexOf("/");
|
|
370723
|
+
if (lastSlash > 0) {
|
|
370724
|
+
dirSet.add(path.slice(0, lastSlash));
|
|
370725
|
+
}
|
|
370726
|
+
}
|
|
370727
|
+
}
|
|
370728
|
+
const dirs = Array.from(dirSet);
|
|
370729
|
+
pyodideWorker.postMessage({ method: "createDirectories", dirs });
|
|
370730
|
+
for (const { path, content } of projectCode) {
|
|
370731
|
+
if (path) {
|
|
370732
|
+
writeFile(path, content);
|
|
370733
|
+
}
|
|
370734
|
+
}
|
|
370735
|
+
if (interruptBuffer.current) {
|
|
370736
|
+
interruptBuffer.current[0] = 0; // Clear previous SIGINT.
|
|
370737
|
+
}
|
|
370738
|
+
runId.current = crypto.randomUUID();
|
|
370739
|
+
activeInputRequest.current = null;
|
|
370740
|
+
pyodideWorker.postMessage({
|
|
370741
|
+
method: "runPython",
|
|
370742
|
+
python: entryFile.content,
|
|
370743
|
+
userModuleNames,
|
|
370744
|
+
runId: runId.current,
|
|
370745
|
+
});
|
|
370746
|
+
}, [
|
|
370747
|
+
pyodideWorker,
|
|
370748
|
+
dispatch,
|
|
370749
|
+
projectCode,
|
|
370750
|
+
userModuleNames,
|
|
370751
|
+
writeFile,
|
|
370752
|
+
ensureInputServiceWorker,
|
|
370753
|
+
registerStdinClient,
|
|
370754
|
+
]);
|
|
370755
|
+
const handleStop = (0, react_1.useCallback)(() => {
|
|
370756
|
+
if (runId.current && stdinStrategy.current === "sync-xhr") {
|
|
370757
|
+
// Stop is a true cancellation (user-driven interrupt), so use CANCEL
|
|
370758
|
+
// and let the worker surface KeyboardInterrupt to user code.
|
|
370759
|
+
(0, serviceWorker_1.postMessageToStdinServiceWorker)((0, stdinFallbackMessages_1.buildStdinFallbackCancel)({
|
|
370760
|
+
clientId: tabIdRef.current,
|
|
370761
|
+
runId: runId.current,
|
|
370762
|
+
}));
|
|
370763
|
+
}
|
|
370764
|
+
pyodideWorker?.postMessage({ method: "stopPython" });
|
|
370765
|
+
if (interruptBuffer.current) {
|
|
370766
|
+
interruptBuffer.current[0] = 2; // SIGINT to the running Python.
|
|
370767
|
+
disableInput();
|
|
370768
|
+
return;
|
|
370769
|
+
}
|
|
370770
|
+
// No SIGINT channel available. If Python is currently blocked on input()
|
|
370771
|
+
// under the sync-XHR strategy, the CANCEL we just posted to the SW is
|
|
370772
|
+
// enough on its own: the worker's pending XHR will return 499, throw
|
|
370773
|
+
// PYODIDE_STDIN_CANCELLED, and runPython will post handleError
|
|
370774
|
+
// (KeyboardInterrupt) followed by handleLoaded — the orchestrator will
|
|
370775
|
+
// reset its refs naturally and no recreate is needed.
|
|
370776
|
+
//
|
|
370777
|
+
// Avoiding the recreate is important on Safari: WebKit does not reliably
|
|
370778
|
+
// attach the page's Service Worker controller to a freshly-created
|
|
370779
|
+
// dedicated Web Worker, so the next run's stdin XHR escapes to the
|
|
370780
|
+
// network (HTTP 404 → OSError [Errno 29] in Python). By keeping the same
|
|
370781
|
+
// worker alive we keep the SW route working across Stop → Run cycles.
|
|
370782
|
+
if (stdinStrategy.current === "sync-xhr" &&
|
|
370783
|
+
activeInputRequest.current !== null) {
|
|
370784
|
+
disableInput();
|
|
370785
|
+
return;
|
|
370786
|
+
}
|
|
370787
|
+
// Otherwise (CPU-bound user code without SIGINT) we have no choice but
|
|
370788
|
+
// to terminate and recreate the worker.
|
|
370789
|
+
disableInput();
|
|
370790
|
+
recreateWorker();
|
|
370791
|
+
dispatch((0, EditorSlice_1.setError)({
|
|
370792
|
+
type: Errors_1.ErrorType.RUNTIME_ERROR,
|
|
370793
|
+
message: "Execution interrupted",
|
|
370794
|
+
}));
|
|
370795
|
+
}, [pyodideWorker, dispatch, disableInput, recreateWorker]);
|
|
370796
|
+
// -------------------------------------------------------------------------
|
|
370797
|
+
// Effects
|
|
370798
|
+
// -------------------------------------------------------------------------
|
|
370799
|
+
// Send the `init` message every time a fresh worker becomes available, so
|
|
370800
|
+
// it knows where to find pyodide assets and how to talk to the stdin SW.
|
|
370801
|
+
(0, react_1.useEffect)(() => {
|
|
370802
|
+
if (!pyodideWorker)
|
|
370803
|
+
return;
|
|
370804
|
+
let cancelled = false;
|
|
370805
|
+
const initWorker = async () => {
|
|
370806
|
+
const swStatus = await ensureInputServiceWorker();
|
|
370807
|
+
if (cancelled) {
|
|
370808
|
+
return;
|
|
370809
|
+
}
|
|
370810
|
+
pyodideWorker.postMessage({
|
|
370811
|
+
method: "init",
|
|
370812
|
+
assets: assetUrls_1.pyodideAssets,
|
|
370813
|
+
packageApiUrl,
|
|
370814
|
+
stdinFallback: {
|
|
370815
|
+
enabled: swStatus.supported && swStatus.controlled,
|
|
370816
|
+
endpointPath: constants_1.PYODIDE_STDIN_ENDPOINT,
|
|
370817
|
+
clientId: tabIdRef.current,
|
|
370818
|
+
},
|
|
370819
|
+
});
|
|
370820
|
+
};
|
|
370821
|
+
initWorker();
|
|
370822
|
+
return () => {
|
|
370823
|
+
cancelled = true;
|
|
370824
|
+
};
|
|
370825
|
+
}, [pyodideWorker, ensureInputServiceWorker, packageApiUrl]);
|
|
370826
|
+
// Kick off a run when the Redux flag flips on.
|
|
370827
|
+
(0, react_1.useEffect)(() => {
|
|
370828
|
+
if (codeRunTriggered && active && output.current) {
|
|
370829
|
+
handleRun();
|
|
370830
|
+
}
|
|
370831
|
+
}, [codeRunTriggered, output.current]);
|
|
370832
|
+
// Stop a run when the Redux flag flips on.
|
|
370833
|
+
(0, react_1.useEffect)(() => {
|
|
370834
|
+
if (codeRunStopped && active) {
|
|
370835
|
+
handleStop();
|
|
370836
|
+
}
|
|
370837
|
+
}, [codeRunStopped]);
|
|
370838
|
+
return {
|
|
370839
|
+
output,
|
|
370840
|
+
visuals,
|
|
370841
|
+
setVisuals,
|
|
370842
|
+
workerInitialized: Boolean(pyodideWorker),
|
|
370843
|
+
};
|
|
370844
|
+
};
|
|
370845
|
+
exports.usePyodideRunner = usePyodideRunner;
|
|
370846
|
+
|
|
370847
|
+
|
|
370848
|
+
/***/ }),
|
|
370849
|
+
|
|
370850
|
+
/***/ 93895:
|
|
370851
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
370852
|
+
|
|
370853
|
+
|
|
370854
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370855
|
+
exports.usePyodideWorker = void 0;
|
|
370856
|
+
const react_1 = __webpack_require__(51649);
|
|
370857
|
+
const assetUrls_1 = __webpack_require__(85799);
|
|
370858
|
+
/**
|
|
370859
|
+
* Owns the lifecycle of the Pyodide Web Worker.
|
|
370860
|
+
*
|
|
370861
|
+
* Responsibilities:
|
|
370862
|
+
* - Create the worker once the runner becomes active.
|
|
370863
|
+
* - Re-create the worker whenever the project identifier changes (each
|
|
370864
|
+
* project starts from a clean Python environment).
|
|
370865
|
+
* - Expose an imperative `recreateWorker` for callers that need to force a
|
|
370866
|
+
* reset (e.g. after the stdin SW activates and we need to retry init).
|
|
370867
|
+
* - Terminate the worker on unmount.
|
|
370868
|
+
*
|
|
370869
|
+
* Posting messages and decoding incoming messages is the orchestrator's job —
|
|
370870
|
+
* this hook just hands the worker over and forwards messages.
|
|
370871
|
+
*/
|
|
370872
|
+
const usePyodideWorker = ({ active, projectIdentifier, onMessage, onBeforeRecreate, }) => {
|
|
370873
|
+
const [worker, setWorker] = (0, react_1.useState)(null);
|
|
370874
|
+
// The onMessage callback closes over orchestrator state, so we route through
|
|
370875
|
+
// a ref to avoid rebuilding the worker every render.
|
|
370876
|
+
const onMessageRef = (0, react_1.useRef)(onMessage);
|
|
370877
|
+
onMessageRef.current = onMessage;
|
|
370878
|
+
const onBeforeRecreateRef = (0, react_1.useRef)(onBeforeRecreate);
|
|
370879
|
+
onBeforeRecreateRef.current = onBeforeRecreate;
|
|
370880
|
+
const createWorker = (0, react_1.useCallback)(() => {
|
|
370881
|
+
const w = new Worker(assetUrls_1.PYODIDE_WORKER_URL);
|
|
370882
|
+
w.onmessage = ({ data }) => {
|
|
370883
|
+
onMessageRef.current(data, w);
|
|
370884
|
+
};
|
|
370885
|
+
w.onerror = (error) => {
|
|
370886
|
+
console.error("Error in PyodideWorker:", error);
|
|
370887
|
+
};
|
|
370888
|
+
return w;
|
|
370889
|
+
}, []);
|
|
370890
|
+
const recreateWorker = (0, react_1.useCallback)(() => {
|
|
370891
|
+
onBeforeRecreateRef.current?.();
|
|
370892
|
+
setWorker((current) => {
|
|
370893
|
+
if (current) {
|
|
370894
|
+
console.log("Destroying and recreating Pyodide worker");
|
|
370895
|
+
current.terminate();
|
|
370896
|
+
}
|
|
370897
|
+
return createWorker();
|
|
370898
|
+
});
|
|
370899
|
+
}, [createWorker]);
|
|
370900
|
+
// First-mount creation: only when active and no worker exists yet.
|
|
370901
|
+
(0, react_1.useEffect)(() => {
|
|
370902
|
+
if (worker)
|
|
370903
|
+
return;
|
|
370904
|
+
if (!active)
|
|
370905
|
+
return;
|
|
370906
|
+
setWorker(createWorker());
|
|
370907
|
+
}, [active, worker, createWorker]);
|
|
370908
|
+
// Project changes always reset the worker
|
|
370909
|
+
(0, react_1.useEffect)(() => {
|
|
370910
|
+
recreateWorker();
|
|
370911
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
370912
|
+
}, [projectIdentifier]);
|
|
370913
|
+
// Terminate on unmount or when the worker reference is replaced.
|
|
370914
|
+
(0, react_1.useEffect)(() => {
|
|
370915
|
+
return () => {
|
|
370916
|
+
worker?.terminate();
|
|
370917
|
+
};
|
|
370918
|
+
}, [worker]);
|
|
370919
|
+
return { worker, recreateWorker };
|
|
370920
|
+
};
|
|
370921
|
+
exports.usePyodideWorker = usePyodideWorker;
|
|
370922
|
+
|
|
370923
|
+
|
|
370924
|
+
/***/ }),
|
|
370925
|
+
|
|
370926
|
+
/***/ 86357:
|
|
370927
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
370928
|
+
|
|
370929
|
+
|
|
370930
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370931
|
+
exports.useStdinServiceWorker = void 0;
|
|
370932
|
+
const react_1 = __webpack_require__(51649);
|
|
370933
|
+
const assetUrls_1 = __webpack_require__(85799);
|
|
370934
|
+
const serviceWorker_1 = __webpack_require__(58158);
|
|
370935
|
+
/**
|
|
370936
|
+
* Manages the lifecycle of the stdin Service Worker:
|
|
370937
|
+
*
|
|
370938
|
+
* - registers the SW (with a non-root-scope fallback for restricted hosts)
|
|
370939
|
+
* - waits for the page to actually be controlled before declaring success
|
|
370940
|
+
* - probes the SW fetch route to confirm interception is wired up
|
|
370941
|
+
* - retries the registration once if either check fails
|
|
370942
|
+
* - listens for SW messages and forwards stdin requests to the orchestrator
|
|
370943
|
+
* - listens for `controllerchange` so the orchestrator can re-register and
|
|
370944
|
+
* decide whether to recreate the Pyodide worker
|
|
370945
|
+
*
|
|
370946
|
+
* Returns helpers (`ensureInputServiceWorker`, `registerStdinClient`) the
|
|
370947
|
+
* orchestrator calls from `run` and from `init`.
|
|
370948
|
+
*/
|
|
370949
|
+
const useStdinServiceWorker = ({ active, tabIdRef, onStdinRequest, onControllerChange, }) => {
|
|
370950
|
+
// Keep latest callbacks in refs so the event listener effects don't need to
|
|
370951
|
+
// re-subscribe whenever the parent re-renders with a new closure.
|
|
370952
|
+
const onStdinRequestRef = (0, react_1.useRef)(onStdinRequest);
|
|
370953
|
+
onStdinRequestRef.current = onStdinRequest;
|
|
370954
|
+
const onControllerChangeRef = (0, react_1.useRef)(onControllerChange);
|
|
370955
|
+
onControllerChangeRef.current = onControllerChange;
|
|
370956
|
+
const registerStdinClient = (0, react_1.useCallback)(() => {
|
|
370957
|
+
(0, serviceWorker_1.postMessageToStdinServiceWorker)({
|
|
370958
|
+
type: "PYODIDE_STDIN_REGISTER",
|
|
370959
|
+
clientId: tabIdRef.current,
|
|
370960
|
+
});
|
|
370961
|
+
}, [tabIdRef]);
|
|
370962
|
+
const ensureInputServiceWorker = (0, react_1.useCallback)(async () => {
|
|
370963
|
+
if (typeof window === "undefined") {
|
|
370964
|
+
return { supported: false, controlled: false };
|
|
370965
|
+
}
|
|
370966
|
+
if (!("serviceWorker" in navigator)) {
|
|
370967
|
+
return { supported: false, controlled: false };
|
|
370968
|
+
}
|
|
370969
|
+
try {
|
|
370970
|
+
const registerStdinWorker = async () => {
|
|
370971
|
+
try {
|
|
370972
|
+
return await navigator.serviceWorker.register(assetUrls_1.PYODIDE_STDIN_SW_URL, {
|
|
370973
|
+
scope: "/",
|
|
370974
|
+
});
|
|
370975
|
+
}
|
|
370976
|
+
catch (rootScopeError) {
|
|
370977
|
+
// Fallback for hosts that do not allow broad SW scope from the asset path.
|
|
370978
|
+
const fallbackRegistration = await navigator.serviceWorker.register(assetUrls_1.PYODIDE_STDIN_SW_URL);
|
|
370979
|
+
console.warn("Registered stdin Service Worker without root scope", rootScopeError);
|
|
370980
|
+
return fallbackRegistration;
|
|
370981
|
+
}
|
|
370982
|
+
};
|
|
370983
|
+
const evaluateRegistration = async (registration) => {
|
|
370984
|
+
await Promise.race([
|
|
370985
|
+
navigator.serviceWorker.ready,
|
|
370986
|
+
new Promise((resolve) => setTimeout(resolve, 2000)),
|
|
370987
|
+
]);
|
|
370988
|
+
const controlled = Boolean(navigator.serviceWorker.controller) ||
|
|
370989
|
+
(await (0, serviceWorker_1.waitForServiceWorkerControl)());
|
|
370990
|
+
if (controlled || registration?.active) {
|
|
370991
|
+
const messageTarget = navigator.serviceWorker.controller ||
|
|
370992
|
+
registration?.active ||
|
|
370993
|
+
registration?.waiting ||
|
|
370994
|
+
registration?.installing;
|
|
370995
|
+
messageTarget?.postMessage({
|
|
370996
|
+
type: "PYODIDE_STDIN_REGISTER",
|
|
370997
|
+
clientId: tabIdRef.current,
|
|
370998
|
+
});
|
|
370999
|
+
}
|
|
371000
|
+
const routeReady = await (0, serviceWorker_1.verifyStdinServiceWorkerRoute)();
|
|
371001
|
+
return controlled && routeReady;
|
|
371002
|
+
};
|
|
371003
|
+
let registration = await registerStdinWorker();
|
|
371004
|
+
let healthy = await evaluateRegistration(registration);
|
|
371005
|
+
if (!healthy) {
|
|
371006
|
+
try {
|
|
371007
|
+
await registration?.unregister();
|
|
371008
|
+
}
|
|
371009
|
+
catch (error) {
|
|
371010
|
+
console.debug("stdin SW unregister retry skipped", error);
|
|
371011
|
+
}
|
|
371012
|
+
registration = await registerStdinWorker();
|
|
371013
|
+
healthy = await evaluateRegistration(registration);
|
|
371014
|
+
}
|
|
371015
|
+
return { supported: true, controlled: healthy };
|
|
371016
|
+
}
|
|
371017
|
+
catch (error) {
|
|
371018
|
+
console.warn("Failed to register stdin Service Worker", error);
|
|
371019
|
+
return { supported: true, controlled: false };
|
|
371020
|
+
}
|
|
371021
|
+
}, [tabIdRef]);
|
|
371022
|
+
// Listen for messages from the SW. The SW forwards a PYODIDE_STDIN_REQUEST
|
|
371023
|
+
// whenever the worker thread blocks on input() via the sync-XHR fallback.
|
|
371024
|
+
(0, react_1.useEffect)(() => {
|
|
371025
|
+
if (!("serviceWorker" in navigator)) {
|
|
371026
|
+
return;
|
|
371027
|
+
}
|
|
371028
|
+
const handleMessage = (event) => {
|
|
371029
|
+
const data = event.data;
|
|
371030
|
+
if (!data || typeof data !== "object") {
|
|
371031
|
+
return;
|
|
371032
|
+
}
|
|
371033
|
+
if (data.type !== "PYODIDE_STDIN_REQUEST") {
|
|
371034
|
+
return;
|
|
371035
|
+
}
|
|
371036
|
+
if (data.clientId !== tabIdRef.current) {
|
|
371037
|
+
return;
|
|
371038
|
+
}
|
|
371039
|
+
onStdinRequestRef.current({
|
|
371040
|
+
runId: data.runId,
|
|
371041
|
+
requestId: data.requestId,
|
|
371042
|
+
clientId: data.clientId,
|
|
371043
|
+
});
|
|
371044
|
+
};
|
|
371045
|
+
navigator.serviceWorker.addEventListener("message", handleMessage);
|
|
371046
|
+
return () => {
|
|
371047
|
+
navigator.serviceWorker.removeEventListener("message", handleMessage);
|
|
371048
|
+
};
|
|
371049
|
+
}, [tabIdRef]);
|
|
371050
|
+
// Re-register stdin client and notify the orchestrator whenever the page
|
|
371051
|
+
// gains a new SW controller (e.g. after first registration or a SW update).
|
|
371052
|
+
(0, react_1.useEffect)(() => {
|
|
371053
|
+
if (!active) {
|
|
371054
|
+
return;
|
|
371055
|
+
}
|
|
371056
|
+
if (!("serviceWorker" in navigator)) {
|
|
371057
|
+
return;
|
|
371058
|
+
}
|
|
371059
|
+
const handleControllerChange = () => {
|
|
371060
|
+
if (!navigator.serviceWorker.controller) {
|
|
371061
|
+
return;
|
|
371062
|
+
}
|
|
371063
|
+
registerStdinClient();
|
|
371064
|
+
onControllerChangeRef.current();
|
|
371065
|
+
};
|
|
371066
|
+
navigator.serviceWorker.addEventListener("controllerchange", handleControllerChange);
|
|
371067
|
+
return () => {
|
|
371068
|
+
navigator.serviceWorker.removeEventListener("controllerchange", handleControllerChange);
|
|
371069
|
+
};
|
|
371070
|
+
}, [active, registerStdinClient]);
|
|
371071
|
+
return { ensureInputServiceWorker, registerStdinClient };
|
|
371072
|
+
};
|
|
371073
|
+
exports.useStdinServiceWorker = useStdinServiceWorker;
|
|
371074
|
+
|
|
371075
|
+
|
|
371076
|
+
/***/ }),
|
|
371077
|
+
|
|
371078
|
+
/***/ 35660:
|
|
371079
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
371080
|
+
|
|
371081
|
+
|
|
371082
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
371083
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
371084
|
+
};
|
|
371085
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371086
|
+
exports.shiftFocusToInput = exports.disableInputElement = exports.getInputContent = exports.getInputElement = exports.inputSpan = void 0;
|
|
371087
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
371088
|
+
/**
|
|
371089
|
+
* DOM helpers for the contentEditable span that captures the user's stdin.
|
|
371090
|
+
*
|
|
371091
|
+
* These helpers intentionally side-step React: the input element is appended
|
|
371092
|
+
* to a `pre` element managed via a ref, and lifecycle is driven by the
|
|
371093
|
+
* worker's stdin requests, not by React render cycles.
|
|
371094
|
+
*/
|
|
371095
|
+
/** Build the contentEditable `<span>` that captures a single line of stdin. */
|
|
371096
|
+
const inputSpan = () => {
|
|
371097
|
+
const span = document.createElement("span");
|
|
371098
|
+
span.setAttribute("id", "input");
|
|
371099
|
+
span.setAttribute("spellCheck", "false");
|
|
371100
|
+
span.setAttribute("class", styles_module_scss_1.default.pythonrunnerInput || "");
|
|
371101
|
+
span.setAttribute("contentEditable", "true");
|
|
371102
|
+
return span;
|
|
371103
|
+
};
|
|
371104
|
+
exports.inputSpan = inputSpan;
|
|
371105
|
+
/** Lookup the currently-active input span (id="input"), if any. */
|
|
371106
|
+
const getInputElement = () => document.getElementById("input");
|
|
371107
|
+
exports.getInputElement = getInputElement;
|
|
371108
|
+
/**
|
|
371109
|
+
* Wait for the user to press Enter (submit) or Ctrl+D (EOF) inside the input
|
|
371110
|
+
* element. Resolves with the typed text and whether EOF was signalled.
|
|
371111
|
+
*
|
|
371112
|
+
* The element is taken out of editable mode after the line is submitted so it
|
|
371113
|
+
* appears as part of the transcript above.
|
|
371114
|
+
*/
|
|
371115
|
+
const getInputContent = (element) => {
|
|
371116
|
+
element.focus();
|
|
371117
|
+
return new Promise((resolve) => {
|
|
371118
|
+
element.addEventListener("keydown", function removeInput(e) {
|
|
371119
|
+
const ctrlD = (e.ctrlKey && e.key.toLowerCase() === "d");
|
|
371120
|
+
const lineEnded = e.key === "Enter" || ctrlD;
|
|
371121
|
+
if (lineEnded) {
|
|
371122
|
+
element.removeEventListener(e.type, removeInput);
|
|
371123
|
+
const content = element.innerText;
|
|
371124
|
+
element.removeAttribute("id");
|
|
371125
|
+
element.removeAttribute("contentEditable");
|
|
371126
|
+
element.innerText = content + "\n";
|
|
371127
|
+
document.addEventListener("keyup", function storeInput(ev) {
|
|
371128
|
+
if (lineEnded) {
|
|
371129
|
+
document.removeEventListener(ev.type, storeInput);
|
|
371130
|
+
resolve({ content, ctrlD });
|
|
371131
|
+
}
|
|
371132
|
+
});
|
|
371133
|
+
}
|
|
371134
|
+
});
|
|
371135
|
+
});
|
|
371136
|
+
};
|
|
371137
|
+
exports.getInputContent = getInputContent;
|
|
371138
|
+
/**
|
|
371139
|
+
* Remove the editable attributes from the active input span so it's frozen as
|
|
371140
|
+
* transcript text. Safe to call even when no input is active.
|
|
371141
|
+
*/
|
|
371142
|
+
const disableInputElement = () => {
|
|
371143
|
+
const element = (0, exports.getInputElement)();
|
|
371144
|
+
if (element) {
|
|
371145
|
+
element.removeAttribute("id");
|
|
371146
|
+
element.removeAttribute("contentEditable");
|
|
371147
|
+
}
|
|
371148
|
+
};
|
|
371149
|
+
exports.disableInputElement = disableInputElement;
|
|
371150
|
+
/**
|
|
371151
|
+
* Click handler for the console pane that re-focuses the active input span
|
|
371152
|
+
* when the user clicks anywhere in the console (without losing a selection).
|
|
371153
|
+
*/
|
|
371154
|
+
const shiftFocusToInput = (event) => {
|
|
371155
|
+
const documentSelection = window.getSelection();
|
|
371156
|
+
if (documentSelection && documentSelection.toString().length > 0) {
|
|
371157
|
+
return;
|
|
371158
|
+
}
|
|
371159
|
+
const inputBox = (0, exports.getInputElement)();
|
|
371160
|
+
if (inputBox && event.target !== inputBox) {
|
|
371161
|
+
const input = (0, exports.getInputElement)();
|
|
371162
|
+
const selection = window.getSelection();
|
|
371163
|
+
selection?.removeAllRanges();
|
|
371164
|
+
if (input?.innerText && input.innerText.length > 0) {
|
|
371165
|
+
const range = document.createRange();
|
|
371166
|
+
range.setStart(input, 1);
|
|
371167
|
+
range.collapse(true);
|
|
371168
|
+
selection?.addRange(range);
|
|
371169
|
+
}
|
|
371170
|
+
input?.focus();
|
|
371171
|
+
}
|
|
371172
|
+
};
|
|
371173
|
+
exports.shiftFocusToInput = shiftFocusToInput;
|
|
371174
|
+
|
|
371175
|
+
|
|
371176
|
+
/***/ }),
|
|
371177
|
+
|
|
371178
|
+
/***/ 98131:
|
|
371179
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
371180
|
+
|
|
371181
|
+
|
|
371182
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
371183
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
371184
|
+
};
|
|
371185
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371186
|
+
exports.appendConsoleLine = void 0;
|
|
371187
|
+
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
371188
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
371189
|
+
/**
|
|
371190
|
+
* Append a line of Python stdout/stderr to the console `pre` element.
|
|
371191
|
+
*
|
|
371192
|
+
* The element's innerHTML is set via `new Option(...).innerHTML` to escape
|
|
371193
|
+
* any HTML control characters in the worker's output.
|
|
371194
|
+
*/
|
|
371195
|
+
const appendConsoleLine = (outputElement, stream, content) => {
|
|
371196
|
+
if (!outputElement) {
|
|
371197
|
+
return;
|
|
371198
|
+
}
|
|
371199
|
+
const span = document.createElement("span");
|
|
371200
|
+
span.className = (0, classnames_1.default)(styles_module_scss_1.default.pythonConsoleLine, stream === "stderr" && styles_module_scss_1.default["stderr"], stream === "stdout" && styles_module_scss_1.default["stdout"]);
|
|
371201
|
+
span.innerHTML = new Option(content || " ").innerHTML + "\n";
|
|
371202
|
+
outputElement.appendChild(span);
|
|
371203
|
+
outputElement.scrollTop = outputElement.scrollHeight;
|
|
371204
|
+
};
|
|
371205
|
+
exports.appendConsoleLine = appendConsoleLine;
|
|
371206
|
+
|
|
371207
|
+
|
|
371208
|
+
/***/ }),
|
|
371209
|
+
|
|
371210
|
+
/***/ 45230:
|
|
371211
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
371212
|
+
|
|
371213
|
+
|
|
371214
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371215
|
+
exports.applyPyodideFileWrite = void 0;
|
|
371216
|
+
const EditorSlice_1 = __webpack_require__(68512);
|
|
371217
|
+
const ProjectTypes_1 = __webpack_require__(27130);
|
|
371218
|
+
const projectHelpers_1 = __webpack_require__(2610);
|
|
371219
|
+
/**
|
|
371220
|
+
* Apply a file-write event from the Pyodide worker to the project tree.
|
|
371221
|
+
*
|
|
371222
|
+
* Modes:
|
|
371223
|
+
* - "w" / "x" → overwrite (or create)
|
|
371224
|
+
* - "a" → append to existing content
|
|
371225
|
+
*
|
|
371226
|
+
* When the target file doesn't exist yet, a new ProjectFile is created and
|
|
371227
|
+
* attached to its parent directory's children list (if the parent exists).
|
|
371228
|
+
*/
|
|
371229
|
+
const applyPyodideFileWrite = ({ dispatch, projectComponents, projectCode, filePath, content, mode, }) => {
|
|
371230
|
+
const componentToUpdate = projectCode.find((item) => item.path === filePath);
|
|
371231
|
+
let updatedContent;
|
|
371232
|
+
if (mode === "w" || mode === "x") {
|
|
371233
|
+
updatedContent = content;
|
|
371234
|
+
}
|
|
371235
|
+
else if (mode === "a") {
|
|
371236
|
+
updatedContent =
|
|
371237
|
+
(componentToUpdate ? componentToUpdate.content : "") + content;
|
|
371238
|
+
}
|
|
371239
|
+
if (updatedContent === undefined) {
|
|
371240
|
+
return;
|
|
371241
|
+
}
|
|
371242
|
+
if (componentToUpdate) {
|
|
371243
|
+
dispatch((0, EditorSlice_1.updateProjectComponent)({
|
|
371244
|
+
...componentToUpdate,
|
|
371245
|
+
content: updatedContent,
|
|
371246
|
+
}));
|
|
371247
|
+
return;
|
|
371248
|
+
}
|
|
371249
|
+
const { dirPath, name, extension } = (0, projectHelpers_1.parseComponentPath)(filePath);
|
|
371250
|
+
const newFile = {
|
|
371251
|
+
id: crypto.randomUUID(),
|
|
371252
|
+
name,
|
|
371253
|
+
extension,
|
|
371254
|
+
content: updatedContent,
|
|
371255
|
+
type: ProjectTypes_1.ProjectComponentType.FILE,
|
|
371256
|
+
path: filePath,
|
|
371257
|
+
};
|
|
371258
|
+
dispatch((0, EditorSlice_1.addProjectComponent)(newFile));
|
|
371259
|
+
const dirParent = projectComponents.find((component) => component.type === ProjectTypes_1.ProjectComponentType.DIR && component.path === dirPath);
|
|
371260
|
+
if (dirParent) {
|
|
371261
|
+
dispatch((0, EditorSlice_1.updateProjectComponent)({
|
|
371262
|
+
...dirParent,
|
|
371263
|
+
children: [...(dirParent.children ?? []), newFile.id],
|
|
371264
|
+
}));
|
|
371265
|
+
}
|
|
371266
|
+
};
|
|
371267
|
+
exports.applyPyodideFileWrite = applyPyodideFileWrite;
|
|
371268
|
+
|
|
371269
|
+
|
|
371270
|
+
/***/ }),
|
|
371271
|
+
|
|
371272
|
+
/***/ 58158:
|
|
371273
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
371274
|
+
|
|
371275
|
+
|
|
371276
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371277
|
+
exports.postMessageToStdinServiceWorker = exports.verifyStdinServiceWorkerRoute = exports.waitForServiceWorkerControl = void 0;
|
|
371278
|
+
const constants_1 = __webpack_require__(90804);
|
|
371279
|
+
/**
|
|
371280
|
+
* Resolve once the current page is controlled by a Service Worker, or once
|
|
371281
|
+
* the timeout elapses. The page may briefly be uncontrolled after a fresh
|
|
371282
|
+
* registration even though the SW is active, so we listen for
|
|
371283
|
+
* `controllerchange` rather than polling.
|
|
371284
|
+
*/
|
|
371285
|
+
const waitForServiceWorkerControl = (timeoutMs = constants_1.SERVICE_WORKER_CONTROL_WAIT_MS) => new Promise((resolve) => {
|
|
371286
|
+
if (!("serviceWorker" in navigator)) {
|
|
371287
|
+
resolve(false);
|
|
371288
|
+
return;
|
|
371289
|
+
}
|
|
371290
|
+
if (navigator.serviceWorker.controller) {
|
|
371291
|
+
resolve(true);
|
|
371292
|
+
return;
|
|
371293
|
+
}
|
|
371294
|
+
let settled = false;
|
|
371295
|
+
const onControllerChange = () => {
|
|
371296
|
+
if (settled)
|
|
371297
|
+
return;
|
|
371298
|
+
if (!navigator.serviceWorker.controller)
|
|
371299
|
+
return;
|
|
371300
|
+
settled = true;
|
|
371301
|
+
window.clearTimeout(timeout);
|
|
371302
|
+
navigator.serviceWorker.removeEventListener("controllerchange", onControllerChange);
|
|
371303
|
+
resolve(true);
|
|
371304
|
+
};
|
|
371305
|
+
const timeout = window.setTimeout(() => {
|
|
371306
|
+
if (settled)
|
|
371307
|
+
return;
|
|
371308
|
+
settled = true;
|
|
371309
|
+
navigator.serviceWorker.removeEventListener("controllerchange", onControllerChange);
|
|
371310
|
+
resolve(Boolean(navigator.serviceWorker.controller));
|
|
371311
|
+
}, timeoutMs);
|
|
371312
|
+
navigator.serviceWorker.addEventListener("controllerchange", onControllerChange);
|
|
371313
|
+
});
|
|
371314
|
+
exports.waitForServiceWorkerControl = waitForServiceWorkerControl;
|
|
371315
|
+
/**
|
|
371316
|
+
* Probe the stdin Service Worker fetch route to confirm it's actually
|
|
371317
|
+
* intercepting requests. The SW is configured to return HTTP 400 for probes
|
|
371318
|
+
* that omit runId/requestId/clientId, so anything else means the route isn't
|
|
371319
|
+
* wired up yet.
|
|
371320
|
+
*/
|
|
371321
|
+
const verifyStdinServiceWorkerRoute = async () => {
|
|
371322
|
+
if (typeof window === "undefined") {
|
|
371323
|
+
return false;
|
|
371324
|
+
}
|
|
371325
|
+
if (!("serviceWorker" in navigator)) {
|
|
371326
|
+
return false;
|
|
371327
|
+
}
|
|
371328
|
+
if (!navigator.serviceWorker.controller) {
|
|
371329
|
+
return false;
|
|
371330
|
+
}
|
|
371331
|
+
const probeController = new AbortController();
|
|
371332
|
+
const timeoutId = window.setTimeout(() => probeController.abort(), constants_1.SERVICE_WORKER_PROBE_TIMEOUT_MS);
|
|
371333
|
+
try {
|
|
371334
|
+
const probeUrl = new URL(constants_1.PYODIDE_STDIN_ENDPOINT, window.location.origin);
|
|
371335
|
+
probeUrl.searchParams.set("probe", "1");
|
|
371336
|
+
const response = await fetch(probeUrl.toString(), {
|
|
371337
|
+
method: "GET",
|
|
371338
|
+
cache: "no-store",
|
|
371339
|
+
signal: probeController.signal,
|
|
371340
|
+
});
|
|
371341
|
+
// SW returns 400 for probe requests without runId/requestId/clientId.
|
|
371342
|
+
return response.status === 400;
|
|
371343
|
+
}
|
|
371344
|
+
catch (_) {
|
|
371345
|
+
return false;
|
|
371346
|
+
}
|
|
371347
|
+
finally {
|
|
371348
|
+
window.clearTimeout(timeoutId);
|
|
371349
|
+
}
|
|
371350
|
+
};
|
|
371351
|
+
exports.verifyStdinServiceWorkerRoute = verifyStdinServiceWorkerRoute;
|
|
371352
|
+
/**
|
|
371353
|
+
* Send a message to the stdin Service Worker. Prefers `navigator.serviceWorker.controller`,
|
|
371354
|
+
* but falls back to the registration's active worker when the controller is
|
|
371355
|
+
* temporarily unavailable (best effort — used to keep stdin mapping fresh).
|
|
371356
|
+
*
|
|
371357
|
+
* Returns true if the message was posted to the active controller.
|
|
371358
|
+
*
|
|
371359
|
+
* The `message` is intentionally typed as a structured-cloneable object — the
|
|
371360
|
+
* concrete shapes live in `./stdinFallbackMessages.ts` and are the source of
|
|
371361
|
+
* truth for the wire protocol.
|
|
371362
|
+
*/
|
|
371363
|
+
const postMessageToStdinServiceWorker = (message) => {
|
|
371364
|
+
if (!("serviceWorker" in navigator)) {
|
|
371365
|
+
return false;
|
|
371366
|
+
}
|
|
371367
|
+
const controller = navigator.serviceWorker.controller;
|
|
371368
|
+
if (controller) {
|
|
371369
|
+
controller.postMessage(message);
|
|
371370
|
+
return true;
|
|
371371
|
+
}
|
|
371372
|
+
navigator.serviceWorker.ready
|
|
371373
|
+
.then((registration) => {
|
|
371374
|
+
registration.active?.postMessage(message);
|
|
371375
|
+
})
|
|
371376
|
+
.catch((error) => {
|
|
371377
|
+
console.debug("stdin SW post fallback skipped", error);
|
|
371378
|
+
});
|
|
371379
|
+
return false;
|
|
371380
|
+
};
|
|
371381
|
+
exports.postMessageToStdinServiceWorker = postMessageToStdinServiceWorker;
|
|
371382
|
+
|
|
371383
|
+
|
|
371384
|
+
/***/ }),
|
|
371385
|
+
|
|
371386
|
+
/***/ 94879:
|
|
371387
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
371388
|
+
|
|
371389
|
+
|
|
371390
|
+
/**
|
|
371391
|
+
* Pure builders for the messages the main thread posts to the stdin Service
|
|
371392
|
+
* Worker. Keeping them as data-only helpers (no `postMessage` side effects)
|
|
371393
|
+
* makes the protocol surface easy to unit test.
|
|
371394
|
+
*
|
|
371395
|
+
* The three shapes correspond one-to-one with the three terminal outcomes the
|
|
371396
|
+
* Service Worker can produce for a pending `/pyodide-stdin` fetch:
|
|
371397
|
+
*
|
|
371398
|
+
* - RESPONSE → HTTP 200 with the typed line (data path)
|
|
371399
|
+
* - EOF → HTTP 204 (clean EOF: input() raises EOFError in user code)
|
|
371400
|
+
* - CANCEL → HTTP 499 (user pressed Stop: worker raises KeyboardInterrupt)
|
|
371401
|
+
*
|
|
371402
|
+
* EOF and CANCEL look superficially similar but mean very different things to
|
|
371403
|
+
* Python — see `docs/PyodideRunner.md` §9 for the full flow.
|
|
371404
|
+
*/
|
|
371405
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371406
|
+
exports.buildStdinFallbackCancel = exports.buildStdinFallbackEof = exports.buildStdinFallbackResponse = void 0;
|
|
371407
|
+
/** Build a successful stdin response targeting a specific (runId, requestId). */
|
|
371408
|
+
const buildStdinFallbackResponse = (args) => ({
|
|
371409
|
+
type: "PYODIDE_STDIN_RESPONSE",
|
|
371410
|
+
clientId: args.clientId,
|
|
371411
|
+
runId: args.runId,
|
|
371412
|
+
requestId: args.requestId,
|
|
371413
|
+
value: args.value,
|
|
371414
|
+
});
|
|
371415
|
+
exports.buildStdinFallbackResponse = buildStdinFallbackResponse;
|
|
371416
|
+
/**
|
|
371417
|
+
* Build an EOF signal for a specific pending input request. Use this when the
|
|
371418
|
+
* user pressed Ctrl+D or when stdin was already closed earlier in the run —
|
|
371419
|
+
* NOT when the user pressed Stop (use the cancel builder for that).
|
|
371420
|
+
*/
|
|
371421
|
+
const buildStdinFallbackEof = (args) => ({
|
|
371422
|
+
type: "PYODIDE_STDIN_EOF",
|
|
371423
|
+
clientId: args.clientId,
|
|
371424
|
+
runId: args.runId,
|
|
371425
|
+
requestId: args.requestId,
|
|
371426
|
+
});
|
|
371427
|
+
exports.buildStdinFallbackEof = buildStdinFallbackEof;
|
|
371428
|
+
/**
|
|
371429
|
+
* Build a cancellation message. Targets either a specific request or every
|
|
371430
|
+
* pending request for the given runId (when `requestId` is omitted).
|
|
371431
|
+
*/
|
|
371432
|
+
const buildStdinFallbackCancel = (args) => {
|
|
371433
|
+
const message = {
|
|
371434
|
+
type: "PYODIDE_STDIN_CANCEL",
|
|
371435
|
+
clientId: args.clientId,
|
|
371436
|
+
runId: args.runId,
|
|
371437
|
+
};
|
|
371438
|
+
if (args.requestId !== undefined) {
|
|
371439
|
+
message.requestId = args.requestId;
|
|
371440
|
+
}
|
|
371441
|
+
return message;
|
|
371442
|
+
};
|
|
371443
|
+
exports.buildStdinFallbackCancel = buildStdinFallbackCancel;
|
|
371444
|
+
|
|
371445
|
+
|
|
371446
|
+
/***/ }),
|
|
371447
|
+
|
|
371448
|
+
/***/ 95369:
|
|
371449
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
371450
|
+
|
|
371451
|
+
|
|
371452
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371453
|
+
exports.getOrCreateTabId = void 0;
|
|
371454
|
+
const constants_1 = __webpack_require__(90804);
|
|
371455
|
+
/**
|
|
371456
|
+
* Return a stable id for this browser tab so the stdin Service Worker can
|
|
371457
|
+
* route input requests back to the right client. Falls back to a fresh UUID
|
|
371458
|
+
* if sessionStorage is unavailable (e.g. private mode).
|
|
371459
|
+
*/
|
|
371460
|
+
const getOrCreateTabId = () => {
|
|
371461
|
+
try {
|
|
371462
|
+
const existing = window.sessionStorage.getItem(constants_1.PYODIDE_TAB_ID_STORAGE_KEY);
|
|
371463
|
+
if (existing) {
|
|
371464
|
+
return existing;
|
|
371465
|
+
}
|
|
371466
|
+
const next = crypto.randomUUID();
|
|
371467
|
+
window.sessionStorage.setItem(constants_1.PYODIDE_TAB_ID_STORAGE_KEY, next);
|
|
371468
|
+
return next;
|
|
371469
|
+
}
|
|
371470
|
+
catch (_) {
|
|
371471
|
+
return crypto.randomUUID();
|
|
371472
|
+
}
|
|
371473
|
+
};
|
|
371474
|
+
exports.getOrCreateTabId = getOrCreateTabId;
|
|
371475
|
+
|
|
371476
|
+
|
|
370674
371477
|
/***/ }),
|
|
370675
371478
|
|
|
370676
371479
|
/***/ 7030:
|
|
@@ -370829,7 +371632,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
370829
371632
|
};
|
|
370830
371633
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370831
371634
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
370832
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371635
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(87295));
|
|
370833
371636
|
const loading_animation_gif_1 = __importDefault(__webpack_require__(73875));
|
|
370834
371637
|
const Loading = ({}) => {
|
|
370835
371638
|
return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.loadingPage, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.loadingContainer, children: [(0, jsx_runtime_1.jsx)("img", { src: loading_animation_gif_1.default, className: styles_module_scss_1.default.loadingContainerAnimation }), (0, jsx_runtime_1.jsxs)("div", { children: ["Project loading", (0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.dots, "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("span", { className: `${styles_module_scss_1.default.dot} ${styles_module_scss_1.default.dot1}`, children: "." }), (0, jsx_runtime_1.jsx)("span", { className: `${styles_module_scss_1.default.dot} ${styles_module_scss_1.default.dot2}`, children: "." }), (0, jsx_runtime_1.jsx)("span", { className: `${styles_module_scss_1.default.dot} ${styles_module_scss_1.default.dot3}`, children: "." })] })] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.loadingContainerSubtext, children: "Building your world!" })] }) }));
|
|
@@ -370850,7 +371653,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
370850
371653
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
370851
371654
|
const react_menu_1 = __webpack_require__(71231);
|
|
370852
371655
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
370853
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371656
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(28076));
|
|
370854
371657
|
const ContextMenu = (props) => {
|
|
370855
371658
|
const { align, direction, menuOptions, menuWidth, menuHeight, opened, anchorRef, onClose, anchorPoint, gap, hoverElement, title, activeItemId, showDivider = true, } = props;
|
|
370856
371659
|
const portalTarget = document.getElementById("textjam-root") || document.body;
|
|
@@ -370887,7 +371690,7 @@ const react_1 = __webpack_require__(51649);
|
|
|
370887
371690
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
370888
371691
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
370889
371692
|
const arrow_right_svg_1 = __importDefault(__webpack_require__(17297));
|
|
370890
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371693
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(51191));
|
|
370891
371694
|
const ContextMenu_1 = __importDefault(__webpack_require__(39179));
|
|
370892
371695
|
const Dropdown = (props) => {
|
|
370893
371696
|
const { ButtonIcon, buttonClassname, menuOptions, menuPosition, ariaLabel } = props;
|
|
@@ -370910,7 +371713,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
370910
371713
|
};
|
|
370911
371714
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
370912
371715
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
370913
|
-
const SidebarPanel_1 = __importDefault(__webpack_require__(
|
|
371716
|
+
const SidebarPanel_1 = __importDefault(__webpack_require__(83617));
|
|
370914
371717
|
const FileTree_1 = __webpack_require__(88675);
|
|
370915
371718
|
const stores_1 = __webpack_require__(32132);
|
|
370916
371719
|
const FilePanel = () => {
|
|
@@ -370938,7 +371741,7 @@ exports.EmptyStateMessage = void 0;
|
|
|
370938
371741
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
370939
371742
|
const open_folder_svg_1 = __importDefault(__webpack_require__(2316));
|
|
370940
371743
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
370941
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371744
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10556));
|
|
370942
371745
|
const EmptyStateMessage = () => {
|
|
370943
371746
|
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.emptyStateContainer, children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { size: 24, SvgElement: open_folder_svg_1.default, className: styles_module_scss_1.default.emptyStateIcon }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.emptyStateMessage, children: "There are no items to display yet." }), (0, jsx_runtime_1.jsx)("div", { children: " As items are added, they will be displayed here." })] }));
|
|
370944
371747
|
};
|
|
@@ -370963,7 +371766,7 @@ const add_folder_svg_1 = __importDefault(__webpack_require__(3503));
|
|
|
370963
371766
|
const add_file_svg_1 = __importDefault(__webpack_require__(41625));
|
|
370964
371767
|
const ImportButton_1 = __webpack_require__(67532);
|
|
370965
371768
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
370966
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371769
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10556));
|
|
370967
371770
|
const react_1 = __webpack_require__(51649);
|
|
370968
371771
|
const FileTreeContext_1 = __webpack_require__(5323);
|
|
370969
371772
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
@@ -370992,7 +371795,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
370992
371795
|
const Text_1 = __webpack_require__(82803);
|
|
370993
371796
|
const ItemEdit_1 = __webpack_require__(61576);
|
|
370994
371797
|
const ItemIcon_1 = __webpack_require__(3427);
|
|
370995
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371798
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10614));
|
|
370996
371799
|
const Tooltip_1 = __importDefault(__webpack_require__(26982));
|
|
370997
371800
|
const useHover_1 = __webpack_require__(78556);
|
|
370998
371801
|
const button_dots_svg_1 = __importDefault(__webpack_require__(80054));
|
|
@@ -371069,7 +371872,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
371069
371872
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371070
371873
|
exports.DeleteOption = void 0;
|
|
371071
371874
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
371072
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
371875
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(52160));
|
|
371073
371876
|
const DeleteOption = () => {
|
|
371074
371877
|
return (0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.textDelete, children: "Delete" });
|
|
371075
371878
|
};
|
|
@@ -371197,7 +372000,7 @@ exports.ItemEdit = void 0;
|
|
|
371197
372000
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
371198
372001
|
const react_1 = __webpack_require__(51649);
|
|
371199
372002
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
371200
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372003
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10614));
|
|
371201
372004
|
const FileTreeContext_1 = __webpack_require__(5323);
|
|
371202
372005
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
371203
372006
|
const alert_svg_1 = __importDefault(__webpack_require__(11367));
|
|
@@ -371282,7 +372085,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
371282
372085
|
exports.FileTreeItem = void 0;
|
|
371283
372086
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
371284
372087
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
371285
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372088
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10614));
|
|
371286
372089
|
const treeGuides_1 = __webpack_require__(35258);
|
|
371287
372090
|
const react_1 = __webpack_require__(51649);
|
|
371288
372091
|
const FileTreeContext_1 = __webpack_require__(5323);
|
|
@@ -371336,7 +372139,7 @@ const upload_svg_1 = __importDefault(__webpack_require__(13616));
|
|
|
371336
372139
|
const upload_file_svg_1 = __importDefault(__webpack_require__(98201));
|
|
371337
372140
|
const upload_folder_svg_1 = __importDefault(__webpack_require__(66351));
|
|
371338
372141
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
371339
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372142
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10556));
|
|
371340
372143
|
const FileImport_1 = __webpack_require__(23079);
|
|
371341
372144
|
const Dropdown_1 = __importDefault(__webpack_require__(44651));
|
|
371342
372145
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
@@ -371731,7 +372534,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
371731
372534
|
const FileTreeItem_1 = __webpack_require__(8153);
|
|
371732
372535
|
const react_1 = __webpack_require__(51649);
|
|
371733
372536
|
const FileTreeActions_1 = __webpack_require__(42884);
|
|
371734
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372537
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(10556));
|
|
371735
372538
|
const useFileTreeActions_1 = __webpack_require__(98028);
|
|
371736
372539
|
const stores_1 = __webpack_require__(32132);
|
|
371737
372540
|
const FileTreeContext_1 = __webpack_require__(5323);
|
|
@@ -371803,7 +372606,7 @@ const AuthContext_1 = __webpack_require__(55471);
|
|
|
371803
372606
|
// import FontIcon from "../../../assets/icons/font.svg";
|
|
371804
372607
|
// import PlaygroundIcon from "../../../assets/icons/playground.svg";
|
|
371805
372608
|
// import ThemeIcon from "../../../assets/icons/theme.svg";
|
|
371806
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372609
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(21852));
|
|
371807
372610
|
const getSidebarOptions = (initials, homeAction, isCodeVisible) => [
|
|
371808
372611
|
{
|
|
371809
372612
|
name: "home",
|
|
@@ -371868,7 +372671,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
371868
372671
|
};
|
|
371869
372672
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
371870
372673
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
371871
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372674
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(21852));
|
|
371872
372675
|
const SidebarBarOption_1 = __importDefault(__webpack_require__(19371));
|
|
371873
372676
|
const SidebarBar = (props) => {
|
|
371874
372677
|
const { menuOptions, option, toggleOption } = props;
|
|
@@ -371892,9 +372695,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
371892
372695
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
371893
372696
|
const react_1 = __webpack_require__(51649);
|
|
371894
372697
|
const stores_1 = __webpack_require__(32132);
|
|
371895
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
372698
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
371896
372699
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
371897
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372700
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(21852));
|
|
371898
372701
|
const UserMenu_1 = __importDefault(__webpack_require__(2957));
|
|
371899
372702
|
const backgroundColors = [
|
|
371900
372703
|
'D7F9F4', '43D6B9',
|
|
@@ -371983,9 +372786,9 @@ const react_modal_1 = __importDefault(__webpack_require__(20312));
|
|
|
371983
372786
|
const info_svg_1 = __importDefault(__webpack_require__(13579));
|
|
371984
372787
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
371985
372788
|
const Text_1 = __webpack_require__(82803);
|
|
371986
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
371987
|
-
const CloseIcon_1 = __importDefault(__webpack_require__(
|
|
371988
|
-
const base_module_scss_1 = __importDefault(__webpack_require__(
|
|
372789
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372790
|
+
const CloseIcon_1 = __importDefault(__webpack_require__(61193));
|
|
372791
|
+
const base_module_scss_1 = __importDefault(__webpack_require__(62857));
|
|
371989
372792
|
const BaseModal = ({ isOpen, closeModal, header, hasCloseButton = true, body, infoText, buttons, headerIcon, width, modalLabel, }) => {
|
|
371990
372793
|
return ((0, jsx_runtime_1.jsxs)(react_modal_1.default, { isOpen: isOpen, onRequestClose: closeModal, className: base_module_scss_1.default.modalContent, overlayClassName: base_module_scss_1.default.modalOverlay, shouldCloseOnOverlayClick: true, contentLabel: modalLabel, style: width ? { content: { width: `${width}px` } } : undefined, parentSelector: () => document.querySelector("#textjam-editor") || document.body, appElement: document.querySelector("#textjam-root"), children: [(0, jsx_runtime_1.jsxs)("div", { className: base_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsx)("div", { className: base_module_scss_1.default.headerButtonContainer, children: hasCloseButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { className: base_module_scss_1.default.buttonClose, onClickHandler: closeModal, ButtonIcon: CloseIcon_1.default, label: "Close", title: "Close", variant: "icon" })) }), (0, jsx_runtime_1.jsxs)("div", { className: base_module_scss_1.default.headerContent, children: [headerIcon, header] })] }), body && (0, jsx_runtime_1.jsx)("div", { className: base_module_scss_1.default.body, children: body }), infoText && ((0, jsx_runtime_1.jsxs)("div", { className: base_module_scss_1.default.infoBox, children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { size: 18, SvgElement: info_svg_1.default }), (0, jsx_runtime_1.jsx)(Text_1.Text, { size: 12, children: infoText })] })), buttons && (0, jsx_runtime_1.jsx)("div", { className: base_module_scss_1.default.footer, children: buttons })] }));
|
|
371991
372794
|
};
|
|
@@ -372003,13 +372806,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
372003
372806
|
};
|
|
372004
372807
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372005
372808
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372006
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372809
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(29642));
|
|
372007
372810
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
372008
372811
|
const types_1 = __webpack_require__(92932);
|
|
372009
372812
|
const react_redux_1 = __webpack_require__(14062);
|
|
372010
372813
|
const BaseModal_1 = __webpack_require__(30659);
|
|
372011
372814
|
const restore_svg_1 = __importDefault(__webpack_require__(503));
|
|
372012
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
372815
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372013
372816
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372014
372817
|
const stores_1 = __webpack_require__(32132);
|
|
372015
372818
|
const selectors_1 = __webpack_require__(43551);
|
|
@@ -372080,13 +372883,13 @@ const EditorSlice_1 = __webpack_require__(68512);
|
|
|
372080
372883
|
const stores_1 = __webpack_require__(32132);
|
|
372081
372884
|
const types_1 = __webpack_require__(92932);
|
|
372082
372885
|
const BaseModal_1 = __webpack_require__(30659);
|
|
372083
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
372886
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372084
372887
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372085
372888
|
const save_svg_1 = __importDefault(__webpack_require__(48060));
|
|
372086
372889
|
const Text_1 = __webpack_require__(82803);
|
|
372087
372890
|
const LeaveFlowSlice_1 = __webpack_require__(52990);
|
|
372088
372891
|
const SpinnerDotted_1 = __webpack_require__(79458);
|
|
372089
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372892
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(6631));
|
|
372090
372893
|
const useProjectCache_1 = __webpack_require__(69557);
|
|
372091
372894
|
const projectTabSync_1 = __webpack_require__(48235);
|
|
372092
372895
|
const SaveBeforeLeaveModal = () => {
|
|
@@ -372137,19 +372940,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
372137
372940
|
};
|
|
372138
372941
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372139
372942
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372140
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
372943
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(27924));
|
|
372141
372944
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
372142
372945
|
const types_1 = __webpack_require__(92932);
|
|
372143
372946
|
const react_redux_1 = __webpack_require__(14062);
|
|
372144
|
-
const BaseModal_1 = __importDefault(__webpack_require__(
|
|
372947
|
+
const BaseModal_1 = __importDefault(__webpack_require__(97933));
|
|
372145
372948
|
const upload_file_svg_1 = __importDefault(__webpack_require__(98201));
|
|
372146
372949
|
const upload_folder_svg_1 = __importDefault(__webpack_require__(66351));
|
|
372147
372950
|
const info_svg_1 = __importDefault(__webpack_require__(13579));
|
|
372148
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
372951
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372149
372952
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372150
372953
|
const stores_1 = __webpack_require__(32132);
|
|
372151
372954
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
372152
|
-
const styles_module_scss_2 = __importDefault(__webpack_require__(
|
|
372955
|
+
const styles_module_scss_2 = __importDefault(__webpack_require__(38653));
|
|
372153
372956
|
const Text_1 = __webpack_require__(82803);
|
|
372154
372957
|
const constants_1 = __webpack_require__(16287);
|
|
372155
372958
|
const UploadFilesModal = () => {
|
|
@@ -372195,14 +372998,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372195
372998
|
exports.ModalTypeToComponentMap = void 0;
|
|
372196
372999
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372197
373000
|
const types_1 = __webpack_require__(92932);
|
|
372198
|
-
const ShareProjectModal_1 = __importDefault(__webpack_require__(
|
|
373001
|
+
const ShareProjectModal_1 = __importDefault(__webpack_require__(38876));
|
|
372199
373002
|
const ProjectHistoryModal_1 = __importDefault(__webpack_require__(39345));
|
|
372200
|
-
const RemoveItemModal_1 = __importDefault(__webpack_require__(
|
|
372201
|
-
const SaveProjectReminderModal_1 = __importDefault(__webpack_require__(
|
|
372202
|
-
const UploadSizeLimitModal_1 = __importDefault(__webpack_require__(
|
|
373003
|
+
const RemoveItemModal_1 = __importDefault(__webpack_require__(15406));
|
|
373004
|
+
const SaveProjectReminderModal_1 = __importDefault(__webpack_require__(23765));
|
|
373005
|
+
const UploadSizeLimitModal_1 = __importDefault(__webpack_require__(66156));
|
|
372203
373006
|
const UploadFilesModal_1 = __importDefault(__webpack_require__(9825));
|
|
372204
|
-
const RemixProjectModal_1 = __importDefault(__webpack_require__(
|
|
372205
|
-
const DraftUnsavedChangesModal_1 = __importDefault(__webpack_require__(
|
|
373007
|
+
const RemixProjectModal_1 = __importDefault(__webpack_require__(14472));
|
|
373008
|
+
const DraftUnsavedChangesModal_1 = __importDefault(__webpack_require__(56724));
|
|
372206
373009
|
exports.ModalTypeToComponentMap = {
|
|
372207
373010
|
[types_1.ModalType.SHARE_PROJECT]: (0, jsx_runtime_1.jsx)(ShareProjectModal_1.default, {}),
|
|
372208
373011
|
[types_1.ModalType.REMOVE_ITEM]: (0, jsx_runtime_1.jsx)(RemoveItemModal_1.default, {}),
|
|
@@ -372228,13 +373031,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372228
373031
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372229
373032
|
const gwc_logo_svg_1 = __importDefault(__webpack_require__(72865));
|
|
372230
373033
|
const text_jam_logo_svg_1 = __importDefault(__webpack_require__(97552));
|
|
372231
|
-
const ProjectName_1 = __importDefault(__webpack_require__(
|
|
373034
|
+
const ProjectName_1 = __importDefault(__webpack_require__(73658));
|
|
372232
373035
|
const DownloadButton_1 = __importDefault(__webpack_require__(2492));
|
|
372233
|
-
const SaveButton_1 = __importDefault(__webpack_require__(
|
|
373036
|
+
const SaveButton_1 = __importDefault(__webpack_require__(88814));
|
|
372234
373037
|
const ShareButton_1 = __importDefault(__webpack_require__(21422));
|
|
372235
373038
|
const HistoryButton_1 = __importDefault(__webpack_require__(21091));
|
|
372236
|
-
const RunBar_1 = __importDefault(__webpack_require__(
|
|
372237
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373039
|
+
const RunBar_1 = __importDefault(__webpack_require__(57715));
|
|
373040
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(88525));
|
|
372238
373041
|
const stores_1 = __webpack_require__(32132);
|
|
372239
373042
|
const types_1 = __webpack_require__(92932);
|
|
372240
373043
|
const ProjectBar = ({ nameEditable = true, }) => {
|
|
@@ -372260,14 +373063,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372260
373063
|
exports.SharedProjectBar = void 0;
|
|
372261
373064
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372262
373065
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
372263
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
373066
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372264
373067
|
const SharedProjectName_1 = __importDefault(__webpack_require__(15591));
|
|
372265
|
-
const RunBar_1 = __importDefault(__webpack_require__(
|
|
373068
|
+
const RunBar_1 = __importDefault(__webpack_require__(57715));
|
|
372266
373069
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372267
373070
|
const link_svg_1 = __importDefault(__webpack_require__(19351));
|
|
372268
373071
|
const gwc_logo_svg_1 = __importDefault(__webpack_require__(72865));
|
|
372269
373072
|
const text_jam_logo_svg_1 = __importDefault(__webpack_require__(97552));
|
|
372270
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373073
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(88525));
|
|
372271
373074
|
const react_redux_1 = __webpack_require__(14062);
|
|
372272
373075
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
372273
373076
|
const types_1 = __webpack_require__(92932);
|
|
@@ -372326,7 +373129,7 @@ const projectHelpers_1 = __webpack_require__(2610);
|
|
|
372326
373129
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372327
373130
|
const file_svg_1 = __importDefault(__webpack_require__(70429));
|
|
372328
373131
|
const Text_1 = __webpack_require__(82803);
|
|
372329
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373132
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(29881));
|
|
372330
373133
|
const SharedProjectName = () => {
|
|
372331
373134
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
372332
373135
|
const authorName = (0, projectHelpers_1.getAuthorName)(project.author);
|
|
@@ -372348,14 +373151,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372348
373151
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372349
373152
|
const react_1 = __webpack_require__(51649);
|
|
372350
373153
|
const share_svg_1 = __importDefault(__webpack_require__(48268));
|
|
372351
|
-
const Button_1 = __importDefault(__webpack_require__(
|
|
373154
|
+
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
372352
373155
|
const Tooltip_1 = __importDefault(__webpack_require__(26982));
|
|
372353
373156
|
const react_redux_1 = __webpack_require__(14062);
|
|
372354
373157
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
372355
373158
|
const types_1 = __webpack_require__(92932);
|
|
372356
373159
|
const stores_1 = __webpack_require__(32132);
|
|
372357
373160
|
const useHover_1 = __webpack_require__(78556);
|
|
372358
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373161
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(68776));
|
|
372359
373162
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372360
373163
|
const ShareButton = (props) => {
|
|
372361
373164
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
@@ -372390,7 +373193,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
372390
373193
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372391
373194
|
exports.SpinnerDotted = void 0;
|
|
372392
373195
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372393
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373196
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(73386));
|
|
372394
373197
|
const DEFAUL_POINT_COUNT = 8;
|
|
372395
373198
|
const SpinnerDotted = ({ pointCount = DEFAUL_POINT_COUNT }) => {
|
|
372396
373199
|
return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.spinnerDotted, children: [...new Array(pointCount)].map((_, i) => ((0, jsx_runtime_1.jsx)("span", { style: { "--itemIndex": i } }, i))) }));
|
|
@@ -372411,7 +373214,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372411
373214
|
exports.Text = void 0;
|
|
372412
373215
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372413
373216
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
372414
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373217
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(91156));
|
|
372415
373218
|
const Text = (props) => {
|
|
372416
373219
|
const { children, size = 12, weight = "regular", variant = "text", tooltip, className, ...rest } = props;
|
|
372417
373220
|
return ((0, jsx_runtime_1.jsx)("span", { className: (0, classnames_1.default)(styles_module_scss_1.default[variant], styles_module_scss_1.default[`size-${size}`], styles_module_scss_1.default[`weight-${weight}`], className), title: tooltip, ...rest, children: children }));
|
|
@@ -372436,7 +373239,7 @@ const alert_svg_1 = __importDefault(__webpack_require__(11367));
|
|
|
372436
373239
|
const circle_check_svg_1 = __importDefault(__webpack_require__(16882));
|
|
372437
373240
|
const info_svg_1 = __importDefault(__webpack_require__(13579));
|
|
372438
373241
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
372439
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373242
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(27112));
|
|
372440
373243
|
const ToastItem = ({ data, closeToast, toastProps, }) => {
|
|
372441
373244
|
const type = toastProps.type;
|
|
372442
373245
|
const isError = type === "error";
|
|
@@ -372515,7 +373318,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
372515
373318
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372516
373319
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372517
373320
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
372518
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373321
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(28188));
|
|
372519
373322
|
const Tooltip = ({ message, visible = false, position = "bottom", className, style, }) => {
|
|
372520
373323
|
if (!visible)
|
|
372521
373324
|
return null;
|
|
@@ -372537,11 +373340,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372537
373340
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372538
373341
|
const react_1 = __webpack_require__(51649);
|
|
372539
373342
|
const marked_1 = __webpack_require__(6709);
|
|
372540
|
-
const Project_1 = __importDefault(__webpack_require__(
|
|
373343
|
+
const Project_1 = __importDefault(__webpack_require__(26665));
|
|
372541
373344
|
const Output_1 = __importDefault(__webpack_require__(95148));
|
|
372542
|
-
const DefaultMZCriteria_1 = __webpack_require__(
|
|
372543
|
-
const WebComponentCustomEvents_1 = __webpack_require__(
|
|
372544
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373345
|
+
const DefaultMZCriteria_1 = __webpack_require__(29441);
|
|
373346
|
+
const WebComponentCustomEvents_1 = __webpack_require__(53841);
|
|
373347
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(93105));
|
|
372545
373348
|
const stores_1 = __webpack_require__(32132);
|
|
372546
373349
|
const WebComponentProject = ({ nameEditable = false, sidebarOptions = [], packageApiUrl, }) => {
|
|
372547
373350
|
const loading = (0, stores_1.useAppSelector)((state) => state.editor.loading);
|
|
@@ -372646,7 +373449,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
372646
373449
|
exports.SvgIcon = void 0;
|
|
372647
373450
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
372648
373451
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
372649
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(
|
|
373452
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(36974));
|
|
372650
373453
|
const SvgIcon = ({ size, SvgElement, className, ...rest }) => {
|
|
372651
373454
|
return ((0, jsx_runtime_1.jsx)(SvgElement, { className: (0, classnames_1.default)(styles_module_scss_1.default[`svgIcon-${size}`], className), ...rest }));
|
|
372652
373455
|
};
|
|
@@ -372677,12 +373480,12 @@ const useProject_1 = __webpack_require__(54095);
|
|
|
372677
373480
|
const useProjectPersistence_1 = __webpack_require__(72300);
|
|
372678
373481
|
const useProjectRemix_1 = __webpack_require__(35602);
|
|
372679
373482
|
const useProjectTabSync_1 = __webpack_require__(17299);
|
|
372680
|
-
const settings_1 = __webpack_require__(
|
|
372681
|
-
const ErrorModal_1 = __importDefault(__webpack_require__(
|
|
372682
|
-
__webpack_require__(
|
|
372683
|
-
__webpack_require__(
|
|
372684
|
-
__webpack_require__(
|
|
372685
|
-
const WebComponentCustomEvents_1 = __webpack_require__(
|
|
373483
|
+
const settings_1 = __webpack_require__(62161);
|
|
373484
|
+
const ErrorModal_1 = __importDefault(__webpack_require__(15382));
|
|
373485
|
+
__webpack_require__(7703);
|
|
373486
|
+
__webpack_require__(75765);
|
|
373487
|
+
__webpack_require__(41882);
|
|
373488
|
+
const WebComponentCustomEvents_1 = __webpack_require__(53841);
|
|
372686
373489
|
const ToastMessages_1 = __webpack_require__(6459);
|
|
372687
373490
|
const Modals_1 = __webpack_require__(18284);
|
|
372688
373491
|
const Loading_1 = __importDefault(__webpack_require__(34466));
|
|
@@ -375856,57 +376659,6 @@ const downloadProjectFile = async (file, fileName) => {
|
|
|
375856
376659
|
exports.downloadProjectFile = downloadProjectFile;
|
|
375857
376660
|
|
|
375858
376661
|
|
|
375859
|
-
/***/ }),
|
|
375860
|
-
|
|
375861
|
-
/***/ 31615:
|
|
375862
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
375863
|
-
|
|
375864
|
-
|
|
375865
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
375866
|
-
exports.matchingRegexes = exports.allowedInternalLinks = exports.allowedExternalLinks = exports.useExternalLinkState = void 0;
|
|
375867
|
-
const react_1 = __webpack_require__(51649);
|
|
375868
|
-
const react_redux_1 = __webpack_require__(14062);
|
|
375869
|
-
const EditorSlice_1 = __webpack_require__(68512);
|
|
375870
|
-
const Errors_1 = __webpack_require__(20339);
|
|
375871
|
-
const domain = "https://rpf.io/";
|
|
375872
|
-
const host = window?.location?.origin || "http://localhost:3011";
|
|
375873
|
-
const rpfDomain = new RegExp(`^${domain}`);
|
|
375874
|
-
const hostDomain = new RegExp(`^${host}`);
|
|
375875
|
-
const allowedInternalLinks = [new RegExp(`^#[a-zA-Z0-9]+`)];
|
|
375876
|
-
exports.allowedInternalLinks = allowedInternalLinks;
|
|
375877
|
-
const allowedExternalLinks = [rpfDomain, hostDomain];
|
|
375878
|
-
exports.allowedExternalLinks = allowedExternalLinks;
|
|
375879
|
-
const useExternalLinkState = (showModal) => {
|
|
375880
|
-
const dispatch = (0, react_redux_1.useDispatch)();
|
|
375881
|
-
const [externalLink, setExternalLink] = (0, react_1.useState)(null);
|
|
375882
|
-
const handleAllowedExternalLink = (linkTo) => {
|
|
375883
|
-
setExternalLink(linkTo);
|
|
375884
|
-
dispatch((0, EditorSlice_1.triggerCodeRun)());
|
|
375885
|
-
};
|
|
375886
|
-
const handleRegularExternalLink = (linkTo) => {
|
|
375887
|
-
setExternalLink(null);
|
|
375888
|
-
dispatch((0, EditorSlice_1.setPage)(linkTo));
|
|
375889
|
-
dispatch((0, EditorSlice_1.triggerCodeRun)());
|
|
375890
|
-
};
|
|
375891
|
-
const handleExternalLinkError = () => {
|
|
375892
|
-
dispatch((0, EditorSlice_1.setError)({ type: Errors_1.ErrorType.EXTERNAL_LINK }));
|
|
375893
|
-
showModal();
|
|
375894
|
-
};
|
|
375895
|
-
return {
|
|
375896
|
-
externalLink,
|
|
375897
|
-
setExternalLink,
|
|
375898
|
-
handleAllowedExternalLink,
|
|
375899
|
-
handleRegularExternalLink,
|
|
375900
|
-
handleExternalLinkError,
|
|
375901
|
-
};
|
|
375902
|
-
};
|
|
375903
|
-
exports.useExternalLinkState = useExternalLinkState;
|
|
375904
|
-
const matchingRegexes = (regexArray, testString) => {
|
|
375905
|
-
return regexArray.some((reg) => reg.test(testString));
|
|
375906
|
-
};
|
|
375907
|
-
exports.matchingRegexes = matchingRegexes;
|
|
375908
|
-
|
|
375909
|
-
|
|
375910
376662
|
/***/ }),
|
|
375911
376663
|
|
|
375912
376664
|
/***/ 65404:
|
|
@@ -383846,7 +384598,7 @@ module.exports = webpackAsyncContext;
|
|
|
383846
384598
|
/***/ 24427:
|
|
383847
384599
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
383848
384600
|
|
|
383849
|
-
module.exports = __webpack_require__.p + "assets/
|
|
384601
|
+
module.exports = __webpack_require__.p + "assets/PyodideWorkerb1409749c37aedc47dc8.js";
|
|
383850
384602
|
|
|
383851
384603
|
/***/ }),
|
|
383852
384604
|
|