|
var GUI =
|
|
(window["webpackJsonpGUI"] = window["webpackJsonpGUI"] || []).push([["gui"],{
|
|
|
|
/***/ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/index.css":
|
|
/*!*****************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/src??postcss!./src/playground/index.css ***!
|
|
\*****************************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
|
|
// imports
|
|
|
|
|
|
// module
|
|
exports.push([module.i, "html,\nbody,\n.index_app_3Qs6X {\n /* probably unecessary, transitional until layout is refactored */\n width: 100%; \n height: 100%;\n margin: 0;\n\n /* Setting min height/width makes the UI scroll below those sizes */\n min-width: 1024px;\n min-height: 640px; /* Min height to fit sprite/backdrop button */\n}\n\n/* @todo: move globally? Safe / side FX, for blocks particularly? */\n\n* { -webkit-box-sizing: border-box; box-sizing: border-box; }\n", ""]);
|
|
|
|
// exports
|
|
exports.locals = {
|
|
"app": "index_app_3Qs6X"
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/playground/index.css":
|
|
/*!**********************************!*\
|
|
!*** ./src/playground/index.css ***!
|
|
\**********************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var content = __webpack_require__(/*! !../../node_modules/css-loader??ref--5-1!../../node_modules/postcss-loader/src??postcss!./index.css */ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/index.css");
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
var transform;
|
|
var insertInto;
|
|
|
|
|
|
|
|
var options = {"hmr":true}
|
|
|
|
options.transform = transform
|
|
options.insertInto = undefined;
|
|
|
|
var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
if(false) {}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/playground/index.jsx":
|
|
/*!**********************************!*\
|
|
!*** ./src/playground/index.jsx ***!
|
|
\**********************************/
|
|
/*! no exports provided */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! es6-object-assign/auto */ "./node_modules/es6-object-assign/auto.js");
|
|
/* harmony import */ var es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/fn/array/includes */ "./node_modules/core-js/fn/array/includes.js");
|
|
/* harmony import */ var core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/fn/promise/finally */ "./node_modules/core-js/fn/promise/finally.js");
|
|
/* harmony import */ var core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var intl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! intl */ "./node_modules/intl/index.js");
|
|
/* harmony import */ var intl__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(intl__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__);
|
|
/* harmony import */ var _lib_analytics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/analytics */ "./src/lib/analytics.js");
|
|
/* harmony import */ var _lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/app-state-hoc.jsx */ "./src/lib/app-state-hoc.jsx");
|
|
/* harmony import */ var _components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/browser-modal/browser-modal.jsx */ "./src/components/browser-modal/browser-modal.jsx");
|
|
/* harmony import */ var _lib_supported_browser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lib/supported-browser */ "./src/lib/supported-browser.js");
|
|
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./index.css */ "./src/playground/index.css");
|
|
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_10__);
|
|
// Polyfills
|
|
|
|
|
|
|
|
// For Safari 9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Register "base" page view
|
|
|
|
_lib_analytics__WEBPACK_IMPORTED_MODULE_6__["default"].pageview('/');
|
|
var appTarget = document.createElement('div');
|
|
appTarget.className = _index_css__WEBPACK_IMPORTED_MODULE_10___default.a.app;
|
|
document.body.appendChild(appTarget);
|
|
|
|
if (Object(_lib_supported_browser__WEBPACK_IMPORTED_MODULE_9__["default"])()) {
|
|
// require needed here to avoid importing unsupported browser-crashing code
|
|
// at the top level
|
|
__webpack_require__(/*! ./render-gui.jsx */ "./src/playground/render-gui.jsx").default(appTarget);
|
|
} else {
|
|
_components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__["default"].setAppElement(appTarget);
|
|
var WrappedBrowserModalComponent = Object(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_7__["default"])(_components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__["default"], true
|
|
/* localesOnly */
|
|
);
|
|
|
|
var handleBack = function handleBack() {}; // eslint-disable-next-line react/jsx-no-bind
|
|
|
|
|
|
react_dom__WEBPACK_IMPORTED_MODULE_5___default.a.render(react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(WrappedBrowserModalComponent, {
|
|
onBack: handleBack
|
|
}), appTarget);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/playground/render-gui.jsx":
|
|
/*!***************************************!*\
|
|
!*** ./src/playground/render-gui.jsx ***!
|
|
\***************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
|
|
/* harmony import */ var _lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/app-state-hoc.jsx */ "./src/lib/app-state-hoc.jsx");
|
|
/* harmony import */ var _containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../containers/gui.jsx */ "./src/containers/gui.jsx");
|
|
/* harmony import */ var _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../lib/hash-parser-hoc.jsx */ "./src/lib/hash-parser-hoc.jsx");
|
|
/* harmony import */ var _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/titled-hoc.jsx */ "./src/lib/titled-hoc.jsx");
|
|
/* harmony import */ var _lib_log_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/log.js */ "./src/lib/log.js");
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var onClickLogo = function onClickLogo() {
|
|
window.location = 'https://scratch.mit.edu';
|
|
};
|
|
|
|
var handleTelemetryModalCancel = function handleTelemetryModalCancel() {
|
|
Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User canceled telemetry modal');
|
|
};
|
|
|
|
var handleTelemetryModalOptIn = function handleTelemetryModalOptIn() {
|
|
Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User opted into telemetry');
|
|
};
|
|
|
|
var handleTelemetryModalOptOut = function handleTelemetryModalOptOut() {
|
|
Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User opted out of telemetry');
|
|
};
|
|
/*
|
|
* Render the GUI playground. This is a separate function because importing anything
|
|
* that instantiates the VM causes unsupported browsers to crash
|
|
* {object} appTarget - the DOM element to render to
|
|
*/
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (function (appTarget) {
|
|
_containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__["default"].setAppElement(appTarget); // note that redux's 'compose' function is just being used as a general utility to make
|
|
// the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
|
|
// ability to compose reducers.
|
|
|
|
var WrappedGui = Object(redux__WEBPACK_IMPORTED_MODULE_2__["compose"])(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_5__["default"], _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_6__["default"])(_containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__["default"]); // TODO a hack for testing the backpack, allow backpack host to be set by url param
|
|
|
|
var backpackHostMatches = window.location.href.match(/[?&]backpack_host=([^&]*)&?/);
|
|
var backpackHost = backpackHostMatches ? backpackHostMatches[1] : null;
|
|
var scratchDesktopMatches = window.location.href.match(/[?&]isScratchDesktop=([^&]+)/);
|
|
var simulateScratchDesktop;
|
|
|
|
if (scratchDesktopMatches) {
|
|
try {
|
|
// parse 'true' into `true`, 'false' into `false`, etc.
|
|
simulateScratchDesktop = JSON.parse(scratchDesktopMatches[1]);
|
|
} catch (_unused) {
|
|
// it's not JSON so just use the string
|
|
// note that a typo like "falsy" will be treated as true
|
|
simulateScratchDesktop = scratchDesktopMatches[1];
|
|
}
|
|
}
|
|
|
|
if (false) {}
|
|
|
|
react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( // important: this is checking whether `simulateScratchDesktop` is truthy, not just defined!
|
|
simulateScratchDesktop ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedGui, {
|
|
isScratchDesktop: true,
|
|
showTelemetryModal: true,
|
|
canSave: false,
|
|
onTelemetryModalCancel: handleTelemetryModalCancel,
|
|
onTelemetryModalOptIn: handleTelemetryModalOptIn,
|
|
onTelemetryModalOptOut: handleTelemetryModalOptOut
|
|
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedGui, {
|
|
backpackVisible: true,
|
|
showComingSoon: true,
|
|
backpackHost: backpackHost,
|
|
canSave: false,
|
|
onClickLogo: onClickLogo
|
|
}), appTarget);
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 1:
|
|
/*!*******************************************!*\
|
|
!*** ./locale-data/complete.js (ignored) ***!
|
|
\*******************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
/* (ignored) */
|
|
|
|
/***/ })
|
|
|
|
},[["./src/playground/index.jsx","lib.min"]]]);
|
|
//# sourceMappingURL=gui.js.map
|