{"version":3,"file":"chunks/gui.js","sources":["webpack://GUI/./src/playground/index.css","webpack://GUI/./src/playground/index.css?5c54","webpack://GUI/./src/playground/index.jsx","webpack://GUI/./src/playground/render-gui.jsx","webpack://GUI/./locale-data/complete.js (ignored)"],"sourcesContent":["exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"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\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"app\": \"index_app_3Qs6X\"\n};","\nvar content = require(\"!!../../node_modules/css-loader/index.js??ref--5-1!../../node_modules/postcss-loader/src/index.js??postcss!./index.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../node_modules/css-loader/index.js??ref--5-1!../../node_modules/postcss-loader/src/index.js??postcss!./index.css\", function() {\n\t\tvar newContent = require(\"!!../../node_modules/css-loader/index.js??ref--5-1!../../node_modules/postcss-loader/src/index.js??postcss!./index.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Polyfills\nimport 'es6-object-assign/auto';\nimport 'core-js/fn/array/includes';\nimport 'core-js/fn/promise/finally';\nimport 'intl'; // For Safari 9\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport analytics from '../lib/analytics';\nimport AppStateHOC from '../lib/app-state-hoc.jsx';\nimport BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';\nimport supportedBrowser from '../lib/supported-browser';\n\nimport styles from './index.css';\n\n// Register \"base\" page view\nanalytics.pageview('/');\n\nconst appTarget = document.createElement('div');\nappTarget.className = styles.app;\ndocument.body.appendChild(appTarget);\n\nif (supportedBrowser()) {\n // require needed here to avoid importing unsupported browser-crashing code\n // at the top level\n require('./render-gui.jsx').default(appTarget);\n\n} else {\n BrowserModalComponent.setAppElement(appTarget);\n const WrappedBrowserModalComponent = AppStateHOC(BrowserModalComponent, true /* localesOnly */);\n const handleBack = () => {};\n // eslint-disable-next-line react/jsx-no-bind\n ReactDOM.render(, appTarget);\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {compose} from 'redux';\n\nimport AppStateHOC from '../lib/app-state-hoc.jsx';\nimport GUI from '../containers/gui.jsx';\nimport HashParserHOC from '../lib/hash-parser-hoc.jsx';\nimport TitledHOC from '../lib/titled-hoc.jsx';\nimport log from '../lib/log.js';\n\nconst onClickLogo = () => {\n window.location = 'https://scratch.mit.edu';\n};\n\nconst handleTelemetryModalCancel = () => {\n log('User canceled telemetry modal');\n};\n\nconst handleTelemetryModalOptIn = () => {\n log('User opted into telemetry');\n};\n\nconst handleTelemetryModalOptOut = () => {\n log('User opted out of telemetry');\n};\n\n/*\n * Render the GUI playground. This is a separate function because importing anything\n * that instantiates the VM causes unsupported browsers to crash\n * {object} appTarget - the DOM element to render to\n */\nexport default appTarget => {\n GUI.setAppElement(appTarget);\n\n // note that redux's 'compose' function is just being used as a general utility to make\n // the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's\n // ability to compose reducers.\n const WrappedGui = compose(\n AppStateHOC,\n HashParserHOC,\n TitledHOC\n )(GUI);\n\n // TODO a hack for testing the backpack, allow backpack host to be set by url param\n const backpackHostMatches = window.location.href.match(/[?&]backpack_host=([^&]*)&?/);\n const backpackHost = backpackHostMatches ? backpackHostMatches[1] : null;\n\n const scratchDesktopMatches = window.location.href.match(/[?&]isScratchDesktop=([^&]+)/);\n let simulateScratchDesktop;\n if (scratchDesktopMatches) {\n try {\n // parse 'true' into `true`, 'false' into `false`, etc.\n simulateScratchDesktop = JSON.parse(scratchDesktopMatches[1]);\n } catch {\n // it's not JSON so just use the string\n // note that a typo like \"falsy\" will be treated as true\n simulateScratchDesktop = scratchDesktopMatches[1];\n }\n }\n\n if (process.env.NODE_ENV === 'production' && typeof window === 'object') {\n // Warn before navigating away\n window.onbeforeunload = () => true;\n }\n\n ReactDOM.render(\n // important: this is checking whether `simulateScratchDesktop` is truthy, not just defined!\n simulateScratchDesktop ?\n :\n ,\n appTarget);\n};\n","/* (ignored) */"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AClCA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;AAKA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAMA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAGA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AANA;AASA;AACA;AACA;AACA;AACA;AALA;AAQA;;;;;;;;;;;ACpFA;;;;A","sourceRoot":""}